From 22aa7a82f9814d1eb9a28c9acdabb530a86e9b69 Mon Sep 17 00:00:00 2001 From: Estevan Vedovelli Date: Mon, 22 Jun 2020 13:02:54 -0300 Subject: [PATCH 1/9] Fix pt-BR translations Signed-off-by: Estevan Vedovelli --- config/locales/pt-BR.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 2f0631ac..4edb4b5c 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -2,21 +2,21 @@ pt-BR: errors: messages: content_type_invalid: "tem um tipo de arquivo inválido" - file_size_out_of_range: "tamanho %{file_size} está fora da faixa de tamanho válida" - limit_out_of_range: "número total está fora do limite" + file_size_out_of_range: "tem tamanho %{file_size} e está fora da faixa de tamanho válida" + limit_out_of_range: "o número total está fora do limite" image_metadata_missing: "não é uma imagem válida" - dimension_min_inclusion: "deve ser maior ou igual a %{width} x %{height} pixel" - dimension_max_inclusion: "deve ser menor ou igual a %{width} x %{height} pixel" - dimension_width_inclusion: "largura não está entre %{min} e %{max} pixel" - dimension_height_inclusion: "altura não está entre %{min} e %{max} pixel" - dimension_width_greater_than_or_equal_to: "largura deve ser maior ou igual a %{length} pixel" - dimension_height_greater_than_or_equal_to: "altura deve ser maior ou igual a %{length} pixel" - dimension_width_less_than_or_equal_to: "largura deve ser menor ou igual a %{length} pixel" - dimension_height_less_than_or_equal_to: "altura deve ser menor ou igual a %{length} pixel" - dimension_width_equal_to: "largura deve ser igual a %{length} pixel" - dimension_height_equal_to: "altura deve ser igual a %{length} pixel" + dimension_min_inclusion: "deve ser maior ou igual a %{width} x %{height} pixels" + dimension_max_inclusion: "deve ser menor ou igual a %{width} x %{height} pixels" + dimension_width_inclusion: "deve ter largura entre %{min} e %{max} pixels" + dimension_height_inclusion: "deve ter altura entre %{min} e %{max} pixels" + dimension_width_greater_than_or_equal_to: "deve ter largura maior ou igual a %{length} pixels" + dimension_height_greater_than_or_equal_to: "deve ter altura maior ou igual a %{length} pixels" + dimension_width_less_than_or_equal_to: "deve ter largura menor ou igual a %{length} pixels" + dimension_height_less_than_or_equal_to: "deve ter altura menor ou igual a %{length} pixels" + dimension_width_equal_to: "deve ter largura igual a %{length} pixels" + dimension_height_equal_to: "deve ter altura igual a %{length} pixels" aspect_ratio_not_square: "não é uma imagem quadrada" - aspect_ratio_not_portrait: "não contém uma imagem no formato retrato" - aspect_ratio_not_landscape: "não contém uma imagem no formato paisagem" + aspect_ratio_not_portrait: "não está no formato retrato" + aspect_ratio_not_landscape: "não está no formato paisagem" aspect_ratio_is_not: "não contém uma proporção de %{aspect_ratio}" aspect_ratio_unknown: "não tem uma proporção definida" From 71a6396aeeaff536c7a0aa070d088d42a08cb1b0 Mon Sep 17 00:00:00 2001 From: Tomas Valent Date: Fri, 10 Sep 2021 13:45:27 +0200 Subject: [PATCH 2/9] README update - better clarify how to define between size --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e7f6076..57927bb7 100755 --- a/README.md +++ b/README.md @@ -44,13 +44,15 @@ or ```ruby class Project < ApplicationRecord + has_one_attached :logo has_one_attached :preview has_one_attached :attachment has_many_attached :documents validates :title, presence: true - validates :preview, attached: true, size: { less_than: 100.megabytes , message: 'is not given between size' } + validates :logo, attached: true, size: { less_than: 100.megabytes , message: 'is too large' } + validates :preview, attached: true, size: { between: 1.kilobyte..100.megabytes , message: 'is not given between size' } validates :attachment, attached: true, content_type: { in: 'application/pdf', message: 'is not a PDF' } validates :documents, limit: { min: 1, max: 3 } end From 7b37e21d2ffc7704557c04f649c933ab5b9337ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Eug=C3=AAnio?= Date: Tue, 7 Dec 2021 14:14:15 +0000 Subject: [PATCH 3/9] References `Marcel::TYPES` only for Rails < 6.1 --- .../matchers/content_type_validator_matcher.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/active_storage_validations/matchers/content_type_validator_matcher.rb b/lib/active_storage_validations/matchers/content_type_validator_matcher.rb index 95a6fd42..4867ea24 100644 --- a/lib/active_storage_validations/matchers/content_type_validator_matcher.rb +++ b/lib/active_storage_validations/matchers/content_type_validator_matcher.rb @@ -35,7 +35,7 @@ def matches?(subject) def failure_message <<~MESSAGE Expected #{@attribute_name} - + Accept content types: #{allowed_types.join(", ")} #{accepted_types_and_failures} @@ -57,7 +57,7 @@ def allowed_types end def rejected_types - @rejected_types || (Marcel::TYPES.keys - allowed_types) + @rejected_types || (content_type_keys - allowed_types) end def allowed_types_allowed? @@ -96,6 +96,16 @@ def attachment_for(type) suffix = type.to_s.split('/').last { io: Tempfile.new('.'), filename: "test.#{suffix}", content_type: type } end + + private + + def content_type_keys + if Rails.gem_version < Gem::Version.new('6.1.0') + Mime::LOOKUP.keys + else + Marcel::TYPES.keys + end + end end end end From f096a18f04bbee64014423450c191cd49b51ad04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Eug=C3=AAnio?= Date: Tue, 7 Dec 2021 15:30:47 +0000 Subject: [PATCH 4/9] Add `Marcel` as development dependency --- active_storage_validations.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/active_storage_validations.gemspec b/active_storage_validations.gemspec index b6a89957..2e2afb8e 100644 --- a/active_storage_validations.gemspec +++ b/active_storage_validations.gemspec @@ -24,4 +24,5 @@ Gem::Specification.new do |s| s.add_development_dependency 'pry' s.add_development_dependency 'rubocop' s.add_development_dependency 'sqlite3' + s.add_development_dependency 'marcel' end From a51d06343a07cf23acb487e5c7562bb605ba9c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 16 Feb 2022 22:42:27 -0600 Subject: [PATCH 5/9] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3b392b3d..a3d29eeb 100755 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ For example you have a model like this and you want to add validation. class User < ApplicationRecord has_one_attached :avatar has_many_attached :photos + has_one_attached :image + validates :name, presence: true From 675ccfa398293cde11845932ba8c57825c54d2cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20V=C3=A1squez?= Date: Wed, 16 Feb 2022 22:43:56 -0600 Subject: [PATCH 6/9] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index a3d29eeb..603ea18e 100755 --- a/README.md +++ b/README.md @@ -28,7 +28,6 @@ class User < ApplicationRecord has_many_attached :photos has_one_attached :image - validates :name, presence: true validates :avatar, attached: true, content_type: 'image/png', From 22c33b2471e070980ae1a907073a71d9bdd66d96 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Tue, 22 Feb 2022 19:18:59 +0100 Subject: [PATCH 7/9] Remove references to image/jpg content type This content type raises a deprecation warning on Rails 7.0 DEPRECATION WARNING: image/jpg is not a valid content type, it should not be used when creating a blob, and support for it will be removed in Rails 7.1. If you want to keep supporting this content type past Rails 7.1, add it to `config.active_storage.variable_content_types`. https://www.w3.org/Graphics/JPEG/ --- README.md | 4 ++-- test/dummy/app/models/only_image.rb | 2 +- test/matchers/content_type_validator_matcher_test.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3b392b3d..d39dc9f2 100755 --- a/README.md +++ b/README.md @@ -31,11 +31,11 @@ class User < ApplicationRecord validates :avatar, attached: true, content_type: 'image/png', dimension: { width: 200, height: 200 } - validates :photos, attached: true, content_type: ['image/png', 'image/jpg', 'image/jpeg'], + validates :photos, attached: true, content_type: ['image/png', 'image/jpeg'], dimension: { width: { min: 800, max: 2400 }, height: { min: 600, max: 1800 }, message: 'is not given between dimension' } validates :image, attached: true, - content_type: ['image/png', 'image/jpg'], + content_type: ['image/png', 'image/jpeg'], aspect_ratio: :landscape end ``` diff --git a/test/dummy/app/models/only_image.rb b/test/dummy/app/models/only_image.rb index a15d2717..094eed34 100644 --- a/test/dummy/app/models/only_image.rb +++ b/test/dummy/app/models/only_image.rb @@ -2,5 +2,5 @@ class OnlyImage < ApplicationRecord has_one_attached :image validates :image, dimension: { width: { min: 100, max: 2000 }, height: { min: 100, max: 1500 } }, aspect_ratio: :is_16_9, - content_type: ['image/png', 'image/jpg'] + content_type: ['image/png', 'image/jpeg'] end diff --git a/test/matchers/content_type_validator_matcher_test.rb b/test/matchers/content_type_validator_matcher_test.rb index 4ce61b8c..aa47b312 100644 --- a/test/matchers/content_type_validator_matcher_test.rb +++ b/test/matchers/content_type_validator_matcher_test.rb @@ -13,7 +13,7 @@ class ActiveStorageValidations::Matchers::ContentTypeValidatorMatcher::Test < Ac test 'negative match when providing class' do matcher = ActiveStorageValidations::Matchers::ContentTypeValidatorMatcher.new(:avatar) - matcher.allowing('image/jpg') + matcher.allowing('image/jpeg') refute matcher.matches?(User) end @@ -32,7 +32,7 @@ class ActiveStorageValidations::Matchers::ContentTypeValidatorMatcher::Test < Ac test 'negative match when providing instance' do matcher = ActiveStorageValidations::Matchers::ContentTypeValidatorMatcher.new(:avatar) - matcher.allowing('image/jpg') + matcher.allowing('image/jpeg') refute matcher.matches?(User.new) end From 0c635faaa389e48a6eaa3306df52d9404a8d4066 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Tue, 22 Feb 2022 19:23:14 +0100 Subject: [PATCH 8/9] Test against Rails 7.0 and Ruby 3.1 Also: - Fix tests against Ruby 3.0. `3.0` as a number will be parsed as `3` and install the latest Ruby 3 version available at the moment, which is `3.1` - Fix tests against Rails next by updating dependencies --- .github/workflows/minitest.yml | 22 +++- gemfiles/rails_7_0.gemfile | 5 + gemfiles/rails_7_0.gemfile.lock | 133 ++++++++++++++++++++ gemfiles/rails_next.gemfile.lock | 208 +++++++++++++++++-------------- 4 files changed, 269 insertions(+), 99 deletions(-) create mode 100644 gemfiles/rails_7_0.gemfile create mode 100644 gemfiles/rails_7_0.gemfile.lock diff --git a/.github/workflows/minitest.yml b/.github/workflows/minitest.yml index ebff887b..89b45133 100644 --- a/.github/workflows/minitest.yml +++ b/.github/workflows/minitest.yml @@ -9,19 +9,33 @@ jobs: - 2.5 - 2.6 - 2.7 - - 3.0 + - '3.0' + - 3.1 gemfile: - rails_5_2 - rails_6_0 - rails_6_1 + - rails_7_0 - rails_next exclude: + # ruby 3.1 only supports rails 7.0+ + - ruby: 3.1 + gemfile: rails_5_2 + - ruby: 3.1 + gemfile: rails_6_0 + - ruby: 3.1 + gemfile: rails_6_1 # ruby 3 only supports rails 6.1+ - - ruby: 3.0 + - ruby: '3.0' gemfile: rails_5_2 - - ruby: 3.0 + - ruby: '3.0' gemfile: rails_6_0 - # rails 7 only supports ruby 2.7+ + # rails 7.0 only supports ruby 2.7+ + - ruby: 2.5 + gemfile: rails_7_0 + - ruby: 2.6 + gemfile: rails_7_0 + # rails next only supports ruby 2.7+ - ruby: 2.5 gemfile: rails_next - ruby: 2.6 diff --git a/gemfiles/rails_7_0.gemfile b/gemfiles/rails_7_0.gemfile new file mode 100644 index 00000000..fce684a7 --- /dev/null +++ b/gemfiles/rails_7_0.gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +%w[activejob activemodel activestorage activesupport].each { |rails_subcomponent| gem rails_subcomponent, '~> 7.0.0' } + +gemspec :path => '../' diff --git a/gemfiles/rails_7_0.gemfile.lock b/gemfiles/rails_7_0.gemfile.lock new file mode 100644 index 00000000..eff6c945 --- /dev/null +++ b/gemfiles/rails_7_0.gemfile.lock @@ -0,0 +1,133 @@ +PATH + remote: .. + specs: + active_storage_validations (0.9.6) + activejob (>= 5.2.0) + activemodel (>= 5.2.0) + activestorage (>= 5.2.0) + activesupport (>= 5.2.0) + +GEM + remote: https://rubygems.org/ + specs: + actionpack (7.0.2.2) + actionview (= 7.0.2.2) + activesupport (= 7.0.2.2) + rack (~> 2.0, >= 2.2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actionview (7.0.2.2) + activesupport (= 7.0.2.2) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (7.0.2.2) + activesupport (= 7.0.2.2) + globalid (>= 0.3.6) + activemodel (7.0.2.2) + activesupport (= 7.0.2.2) + activerecord (7.0.2.2) + activemodel (= 7.0.2.2) + activesupport (= 7.0.2.2) + activestorage (7.0.2.2) + actionpack (= 7.0.2.2) + activejob (= 7.0.2.2) + activerecord (= 7.0.2.2) + activesupport (= 7.0.2.2) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (7.0.2.2) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + ast (2.4.2) + builder (3.2.4) + coderay (1.1.3) + combustion (1.3.5) + activesupport (>= 3.0.0) + railties (>= 3.0.0) + thor (>= 0.14.6) + concurrent-ruby (1.1.9) + crass (1.0.6) + erubi (1.10.0) + globalid (1.0.0) + activesupport (>= 5.0) + i18n (1.10.0) + concurrent-ruby (~> 1.0) + loofah (2.14.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) + marcel (1.0.2) + method_source (1.0.0) + mini_magick (4.11.0) + mini_mime (1.1.2) + mini_portile2 (2.8.0) + minitest (5.15.0) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) + parallel (1.21.0) + parser (3.1.1.0) + ast (~> 2.4.1) + pry (0.14.1) + coderay (~> 1.1) + method_source (~> 1.0) + racc (1.6.0) + rack (2.2.3) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.4.2) + loofah (~> 2.3) + railties (7.0.2.2) + actionpack (= 7.0.2.2) + activesupport (= 7.0.2.2) + method_source + rake (>= 12.2) + thor (~> 1.0) + zeitwerk (~> 2.5) + rainbow (3.1.1) + rake (13.0.6) + regexp_parser (2.2.1) + rexml (3.2.5) + rubocop (1.25.1) + parallel (~> 1.10) + parser (>= 3.1.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml + rubocop-ast (>= 1.15.1, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.16.0) + parser (>= 3.1.1.0) + ruby-progressbar (1.11.0) + sqlite3 (1.4.2) + thor (1.2.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) + unicode-display_width (2.1.0) + zeitwerk (2.5.4) + +PLATFORMS + ruby + +DEPENDENCIES + active_storage_validations! + activejob (~> 7.0.0) + activemodel (~> 7.0.0) + activestorage (~> 7.0.0) + activesupport (~> 7.0.0) + combustion (~> 1.3) + mini_magick (>= 4.9.5) + pry + rubocop + sqlite3 + +BUNDLED WITH + 2.3.6 diff --git a/gemfiles/rails_next.gemfile.lock b/gemfiles/rails_next.gemfile.lock index cec2a374..dcd9ab61 100755 --- a/gemfiles/rails_next.gemfile.lock +++ b/gemfiles/rails_next.gemfile.lock @@ -1,87 +1,93 @@ GIT remote: https://github.com/rails/rails - revision: 6ae78e964ddd525f623e422391fb0d76f782dbc8 + revision: ce1517ea5290c1190d94c3168cfc4dc5fcdb36ed specs: - actioncable (7.0.0.alpha) - actionpack (= 7.0.0.alpha) - activesupport (= 7.0.0.alpha) + actioncable (7.1.0.alpha) + actionpack (= 7.1.0.alpha) + activesupport (= 7.1.0.alpha) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.0.alpha) - actionpack (= 7.0.0.alpha) - activejob (= 7.0.0.alpha) - activerecord (= 7.0.0.alpha) - activestorage (= 7.0.0.alpha) - activesupport (= 7.0.0.alpha) + actionmailbox (7.1.0.alpha) + actionpack (= 7.1.0.alpha) + activejob (= 7.1.0.alpha) + activerecord (= 7.1.0.alpha) + activestorage (= 7.1.0.alpha) + activesupport (= 7.1.0.alpha) mail (>= 2.7.1) - actionmailer (7.0.0.alpha) - actionpack (= 7.0.0.alpha) - actionview (= 7.0.0.alpha) - activejob (= 7.0.0.alpha) - activesupport (= 7.0.0.alpha) + net-imap + net-pop + net-smtp + actionmailer (7.1.0.alpha) + actionpack (= 7.1.0.alpha) + actionview (= 7.1.0.alpha) + activejob (= 7.1.0.alpha) + activesupport (= 7.1.0.alpha) mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.0.alpha) - actionview (= 7.0.0.alpha) - activesupport (= 7.0.0.alpha) + actionpack (7.1.0.alpha) + actionview (= 7.1.0.alpha) + activesupport (= 7.1.0.alpha) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.0.alpha) - actionpack (= 7.0.0.alpha) - activerecord (= 7.0.0.alpha) - activestorage (= 7.0.0.alpha) - activesupport (= 7.0.0.alpha) + actiontext (7.1.0.alpha) + actionpack (= 7.1.0.alpha) + activerecord (= 7.1.0.alpha) + activestorage (= 7.1.0.alpha) + activesupport (= 7.1.0.alpha) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.0.alpha) - activesupport (= 7.0.0.alpha) + actionview (7.1.0.alpha) + activesupport (= 7.1.0.alpha) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.0.alpha) - activesupport (= 7.0.0.alpha) + activejob (7.1.0.alpha) + activesupport (= 7.1.0.alpha) globalid (>= 0.3.6) - activemodel (7.0.0.alpha) - activesupport (= 7.0.0.alpha) - activerecord (7.0.0.alpha) - activemodel (= 7.0.0.alpha) - activesupport (= 7.0.0.alpha) - activestorage (7.0.0.alpha) - actionpack (= 7.0.0.alpha) - activejob (= 7.0.0.alpha) - activerecord (= 7.0.0.alpha) - activesupport (= 7.0.0.alpha) - marcel (~> 1.0.0) + activemodel (7.1.0.alpha) + activesupport (= 7.1.0.alpha) + activerecord (7.1.0.alpha) + activemodel (= 7.1.0.alpha) + activesupport (= 7.1.0.alpha) + activestorage (7.1.0.alpha) + actionpack (= 7.1.0.alpha) + activejob (= 7.1.0.alpha) + activerecord (= 7.1.0.alpha) + activesupport (= 7.1.0.alpha) + marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.0.alpha) + activesupport (7.1.0.alpha) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) - rails (7.0.0.alpha) - actioncable (= 7.0.0.alpha) - actionmailbox (= 7.0.0.alpha) - actionmailer (= 7.0.0.alpha) - actionpack (= 7.0.0.alpha) - actiontext (= 7.0.0.alpha) - actionview (= 7.0.0.alpha) - activejob (= 7.0.0.alpha) - activemodel (= 7.0.0.alpha) - activerecord (= 7.0.0.alpha) - activestorage (= 7.0.0.alpha) - activesupport (= 7.0.0.alpha) + rails (7.1.0.alpha) + actioncable (= 7.1.0.alpha) + actionmailbox (= 7.1.0.alpha) + actionmailer (= 7.1.0.alpha) + actionpack (= 7.1.0.alpha) + actiontext (= 7.1.0.alpha) + actionview (= 7.1.0.alpha) + activejob (= 7.1.0.alpha) + activemodel (= 7.1.0.alpha) + activerecord (= 7.1.0.alpha) + activestorage (= 7.1.0.alpha) + activesupport (= 7.1.0.alpha) bundler (>= 1.15.0) - railties (= 7.0.0.alpha) - sprockets-rails (>= 2.0.0) - railties (7.0.0.alpha) - actionpack (= 7.0.0.alpha) - activesupport (= 7.0.0.alpha) + railties (= 7.1.0.alpha) + railties (7.1.0.alpha) + actionpack (= 7.1.0.alpha) + activesupport (= 7.1.0.alpha) method_source - rake (>= 0.13) + rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) PATH remote: .. @@ -98,83 +104,95 @@ GEM ast (2.4.2) builder (3.2.4) coderay (1.1.3) - combustion (1.3.1) + combustion (1.3.5) activesupport (>= 3.0.0) railties (>= 3.0.0) thor (>= 0.14.6) concurrent-ruby (1.1.9) crass (1.0.6) + digest (3.1.0) erubi (1.10.0) - globalid (0.4.2) - activesupport (>= 4.2.0) - i18n (1.8.10) + globalid (1.0.0) + activesupport (>= 5.0) + i18n (1.10.0) concurrent-ruby (~> 1.0) - loofah (2.10.0) + io-wait (0.2.1) + loofah (2.14.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (1.0.1) + marcel (1.0.2) method_source (1.0.0) mini_magick (4.11.0) - mini_mime (1.1.0) - mini_portile2 (2.5.3) - minitest (5.14.4) - nio4r (2.5.7) - nokogiri (1.11.7) - mini_portile2 (~> 2.5.0) + mini_mime (1.1.2) + mini_portile2 (2.8.0) + minitest (5.15.0) + net-imap (0.2.3) + digest + net-protocol + strscan + net-pop (0.1.1) + digest + net-protocol + timeout + net-protocol (0.1.2) + io-wait + timeout + net-smtp (0.3.1) + digest + net-protocol + timeout + nio4r (2.5.8) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.11.7-x86_64-darwin) + nokogiri (1.13.3-x86_64-darwin) racc (~> 1.4) - nokogiri (1.11.7-x86_64-linux) + nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) - parallel (1.20.1) - parser (3.0.1.1) + parallel (1.21.0) + parser (3.1.1.0) ast (~> 2.4.1) pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) - racc (1.5.2) + racc (1.6.0) rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.2) loofah (~> 2.3) - rainbow (3.0.0) - rake (13.0.3) - regexp_parser (2.1.1) + rainbow (3.1.1) + rake (13.0.6) + regexp_parser (2.2.1) rexml (3.2.5) - rubocop (1.17.0) + rubocop (1.25.1) parallel (~> 1.10) - parser (>= 3.0.0.0) + parser (>= 3.1.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml - rubocop-ast (>= 1.7.0, < 2.0) + rubocop-ast (>= 1.15.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.7.0) - parser (>= 3.0.1.1) + rubocop-ast (1.16.0) + parser (>= 3.1.1.0) ruby-progressbar (1.11.0) - sprockets (4.0.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) sqlite3 (1.4.2) - thor (1.1.0) + strscan (3.0.1) + thor (1.2.1) + timeout (0.2.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) - unicode-display_width (2.0.0) + unicode-display_width (2.1.0) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - zeitwerk (2.4.2) + zeitwerk (2.5.4) PLATFORMS ruby @@ -191,4 +209,4 @@ DEPENDENCIES sqlite3 BUNDLED WITH - 2.2.16 + 2.3.6 From 9a2714bbb3c4bae3aada7d8783a181b543714714 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 5 Mar 2022 14:10:16 +0200 Subject: [PATCH 9/9] preparing for a release --- CHANGES.md | 9 +++++++++ Gemfile.lock | 1 + README.md | 5 +++++ gemfiles/rails_5_2.gemfile.lock | 3 ++- gemfiles/rails_6_0.gemfile.lock | 3 ++- gemfiles/rails_6_1.gemfile.lock | 3 ++- gemfiles/rails_next.gemfile.lock | 3 ++- lib/active_storage_validations/version.rb | 2 +- 8 files changed, 24 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c76b3ef1..9516868b 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,14 @@ - master +- 0.9.7 (unreleased) + - tests for Rails 7 and Ruby 3.1 https://github.com/igorkasyanchuk/active_storage_validations/pull/143 + - Fix pt-BR translations https://github.com/igorkasyanchuk/active_storage_validations/pull/132 + - Remove references to image/jpg content type https://github.com/igorkasyanchuk/active_storage_validations/pull/144 + - missing relationship in dummy app https://github.com/igorkasyanchuk/active_storage_validations/pull/142 + - References Marcel::TYPES only for Rails < 6.1 https://github.com/igorkasyanchuk/active_storage_validations/pull/138 + - better clarify how to define between size https://github.com/igorkasyanchuk/active_storage_validations/pull/133 + - + - 0.9.6 - Add min_size and max_size to :file_size_out_of_range error message https://github.com/igorkasyanchuk/active_storage_validations/pull/134 - Reference Marcel::EXTENSIONS https://github.com/igorkasyanchuk/active_storage_validations/pull/137 diff --git a/Gemfile.lock b/Gemfile.lock index 0af5da86..c6b5ac91 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -129,6 +129,7 @@ PLATFORMS DEPENDENCIES active_storage_validations! combustion (~> 1.3) + marcel mini_magick (>= 4.9.5) pry rubocop diff --git a/README.md b/README.md index 354bab02..b9cbb34a 100755 --- a/README.md +++ b/README.md @@ -365,6 +365,11 @@ You are welcome to contribute. - https://github.com/vietqhoang - https://github.com/kemenaran - https://github.com/jrmhaig +- https://github.com/tagliala +- https://github.com/evedovelli +- https://github.com/JuanVqz +- https://github.com/luiseugenio +- https://github.com/equivalent ## License diff --git a/gemfiles/rails_5_2.gemfile.lock b/gemfiles/rails_5_2.gemfile.lock index 10e02e71..6cd17234 100644 --- a/gemfiles/rails_5_2.gemfile.lock +++ b/gemfiles/rails_5_2.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - active_storage_validations (0.9.6) + active_storage_validations (0.9.7) activejob (>= 5.2.0) activemodel (>= 5.2.0) activestorage (>= 5.2.0) @@ -131,6 +131,7 @@ DEPENDENCIES activestorage (~> 5.2) activesupport (~> 5.2) combustion (~> 1.3) + marcel mini_magick (>= 4.9.5) pry rubocop diff --git a/gemfiles/rails_6_0.gemfile.lock b/gemfiles/rails_6_0.gemfile.lock index 3765a137..23df731a 100644 --- a/gemfiles/rails_6_0.gemfile.lock +++ b/gemfiles/rails_6_0.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - active_storage_validations (0.9.6) + active_storage_validations (0.9.7) activejob (>= 5.2.0) activemodel (>= 5.2.0) activestorage (>= 5.2.0) @@ -132,6 +132,7 @@ DEPENDENCIES activestorage (~> 6.0.0) activesupport (~> 6.0.0) combustion (~> 1.3) + marcel mini_magick (>= 4.9.5) pry rubocop diff --git a/gemfiles/rails_6_1.gemfile.lock b/gemfiles/rails_6_1.gemfile.lock index 4079cce5..c766753d 100644 --- a/gemfiles/rails_6_1.gemfile.lock +++ b/gemfiles/rails_6_1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - active_storage_validations (0.9.6) + active_storage_validations (0.9.7) activejob (>= 5.2.0) activemodel (>= 5.2.0) activestorage (>= 5.2.0) @@ -133,6 +133,7 @@ DEPENDENCIES activestorage (~> 6.1.0) activesupport (~> 6.1.0) combustion (~> 1.3) + marcel mini_magick (>= 4.9.5) pry rubocop diff --git a/gemfiles/rails_next.gemfile.lock b/gemfiles/rails_next.gemfile.lock index dcd9ab61..ef6e1896 100755 --- a/gemfiles/rails_next.gemfile.lock +++ b/gemfiles/rails_next.gemfile.lock @@ -92,7 +92,7 @@ GIT PATH remote: .. specs: - active_storage_validations (0.9.6) + active_storage_validations (0.9.7) activejob (>= 5.2.0) activemodel (>= 5.2.0) activestorage (>= 5.2.0) @@ -202,6 +202,7 @@ PLATFORMS DEPENDENCIES active_storage_validations! combustion (~> 1.3) + marcel mini_magick (>= 4.9.5) pry rails! diff --git a/lib/active_storage_validations/version.rb b/lib/active_storage_validations/version.rb index eab8c107..12c3a1a9 100755 --- a/lib/active_storage_validations/version.rb +++ b/lib/active_storage_validations/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module ActiveStorageValidations - VERSION = '0.9.6' + VERSION = '0.9.7' end