igorkasyanchuk / active_storage_validations

Do it like => validates :photos, attached: true, content_type: ['image/png', 'image/jpg', 'image/jpeg'], size: { less_than: 500.kilobytes }, limit: { min: 1, max: 3 }, aspect_ratio: :landscape, dimension: { width: { in: 800..1600 }
https://www.railsjazz.com/
MIT License
1.02k stars 130 forks source link

1.1.2 release is breaking #216

Closed aditya-cherukuri closed 11 months ago

aditya-cherukuri commented 11 months ago

I believe the Validatable concern active_storage_validations/matchers/concerns/validatable.rb hasn't been namespaced correctly and hence is causing a errors when trying to run specs. Here is the stack trace,

/vendor/bundle/ruby/3.1.0/gems/active_storage_validations-1.1.2/lib/active_storage_validations/matchers/concerns/validatable.rb:2:in `<module:Validatable>': uninitialized constant Validatable::ActiveSupport (NameError)

  extend ActiveSupport::Concern
         ^^^^^^^^^^^^^
    from vendor/bundle/ruby/3.1.0/gems/active_storage_validations-1.1.2/lib/active_storage_validations/matchers/concerns/validatable.rb:1:in `<top (required)>'
    from vendor/bundle/ruby/3.1.0/gems/active_storage_validations-1.1.2/lib/active_storage_validations/matchers/attached_validator_matcher.rb:3:in `require_relative'
    from vendor/bundle/ruby/3.1.0/gems/active_storage_validations-1.1.2/lib/active_storage_validations/matchers/attached_validator_matcher.rb:3:in `<top (required)>'
    from vendor/bundle/ruby/3.1.0/gems/active_storage_validations-1.1.2/lib/active_storage_validations/matchers.rb:3:in `require'
    from vendor/bundle/ruby/3.1.0/gems/active_storage_validations-1.1.2/lib/active_storage_validations/matchers.rb:3:in `<top (required)>'
Mth0158 commented 11 months ago

Hi @aditya-cherukuri, This bug has been fixed in your #217 PR and has been released today in https://github.com/igorkasyanchuk/active_storage_validations/commit/270212653bc775600caa79b908ffb6d83759ae40. Thanks again for your work!