imgix 3.0.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,23 +13,65 @@ class UrlTest < Imgix::Test
13
13
 
14
14
  def test_signing_with_one
15
15
  path = client.path(DEMO_IMAGE_PATH)
16
- path.width = 200
16
+
17
+ assert_output(nil, "Warning: `Path.width=' has been deprecated and " \
18
+ "will be removed in the next major version (along " \
19
+ "with all parameter `ALIASES`).\n") {
20
+ path.width = 200
21
+ }
17
22
 
18
23
  assert_equal 'https://demo.imgix.net/images/demo.png?w=200&s=da421114ca238d1f4a927b889f67c34e', path.to_url
19
24
  end
20
25
 
21
26
  def test_signing_with_multiple_params
22
27
  path = client.path(DEMO_IMAGE_PATH)
23
- path.height = 200
24
- path.width = 200
28
+
29
+ assert_output(nil, "Warning: `Path.height=' has been deprecated and " \
30
+ "will be removed in the next major version (along " \
31
+ "with all parameter `ALIASES`).\n") {
32
+ path.height = 200
33
+ }
34
+
35
+ assert_output(nil, "Warning: `Path.width=' has been deprecated and " \
36
+ "will be removed in the next major version (along " \
37
+ "with all parameter `ALIASES`).\n") {
38
+ path.width = 200
39
+ }
40
+
25
41
  assert_equal 'https://demo.imgix.net/images/demo.png?h=200&w=200&s=d570a1ecd765470f7b34a69b56718a7a', path.to_url
26
42
 
27
43
  path = client.path(DEMO_IMAGE_PATH)
28
- path.width = 200
29
- path.height = 200
44
+
45
+ assert_output(nil, "Warning: `Path.width=' has been deprecated and " \
46
+ "will be removed in the next major version (along " \
47
+ "with all parameter `ALIASES`).\n") {
48
+ path.width = 200
49
+ }
50
+
51
+ assert_output(nil, "Warning: `Path.height=' has been deprecated and " \
52
+ "will be removed in the next major version (along " \
53
+ "with all parameter `ALIASES`).\n") {
54
+ path.height = 200
55
+ }
56
+
30
57
  assert_equal 'https://demo.imgix.net/images/demo.png?w=200&h=200&s=00b5cde5c7b8bca8618cb911da4ac379', path.to_url
31
58
  end
32
59
 
60
+ def test_domain_resolves_host_warn
61
+ assert_output(nil, "Warning: The identifier `host' has been deprecated and " \
62
+ "will\nappear as `domain' in the next major version, e.g. " \
63
+ "`@host'\nbecomes `@domain', `options[:host]' becomes " \
64
+ "`options[:domain]'.\n") {
65
+ Imgix::Client.new(host: 'demo.imgix.net', include_library_param: false)
66
+ }
67
+
68
+
69
+ # Assert the output of this call (to both stdout and stderr) is nil.
70
+ assert_output(nil, nil) {
71
+ Imgix::Client.new(domain: 'demo.imgix.net', include_library_param: false)
72
+ }
73
+ end
74
+
33
75
  private
34
76
 
35
77
  def client
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imgix
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kelly Sutton
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2019-06-07 00:00:00.000000000 Z
16
+ date: 2020-07-21 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: addressable
@@ -55,6 +55,10 @@ executables: []
55
55
  extensions: []
56
56
  extra_rdoc_files: []
57
57
  files:
58
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
59
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
60
+ - ".github/ISSUE_TEMPLATE/question.md"
61
+ - ".github/pull_request_template.md"
58
62
  - ".gitignore"
59
63
  - ".travis.yml"
60
64
  - CHANGELOG.md
@@ -71,13 +75,19 @@ files:
71
75
  - lib/imgix/version.rb
72
76
  - test/test_helper.rb
73
77
  - test/units/domains_test.rb
78
+ - test/units/param_helpers_test.rb
74
79
  - test/units/path_test.rb
75
80
  - test/units/purge_test.rb
81
+ - test/units/srcset_test.rb
76
82
  - test/units/url_test.rb
77
83
  homepage: https://github.com/imgix/imgix-rb
78
84
  licenses:
79
85
  - MIT
80
- metadata: {}
86
+ metadata:
87
+ bug_tracker_uri: https://github.com/imgix/imgix-rb/issues
88
+ changelog_uri: https://github.com/imgix/imgix-rb/blob/main/CHANGELOG.md
89
+ documentation_uri: https://www.rubydoc.info/gems/imgix/3.3.0
90
+ source_code_uri: https://github.com/imgix/imgix-rb/tree/3.3.0
81
91
  post_install_message:
82
92
  rdoc_options: []
83
93
  require_paths:
@@ -93,14 +103,15 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
103
  - !ruby/object:Gem::Version
94
104
  version: '0'
95
105
  requirements: []
96
- rubyforge_project:
97
- rubygems_version: 2.6.13
106
+ rubygems_version: 3.1.2
98
107
  signing_key:
99
108
  specification_version: 4
100
109
  summary: Official Ruby Gem for easily creating and signing imgix URLs.
101
110
  test_files:
102
111
  - test/test_helper.rb
103
112
  - test/units/domains_test.rb
113
+ - test/units/param_helpers_test.rb
104
114
  - test/units/path_test.rb
105
115
  - test/units/purge_test.rb
116
+ - test/units/srcset_test.rb
106
117
  - test/units/url_test.rb