ruby-thumbor 1.1.3 → 1.2.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ed4ebe8f3b222814e1c6657501b576742203490a
4
+ data.tar.gz: b7d93fdda95026dbde9d01a2ae6943ffbe9be526
5
+ SHA512:
6
+ metadata.gz: 3bb31b237dd4fe02e625d81f4b803e98df02fa16a019c96d9831984a27b64ec95513312c8e193cac4614b56de875ced3d265d81c10420c60f18310bd7241d269
7
+ data.tar.gz: 616b5aa7ac01e9c3f0380d65528ba5d18fc590b971353b4ec1102ff0dd0d9b4f2e9765a879615a348a2c3c142d40efb5cc4c6793ee8d25be3cfd2757476453ed
@@ -217,9 +217,12 @@ module Thumbor
217
217
 
218
218
  thumbor_path << options[:image]
219
219
 
220
- signature = url_safe_base64(OpenSSL::HMAC.digest('sha1', Thumbor.key, thumbor_path))
221
- thumbor_path.insert(0, "/#{signature}/")
222
-
220
+ if Thumbor.key
221
+ signature = url_safe_base64(OpenSSL::HMAC.digest('sha1', Thumbor.key, thumbor_path))
222
+ thumbor_path.insert(0, "/#{signature}/")
223
+ else
224
+ thumbor_path.insert(0, "/unsafe/")
225
+ end
223
226
  thumbor_path
224
227
  end
225
228
 
@@ -1,3 +1,3 @@
1
1
  module Thumbor
2
- VERSION = '1.1.3'
3
- end
2
+ VERSION = '1.2.0'
3
+ end
@@ -452,4 +452,13 @@ describe Thumbor::CryptoURL do
452
452
  decrypted["filters"].should == "quality(20):brightness(10)"
453
453
  end
454
454
  end
455
+
456
+ describe "without security key" do
457
+ subject { Thumbor::CryptoURL.new nil }
458
+ it "should generate a unsafe url" do
459
+ url = subject.generate :image => image_url
460
+
461
+ url.should == "/unsafe/#{image_url}"
462
+ end
463
+ end
455
464
  end
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-thumbor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
5
- prerelease:
4
+ version: 1.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Bernardo Heynemann
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-01-29 00:00:00.000000000 Z
11
+ date: 2013-09-02 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: simplecov
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  description: ruby-thumbor is the client to the thumbor imaging service (http://github.com/globocom/thumbor).
@@ -61,6 +56,7 @@ files:
61
56
  - spec/util/thumbor.rb
62
57
  homepage: http://github.com/heynemann/ruby-thumbor
63
58
  licenses: []
59
+ metadata: {}
64
60
  post_install_message:
65
61
  rdoc_options:
66
62
  - --main
@@ -68,22 +64,20 @@ rdoc_options:
68
64
  require_paths:
69
65
  - lib
70
66
  required_ruby_version: !ruby/object:Gem::Requirement
71
- none: false
72
67
  requirements:
73
- - - ! '>='
68
+ - - '>='
74
69
  - !ruby/object:Gem::Version
75
70
  version: '0'
76
71
  required_rubygems_version: !ruby/object:Gem::Requirement
77
- none: false
78
72
  requirements:
79
- - - ! '>='
73
+ - - '>='
80
74
  - !ruby/object:Gem::Version
81
75
  version: '0'
82
76
  requirements: []
83
77
  rubyforge_project:
84
- rubygems_version: 1.8.24
78
+ rubygems_version: 2.0.6
85
79
  signing_key:
86
- specification_version: 3
80
+ specification_version: 4
87
81
  summary: ruby-thumbor is the client to the thumbor imaging service (http://github.com/globocom/thumbor).
88
82
  test_files:
89
83
  - spec/spec_helper.rb