ruby-thumbor 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fb9d400670315240363d6886302ee62da8b3b4b
4
- data.tar.gz: 97818a3c1400417a4d2a0e3520069f547abf9e69
3
+ metadata.gz: 619894cedb07f907548f9fd762a236775c7cf224
4
+ data.tar.gz: 6e94d8844c1da9d631933334607a948eb4b52958
5
5
  SHA512:
6
- metadata.gz: 20143d675dd3a3e9721e745f4992e3d5446547b29aa6ef6852a1702623b41010b4f6ca7dc0991d847182532f414438514753f77ba9f47348f4c1d386529f28fb
7
- data.tar.gz: 49096c792b320fa1deb4ab4a5647367af39218ec80f1702245403b6f2d9a51410452c840948d251fcbb5325bddb6dd8c48eabd4b4643287040ecfb0ebb152624
6
+ metadata.gz: 74125821b2fd078fef7635c302a3842fbbf2041a2599321acda4cde19ca268c5d74e8b4069de5aaf24e6ab2c87afb5439d64556284944f37b08066502d25d66f
7
+ data.tar.gz: ee17011292ba6e85a4c784d854260c348ca10661aee4d5c600f41c82a5c91fe17c5410e0cefe7ca5710ff952722179861419c37a9fd78fa6b35be12fb0d83cec
@@ -1,4 +1,6 @@
1
- = ruby-thumbor {<img src="https://secure.travis-ci.org/thumbor/ruby-thumbor.png?branch=master" alt="Build Status" />}[http://travis-ci.org/thumbor/ruby-thumbor] {<img src="https://gemnasium.com/thumbor/ruby-thumbor.png" alt="Dependency Status" />}[https://gemnasium.com/thumbor/ruby-thumbor] {<img src="https://badge.fury.io/rb/ruby-thumbor.svg" alt="Gem Version" />}[http://badge.fury.io/rb/ruby-thumbor]
1
+ = ruby-thumbor {<img src="https://secure.travis-ci.org/thumbor/ruby-thumbor.png?branch=master" alt="Build Status" />}[http://travis-ci.org/thumbor/ruby-thumbor] {<img src="https://gemnasium.com/thumbor/ruby-thumbor.png" alt="Dependency Status" />}[https://gemnasium.com/thumbor/ruby-thumbor] {<img src="https://badge.fury.io/rb/ruby-thumbor.svg" alt="Gem Version" />}[http://badge.fury.io/rb/ruby-thumbor] {<img src="https://coveralls.io/repos/thumbor/ruby-thumbor/badge.svg?branch=master&service=github" alt="Coverage Status" />}[https://coveralls.io/github/thumbor/ruby-thumbor?branch=master]
2
+
3
+
2
4
 
3
5
  * http://github.com/thumbor/ruby-thumbor
4
6
 
@@ -46,11 +46,7 @@ module Thumbor
46
46
  width = '0' if not has_width and not options[:flip]
47
47
  end
48
48
 
49
- if width or height
50
- width = width.to_s
51
- height = height.to_s
52
- url_parts.push(width << 'x' << height)
53
- end
49
+ url_parts.push("#{width}x#{height}") if width || height
54
50
  end
55
51
 
56
52
  def calculate_centered_crop(options)
@@ -1,3 +1,3 @@
1
1
  module Thumbor
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
@@ -1,4 +1,6 @@
1
1
  require 'simplecov'
2
+ require 'coveralls'
3
+ Coveralls.wear!
2
4
 
3
5
  SimpleCov.start do
4
6
  add_filter '/spec/'
@@ -227,6 +227,17 @@ describe Thumbor::CryptoURL do
227
227
  url = subject.url_for :image => image_url, :original_width => 100, :original_height => 100, :width => -50, :height => -40, :center => [50, 50]
228
228
  expect(url).to eq('0x10:100x90/-50x-40/' << image_md5)
229
229
  end
230
+
231
+ it "should handle string values" do
232
+ url = subject.url_for :image => image_url, :width => '40', :height => '50'
233
+ expect(url).to eq('40x50/' << image_md5)
234
+ end
235
+
236
+ it "should never mutate its arguments" do
237
+ opts = {:image => image_url, :width => '500'}
238
+ subject.url_for opts
239
+ expect(opts).to eq({:image => image_url, :width => '500'})
240
+ end
230
241
  end
231
242
 
232
243
  describe '#generate' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-thumbor
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernardo Heynemann
@@ -9,92 +9,120 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-28 00:00:00.000000000 Z
12
+ date: 2016-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: simplecov
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: guard-rspec
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rb-fsevent
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: 0.9.1
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: 0.9.1
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: listen
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
76
  version: 1.3.1
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: 1.3.1
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rake
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
+ - !ruby/object:Gem::Dependency
99
+ name: coveralls
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ - !ruby/object:Gem::Dependency
113
+ name: tins
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - "<"
117
+ - !ruby/object:Gem::Version
118
+ version: 1.7.0
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - "<"
124
+ - !ruby/object:Gem::Version
125
+ version: 1.7.0
98
126
  description: ruby-thumbor is the client to the thumbor imaging service (http://github.com/globocom/thumbor).
99
127
  email:
100
128
  - heynemann@gmail.com
@@ -117,23 +145,23 @@ licenses: []
117
145
  metadata: {}
118
146
  post_install_message:
119
147
  rdoc_options:
120
- - --main
148
+ - "--main"
121
149
  - README.rdoc
122
150
  require_paths:
123
151
  - lib
124
152
  required_ruby_version: !ruby/object:Gem::Requirement
125
153
  requirements:
126
- - - '>='
154
+ - - ">="
127
155
  - !ruby/object:Gem::Version
128
156
  version: '0'
129
157
  required_rubygems_version: !ruby/object:Gem::Requirement
130
158
  requirements:
131
- - - '>='
159
+ - - ">="
132
160
  - !ruby/object:Gem::Version
133
161
  version: '0'
134
162
  requirements: []
135
163
  rubyforge_project:
136
- rubygems_version: 2.4.7
164
+ rubygems_version: 2.4.3
137
165
  signing_key:
138
166
  specification_version: 4
139
167
  summary: ruby-thumbor is the client to the thumbor imaging service (http://github.com/globocom/thumbor).