resizor 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
data/lib/resizor/asset.rb CHANGED
@@ -7,8 +7,8 @@ module Resizor
7
7
  end
8
8
 
9
9
  def url(options={})
10
- options = {:size => '200', :format => 'jpg'}.merge(options)
11
- Resizor.cdn_host ? cdn_compatible_url(options) : query_string_url(options)
10
+ options = {:size => '200', :format => 'jpg', :cdn_host => !Resizor.cdn_host.nil?}.merge(options)
11
+ options[:cdn_host] ? cdn_compatible_url(options) : query_string_url(options)
12
12
  end
13
13
 
14
14
 
@@ -1,3 +1,3 @@
1
1
  module Resizor
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
data/test/asset_test.rb CHANGED
@@ -50,6 +50,10 @@ class ResizorAssetTest < Test::Unit::TestCase
50
50
  should 'generate url for size c200x300 format png' do
51
51
  assert_equal 'http://abc.cloudfront.com/assets/c200x300/0cf27070e89c44a40aee85decca2cd2d98af1dc2/10.png', @asset.url(:size => 'c200x300', :format => 'png')
52
52
  end
53
+
54
+ should 'generate url with out cdn_host if option cdn_host is set to false' do
55
+ assert_equal 'http://resizor.test:80/assets/10.jpg?size=c200x300&token=b8bb7c4c7c4fc1006c904f011f32f50f69730e5e', @asset.url(:size => 'c200x300', :cdn_host => false)
56
+ end
53
57
  end
54
58
 
55
59
  should 'generate resize token for size c200x300 and format jpg' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resizor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-29 00:00:00.000000000 Z
12
+ date: 2012-04-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70152020515480 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 0.9.2
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70152020515480
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.9.2
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: sqlite3
27
- requirement: &70152020515020 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ~>
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: 1.3.4
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *70152020515020
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.3.4
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: bundler
38
- requirement: &70152020514560 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '1.0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70152020514560
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1.0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: shoulda
49
- requirement: &70152020514100 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ~>
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: 2.11.3
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *70152020514100
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.11.3
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: webmock
60
- requirement: &70152020513640 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ~>
@@ -65,10 +85,15 @@ dependencies:
65
85
  version: 1.6.2
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *70152020513640
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 1.6.2
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: activerecord
71
- requirement: &70152020513180 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
99
  - - ~>
@@ -76,10 +101,15 @@ dependencies:
76
101
  version: 3.0.0
77
102
  type: :development
78
103
  prerelease: false
79
- version_requirements: *70152020513180
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 3.0.0
80
110
  - !ruby/object:Gem::Dependency
81
111
  name: rest-client
82
- requirement: &70152020512700 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
83
113
  none: false
84
114
  requirements:
85
115
  - - ! '>='
@@ -87,10 +117,15 @@ dependencies:
87
117
  version: 1.4.2
88
118
  type: :runtime
89
119
  prerelease: false
90
- version_requirements: *70152020512700
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: 1.4.2
91
126
  - !ruby/object:Gem::Dependency
92
127
  name: json
93
- requirement: &70152020512220 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
94
129
  none: false
95
130
  requirements:
96
131
  - - ! '>='
@@ -98,7 +133,12 @@ dependencies:
98
133
  version: '1.2'
99
134
  type: :runtime
100
135
  prerelease: false
101
- version_requirements: *70152020512220
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '1.2'
102
142
  description: Lets you easily interface with the Resizor.com REST API. Includes Rails
103
143
  helpers.
104
144
  email:
@@ -138,9 +178,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
178
  - - ! '>='
139
179
  - !ruby/object:Gem::Version
140
180
  version: '0'
141
- segments:
142
- - 0
143
- hash: -1361478278770955800
144
181
  required_rubygems_version: !ruby/object:Gem::Requirement
145
182
  none: false
146
183
  requirements:
@@ -149,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
186
  version: 1.3.6
150
187
  requirements: []
151
188
  rubyforge_project:
152
- rubygems_version: 1.8.15
189
+ rubygems_version: 1.8.23
153
190
  signing_key:
154
191
  specification_version: 3
155
192
  summary: Client for Resizor.com API