resizor 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/resizor/asset.rb +5 -3
- data/lib/resizor/version.rb +1 -1
- data/test/asset_test.rb +6 -0
- metadata +19 -62
data/lib/resizor/asset.rb
CHANGED
@@ -35,9 +35,11 @@ module Resizor
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def destroy
|
38
|
-
|
39
|
-
|
40
|
-
|
38
|
+
if id && id.to_s != ''
|
39
|
+
ret = Resizor.delete("/assets/#{id}.json")
|
40
|
+
if ret.code == 200
|
41
|
+
return true
|
42
|
+
end
|
41
43
|
end
|
42
44
|
end
|
43
45
|
|
data/lib/resizor/version.rb
CHANGED
data/test/asset_test.rb
CHANGED
@@ -125,6 +125,12 @@ class ResizorAssetTest < Test::Unit::TestCase
|
|
125
125
|
assert_requested :delete, "https://resizor.test:443/assets/10.json?api_key=test-api-key", :times => 1
|
126
126
|
end
|
127
127
|
|
128
|
+
should 'not make delete call to resizor if id is missing' do
|
129
|
+
@asset.id = nil
|
130
|
+
@asset.destroy
|
131
|
+
assert_not_requested :delete, "https://resizor.test:443/assets/.json?api_key=test-api-key"
|
132
|
+
end
|
133
|
+
|
128
134
|
should 'return true on success' do
|
129
135
|
stub_http_request(:delete, "https://resizor.test:443/assets/10.json?api_key=test-api-key").to_return(:status => 200)
|
130
136
|
assert @asset.destroy
|
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.
|
4
|
+
version: 0.0.15
|
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-
|
12
|
+
date: 2012-06-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70185973193940 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,15 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.9.2
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.9.2
|
24
|
+
version_requirements: *70185973193940
|
30
25
|
- !ruby/object:Gem::Dependency
|
31
26
|
name: sqlite3
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
27
|
+
requirement: &70185973193080 !ruby/object:Gem::Requirement
|
33
28
|
none: false
|
34
29
|
requirements:
|
35
30
|
- - ~>
|
@@ -37,15 +32,10 @@ dependencies:
|
|
37
32
|
version: 1.3.4
|
38
33
|
type: :development
|
39
34
|
prerelease: false
|
40
|
-
version_requirements:
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 1.3.4
|
35
|
+
version_requirements: *70185973193080
|
46
36
|
- !ruby/object:Gem::Dependency
|
47
37
|
name: bundler
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirement: &70185973192400 !ruby/object:Gem::Requirement
|
49
39
|
none: false
|
50
40
|
requirements:
|
51
41
|
- - ~>
|
@@ -53,15 +43,10 @@ dependencies:
|
|
53
43
|
version: '1.0'
|
54
44
|
type: :development
|
55
45
|
prerelease: false
|
56
|
-
version_requirements:
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.0'
|
46
|
+
version_requirements: *70185973192400
|
62
47
|
- !ruby/object:Gem::Dependency
|
63
48
|
name: shoulda
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirement: &70185973191660 !ruby/object:Gem::Requirement
|
65
50
|
none: false
|
66
51
|
requirements:
|
67
52
|
- - ~>
|
@@ -69,15 +54,10 @@ dependencies:
|
|
69
54
|
version: 2.11.3
|
70
55
|
type: :development
|
71
56
|
prerelease: false
|
72
|
-
version_requirements:
|
73
|
-
none: false
|
74
|
-
requirements:
|
75
|
-
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: 2.11.3
|
57
|
+
version_requirements: *70185973191660
|
78
58
|
- !ruby/object:Gem::Dependency
|
79
59
|
name: webmock
|
80
|
-
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirement: &70185973190980 !ruby/object:Gem::Requirement
|
81
61
|
none: false
|
82
62
|
requirements:
|
83
63
|
- - ~>
|
@@ -85,15 +65,10 @@ dependencies:
|
|
85
65
|
version: 1.6.2
|
86
66
|
type: :development
|
87
67
|
prerelease: false
|
88
|
-
version_requirements:
|
89
|
-
none: false
|
90
|
-
requirements:
|
91
|
-
- - ~>
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: 1.6.2
|
68
|
+
version_requirements: *70185973190980
|
94
69
|
- !ruby/object:Gem::Dependency
|
95
70
|
name: activerecord
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirement: &70185973190300 !ruby/object:Gem::Requirement
|
97
72
|
none: false
|
98
73
|
requirements:
|
99
74
|
- - ~>
|
@@ -101,15 +76,10 @@ dependencies:
|
|
101
76
|
version: 3.0.0
|
102
77
|
type: :development
|
103
78
|
prerelease: false
|
104
|
-
version_requirements:
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: 3.0.0
|
79
|
+
version_requirements: *70185973190300
|
110
80
|
- !ruby/object:Gem::Dependency
|
111
81
|
name: rest-client
|
112
|
-
requirement: !ruby/object:Gem::Requirement
|
82
|
+
requirement: &70185973189540 !ruby/object:Gem::Requirement
|
113
83
|
none: false
|
114
84
|
requirements:
|
115
85
|
- - ! '>='
|
@@ -117,15 +87,10 @@ dependencies:
|
|
117
87
|
version: 1.4.2
|
118
88
|
type: :runtime
|
119
89
|
prerelease: false
|
120
|
-
version_requirements:
|
121
|
-
none: false
|
122
|
-
requirements:
|
123
|
-
- - ! '>='
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
version: 1.4.2
|
90
|
+
version_requirements: *70185973189540
|
126
91
|
- !ruby/object:Gem::Dependency
|
127
92
|
name: json
|
128
|
-
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirement: &70185973188660 !ruby/object:Gem::Requirement
|
129
94
|
none: false
|
130
95
|
requirements:
|
131
96
|
- - ! '>='
|
@@ -133,12 +98,7 @@ dependencies:
|
|
133
98
|
version: '1.2'
|
134
99
|
type: :runtime
|
135
100
|
prerelease: false
|
136
|
-
version_requirements:
|
137
|
-
none: false
|
138
|
-
requirements:
|
139
|
-
- - ! '>='
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
version: '1.2'
|
101
|
+
version_requirements: *70185973188660
|
142
102
|
description: Lets you easily interface with the Resizor.com REST API. Includes Rails
|
143
103
|
helpers.
|
144
104
|
email:
|
@@ -178,9 +138,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
178
138
|
- - ! '>='
|
179
139
|
- !ruby/object:Gem::Version
|
180
140
|
version: '0'
|
181
|
-
segments:
|
182
|
-
- 0
|
183
|
-
hash: 2339798260532016014
|
184
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
142
|
none: false
|
186
143
|
requirements:
|
@@ -189,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
189
146
|
version: 1.3.6
|
190
147
|
requirements: []
|
191
148
|
rubyforge_project:
|
192
|
-
rubygems_version: 1.8.
|
149
|
+
rubygems_version: 1.8.10
|
193
150
|
signing_key:
|
194
151
|
specification_version: 3
|
195
152
|
summary: Client for Resizor.com API
|