imageboss-rb 1.0.2 → 1.0.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/Gemfile.lock +1 -1
- data/lib/imageboss/path.rb +3 -4
- data/lib/imageboss/version.rb +1 -1
- data/spec/imageboss/client_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0790841cb7a280c5a75ebf642eac12cf15bb69d4
|
4
|
+
data.tar.gz: 8cfadd44959a226ea1ebb3e9d71511863c40c20c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4480371854e36b55747cb392068cdb9209d5fc3ce2e837c6179132ee25dc01b5d6d2e76855792b118ccacb3b20a1fbffd8358a53661b6be671641c5871694696
|
7
|
+
data.tar.gz: 8f113dac07c66db31a4ef1c3a9a5d261e6ba1b72f1e73bb6c2ae28122e342b2d45e9aca591107a30d6dded93a1e447a52ccda112421cbab399dce527758ad236
|
data/Gemfile.lock
CHANGED
data/lib/imageboss/path.rb
CHANGED
@@ -50,11 +50,10 @@ module ImageBoss
|
|
50
50
|
.sub('::mode', @options[:mode] ? ":#{@options[:mode]}" : '').to_s
|
51
51
|
end
|
52
52
|
|
53
|
-
def parse_options(options
|
54
|
-
valid_options = [ :grayscale, :blur ]
|
53
|
+
def parse_options(options)
|
55
54
|
opts = []
|
56
|
-
|
57
|
-
opts << [
|
55
|
+
(options || {}).each_key do |k|
|
56
|
+
opts << [k.to_s, options[k] ].join(':')
|
58
57
|
end
|
59
58
|
opts.join(',')
|
60
59
|
end
|
data/lib/imageboss/version.rb
CHANGED
@@ -34,6 +34,11 @@ describe ImageBoss::Client do
|
|
34
34
|
it { expect(image_url).to eq "#{service}/cover/100x100/grayscale:true,blur:2.0/https://myassets.com/assets/img01.jpg" }
|
35
35
|
end
|
36
36
|
|
37
|
+
context 'with options #2' do
|
38
|
+
let(:operation_args) { [:cover, width: 100, height: 100, options: { animation: true } ] }
|
39
|
+
it { expect(image_url).to eq "#{service}/cover/100x100/animation:true/https://myassets.com/assets/img01.jpg" }
|
40
|
+
end
|
41
|
+
|
37
42
|
context 'mode' do
|
38
43
|
let(:operation_args) { [:cover, mode: :entropy, width: 100, height: 100 ] }
|
39
44
|
it { expect(image_url).to eq "#{service}/cover:entropy/100x100/https://myassets.com/assets/img01.jpg" }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imageboss-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Escobar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|