imgix 3.1.1 → 3.4.0

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.
@@ -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.1.1
4
+ version: 3.4.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-09-05 00:00:00.000000000 Z
16
+ date: 2020-08-12 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: addressable
@@ -55,6 +55,11 @@ executables: []
55
55
  extensions: []
56
56
  extra_rdoc_files: []
57
57
  files:
58
+ - ".github/CODEOWNERS"
59
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
60
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
61
+ - ".github/ISSUE_TEMPLATE/question.md"
62
+ - ".github/pull_request_template.md"
58
63
  - ".gitignore"
59
64
  - ".travis.yml"
60
65
  - CHANGELOG.md
@@ -71,6 +76,7 @@ files:
71
76
  - lib/imgix/version.rb
72
77
  - test/test_helper.rb
73
78
  - test/units/domains_test.rb
79
+ - test/units/param_helpers_test.rb
74
80
  - test/units/path_test.rb
75
81
  - test/units/purge_test.rb
76
82
  - test/units/srcset_test.rb
@@ -78,7 +84,11 @@ files:
78
84
  homepage: https://github.com/imgix/imgix-rb
79
85
  licenses:
80
86
  - MIT
81
- metadata: {}
87
+ metadata:
88
+ bug_tracker_uri: https://github.com/imgix/imgix-rb/issues
89
+ changelog_uri: https://github.com/imgix/imgix-rb/blob/main/CHANGELOG.md
90
+ documentation_uri: https://www.rubydoc.info/gems/imgix/3.4.0
91
+ source_code_uri: https://github.com/imgix/imgix-rb/tree/3.4.0
82
92
  post_install_message:
83
93
  rdoc_options: []
84
94
  require_paths:
@@ -94,14 +104,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
104
  - !ruby/object:Gem::Version
95
105
  version: '0'
96
106
  requirements: []
97
- rubyforge_project:
98
- rubygems_version: 2.6.13
107
+ rubygems_version: 3.1.2
99
108
  signing_key:
100
109
  specification_version: 4
101
110
  summary: Official Ruby Gem for easily creating and signing imgix URLs.
102
111
  test_files:
103
112
  - test/test_helper.rb
104
113
  - test/units/domains_test.rb
114
+ - test/units/param_helpers_test.rb
105
115
  - test/units/path_test.rb
106
116
  - test/units/purge_test.rb
107
117
  - test/units/srcset_test.rb