imgix 0.3.2 → 0.3.3
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 +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +12 -0
- data/Rakefile +8 -0
- data/Readme.markdown +1 -1
- data/lib/imgix/path.rb +1 -0
- data/lib/imgix/version.rb +1 -1
- data/test/units/domains_test.rb +12 -2
- data/test/units/path_test.rb +12 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 588ae10e0524aac623bad42329e59ab645891c9d
|
4
|
+
data.tar.gz: 836a1ed328300c1d74ae6919d720acfef0aa373f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20e0097bd2e1671598a26c3b70c85aac692ce4edef1615a33e888154d8011b394aac06d39e750abe4ffc58f9c818543dc10213a01e0334a623d0abf9ccead82a
|
7
|
+
data.tar.gz: 3aab4814449a24f6b2aeca5ac07158dbccd286114563e11a1a52b4f139e477fd2ab14382c509485412da99641125cbe7510427e5954f34dd3ad3f22280bbdd73
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
This project adheres to [Semantic Versioning](http://semver.org/).
|
5
|
+
|
6
|
+
## [0.3.3] - May 14, 2015
|
7
|
+
### Fixed
|
8
|
+
- Fixed a bug where URLs as the path component for Web Proxy sources would not be encoded would generate URLs that would result in a 400 Bad Request. [#8](https://github.com/imgix/imgix-rb/pull/8)
|
9
|
+
|
10
|
+
## [0.3.2] - May 11, 2015
|
11
|
+
### Fixed
|
12
|
+
- Fixed a bug where the library would not work if tokens were not present.
|
data/Rakefile
CHANGED
data/Readme.markdown
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Unofficial Ruby Gem for signing [imgix](http://imgix.com) URLs. Tested under 1.9.2, 2.2.1, JRuby 1.7.19, and Rubinius 2.2.7.
|
4
4
|
|
5
|
-
[](https://travis-ci.org/imgix/imgix-rb)
|
6
6
|
|
7
7
|
|
8
8
|
## Installation
|
data/lib/imgix/path.rb
CHANGED
data/lib/imgix/version.rb
CHANGED
data/test/units/domains_test.rb
CHANGED
@@ -37,7 +37,6 @@ class DomainsTest < Imgix::Test
|
|
37
37
|
|
38
38
|
path = client.path('/bridge.png')
|
39
39
|
assert_equal 'http://demos-1.imgix.net/bridge.png?&s=13e68f249172e5f790344e85e7cdb14b', path.to_url
|
40
|
-
|
41
40
|
end
|
42
41
|
|
43
42
|
def test_strips_out_protocol
|
@@ -47,7 +46,18 @@ class DomainsTest < Imgix::Test
|
|
47
46
|
|
48
47
|
path = client.path('/bridge.png')
|
49
48
|
assert_equal 'http://demos-1.imgix.net/bridge.png?&s=13e68f249172e5f790344e85e7cdb14b', path.to_url
|
50
|
-
|
51
49
|
end
|
52
50
|
|
51
|
+
def test_with_full_paths
|
52
|
+
client = Imgix::Client.new(:hosts => [
|
53
|
+
"demos-1.imgix.net",
|
54
|
+
"demos-2.imgix.net",
|
55
|
+
"demos-3.imgix.net",
|
56
|
+
],
|
57
|
+
:token => '10adc394',
|
58
|
+
:shard_strategy => :cycle)
|
59
|
+
|
60
|
+
path = 'https://google.com/cats.gif'
|
61
|
+
assert_equal "http://demos-1.imgix.net/#{CGI.escape(path)}?&s=4c3ff935011f0d2251800e6a2bb68ee5", client.path(path).to_url
|
62
|
+
end
|
53
63
|
end
|
data/test/units/path_test.rb
CHANGED
@@ -60,7 +60,18 @@ class PathTest < Imgix::Test
|
|
60
60
|
assert_equal url, path.to_url
|
61
61
|
end
|
62
62
|
|
63
|
-
|
63
|
+
def test_full_url
|
64
|
+
path = 'https://google.com/cats.gif'
|
65
|
+
|
66
|
+
assert_equal "http://demo.imgix.net/#{CGI.escape(path)}?&s=4c3ff935011f0d2251800e6a2bb68ee5", client.path(path).to_url
|
67
|
+
end
|
68
|
+
|
69
|
+
def test_full_url_with_a_space
|
70
|
+
path = 'https://my-demo-site.com/files/133467012/avatar icon.png'
|
71
|
+
assert_equal "http://demo.imgix.net/#{CGI.escape(path)}?&s=8943817bed50811f6ceedd8f4b84169d", client.path(path).to_url
|
72
|
+
end
|
73
|
+
|
74
|
+
private
|
64
75
|
|
65
76
|
def client
|
66
77
|
@client ||= Imgix::Client.new(:host => 'demo.imgix.net', :token => '10adc394')
|
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: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Soffes
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-05-
|
13
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
@@ -37,6 +37,7 @@ extra_rdoc_files: []
|
|
37
37
|
files:
|
38
38
|
- ".gitignore"
|
39
39
|
- ".travis.yml"
|
40
|
+
- CHANGELOG.md
|
40
41
|
- Contributing.markdown
|
41
42
|
- Gemfile
|
42
43
|
- LICENSE
|