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 +4 -4
- data/Gemfile.lock +2 -1
- data/README.md +5 -3
- data/lib/decorator_dryer/active_storage_shortcuts.rb +7 -1
- data/lib/decorator_dryer/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fc5615f9000e21335ada498331dd1fe229958e961492c4cd2221190fafa7ffa6
|
|
4
|
+
data.tar.gz: 288f3aace43467fad8b93afc54334101fbe669ab98992fdb00c86a7f978d05da
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55e39f52c71bf22f394ba9c2c8581c99b8cd741c1329340999e58f0d175d584e14881d306b2def6981d144f8ac1cb650d3e5c1a5ba9b4ca4c092a685adc711e8
|
|
7
|
+
data.tar.gz: 1498d7d0e999640d81bee64c36920ee1727d4f297e8a5cfa31c25e02edc02c7a383d21bceba9d63d4657ed391a5e3bdca3f8d7b2b9df64ffdceda21afa442d80
|
data/Gemfile.lock
CHANGED
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/
|
|
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/
|
|
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
|
-
|
|
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
|
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.
|
|
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:
|
|
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.
|
|
108
|
+
rubygems_version: 3.4.19
|
|
109
109
|
signing_key:
|
|
110
110
|
specification_version: 4
|
|
111
111
|
summary: Shortcuts for concise view models.
|