cloudapp_api 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZjhiZDI1NWNhNDdiZTE4Y2I5OTZkZWZkY2MzOTYzYjMzZGNjZjAyZA==
5
+ data.tar.gz: !binary |-
6
+ YmUzMWYxZmQ4OWJjM2YwNWQ0N2VkMDFlODhiNjZhNDMyZGU4YmQwZA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZGU3M2RiZTQyZTRjNzE4MmY1N2Q1NWM5YzFhNGQ1YjE3YjNlODQ4ZWUxM2I2
10
+ MzcxZjgxZmNlYmZhYjdhYzllNTM3ZWJiZmQxY2UzYWYxZWU0OGFjZGNmNTgz
11
+ ZDQ5Njg4ODgzZTExMGFjYzQyZjFjMjhlMTk1NDNjN2Y5NjBjZjU=
12
+ data.tar.gz: !binary |-
13
+ ZWIwOTk4NmYwZTUxMDBiZGE0MTRkMzg2MGU5NTJjOGVmYmY5MzE2YzNlZDJh
14
+ ZGI5Y2E5ZDZhMjkwOTA0MzhkOWRmNjRmOTQzOGI1ZjBjMWE5ZWE4ODAxYjU1
15
+ ODBhOTYyYWI2NjQ2MmQzNDdkMjJjNmI4OWVhYmU5ZjFlZmUwMGQ=
@@ -3,4 +3,3 @@ language: ruby
3
3
  rvm:
4
4
  - 2.0.0
5
5
  - 1.9.3
6
- - 1.8.7
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "http://rubygems.org"
2
+
2
3
  # Add dependencies required to use your gem here.
3
- gem "httparty"
4
+ gem "httparty", "~> 0.13.5"
4
5
  gem "mime-types"
5
6
 
6
7
  # Add dependencies to develop your gem here.
@@ -12,6 +13,4 @@ group :development do
12
13
  gem "yard"
13
14
  gem "bluecloth"
14
15
  gem "cucumber"
15
- gem "bundler"
16
- gem "jeweler"
17
16
  end
@@ -19,22 +19,13 @@ GEM
19
19
  fakeweb (1.3.0)
20
20
  gherkin (2.12.0)
21
21
  multi_json (~> 1.3)
22
- git (1.2.5)
23
- httparty (0.11.0)
24
- multi_json (~> 1.0)
22
+ httparty (0.13.5)
23
+ json (~> 1.8)
25
24
  multi_xml (>= 0.5.2)
26
- jeweler (1.8.4)
27
- bundler (~> 1.0)
28
- git (>= 1.2.5)
29
- rake
30
- rdoc
31
- json (1.8.0)
25
+ json (1.8.2)
32
26
  mime-types (1.23)
33
27
  multi_json (1.7.7)
34
- multi_xml (0.5.4)
35
- rake (10.0.4)
36
- rdoc (4.0.1)
37
- json (~> 1.4)
28
+ multi_xml (0.5.5)
38
29
  rest-client (1.6.7)
39
30
  mime-types (>= 1.16)
40
31
  rspec (2.13.0)
@@ -57,12 +48,10 @@ PLATFORMS
57
48
 
58
49
  DEPENDENCIES
59
50
  bluecloth
60
- bundler
61
51
  coveralls
62
52
  cucumber
63
53
  fakeweb
64
- httparty
65
- jeweler
54
+ httparty (~> 0.13.5)
66
55
  mime-types
67
56
  rspec
68
57
  yard
data/README.md CHANGED
@@ -16,6 +16,8 @@ To install as a Gem:
16
16
 
17
17
  sudo gem install cloudapp_api
18
18
 
19
+ **(Version 0.5.0 ends compaitibility with Ruby 1.8.7. If you need 1.8.7 support, you can still use version 0.4.0 of this gem.)**
20
+
19
21
  ## Authentication
20
22
 
21
23
  Authentication is necessary for most actions, the only exceptions being when creating a new Account or querying a specific Drop.
