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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ae6b675cc6f4deb733513dd5cfcb04c30c90a392
4
- data.tar.gz: 0a132f8c1e3448f154a7cd0734f15f86c766c25b
3
+ metadata.gz: 0790841cb7a280c5a75ebf642eac12cf15bb69d4
4
+ data.tar.gz: 8cfadd44959a226ea1ebb3e9d71511863c40c20c
5
5
  SHA512:
6
- metadata.gz: 937824c0290c007135b89bed99fc16c32ed7bf1930b48ba17830bbbdf446cffa04ddffac2101e6626a0823899f267c8aac26d5fc537f557af6c44159e26d310a
7
- data.tar.gz: 67feaf74d29b56b27bc01bfe1cf85172706101f43bb0f6bfebfb16ccd6b4e812da19c643424baa35855873467fb4b2eb1e47307b77a8a0af8ef752af89ec4a49
6
+ metadata.gz: 4480371854e36b55747cb392068cdb9209d5fc3ce2e837c6179132ee25dc01b5d6d2e76855792b118ccacb3b20a1fbffd8358a53661b6be671641c5871694696
7
+ data.tar.gz: 8f113dac07c66db31a4ef1c3a9a5d261e6ba1b72f1e73bb6c2ae28122e342b2d45e9aca591107a30d6dded93a1e447a52ccda112421cbab399dce527758ad236
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- imageboss-rb (1.0.2)
4
+ imageboss-rb (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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
- valid_options.each do |vo|
57
- opts << [vo.to_s, options[vo] ].join(':') if options && options.has_key?(vo)
55
+ (options || {}).each_key do |k|
56
+ opts << [k.to_s, options[k] ].join(':')
58
57
  end
59
58
  opts.join(',')
60
59
  end
@@ -1,3 +1,3 @@
1
1
  module ImageBoss
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
@@ -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.2
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-15 00:00:00.000000000 Z
11
+ date: 2018-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec