decorator_dryer 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57534e692dcdc6bfc6a30bf1ba81d3392acd5aa9970c61c4a301ac680f8cbb35
4
- data.tar.gz: 26e905c85521618775dc1276e9e9435f7839d003cc99137719b40d4f673b7c2d
3
+ metadata.gz: fc5615f9000e21335ada498331dd1fe229958e961492c4cd2221190fafa7ffa6
4
+ data.tar.gz: 288f3aace43467fad8b93afc54334101fbe669ab98992fdb00c86a7f978d05da
5
5
  SHA512:
6
- metadata.gz: 8e0f3540a44117a74423b51b30d871303d61bfc8f48bfd874c915fe8c2b40ecbaae19180adf5c824dd4013ec6c365487f1fefbcdcacd5fca7a3548e1ae408285
7
- data.tar.gz: 445f24bce804cf151f0967f18bd6edeabb37769390dcf2720655d51f9eb10ee8c369781ad10d2a93b6363ba804ddf956dae66cf922b62f92e821057853d2446f
6
+ metadata.gz: 55e39f52c71bf22f394ba9c2c8581c99b8cd741c1329340999e58f0d175d584e14881d306b2def6981d144f8ac1cb650d3e5c1a5ba9b4ca4c092a685adc711e8
7
+ data.tar.gz: 1498d7d0e999640d81bee64c36920ee1727d4f297e8a5cfa31c25e02edc02c7a383d21bceba9d63d4657ed391a5e3bdca3f8d7b2b9df64ffdceda21afa442d80
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- decorator_dryer (0.1.0)
4
+ decorator_dryer (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -49,6 +49,7 @@ GEM
49
49
  unicode-display_width (2.5.0)
50
50
 
51
51
  PLATFORMS
52
+ aarch64-linux
52
53
  x86_64-darwin-20
53
54
 
54
55
  DEPENDENCIES
data/README.md CHANGED
@@ -228,16 +228,18 @@ end
228
228
  * Enable formats to be overridden when calling shortcuts.
229
229
  * Add support for additional attachment libraries.
230
230
  * Add a more flexible replacement for the `to_name` shortcut.
231
+ * Add test helpers.
232
+ * Add a generator for the initialiser.
231
233
 
232
234
  ## Development
233
235
 
234
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `spec` to run the tests.
236
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
235
237
 
236
238
  To release a new version of this gem, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
237
239
 
238
240
  ## Contributing
239
241
 
240
- Bug reports and pull requests are welcome on GitHub at https://github.com/CodeTectonics/decorator_dryer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/CodeTectonics/decorator_dryer/blob/master/CODE_OF_CONDUCT.md).
242
+ Bug reports and pull requests are welcome on GitHub at https://github.com/CodeTectonics/decorator_dryer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/CodeTectonics/decorator_dryer/blob/main/CODE_OF_CONDUCT.md).
241
243
 
242
244
  ## License
243
245
 
@@ -245,4 +247,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
245
247
 
246
248
  ## Code of Conduct
247
249
 
248
- Everyone interacting in the DecoratorDryer project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/CodeTectonics/decorator_dryer/blob/master/CODE_OF_CONDUCT.md).
250
+ Everyone interacting in the DecoratorDryer project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/CodeTectonics/decorator_dryer/blob/main/CODE_OF_CONDUCT.md).
@@ -22,7 +22,13 @@ module DecoratorDryer
22
22
  define_method(method_name) do
23
23
  attachment = object.send(attr)
24
24
 
25
- url_for(attachment) if attachment.attached?
25
+ if attachment.attached?
26
+ if attachment.content_type == "image/heic"
27
+ url_for(attachment.variant(format: :jpg).processed)
28
+ else
29
+ url_for(attachment)
30
+ end
31
+ end
26
32
  end
27
33
  end
28
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DecoratorDryer
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decorator_dryer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Harbison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-01 00:00:00.000000000 Z
11
+ date: 2025-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []
108
- rubygems_version: 3.4.21
108
+ rubygems_version: 3.4.19
109
109
  signing_key:
110
110
  specification_version: 4
111
111
  summary: Shortcuts for concise view models.