data/Rakefile CHANGED
@@ -9,22 +9,7 @@ rescue Bundler::BundlerError => e
9
9
  end
10
10
  require 'rake'
11
11
 
12
- require 'jeweler'
13
- Jeweler::Tasks.new do |gem|
14
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
- gem.name = "cloudapp_api"
16
- gem.homepage = "http://github.com/aaronrussell/cloudapp_api"
17
- gem.summary = %Q{A simple Ruby wrapper for the CloudApp API. Uses HTTParty with a simple ActiveResource-like interface.}
18
- gem.description = %Q{A simple Ruby wrapper for the CloudApp API. Uses HTTParty with a simple ActiveResource-like interface.}
19
- gem.email = "aaron@gc4.co.uk"
20
- gem.authors = ["Aaron Russell"]
21
- # Include your dependencies below. Runtime dependencies are required when using your gem,
22
- # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
23
- gem.add_runtime_dependency "httparty"
24
- gem.add_development_dependency "rspec"
25
- gem.add_development_dependency "yard"
26
- end
27
- Jeweler::RubygemsDotOrgTasks.new
12
+ Bundler::GemHelper.install_tasks
28
13
 
29
14
  require 'rspec/core'
30
15
  require 'rspec/core/rake_task'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.5.0
@@ -2,14 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: cloudapp_api 0.5.0 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "cloudapp_api"
8
- s.version = "0.4.0"
9
+ s.version = "0.5.0"
9
10
 
10
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
11
13
  s.authors = ["Aaron Russell"]
12
- s.date = "2013-06-17"
14
+ s.date = "2015-06-01"
13
15
  s.description = "A simple Ruby wrapper for the CloudApp API. Uses HTTParty with a simple ActiveResource-like interface."
14
16
  s.email = "aaron@gc4.co.uk"
15
17
  s.extra_rdoc_files = [
@@ -67,56 +69,16 @@ Gem::Specification.new do |s|
67
69
  "spec/stubs/gift_card/show"
68
70
  ]
69
71
  s.homepage = "http://github.com/aaronrussell/cloudapp_api"
70
- s.require_paths = ["lib"]
71
- s.rubygems_version = "1.8.25"
72
+ s.rubygems_version = "2.4.4"
72
73
  s.summary = "A simple Ruby wrapper for the CloudApp API. Uses HTTParty with a simple ActiveResource-like interface."
73
74
 
