imagizer_engine 0.0.5 → 0.0.7
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/README.md +2 -2
- data/lib/imagizer_engine.rb +1 -1
- data/lib/imagizer_engine/url.rb +1 -1
- data/lib/imagizer_engine/version.rb +2 -2
- data/spec/imagizer_engine_spec.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4631e83bc2b0414b55df622f1d9e0003a13cdc6
|
4
|
+
data.tar.gz: b41f67ac03114f2431e4d8591e934a2df7cae7cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ea9c248875dcad7a292824a1f63763c50d8774721c3d77f4e2ce66ccd4a1c4935e9ccf7518eba2fb6b796d02828ac39dd69e6766f0644fe27a0ddeee1894749
|
7
|
+
data.tar.gz: 031ca499eb6631d855a68b0c57b13fc6ee67623255532d0b5ea56577f87df6a1efba52b44203ad66c8ba0e82816f7c17dd12142a8df0e553b4307fadee684f55
|
data/README.md
CHANGED
@@ -76,8 +76,8 @@ To use the Imagizer Engine use the `profile_image_url()` method. This also takes
|
|
76
76
|
|
77
77
|
```
|
78
78
|
user = User.new
|
79
|
-
user.profile_image_url() => "http://143.123.12.9/
|
80
|
-
user.profile_image_url(:cover) => "http://143.123.12.9/
|
79
|
+
user.profile_image_url() => "http://143.123.12.9/path/to/file"
|
80
|
+
user.profile_image_url(:cover) => "http://143.123.12.9/path/to/file?scale=2&crop1,2,3,4"
|
81
81
|
|
82
82
|
```
|
83
83
|
|
data/lib/imagizer_engine.rb
CHANGED
@@ -27,7 +27,7 @@ module ImagizerEngine
|
|
27
27
|
|
28
28
|
class Version
|
29
29
|
|
30
|
-
@@valid_config_keys = [:scale, :crop, :width, :height, :quality, :dpr, :filter, :
|
30
|
+
@@valid_config_keys = [:scale, :crop, :width, :height, :quality, :dpr, :filter, :flatten]
|
31
31
|
|
32
32
|
def initialize(name, options)
|
33
33
|
@name = name.to_sym
|
data/lib/imagizer_engine/url.rb
CHANGED
@@ -2,7 +2,7 @@ module ImagizerEngine
|
|
2
2
|
class Url
|
3
3
|
def to_url(url, version)
|
4
4
|
protocol = ImagizerEngine.use_ssl ? 'https://' : 'http://'
|
5
|
-
protocol + ImagizerEngine.host + "/
|
5
|
+
protocol + ImagizerEngine.host + "/" + sanitized_url(url) + process_params(version)
|
6
6
|
end
|
7
7
|
|
8
8
|
private
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module ImagizerEngine
|
2
|
-
VERSION = "0.0.
|
3
|
-
end
|
2
|
+
VERSION = "0.0.7"
|
3
|
+
end
|
@@ -39,16 +39,16 @@ describe ImagizerEngine do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
it "should send the correct url without a version" do
|
42
|
-
expect(@instance.image_url).to eq("http://141.123.12.9/
|
42
|
+
expect(@instance.image_url).to eq("http://141.123.12.9/path/to/file.png")
|
43
43
|
end
|
44
44
|
|
45
45
|
it "should send the correct url with a version" do
|
46
|
-
expect(@instance.image_url(:cover)).to eq("http://141.123.12.9/
|
46
|
+
expect(@instance.image_url(:cover)).to eq("http://141.123.12.9/path/to/file.png?width=250&height=100&scale=2&crop=1,2,3,4")
|
47
47
|
end
|
48
48
|
|
49
49
|
it "should send the correct url with https if use_ssl is set to true" do
|
50
50
|
ImagizerEngine.use_ssl = true
|
51
|
-
expect(@instance.image_url).to eq("https://141.123.12.9/
|
51
|
+
expect(@instance.image_url).to eq("https://141.123.12.9/path/to/file.png")
|
52
52
|
end
|
53
53
|
|
54
54
|
it "should raise error if `cover_original_url is not defined" do
|
@@ -72,7 +72,7 @@ describe ImagizerEngine do
|
|
72
72
|
end
|
73
73
|
|
74
74
|
it "should ignore keys that are not used in the Imagizer API" do
|
75
|
-
expect(@instance.image_url(:invalid)).to eq("http://141.123.12.9/
|
75
|
+
expect(@instance.image_url(:invalid)).to eq("http://141.123.12.9/path/to/file.png")
|
76
76
|
end
|
77
77
|
|
78
78
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imagizer_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sfkaos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.
|
142
|
+
rubygems_version: 2.4.5
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Ruby client for using the Imagizer Media Engine from nvnentify.
|