coop 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/coop.gemspec +7 -13
- data/lib/coop.rb +6 -9
- data/lib/coop/version.rb +1 -1
- metadata +26 -72
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f71c14f7f3610b543cd394fa247689a6c62828ce
|
4
|
+
data.tar.gz: 4c3142e1eec74c587bb3ed4d4d5357d2694b2bc1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7a1aec835974829b28b8070d446512ec0fa1a36931058d234dbccbc493d0c39e07d85e061d6aaa6d552faef89837885c6026af98472d665d3961d780bff2f7d4
|
7
|
+
data.tar.gz: 1e38531ccff2bab01c8b21102d80404737795e6ca4116a9652508a73744fa6b3e664273fd6fe9823671725910c69783b64a89489a096c1f6d4b2a3061d79a78c
|
data/coop.gemspec
CHANGED
@@ -3,7 +3,7 @@ require File.expand_path('../lib/coop/version', __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["Evan Walsh"]
|
6
|
-
gem.email = ["evan@
|
6
|
+
gem.email = ["evan@massivedanger.com"]
|
7
7
|
gem.description = %q{Interact with the Co-op API with Ruby}
|
8
8
|
gem.summary = %q{Interact with the Co-op API with Ruby}
|
9
9
|
gem.homepage = "http://github.com/evanwalsh/coop"
|
@@ -14,20 +14,14 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.name = "coop"
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = Coop::VERSION
|
17
|
-
|
17
|
+
|
18
18
|
gem.required_ruby_version = '>= 1.9.2'
|
19
|
-
|
19
|
+
|
20
20
|
gem.add_development_dependency "rake"
|
21
21
|
gem.add_development_dependency "minitest", "~> 2.11.3"
|
22
|
-
gem.add_development_dependency "guard-minitest", "~> 0.5.0"
|
23
22
|
gem.add_development_dependency "turn", "~> 0.9.3"
|
24
23
|
gem.add_development_dependency "webmock", "~> 1.8.2"
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
gem.add_dependency "hashie", "~> 1.2.0"
|
31
|
-
gem.add_dependency "httparty", "~> 0.8.1"
|
32
|
-
gem.add_dependency "json-jruby", "~> 1.5.0" if RUBY_PLATFORM == "java"
|
33
|
-
end
|
24
|
+
|
25
|
+
gem.add_dependency "hashie", "~> 3.3.1"
|
26
|
+
gem.add_dependency "httparty", "~> 0.13.1"
|
27
|
+
end
|
data/lib/coop.rb
CHANGED
@@ -8,7 +8,7 @@ module Coop
|
|
8
8
|
include HTTParty
|
9
9
|
base_uri 'http://coopapp.com'
|
10
10
|
headers "Accept" => "application/json", "User-Agent" => "coop-gem"
|
11
|
-
|
11
|
+
|
12
12
|
class << self
|
13
13
|
# Public: Shortcut for creating a new Coop::Session for API stuff
|
14
14
|
#
|
@@ -22,10 +22,10 @@ module Coop
|
|
22
22
|
#
|
23
23
|
# Returns an authenticated Coop::Session object
|
24
24
|
def new(email, password)
|
25
|
-
basic_auth email, password
|
25
|
+
basic_auth email, password
|
26
26
|
Coop::Session.new(email, password)
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
# Public: Parse an HTTParty response into APIObjects
|
30
30
|
#
|
31
31
|
# *args - any valid arguments for HTTParty.get
|
@@ -39,18 +39,15 @@ module Coop
|
|
39
39
|
def get_parsed(*args)
|
40
40
|
begin
|
41
41
|
request = self.get(*args)
|
42
|
-
|
42
|
+
|
43
43
|
raise BadRequest if request.response.code == "400"
|
44
44
|
raise Unauthorized if request.response.code == "401"
|
45
45
|
raise NotFound if request.response.code == "404"
|
46
46
|
raise InternalServerError if request.response.code == "500"
|
47
47
|
raise ServiceUnavailable if request.response.code == "503"
|
48
|
-
|
48
|
+
|
49
49
|
APIObject.parse_response(request)
|
50
|
-
|
51
|
-
rescue MultiJson::DecodeError
|
52
|
-
nil
|
53
50
|
end
|
54
51
|
end
|
55
52
|
end
|
56
|
-
end
|
53
|
+
end
|
data/lib/coop/version.rb
CHANGED
metadata
CHANGED
@@ -1,153 +1,108 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Evan Walsh
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-10-08 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rake
|
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: minitest
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 2.11.3
|
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: 2.11.3
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: guard-minitest
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ~>
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 0.5.0
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.5.0
|
62
41
|
- !ruby/object:Gem::Dependency
|
63
42
|
name: turn
|
64
43
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
44
|
requirements:
|
67
|
-
- - ~>
|
45
|
+
- - "~>"
|
68
46
|
- !ruby/object:Gem::Version
|
69
47
|
version: 0.9.3
|
70
48
|
type: :development
|
71
49
|
prerelease: false
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
51
|
requirements:
|
75
|
-
- - ~>
|
52
|
+
- - "~>"
|
76
53
|
- !ruby/object:Gem::Version
|
77
54
|
version: 0.9.3
|
78
55
|
- !ruby/object:Gem::Dependency
|
79
56
|
name: webmock
|
80
57
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
58
|
requirements:
|
83
|
-
- - ~>
|
59
|
+
- - "~>"
|
84
60
|
- !ruby/object:Gem::Version
|
85
61
|
version: 1.8.2
|
86
62
|
type: :development
|
87
63
|
prerelease: false
|
88
64
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
65
|
requirements:
|
91
|
-
- - ~>
|
66
|
+
- - "~>"
|
92
67
|
- !ruby/object:Gem::Version
|
93
68
|
version: 1.8.2
|
94
|
-
- !ruby/object:Gem::Dependency
|
95
|
-
name: growl
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
|
-
requirements:
|
99
|
-
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: 1.0.3
|
102
|
-
type: :development
|
103
|
-
prerelease: false
|
104
|
-
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
|
-
requirements:
|
107
|
-
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: 1.0.3
|
110
69
|
- !ruby/object:Gem::Dependency
|
111
70
|
name: hashie
|
112
71
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
72
|
requirements:
|
115
|
-
- - ~>
|
73
|
+
- - "~>"
|
116
74
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
75
|
+
version: 3.3.1
|
118
76
|
type: :runtime
|
119
77
|
prerelease: false
|
120
78
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
79
|
requirements:
|
123
|
-
- - ~>
|
80
|
+
- - "~>"
|
124
81
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
82
|
+
version: 3.3.1
|
126
83
|
- !ruby/object:Gem::Dependency
|
127
84
|
name: httparty
|
128
85
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
86
|
requirements:
|
131
|
-
- - ~>
|
87
|
+
- - "~>"
|
132
88
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0.
|
89
|
+
version: 0.13.1
|
134
90
|
type: :runtime
|
135
91
|
prerelease: false
|
136
92
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
93
|
requirements:
|
139
|
-
- - ~>
|
94
|
+
- - "~>"
|
140
95
|
- !ruby/object:Gem::Version
|
141
|
-
version: 0.
|
96
|
+
version: 0.13.1
|
142
97
|
description: Interact with the Co-op API with Ruby
|
143
98
|
email:
|
144
|
-
- evan@
|
99
|
+
- evan@massivedanger.com
|
145
100
|
executables: []
|
146
101
|
extensions: []
|
147
102
|
extra_rdoc_files: []
|
148
103
|
files:
|
149
|
-
- .gitignore
|
150
|
-
- .travis.yml
|
104
|
+
- ".gitignore"
|
105
|
+
- ".travis.yml"
|
151
106
|
- CHANGELOG.md
|
152
107
|
- Gemfile
|
153
108
|
- Guardfile
|
@@ -184,27 +139,26 @@ files:
|
|
184
139
|
- test/test_helper.rb
|
185
140
|
homepage: http://github.com/evanwalsh/coop
|
186
141
|
licenses: []
|
142
|
+
metadata: {}
|
187
143
|
post_install_message:
|
188
144
|
rdoc_options: []
|
189
145
|
require_paths:
|
190
146
|
- lib
|
191
147
|
required_ruby_version: !ruby/object:Gem::Requirement
|
192
|
-
none: false
|
193
148
|
requirements:
|
194
|
-
- -
|
149
|
+
- - ">="
|
195
150
|
- !ruby/object:Gem::Version
|
196
151
|
version: 1.9.2
|
197
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
|
-
none: false
|
199
153
|
requirements:
|
200
|
-
- -
|
154
|
+
- - ">="
|
201
155
|
- !ruby/object:Gem::Version
|
202
156
|
version: '0'
|
203
157
|
requirements: []
|
204
158
|
rubyforge_project:
|
205
|
-
rubygems_version:
|
159
|
+
rubygems_version: 2.2.2
|
206
160
|
signing_key:
|
207
|
-
specification_version:
|
161
|
+
specification_version: 4
|
208
162
|
summary: Interact with the Co-op API with Ruby
|
209
163
|
test_files:
|
210
164
|
- test/coop/api_object/test_agenda.rb
|