74
- if s.respond_to? :specification_version then
75
- s.specification_version = 3
76
-
77
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
78
- s.add_runtime_dependency(%q<httparty>, [">= 0"])
79
- s.add_runtime_dependency(%q<mime-types>, [">= 0"])
80
- s.add_development_dependency(%q<rspec>, [">= 0"])
81
- s.add_development_dependency(%q<coveralls>, [">= 0"])
82
- s.add_development_dependency(%q<fakeweb>, [">= 0"])
83
- s.add_development_dependency(%q<yard>, [">= 0"])
84
- s.add_development_dependency(%q<bluecloth>, [">= 0"])
85
- s.add_development_dependency(%q<cucumber>, [">= 0"])
86
- s.add_development_dependency(%q<bundler>, [">= 0"])
87
- s.add_development_dependency(%q<jeweler>, [">= 0"])
88
- s.add_runtime_dependency(%q<httparty>, [">= 0"])
89
- s.add_development_dependency(%q<rspec>, [">= 0"])
90
- s.add_development_dependency(%q<yard>, [">= 0"])
91
- else
92
- s.add_dependency(%q<httparty>, [">= 0"])
93
- s.add_dependency(%q<mime-types>, [">= 0"])
94
- s.add_dependency(%q<rspec>, [">= 0"])
95
- s.add_dependency(%q<coveralls>, [">= 0"])
96
- s.add_dependency(%q<fakeweb>, [">= 0"])
97
- s.add_dependency(%q<yard>, [">= 0"])
98
- s.add_dependency(%q<bluecloth>, [">= 0"])
99
- s.add_dependency(%q<cucumber>, [">= 0"])
100
- s.add_dependency(%q<bundler>, [">= 0"])
101
- s.add_dependency(%q<jeweler>, [">= 0"])
102
- s.add_dependency(%q<httparty>, [">= 0"])
103
- s.add_dependency(%q<rspec>, [">= 0"])
104
- s.add_dependency(%q<yard>, [">= 0"])
105
- end
106
- else
107
- s.add_dependency(%q<httparty>, [">= 0"])
108
- s.add_dependency(%q<mime-types>, [">= 0"])
109
- s.add_dependency(%q<rspec>, [">= 0"])
110
- s.add_dependency(%q<coveralls>, [">= 0"])
111
- s.add_dependency(%q<fakeweb>, [">= 0"])
112
- s.add_dependency(%q<yard>, [">= 0"])
113
- s.add_dependency(%q<bluecloth>, [">= 0"])
114
- s.add_dependency(%q<cucumber>, [">= 0"])
115
- s.add_dependency(%q<bundler>, [">= 0"])
116
- s.add_dependency(%q<jeweler>, [">= 0"])
117
- s.add_dependency(%q<httparty>, [">= 0"])
118
- s.add_dependency(%q<rspec>, [">= 0"])
119
- s.add_dependency(%q<yard>, [">= 0"])
120
- end
75
+ s.add_runtime_dependency 'httparty', "~> 0.13.5"
76
+ s.add_runtime_dependency 'mime-types', ">= 1.16"
77
+ s.add_development_dependency 'rspec', "~> 2.13.0"
78
+ s.add_development_dependency 'coveralls', "~> 0.6.7"
79
+ s.add_development_dependency 'fakeweb', "~> 1.3.0"
80
+ s.add_development_dependency 'yard', "~> 0.8.6.1"
81
+ s.add_development_dependency 'bluecloth', "~> 2.2.0"
82
+ s.add_development_dependency 'cucumber', "~> 1.3.2"
121
83
  end
122
84
 
@@ -36,11 +36,11 @@ module CloudApp
36
36
  if response.class == HTTParty::Response
37
37
  raise ResponseError, response
38
38
  end
39
- raise StandardError, "Unkown error"
39
+ raise StandardError, "Unknown error"
40
40
  end
41
-
41
+
42
42
  attr_reader :data
43
-
43
+
44
44
  # Create a new CloudApp::Base object.
45
45
  #
46
46
  # Only used internally
@@ -2,7 +2,7 @@ require "json"
2
2
 
3
3
  module HTTParty #:nodoc:
4
4
 
5
- class Response < HTTParty::BasicObject #:nodoc:
5
+ class Response < ::BasicObject #:nodoc:
6
6
  def ok?
7
7
  [200, 201, 202].include?(self.code)
8
8
  end
@@ -32,4 +32,4 @@ module HTTParty #:nodoc:
32
32
 
33
33
  end
34
34
 
35
- end
35
+ end
@@ -16,7 +16,7 @@ module CloudApp
16
16
  @code = res.code
17
17
  begin
18
18
  @errors = parse_errors(res.parsed_response)
19
- rescue MultiJson::LoadError => ex
19
+ rescue JSON::ParserError => ex
20
20
  @errors = [res.response.body]
21
21
  end
22
22
  end
@@ -1,7 +1,5 @@
1
1
  require 'fakeweb'
2
2
 
3
- FakeWeb.allow_net_connect = false
4
-
5
3
  def stub_file(stub)
6
4
  File.join(File.dirname(__FILE__), 'stubs', stub)
7
5
  end
@@ -12,4 +12,12 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
12
12
 
13
13
  RSpec.configure do |config|
14
14
  config.color_enabled = true
15
+
16
+ config.before :suite do
17
+ FakeWeb.allow_net_connect = false
18
+ end
19
+
20
+ config.after :suite do
21
+ FakeWeb.allow_net_connect = true
22
+ end
15
23
  end
