shrinerb / shrine-imgix Goto Github PK
View Code? Open in Web Editor NEWImgix integration for Shrine
Home Page: https://www.imgix.com/
License: MIT License
Imgix integration for Shrine
Home Page: https://www.imgix.com/
License: MIT License
Hi, thanks for this gem.
I'm hoping this would just require an update to the gemspec, but 4.0.0 of the Imgix gem has been out for a bit now.
I've got an Object with an attacher using shrine-imgix that uses S3 as the storage backend. When I call .dup on the Object it throws #<NoMethodError: undefined method `>' for nil:NilClass> in the Amazon S3 Library at aws-sdk-s3-1.8.0/lib/aws-sdk-s3/plugins/expect_100_continue.rb.
I get the feeling that shrine-imgix should be defining its own version of the copy method but I can't quite seem to figure out what should be in there. Stack trace is below.
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-s3-1.5.0/lib/aws-sdk-s3/plugins/expect_100_continue.rb" line 18 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-s3-1.5.0/lib/aws-sdk-s3/plugins/bucket_dns.rb" line 33 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/rest/handler.rb" line 8 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/plugins/user_agent.rb" line 13 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/seahorse/client/plugins/endpoint.rb" line 45 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/plugins/param_validator.rb" line 24 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/seahorse/client/plugins/raise_response_errors.rb" line 14 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-s3-1.5.0/lib/aws-sdk-s3/plugins/sse_cpk.rb" line 22 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-s3-1.5.0/lib/aws-sdk-s3/plugins/dualstack.rb" line 26 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-s3-1.5.0/lib/aws-sdk-s3/plugins/accelerate.rb" line 35 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/plugins/jsonvalue_converter.rb" line 20 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/plugins/idempotency_token.rb" line 17 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/plugins/param_converter.rb" line 24 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/aws-sdk-core/plugins/response_paging.rb" line 10 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/seahorse/client/plugins/response_target.rb" line 23 in call
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-core-3.6.0/lib/seahorse/client/request.rb" line 70 in send_request
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-s3-1.5.0/lib/aws-sdk-s3/client.rb" line 5335 in put_object
File "/app/vendor/bundle/ruby/2.4.0/gems/aws-sdk-s3-1.5.0/lib/aws-sdk-s3/object.rb" line 876 in put
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/storage/s3.rb" line 397 in put
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/storage/s3.rb" line 245 in upload
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-imgix-0.4.0/lib/shrine/storage/imgix.rb" line 52 in upload
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine.rb" line 330 in copy
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine.rb" line 319 in put
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/upload_options.rb" line 32 in put
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine.rb" line 303 in _store
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine.rb" line 233 in store
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/hooks.rb" line 95 in block in store
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/hooks.rb" line 101 in around_store
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/hooks.rb" line 95 in store
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/logging.rb" line 86 in block in store
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/logging.rb" line 101 in block in log
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/logging.rb" line 161 in benchmark
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/logging.rb" line 101 in log
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/logging.rb" line 86 in store
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/rack_file.rb" line 62 in store
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine.rb" line 211 in upload
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/hooks.rb" line 56 in block in upload
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/hooks.rb" line 62 in around_upload
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/hooks.rb" line 56 in upload
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/rack_file.rb" line 56 in upload
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine.rb" line 635 in store!
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/copy.rb" line 40 in copy
File "/app/vendor/bundle/ruby/2.4.0/gems/shrine-2.8.0/lib/shrine/plugins/copy.rb" line 27 in initialize_copy
File "/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/core.rb" line 411 in initialize_dup
File "/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/core.rb" line 411 in initialize_dup
File "/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/inheritance.rb" line 230 in initialize_dup
File "/app/vendor/bundle/ruby/2.4.0/gems/activemodel-5.1.4/lib/active_model/validations.rb" line 283 in initialize_dup
File "/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/attribute_methods/dirty.rb" line 58 in initialize_dup
File "/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/timestamp.rb" line 51 in initialize_dup
File "/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/associations.rb" line 278 in initialize_dup
File "/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.4/lib/active_record/aggregations.rb" line 8 in initialize_dup
File "/app/app/jobs/copy_job.rb", line 23 in dup
Due to the kwargs changes, we are getting this:
ArgumentError: wrong number of arguments (given 1, expected 0)
from /home/rtxde/.local/share/rtx/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/shrine-imgix-0.5.2/lib/shrine/plugins/imgix.rb:22:in `imgix_url'
When passing in:
Image.first.file.imigx_url({w: 200})
Following the imgix deprecation announcement for the legacy API, imgix is scheduled to deprecate legacy endpoints by March 31rst, 2021.
This deprecation affects the following endpoints:
One of these endpoints was detected in this repository. To ensure that API calls to imgix do not fail, it's crucial to migrate to the new imgix API by following this guide:
https://docs.imgix.com/setup/legacy-api-migration-guide
Note that this concerns only the endpoints aforementioned endpoints. The rendering API will not be affected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.