Skip to content

Commit ba77cd0

Browse files
committed
Rename attachment option to return_attachment
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
1 parent 3302576 commit ba77cd0

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ builder.url_for("http://images.example.com/images/image2.jpg")
235235
- [auto_rotate](https://docs.imgproxy.net/#/generating_the_url_advanced?id=auto-rotate)
236236
- [filename](https://docs.imgproxy.net/#/generating_the_url_advanced?id=filename)
237237
- [format](https://docs.imgproxy.net/#/generating_the_url_advanced?id=format)
238-
- [attachment](https://docs.imgproxy.net/#/generating_the_url_advanced?id=attachment)
238+
- [return_attachment](https://docs.imgproxy.net/#/generating_the_url_advanced?id=return-attachment)
239239

240240
_See [imgproxy URL format guide](https://docs.imgproxy.net/#/generating_the_url_advanced?id=processing-options) for more info._
241241

lib/imgproxy/options.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class Options < Hash
6464
auto_rotate: Imgproxy::OptionsCasters::Bool,
6565
filename: Imgproxy::OptionsCasters::String,
6666
format: Imgproxy::OptionsCasters::String,
67-
attachment: Imgproxy::OptionsCasters::Bool,
67+
return_attachment: Imgproxy::OptionsCasters::Bool,
6868
}.freeze
6969

7070
META = %i[size resize adjust].freeze

lib/imgproxy/options_aliases.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ module Imgproxy
3939
strip_color_profile: :scp,
4040
auto_rotate: :ar,
4141
filename: :fn,
42-
attachment: :att,
42+
return_attachment: :att,
4343
}.freeze
4444
end

spec/imgproxy_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
auto_rotate: true,
121121
filename: "the_image.jpg",
122122
format: :webp,
123-
attachment: true,
123+
return_attachment: true,
124124
}
125125
end
126126

@@ -209,7 +209,7 @@
209209
"strip_color_profile:0/"\
210210
"auto_rotate:1/"\
211211
"filename:the_image.jpg/"\
212-
"attachment:1"
212+
"return_attachment:1"
213213
end
214214

215215
subject(:url) { described_class.url_for(src_url, options) }

0 commit comments

Comments
 (0)