imgix 3.2.1 → 3.3.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.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE/bug_report.md +28 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +27 -0
- data/.github/ISSUE_TEMPLATE/question.md +17 -0
- data/.github/pull_request_template.md +73 -0
- data/.travis.yml +14 -2
- data/CHANGELOG.md +9 -0
- data/README.md +49 -17
- data/imgix.gemspec +1 -1
- data/lib/imgix.rb +9 -7
- data/lib/imgix/client.rb +45 -15
- data/lib/imgix/param_helpers.rb +1 -0
- data/lib/imgix/path.rb +72 -58
- data/lib/imgix/version.rb +1 -1
- data/test/units/param_helpers_test.rb +23 -0
- data/test/units/path_test.rb +54 -4
- data/test/units/srcset_test.rb +749 -710
- data/test/units/url_test.rb +47 -5
- metadata +12 -7
data/test/units/url_test.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
24
|
-
|
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
|
-
|
29
|
-
|
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.
|
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:
|
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,6 +75,7 @@ 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
|
76
81
|
- test/units/srcset_test.rb
|
@@ -80,9 +85,9 @@ licenses:
|
|
80
85
|
- MIT
|
81
86
|
metadata:
|
82
87
|
bug_tracker_uri: https://github.com/imgix/imgix-rb/issues
|
83
|
-
changelog_uri: https://github.com/imgix/imgix-rb/blob/
|
84
|
-
documentation_uri: https://www.rubydoc.info/gems/imgix/3.
|
85
|
-
source_code_uri: https://github.com/imgix/imgix-rb/tree/3.
|
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
|
86
91
|
post_install_message:
|
87
92
|
rdoc_options: []
|
88
93
|
require_paths:
|
@@ -98,14 +103,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
103
|
- !ruby/object:Gem::Version
|
99
104
|
version: '0'
|
100
105
|
requirements: []
|
101
|
-
|
102
|
-
rubygems_version: 2.6.13
|
106
|
+
rubygems_version: 3.1.2
|
103
107
|
signing_key:
|
104
108
|
specification_version: 4
|
105
109
|
summary: Official Ruby Gem for easily creating and signing imgix URLs.
|
106
110
|
test_files:
|
107
111
|
- test/test_helper.rb
|
108
112
|
- test/units/domains_test.rb
|
113
|
+
- test/units/param_helpers_test.rb
|
109
114
|
- test/units/path_test.rb
|
110
115
|
- test/units/purge_test.rb
|
111
116
|
- test/units/srcset_test.rb
|