metadata CHANGED
@@ -1,224 +1,143 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudapp_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
5
- prerelease:
4
+ version: 0.5.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Aaron Russell
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-17 00:00:00.000000000 Z
11
+ date: 2015-06-01 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: httparty
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '0'
19
+ version: !binary |-
20
+ MC4xMy41
22
21
  type: :runtime
23
22
  prerelease: false
24
23
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
- - - ! '>='
25
+ - - ~>
28
26
  - !ruby/object:Gem::Version
29
- version: '0'
27
+ version: !binary |-
28
+ MC4xMy41
30
29
  - !ruby/object:Gem::Dependency
31
30
  name: mime-types
32
31
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
32
  requirements:
35
33
  - - ! '>='
36
34
  - !ruby/object:Gem::Version
37
- version: '0'
35
+ version: !binary |-
36
+ MS4xNg==
38
37
  type: :runtime
39
38
  prerelease: false
40
39
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
40
  requirements:
43
41
  - - ! '>='
44
42
  - !ruby/object:Gem::Version
45
- version: '0'
43
+ version: !binary |-
44
+ MS4xNg==
46
45
  - !ruby/object:Gem::Dependency
47
46
  name: rspec
48
47
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
48
  requirements:
51
- - - ! '>='
49
+ - - ~>
52
50
  - !ruby/object:Gem::Version
53
- version: '0'
51
+ version: !binary |-
52
+ Mi4xMy4w
54
53
  type: :development
55
54
  prerelease: false
56
55
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
56
  requirements:
59
- - - ! '>='
57
+ - - ~>
60
58
  - !ruby/object:Gem::Version
61
- version: '0'
59
+ version: !binary |-
60
+ Mi4xMy4w
62
61
  - !ruby/object:Gem::Dependency
63
62
  name: coveralls
64
63
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
64
  requirements:
67
- - - ! '>='
65
+ - - ~>
68
66
  - !ruby/object:Gem::Version
69
- version: '0'
67
+ version: !binary |-
68
+ MC42Ljc=
70
69
  type: :development
71
70
  prerelease: false
72
71
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
72
  requirements:
75
- - - ! '>='
73
+ - - ~>
76
74
  - !ruby/object:Gem::Version
77
- version: '0'
75
+ version: !binary |-
76
+ MC42Ljc=
78
77
  - !ruby/object:Gem::Dependency
79
78
  name: fakeweb
80
79
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
80
  requirements:
83
- - - ! '>='
81
+ - - ~>
84
82
  - !ruby/object:Gem::Version
85
- version: '0'
83
+ version: !binary |-
84
+ MS4zLjA=
86
85
  type: :development
87
86
  prerelease: false
88
87
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
88
  requirements:
91
- - - ! '>='
89
+ - - ~>
92
90
  - !ruby/object:Gem::Version
93
- version: '0'
91
+ version: !binary |-
92
+ MS4zLjA=
94
93
  - !ruby/object:Gem::Dependency
95
94
  name: yard
96
95
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
96
  requirements:
99
- - - ! '>='
97
+ - - ~>
100
98
  - !ruby/object:Gem::Version
101
- version: '0'
99
+ version: !binary |-
100
+ MC44LjYuMQ==
102
101
  type: :development
103
102
  prerelease: false
104
103
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
104
  requirements:
107
- - - ! '>='
105
+ - - ~>
108
106
  - !ruby/object:Gem::Version
109
- version: '0'
107
+ version: !binary |-
108
+ MC44LjYuMQ==
110
109
  - !ruby/object:Gem::Dependency
111
110
  name: bluecloth
112
111
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
112
  requirements:
115
- - - ! '>='
113
+ - - ~>
116
114
  - !ruby/object:Gem::Version
117
- version: '0'
115
+ version: !binary |-
116
+ Mi4yLjA=
118
117
  type: :development
119
118
  prerelease: false
120
119
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
120
  requirements:
