bcx 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +6 -0
- data/README.md +57 -4
- data/docs/bcx.html +171 -0
- data/docs/configuration.html +128 -0
- data/docs/docco.css +500 -0
- data/docs/http.html +125 -0
- data/docs/oauth.html +127 -0
- data/docs/person.html +125 -0
- data/docs/project.html +143 -0
- data/docs/public/fonts/aller-bold.eot +0 -0
- data/docs/public/fonts/aller-bold.ttf +0 -0
- data/docs/public/fonts/aller-bold.woff +0 -0
- data/docs/public/fonts/aller-light.eot +0 -0
- data/docs/public/fonts/aller-light.ttf +0 -0
- data/docs/public/fonts/aller-light.woff +0 -0
- data/docs/public/fonts/fleurons.eot +0 -0
- data/docs/public/fonts/fleurons.ttf +0 -0
- data/docs/public/fonts/fleurons.woff +0 -0
- data/docs/public/fonts/novecento-bold.eot +0 -0
- data/docs/public/fonts/novecento-bold.ttf +0 -0
- data/docs/public/fonts/novecento-bold.woff +0 -0
- data/docs/public/images/gray.png +0 -0
- data/docs/public/stylesheets/normalize.css +375 -0
- data/docs/response_error.html +117 -0
- data/docs/todo.html +138 -0
- data/docs/todolist.html +148 -0
- data/docs/version.html +103 -0
- data/lib/bcx/client/http.rb +25 -0
- data/lib/bcx/client/oauth.rb +27 -0
- data/lib/bcx/resources/person.rb +30 -7
- data/lib/bcx/resources/project.rb +7 -10
- data/lib/bcx/resources/todolist.rb +11 -4
- data/lib/bcx/version.rb +1 -1
- data/lib/bcx.rb +12 -1
- data/spec/bcx/client_spec.rb +24 -19
- data/spec/bcx/person_spec.rb +55 -0
- data/spec/bcx/project_spec.rb +1 -1
- data/spec/bcx/todo_spec.rb +43 -0
- data/spec/bcx/todolist_spec.rb +19 -3
- data/spec/cassettes/Bcx_Client/error_handling/should_raise_exception.yml +56 -0
- data/spec/cassettes/Bcx_Resources_Person/DELETE_/people/4904728_json/should_delete_a_todolist.yml +101 -0
- data/spec/cassettes/Bcx_Resources_Person/GET_/people/4666033_json/should_have_the_correct_id.yml +58 -0
- data/spec/cassettes/Bcx_Resources_Person/GET_/people/4666033_json/should_return_a_hash.yml +58 -0
- data/spec/cassettes/Bcx_Resources_Person/GET_/people/me_json/should_have_assigned_todos.yml +58 -0
- data/spec/cassettes/Bcx_Resources_Person/GET_/people/me_json/should_have_the_correct_id.yml +58 -0
- data/spec/cassettes/Bcx_Resources_Person/GET_/people/me_json/should_return_a_hash.yml +58 -0
- data/spec/cassettes/Bcx_Resources_Person/GET_/people_json/first_person_should_have_the_correct_id.yml +56 -0
- data/spec/cassettes/Bcx_Resources_Person/GET_/people_json/should_be_an_array.yml +56 -0
- data/spec/cassettes/Bcx_Resources_Todo/DELETE_/projects/2951531/todos/48545200_json/should_delete_the_given_todo.yml +101 -0
- data/spec/cassettes/Bcx_Resources_Todo/GET_/projects/2951531/todos/48545200_json/should_have_the_correct_id.yml +61 -0
- data/spec/cassettes/Bcx_Resources_Todo/GET_/projects/2951531/todos/48545200_json/should_return_a_hash.yml +61 -0
- data/spec/cassettes/Bcx_Resources_Todo/POST_/projects/2951531/todolists/2951531/todos_json/should_create_a_new_todo.yml +56 -0
- data/spec/cassettes/Bcx_Resources_Todo/POST_/projects/2951531/todolists/8268819/todos_json/should_create_a_new_todo.yml +62 -0
- data/spec/cassettes/Bcx_Resources_Todo/PUT_/projects/2951531/todos/48545200_json/should_update_an_existing_todo.yml +61 -0
- data/spec/cassettes/Bcx_Resources_Todolist/DELETE_/projects/2956584/todolists/8268819_json/should_create_a_new_todolist.yml +66 -0
- data/spec/cassettes/Bcx_Resources_Todolist/DELETE_/projects/2956584/todolists/8268819_json/should_delete_a_todolist.yml +101 -0
- data/spec/cassettes/Bcx_Resources_Todolist/POST_/projects/123/todolists_json/should_create_a_new_todolist.yml +62 -0
- data/spec/cassettes/Bcx_Resources_Todolist/PUT_/projects/2956584/todolists/8268819_json/should_create_a_new_todolist.yml +186 -0
- metadata +88 -14
- data/lib/bcx/client.rb +0 -24
@@ -0,0 +1,186 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://basecamp.com/2274488/api/v1/projects/2956584/todolists/8268819.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"name":"Renamed todolist"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
12
|
+
Authorization:
|
13
|
+
- Basic YmN4LXRlc3QtdXNlcjpzZWNyZXQ=
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 301
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Fri, 21 Jun 2013 22:11:54 GMT
|
25
|
+
content-type:
|
26
|
+
- text/html; charset=utf-8
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
status:
|
32
|
+
- 301 Moved Permanently
|
33
|
+
x-frame-options:
|
34
|
+
- SAMEORIGIN
|
35
|
+
x-xss-protection:
|
36
|
+
- 1; mode=block
|
37
|
+
x-content-type-options:
|
38
|
+
- nosniff
|
39
|
+
x-ua-compatible:
|
40
|
+
- chrome=1
|
41
|
+
x-xhr-current-location:
|
42
|
+
- /2274488/api/v1/projects/2956584/todolists/8268819.json
|
43
|
+
x-asset-paths:
|
44
|
+
- ! '{"application.js":"application-eb8afc75ba8fcbb36b8518826dd32bc5.js","application.css":"application-18059b31e3ebdcca82003cfaf2564179.css"}'
|
45
|
+
location:
|
46
|
+
- https://basecamp.com/2274488/api/v1/projects/2951531/todolists/8268819.json?moved=true
|
47
|
+
cache-control:
|
48
|
+
- no-cache
|
49
|
+
x-request-id:
|
50
|
+
- dff7cb08-4935-427f-a4ed-2f60351e02a7
|
51
|
+
x-runtime:
|
52
|
+
- '0.119044'
|
53
|
+
body:
|
54
|
+
encoding: US-ASCII
|
55
|
+
string: <html><body>You are being <a href="https://basecamp.com/2274488/api/v1/projects/2951531/todolists/8268819.json?moved=true">redirected</a>.</body></html>
|
56
|
+
http_version:
|
57
|
+
recorded_at: Fri, 21 Jun 2013 22:11:54 GMT
|
58
|
+
- request:
|
59
|
+
method: get
|
60
|
+
uri: https://basecamp.com/2274488/api/v1/projects/2951531/todolists/8268819.json?moved=true
|
61
|
+
body:
|
62
|
+
encoding: US-ASCII
|
63
|
+
string: ''
|
64
|
+
headers:
|
65
|
+
User-Agent:
|
66
|
+
- Faraday v0.8.7
|
67
|
+
Authorization:
|
68
|
+
- Basic YmN4LXRlc3QtdXNlcjpzZWNyZXQ=
|
69
|
+
Content-Type:
|
70
|
+
- application/json
|
71
|
+
response:
|
72
|
+
status:
|
73
|
+
code: 200
|
74
|
+
message:
|
75
|
+
headers:
|
76
|
+
server:
|
77
|
+
- nginx
|
78
|
+
date:
|
79
|
+
- Fri, 21 Jun 2013 22:11:54 GMT
|
80
|
+
content-type:
|
81
|
+
- application/json; charset=utf-8
|
82
|
+
transfer-encoding:
|
83
|
+
- chunked
|
84
|
+
connection:
|
85
|
+
- close
|
86
|
+
status:
|
87
|
+
- 200 OK
|
88
|
+
x-frame-options:
|
89
|
+
- SAMEORIGIN
|
90
|
+
x-xss-protection:
|
91
|
+
- 1; mode=block
|
92
|
+
x-content-type-options:
|
93
|
+
- nosniff
|
94
|
+
x-ua-compatible:
|
95
|
+
- chrome=1
|
96
|
+
x-xhr-current-location:
|
97
|
+
- /2274488/api/v1/projects/2951531/todolists/8268819.json?moved=true
|
98
|
+
x-asset-paths:
|
99
|
+
- ! '{"application.js":"application-eb8afc75ba8fcbb36b8518826dd32bc5.js","application.css":"application-18059b31e3ebdcca82003cfaf2564179.css"}'
|
100
|
+
etag:
|
101
|
+
- ! '"81e46ff9ee5f546c6d98d48c720a938d"'
|
102
|
+
last-modified:
|
103
|
+
- Fri, 21 Jun 2013 22:06:49 GMT
|
104
|
+
cache-control:
|
105
|
+
- max-age=0, private, must-revalidate
|
106
|
+
x-request-id:
|
107
|
+
- dd670c7a-121f-4c98-acb8-d80de79568bf
|
108
|
+
x-runtime:
|
109
|
+
- '0.163867'
|
110
|
+
body:
|
111
|
+
encoding: US-ASCII
|
112
|
+
string: ! '{"id":8268819,"name":"Example todolist","description":null,"created_at":"2013-06-21T21:50:13.000Z","updated_at":"2013-06-21T22:06:49.000Z","completed":false,"position":1,"remaining_count":3,"completed_count":0,"creator":{"id":4666033,"name":"Paul
|
113
|
+
Springett","avatar_url":"http://dge9rmgqjs8m1.cloudfront.net/global/default_avatar_v1_3/avatar.gif?r=3"},"todos":{"remaining":[{"id":48545209,"todolist_id":8268819,"position":1,"content":"Another
|
114
|
+
todo","completed":false,"created_at":"2013-06-21T21:50:24.000Z","updated_at":"2013-06-21T21:50:24.000Z","comments_count":0,"due_on":null,"due_at":null,"creator":{"id":4666033,"name":"Paul
|
115
|
+
Springett","avatar_url":"http://dge9rmgqjs8m1.cloudfront.net/global/default_avatar_v1_3/avatar.gif?r=3"},"url":"https://basecamp.com/2274488/api/v1/projects/2951531-new-project/todos/48545209-another-todo.json"},{"id":48545212,"todolist_id":8268819,"position":2,"content":"Number
|
116
|
+
3","completed":false,"created_at":"2013-06-21T21:50:27.000Z","updated_at":"2013-06-21T21:50:27.000Z","comments_count":0,"due_on":null,"due_at":null,"creator":{"id":4666033,"name":"Paul
|
117
|
+
Springett","avatar_url":"http://dge9rmgqjs8m1.cloudfront.net/global/default_avatar_v1_3/avatar.gif?r=3"},"url":"https://basecamp.com/2274488/api/v1/projects/2951531-new-project/todos/48545212-number-3.json"},{"id":48546382,"todolist_id":8268819,"position":3,"content":"My
|
118
|
+
todo","completed":false,"created_at":"2013-06-21T22:01:32.000Z","updated_at":"2013-06-21T22:01:32.000Z","comments_count":0,"due_on":null,"due_at":null,"creator":{"id":4666033,"name":"Paul
|
119
|
+
Springett","avatar_url":"http://dge9rmgqjs8m1.cloudfront.net/global/default_avatar_v1_3/avatar.gif?r=3"},"url":"https://basecamp.com/2274488/api/v1/projects/2951531-new-project/todos/48546382-my-todo.json"}],"completed":[]},"comments":[],"subscribers":[{"id":4666033,"name":"Paul
|
120
|
+
Springett"}]}'
|
121
|
+
http_version:
|
122
|
+
recorded_at: Fri, 21 Jun 2013 22:11:54 GMT
|
123
|
+
- request:
|
124
|
+
method: put
|
125
|
+
uri: https://basecamp.com/2274488/api/v1/projects/2951531/todolists/8268819.json
|
126
|
+
body:
|
127
|
+
encoding: UTF-8
|
128
|
+
string: ! '{"name":"Renamed todolist"}'
|
129
|
+
headers:
|
130
|
+
User-Agent:
|
131
|
+
- Faraday v0.8.7
|
132
|
+
Authorization:
|
133
|
+
- Basic YmN4LXRlc3QtdXNlcjpzZWNyZXQ=
|
134
|
+
Content-Type:
|
135
|
+
- application/json
|
136
|
+
response:
|
137
|
+
status:
|
138
|
+
code: 200
|
139
|
+
message:
|
140
|
+
headers:
|
141
|
+
server:
|
142
|
+
- nginx
|
143
|
+
date:
|
144
|
+
- Fri, 21 Jun 2013 22:12:35 GMT
|
145
|
+
content-type:
|
146
|
+
- application/json; charset=utf-8
|
147
|
+
transfer-encoding:
|
148
|
+
- chunked
|
149
|
+
connection:
|
150
|
+
- close
|
151
|
+
status:
|
152
|
+
- 200 OK
|
153
|
+
x-frame-options:
|
154
|
+
- SAMEORIGIN
|
155
|
+
x-xss-protection:
|
156
|
+
- 1; mode=block
|
157
|
+
x-content-type-options:
|
158
|
+
- nosniff
|
159
|
+
x-ua-compatible:
|
160
|
+
- chrome=1
|
161
|
+
x-xhr-current-location:
|
162
|
+
- /2274488/api/v1/projects/2951531/todolists/8268819.json
|
163
|
+
x-asset-paths:
|
164
|
+
- ! '{"application.js":"application-eb8afc75ba8fcbb36b8518826dd32bc5.js","application.css":"application-18059b31e3ebdcca82003cfaf2564179.css"}'
|
165
|
+
etag:
|
166
|
+
- ! '"14816494a234cd89e748f90806a4f020"'
|
167
|
+
cache-control:
|
168
|
+
- max-age=0, private, must-revalidate
|
169
|
+
x-request-id:
|
170
|
+
- 0c97216d-f91d-40cc-85be-7c04190eac64
|
171
|
+
x-runtime:
|
172
|
+
- '0.259824'
|
173
|
+
body:
|
174
|
+
encoding: US-ASCII
|
175
|
+
string: ! '{"id":8268819,"name":"Renamed todolist","description":null,"created_at":"2013-06-21T21:50:13.000Z","updated_at":"2013-06-21T22:12:35.839Z","completed":false,"position":1,"remaining_count":3,"completed_count":0,"creator":{"id":4666033,"name":"Paul
|
176
|
+
Springett","avatar_url":"http://dge9rmgqjs8m1.cloudfront.net/global/default_avatar_v1_3/avatar.gif?r=3"},"todos":{"remaining":[{"id":48545209,"todolist_id":8268819,"position":1,"content":"Another
|
177
|
+
todo","completed":false,"created_at":"2013-06-21T21:50:24.000Z","updated_at":"2013-06-21T21:50:24.000Z","comments_count":0,"due_on":null,"due_at":null,"creator":{"id":4666033,"name":"Paul
|
178
|
+
Springett","avatar_url":"http://dge9rmgqjs8m1.cloudfront.net/global/default_avatar_v1_3/avatar.gif?r=3"},"url":"https://basecamp.com/2274488/api/v1/projects/2951531-new-project/todos/48545209-another-todo.json"},{"id":48545212,"todolist_id":8268819,"position":2,"content":"Number
|
179
|
+
3","completed":false,"created_at":"2013-06-21T21:50:27.000Z","updated_at":"2013-06-21T21:50:27.000Z","comments_count":0,"due_on":null,"due_at":null,"creator":{"id":4666033,"name":"Paul
|
180
|
+
Springett","avatar_url":"http://dge9rmgqjs8m1.cloudfront.net/global/default_avatar_v1_3/avatar.gif?r=3"},"url":"https://basecamp.com/2274488/api/v1/projects/2951531-new-project/todos/48545212-number-3.json"},{"id":48546382,"todolist_id":8268819,"position":3,"content":"My
|
181
|
+
todo","completed":false,"created_at":"2013-06-21T22:01:32.000Z","updated_at":"2013-06-21T22:01:32.000Z","comments_count":0,"due_on":null,"due_at":null,"creator":{"id":4666033,"name":"Paul
|
182
|
+
Springett","avatar_url":"http://dge9rmgqjs8m1.cloudfront.net/global/default_avatar_v1_3/avatar.gif?r=3"},"url":"https://basecamp.com/2274488/api/v1/projects/2951531-new-project/todos/48546382-my-todo.json"}],"completed":[]},"comments":[],"subscribers":[{"id":4666033,"name":"Paul
|
183
|
+
Springett"}]}'
|
184
|
+
http_version:
|
185
|
+
recorded_at: Fri, 21 Jun 2013 22:12:36 GMT
|
186
|
+
recorded_with: VCR 2.5.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
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: 2013-
|
12
|
+
date: 2013-06-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rapidash
|
16
|
-
requirement: &
|
16
|
+
requirement: &70106379265520 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70106379265520
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70106379280400 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70106379280400
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70106379278020 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70106379278020
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: simplecov
|
49
|
-
requirement: &
|
49
|
+
requirement: &70106379276340 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70106379276340
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: vcr
|
60
|
-
requirement: &
|
60
|
+
requirement: &70106379274940 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70106379274940
|
69
69
|
description: Fully-fledged Ruby API wrapper for Basecamp Next
|
70
70
|
email:
|
71
71
|
- paul@springett.me
|
@@ -75,13 +75,40 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- .gitignore
|
77
77
|
- .rspec
|
78
|
+
- .travis.yml
|
78
79
|
- Gemfile
|
79
80
|
- LICENSE
|
80
81
|
- README.md
|
81
82
|
- Rakefile
|
82
83
|
- bcx.gemspec
|
84
|
+
- docs/bcx.html
|
85
|
+
- docs/configuration.html
|
86
|
+
- docs/docco.css
|
87
|
+
- docs/http.html
|
88
|
+
- docs/oauth.html
|
89
|
+
- docs/person.html
|
90
|
+
- docs/project.html
|
91
|
+
- docs/public/fonts/aller-bold.eot
|
92
|
+
- docs/public/fonts/aller-bold.ttf
|
93
|
+
- docs/public/fonts/aller-bold.woff
|
94
|
+
- docs/public/fonts/aller-light.eot
|
95
|
+
- docs/public/fonts/aller-light.ttf
|
96
|
+
- docs/public/fonts/aller-light.woff
|
97
|
+
- docs/public/fonts/fleurons.eot
|
98
|
+
- docs/public/fonts/fleurons.ttf
|
99
|
+
- docs/public/fonts/fleurons.woff
|
100
|
+
- docs/public/fonts/novecento-bold.eot
|
101
|
+
- docs/public/fonts/novecento-bold.ttf
|
102
|
+
- docs/public/fonts/novecento-bold.woff
|
103
|
+
- docs/public/images/gray.png
|
104
|
+
- docs/public/stylesheets/normalize.css
|
105
|
+
- docs/response_error.html
|
106
|
+
- docs/todo.html
|
107
|
+
- docs/todolist.html
|
108
|
+
- docs/version.html
|
83
109
|
- lib/bcx.rb
|
84
|
-
- lib/bcx/client.rb
|
110
|
+
- lib/bcx/client/http.rb
|
111
|
+
- lib/bcx/client/oauth.rb
|
85
112
|
- lib/bcx/configuration.rb
|
86
113
|
- lib/bcx/resources/person.rb
|
87
114
|
- lib/bcx/resources/project.rb
|
@@ -90,8 +117,19 @@ files:
|
|
90
117
|
- lib/bcx/response_error.rb
|
91
118
|
- lib/bcx/version.rb
|
92
119
|
- spec/bcx/client_spec.rb
|
120
|
+
- spec/bcx/person_spec.rb
|
93
121
|
- spec/bcx/project_spec.rb
|
122
|
+
- spec/bcx/todo_spec.rb
|
94
123
|
- spec/bcx/todolist_spec.rb
|
124
|
+
- spec/cassettes/Bcx_Client/error_handling/should_raise_exception.yml
|
125
|
+
- spec/cassettes/Bcx_Resources_Person/DELETE_/people/4904728_json/should_delete_a_todolist.yml
|
126
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people/4666033_json/should_have_the_correct_id.yml
|
127
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people/4666033_json/should_return_a_hash.yml
|
128
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people/me_json/should_have_assigned_todos.yml
|
129
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people/me_json/should_have_the_correct_id.yml
|
130
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people/me_json/should_return_a_hash.yml
|
131
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people_json/first_person_should_have_the_correct_id.yml
|
132
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people_json/should_be_an_array.yml
|
95
133
|
- spec/cassettes/Bcx_Resources_Project/DELETE_/projects/2937644/should_delete_a_project.yml
|
96
134
|
- spec/cassettes/Bcx_Resources_Project/GET_/projects/2937644/should_have_the_correct_id.yml
|
97
135
|
- spec/cassettes/Bcx_Resources_Project/GET_/projects/2937644/should_return_a_hash.yml
|
@@ -101,6 +139,14 @@ files:
|
|
101
139
|
- spec/cassettes/Bcx_Resources_Project/GET_/projects/should_be_an_array.yml
|
102
140
|
- spec/cassettes/Bcx_Resources_Project/POST_/projects/should_create_a_new_project.yml
|
103
141
|
- spec/cassettes/Bcx_Resources_Project/PUT_/projects/2937644/should_update_an_existing_project.yml
|
142
|
+
- spec/cassettes/Bcx_Resources_Todo/DELETE_/projects/2951531/todos/48545200_json/should_delete_the_given_todo.yml
|
143
|
+
- spec/cassettes/Bcx_Resources_Todo/GET_/projects/2951531/todos/48545200_json/should_have_the_correct_id.yml
|
144
|
+
- spec/cassettes/Bcx_Resources_Todo/GET_/projects/2951531/todos/48545200_json/should_return_a_hash.yml
|
145
|
+
- spec/cassettes/Bcx_Resources_Todo/POST_/projects/2951531/todolists/2951531/todos_json/should_create_a_new_todo.yml
|
146
|
+
- spec/cassettes/Bcx_Resources_Todo/POST_/projects/2951531/todolists/8268819/todos_json/should_create_a_new_todo.yml
|
147
|
+
- spec/cassettes/Bcx_Resources_Todo/PUT_/projects/2951531/todos/48545200_json/should_update_an_existing_todo.yml
|
148
|
+
- spec/cassettes/Bcx_Resources_Todolist/DELETE_/projects/2956584/todolists/8268819_json/should_create_a_new_todolist.yml
|
149
|
+
- spec/cassettes/Bcx_Resources_Todolist/DELETE_/projects/2956584/todolists/8268819_json/should_delete_a_todolist.yml
|
104
150
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/1/todolists/completed_json/first_todolist_should_have_the_correct_id.yml
|
105
151
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/1/todolists/completed_json/should_be_an_array.yml
|
106
152
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/123/todolists/456_json/should_have_the_correct_id.yml
|
@@ -113,6 +159,8 @@ files:
|
|
113
159
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists/completed_json/should_be_an_array.yml
|
114
160
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists_json/first_todolist_should_have_the_correct_id.yml
|
115
161
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists_json/should_be_an_array.yml
|
162
|
+
- spec/cassettes/Bcx_Resources_Todolist/POST_/projects/123/todolists_json/should_create_a_new_todolist.yml
|
163
|
+
- spec/cassettes/Bcx_Resources_Todolist/PUT_/projects/2956584/todolists/8268819_json/should_create_a_new_todolist.yml
|
116
164
|
- spec/cassettes/Bcx_Resources_Todolist/projects/123/todolists_json/should_create_a_new_todolist.yml
|
117
165
|
- spec/spec_helper.rb
|
118
166
|
homepage: ''
|
@@ -127,12 +175,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
175
|
- - ! '>='
|
128
176
|
- !ruby/object:Gem::Version
|
129
177
|
version: '0'
|
178
|
+
segments:
|
179
|
+
- 0
|
180
|
+
hash: 3015624235311815294
|
130
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
182
|
none: false
|
132
183
|
requirements:
|
133
184
|
- - ! '>='
|
134
185
|
- !ruby/object:Gem::Version
|
135
186
|
version: '0'
|
187
|
+
segments:
|
188
|
+
- 0
|
189
|
+
hash: 3015624235311815294
|
136
190
|
requirements: []
|
137
191
|
rubyforge_project:
|
138
192
|
rubygems_version: 1.8.16
|
@@ -142,8 +196,19 @@ summary: Fully-fledged Ruby API wrapper for Basecamp Next. Uses the Rapidash gem
|
|
142
196
|
the hood.
|
143
197
|
test_files:
|
144
198
|
- spec/bcx/client_spec.rb
|
199
|
+
- spec/bcx/person_spec.rb
|
145
200
|
- spec/bcx/project_spec.rb
|
201
|
+
- spec/bcx/todo_spec.rb
|
146
202
|
- spec/bcx/todolist_spec.rb
|
203
|
+
- spec/cassettes/Bcx_Client/error_handling/should_raise_exception.yml
|
204
|
+
- spec/cassettes/Bcx_Resources_Person/DELETE_/people/4904728_json/should_delete_a_todolist.yml
|
205
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people/4666033_json/should_have_the_correct_id.yml
|
206
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people/4666033_json/should_return_a_hash.yml
|
207
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people/me_json/should_have_assigned_todos.yml
|
208
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people/me_json/should_have_the_correct_id.yml
|
209
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people/me_json/should_return_a_hash.yml
|
210
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people_json/first_person_should_have_the_correct_id.yml
|
211
|
+
- spec/cassettes/Bcx_Resources_Person/GET_/people_json/should_be_an_array.yml
|
147
212
|
- spec/cassettes/Bcx_Resources_Project/DELETE_/projects/2937644/should_delete_a_project.yml
|
148
213
|
- spec/cassettes/Bcx_Resources_Project/GET_/projects/2937644/should_have_the_correct_id.yml
|
149
214
|
- spec/cassettes/Bcx_Resources_Project/GET_/projects/2937644/should_return_a_hash.yml
|
@@ -153,6 +218,14 @@ test_files:
|
|
153
218
|
- spec/cassettes/Bcx_Resources_Project/GET_/projects/should_be_an_array.yml
|
154
219
|
- spec/cassettes/Bcx_Resources_Project/POST_/projects/should_create_a_new_project.yml
|
155
220
|
- spec/cassettes/Bcx_Resources_Project/PUT_/projects/2937644/should_update_an_existing_project.yml
|
221
|
+
- spec/cassettes/Bcx_Resources_Todo/DELETE_/projects/2951531/todos/48545200_json/should_delete_the_given_todo.yml
|
222
|
+
- spec/cassettes/Bcx_Resources_Todo/GET_/projects/2951531/todos/48545200_json/should_have_the_correct_id.yml
|
223
|
+
- spec/cassettes/Bcx_Resources_Todo/GET_/projects/2951531/todos/48545200_json/should_return_a_hash.yml
|
224
|
+
- spec/cassettes/Bcx_Resources_Todo/POST_/projects/2951531/todolists/2951531/todos_json/should_create_a_new_todo.yml
|
225
|
+
- spec/cassettes/Bcx_Resources_Todo/POST_/projects/2951531/todolists/8268819/todos_json/should_create_a_new_todo.yml
|
226
|
+
- spec/cassettes/Bcx_Resources_Todo/PUT_/projects/2951531/todos/48545200_json/should_update_an_existing_todo.yml
|
227
|
+
- spec/cassettes/Bcx_Resources_Todolist/DELETE_/projects/2956584/todolists/8268819_json/should_create_a_new_todolist.yml
|
228
|
+
- spec/cassettes/Bcx_Resources_Todolist/DELETE_/projects/2956584/todolists/8268819_json/should_delete_a_todolist.yml
|
156
229
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/1/todolists/completed_json/first_todolist_should_have_the_correct_id.yml
|
157
230
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/1/todolists/completed_json/should_be_an_array.yml
|
158
231
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/123/todolists/456_json/should_have_the_correct_id.yml
|
@@ -165,6 +238,7 @@ test_files:
|
|
165
238
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists/completed_json/should_be_an_array.yml
|
166
239
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists_json/first_todolist_should_have_the_correct_id.yml
|
167
240
|
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists_json/should_be_an_array.yml
|
241
|
+
- spec/cassettes/Bcx_Resources_Todolist/POST_/projects/123/todolists_json/should_create_a_new_todolist.yml
|
242
|
+
- spec/cassettes/Bcx_Resources_Todolist/PUT_/projects/2956584/todolists/8268819_json/should_create_a_new_todolist.yml
|
168
243
|
- spec/cassettes/Bcx_Resources_Todolist/projects/123/todolists_json/should_create_a_new_todolist.yml
|
169
244
|
- spec/spec_helper.rb
|
170
|
-
has_rdoc:
|
data/lib/bcx/client.rb
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
module Bcx
|
2
|
-
class Client < Rapidash::Client
|
3
|
-
extension :json
|
4
|
-
|
5
|
-
raise_errors
|
6
|
-
|
7
|
-
resource :projects, class_name: 'Bcx::Resources::Project'
|
8
|
-
resource :todolists, class_name: 'Bcx::Resources::Todolist'
|
9
|
-
|
10
|
-
def initialize(auth_method, options = {})
|
11
|
-
@account = Bcx.configuration.account
|
12
|
-
@api_version = Bcx.configuration.api_version
|
13
|
-
|
14
|
-
self.class.site("https://basecamp.com/#{@account}/api/#{@api_version}/")
|
15
|
-
self.class.method(auth_method)
|
16
|
-
|
17
|
-
options[:uid] ||= options[:client_id]
|
18
|
-
options[:secret] ||= options[:client_secret]
|
19
|
-
|
20
|
-
super(options)
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
24
|
-
end
|