123
- - - ! '>='
121
+ - - ~>
124
122
  - !ruby/object:Gem::Version
125
- version: '0'
123
+ version: !binary |-
124
+ Mi4yLjA=
126
125
  - !ruby/object:Gem::Dependency
127
126
  name: cucumber
128
127
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
- type: :development
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
142
- - !ruby/object:Gem::Dependency
143
- name: bundler
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ! '>='
148
- - !ruby/object:Gem::Version
149
- version: '0'
150
- type: :development
151
- prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
155
- - - ! '>='
156
- - !ruby/object:Gem::Version
157
- version: '0'
158
- - !ruby/object:Gem::Dependency
159
- name: jeweler
160
- requirement: !ruby/object:Gem::Requirement
161
- none: false
162
- requirements:
163
- - - ! '>='
164
- - !ruby/object:Gem::Version
165
- version: '0'
166
- type: :development
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - ! '>='
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- - !ruby/object:Gem::Dependency
175
- name: httparty
176
- requirement: !ruby/object:Gem::Requirement
177
- none: false
178
- requirements:
179
- - - ! '>='
180
- - !ruby/object:Gem::Version
181
- version: '0'
182
- type: :runtime
183
- prerelease: false
184
- version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ! '>='
188
- - !ruby/object:Gem::Version
189
- version: '0'
190
- - !ruby/object:Gem::Dependency
191
- name: rspec
192
- requirement: !ruby/object:Gem::Requirement
193
- none: false
194
- requirements:
195
- - - ! '>='
196
- - !ruby/object:Gem::Version
197
- version: '0'
198
- type: :development
199
- prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
201
- none: false
202
- requirements:
203
- - - ! '>='
204
- - !ruby/object:Gem::Version
205
- version: '0'
206
- - !ruby/object:Gem::Dependency
207
- name: yard
208
- requirement: !ruby/object:Gem::Requirement
209
- none: false
210
128
  requirements:
211
- - - ! '>='
129
+ - - ~>
212
130
  - !ruby/object:Gem::Version
213
- version: '0'
131
+ version: !binary |-
132
+ MS4zLjI=
214
133
  type: :development
215
134
  prerelease: false
216
135
  version_requirements: !ruby/object:Gem::Requirement
217
- none: false
218
136
  requirements:
219
- - - ! '>='
137
+ - - ~>
220
138
  - !ruby/object:Gem::Version
221
- version: '0'
139
+ version: !binary |-
140
+ MS4zLjI=
222
141
  description: A simple Ruby wrapper for the CloudApp API. Uses HTTParty with a simple
223
142
  ActiveResource-like interface.
224
143
  email: aaron@gc4.co.uk
@@ -278,30 +197,27 @@ files:
278
197
  - spec/stubs/gift_card/show
279
198
  homepage: http://github.com/aaronrussell/cloudapp_api
280
199
  licenses: []
200
+ metadata: {}
281
201
  post_install_message:
282
202
  rdoc_options: []
283
203
  require_paths:
284
204
  - lib
285
205
  required_ruby_version: !ruby/object:Gem::Requirement
286
- none: false
287
206
  requirements:
288
207
  - - ! '>='
289
208
  - !ruby/object:Gem::Version
290
209
  version: '0'
291
- segments:
292
- - 0
293
- hash: -1984904809724600224
294
210
  required_rubygems_version: !ruby/object:Gem::Requirement
295
- none: false
296
211
  requirements:
297
212
  - - ! '>='
298
213
  - !ruby/object:Gem::Version
299
214
  version: '0'
300
215
  requirements: []
301
216
  rubyforge_project:
302
- rubygems_version: 1.8.25
217
+ rubygems_version: 2.4.4
303
218
  signing_key:
304
- specification_version: 3
219
+ specification_version: 4
305
220
  summary: A simple Ruby wrapper for the CloudApp API. Uses HTTParty with a simple ActiveResource-like
306
221
  interface.
307
222
  test_files: []
223
+ has_rdoc: