bcx 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -0
- data/Gemfile +1 -1
- data/README.md +64 -15
- data/Rakefile +5 -1
- data/bcx.gemspec +5 -0
- data/lib/bcx.rb +7 -2
- data/lib/bcx/client.rb +11 -4
- data/lib/bcx/configuration.rb +9 -0
- data/lib/bcx/resources/person.rb +13 -0
- data/lib/bcx/resources/project.rb +40 -2
- data/lib/bcx/resources/todo.rb +37 -0
- data/lib/bcx/resources/todolist.rb +40 -1
- data/lib/bcx/response_error.rb +17 -0
- data/lib/bcx/version.rb +1 -1
- data/spec/bcx/client_spec.rb +40 -0
- data/spec/bcx/project_spec.rb +65 -0
- data/spec/bcx/todolist_spec.rb +75 -0
- data/spec/cassettes/Bcx_Resources_Project/DELETE_/projects/2937644/should_delete_a_project.yml +105 -0
- data/spec/cassettes/Bcx_Resources_Project/GET_/projects/2937644/should_have_the_correct_id.yml +60 -0
- data/spec/cassettes/Bcx_Resources_Project/GET_/projects/2937644/should_return_a_hash.yml +60 -0
- data/spec/cassettes/Bcx_Resources_Project/GET_/projects/archived/should_be_an_array.yml +58 -0
- data/spec/cassettes/Bcx_Resources_Project/GET_/projects/archived/should_be_empty.yml +58 -0
- data/spec/cassettes/Bcx_Resources_Project/GET_/projects/first_project_should_have_the_correct_id.yml +59 -0
- data/spec/cassettes/Bcx_Resources_Project/GET_/projects/should_be_an_array.yml +59 -0
- data/spec/cassettes/Bcx_Resources_Project/POST_/projects/should_create_a_new_project.yml +63 -0
- data/spec/cassettes/Bcx_Resources_Project/PUT_/projects/2937644/should_update_an_existing_project.yml +58 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/projects/1/todolists/completed_json/first_todolist_should_have_the_correct_id.yml +59 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/projects/1/todolists/completed_json/should_be_an_array.yml +59 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/projects/123/todolists/456_json/should_have_the_correct_id.yml +67 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/projects/123/todolists/456_json/should_return_a_hash.yml +67 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2937644/todolists_json/first_todolist_should_have_the_correct_id.yml +114 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2937644/todolists_json/should_be_an_array.yml +114 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2956584/todolists/completed_json/first_todolist_should_have_the_correct_id.yml +59 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2956584/todolists/completed_json/should_be_an_array.yml +59 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/todolists/completed_json/first_todolist_should_have_the_correct_id.yml +60 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/todolists/completed_json/should_be_an_array.yml +60 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/todolists_json/first_todolist_should_have_the_correct_id.yml +60 -0
- data/spec/cassettes/Bcx_Resources_Todolist/GET_/todolists_json/should_be_an_array.yml +60 -0
- data/spec/cassettes/Bcx_Resources_Todolist/projects/123/todolists_json/should_create_a_new_todolist.yml +62 -0
- data/spec/spec_helper.rb +21 -0
- metadata +103 -8
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://basecamp.com/2274488/api/v1/projects/2956584/todolists.json
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ! '{"name":"My todolist","description":"This is a todolist"}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.8.7
|
12
|
+
Content-Type:
|
13
|
+
- application/json
|
14
|
+
Authorization:
|
15
|
+
- Basic YmN4LXRlc3QtdXNlcjpzZWNyZXQ=
|
16
|
+
response:
|
17
|
+
status:
|
18
|
+
code: 201
|
19
|
+
message:
|
20
|
+
headers:
|
21
|
+
server:
|
22
|
+
- nginx
|
23
|
+
date:
|
24
|
+
- Tue, 28 May 2013 21:16:16 GMT
|
25
|
+
content-type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
transfer-encoding:
|
28
|
+
- chunked
|
29
|
+
connection:
|
30
|
+
- close
|
31
|
+
status:
|
32
|
+
- 201 Created
|
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.json
|
43
|
+
x-asset-paths:
|
44
|
+
- ! '{"application.js":"application-65ce9eab0fe6859d64efe0f889d5e231.js","application.css":"application-417c4f9074157e12c1dfb6ede37ce3e3.css"}'
|
45
|
+
location:
|
46
|
+
- https://basecamp.com/2274488/api/v1/projects/2956584-new-project/todolists/7702303-my-todolist.json
|
47
|
+
etag:
|
48
|
+
- ! '"12c774432725cf346424fd9c6b12c807"'
|
49
|
+
cache-control:
|
50
|
+
- max-age=0, private, must-revalidate
|
51
|
+
x-request-id:
|
52
|
+
- f077634e-6d73-48f9-9e89-0b4b6e49acff
|
53
|
+
x-runtime:
|
54
|
+
- '0.584372'
|
55
|
+
body:
|
56
|
+
encoding: US-ASCII
|
57
|
+
string: ! '{"id":7702303,"name":"My todolist","description":"This is a todolist","created_at":"2013-05-28T21:16:16.460Z","updated_at":"2013-05-28T21:16:16.460Z","completed":false,"position":1,"remaining_count":0,"completed_count":0,"creator":{"id":4666033,"name":"Paul
|
58
|
+
Springett","avatar_url":"http://dge9rmgqjs8m1.cloudfront.net/global/default_avatar_v1_3/avatar.gif?r=3"},"todos":{"remaining":[],"completed":[]},"comments":[],"subscribers":[{"id":4666033,"name":"Paul
|
59
|
+
Springett"}]}'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Tue, 28 May 2013 21:16:16 GMT
|
62
|
+
recorded_with: VCR 2.5.0
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
SimpleCov.start
|
3
|
+
|
4
|
+
require 'vcr'
|
5
|
+
VCR.configure do |c|
|
6
|
+
c.cassette_library_dir = 'spec/cassettes'
|
7
|
+
c.hook_into :faraday
|
8
|
+
c.default_cassette_options = { record: :new_episodes }
|
9
|
+
c.configure_rspec_metadata!
|
10
|
+
end
|
11
|
+
|
12
|
+
require 'bcx'
|
13
|
+
|
14
|
+
RSpec.configure do |config|
|
15
|
+
config.before(:each) do
|
16
|
+
# Set to test account
|
17
|
+
Bcx.configure { |config| config.account = '2274488' }
|
18
|
+
end
|
19
|
+
|
20
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
21
|
+
end
|
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.0.2
|
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-05-
|
12
|
+
date: 2013-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rapidash
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70292815485980 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,12 +21,51 @@ dependencies:
|
|
21
21
|
version: 0.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: *70292815485980
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rake
|
27
|
+
requirement: &70292815485340 !ruby/object:Gem::Requirement
|
25
28
|
none: false
|
26
29
|
requirements:
|
27
|
-
- -
|
30
|
+
- - ! '>='
|
28
31
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70292815485340
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &70292815482280 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70292815482280
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: simplecov
|
49
|
+
requirement: &70292815481620 !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *70292815481620
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: vcr
|
60
|
+
requirement: &70292815506720 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70292815506720
|
30
69
|
description: Fully-fledged Ruby API wrapper for Basecamp Next
|
31
70
|
email:
|
32
71
|
- paul@springett.me
|
@@ -35,6 +74,7 @@ extensions: []
|
|
35
74
|
extra_rdoc_files: []
|
36
75
|
files:
|
37
76
|
- .gitignore
|
77
|
+
- .rspec
|
38
78
|
- Gemfile
|
39
79
|
- LICENSE
|
40
80
|
- README.md
|
@@ -43,9 +83,38 @@ files:
|
|
43
83
|
- lib/bcx.rb
|
44
84
|
- lib/bcx/client.rb
|
45
85
|
- lib/bcx/configuration.rb
|
86
|
+
- lib/bcx/resources/person.rb
|
46
87
|
- lib/bcx/resources/project.rb
|
88
|
+
- lib/bcx/resources/todo.rb
|
47
89
|
- lib/bcx/resources/todolist.rb
|
90
|
+
- lib/bcx/response_error.rb
|
48
91
|
- lib/bcx/version.rb
|
92
|
+
- spec/bcx/client_spec.rb
|
93
|
+
- spec/bcx/project_spec.rb
|
94
|
+
- spec/bcx/todolist_spec.rb
|
95
|
+
- spec/cassettes/Bcx_Resources_Project/DELETE_/projects/2937644/should_delete_a_project.yml
|
96
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/2937644/should_have_the_correct_id.yml
|
97
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/2937644/should_return_a_hash.yml
|
98
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/archived/should_be_an_array.yml
|
99
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/archived/should_be_empty.yml
|
100
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/first_project_should_have_the_correct_id.yml
|
101
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/should_be_an_array.yml
|
102
|
+
- spec/cassettes/Bcx_Resources_Project/POST_/projects/should_create_a_new_project.yml
|
103
|
+
- spec/cassettes/Bcx_Resources_Project/PUT_/projects/2937644/should_update_an_existing_project.yml
|
104
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/1/todolists/completed_json/first_todolist_should_have_the_correct_id.yml
|
105
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/1/todolists/completed_json/should_be_an_array.yml
|
106
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/123/todolists/456_json/should_have_the_correct_id.yml
|
107
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/123/todolists/456_json/should_return_a_hash.yml
|
108
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2937644/todolists_json/first_todolist_should_have_the_correct_id.yml
|
109
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2937644/todolists_json/should_be_an_array.yml
|
110
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2956584/todolists/completed_json/first_todolist_should_have_the_correct_id.yml
|
111
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2956584/todolists/completed_json/should_be_an_array.yml
|
112
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists/completed_json/first_todolist_should_have_the_correct_id.yml
|
113
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists/completed_json/should_be_an_array.yml
|
114
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists_json/first_todolist_should_have_the_correct_id.yml
|
115
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists_json/should_be_an_array.yml
|
116
|
+
- spec/cassettes/Bcx_Resources_Todolist/projects/123/todolists_json/should_create_a_new_todolist.yml
|
117
|
+
- spec/spec_helper.rb
|
49
118
|
homepage: ''
|
50
119
|
licenses: []
|
51
120
|
post_install_message:
|
@@ -66,10 +135,36 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
135
|
version: '0'
|
67
136
|
requirements: []
|
68
137
|
rubyforge_project:
|
69
|
-
rubygems_version: 1.8.
|
138
|
+
rubygems_version: 1.8.16
|
70
139
|
signing_key:
|
71
140
|
specification_version: 3
|
72
141
|
summary: Fully-fledged Ruby API wrapper for Basecamp Next. Uses the Rapidash gem under
|
73
142
|
the hood.
|
74
|
-
test_files:
|
143
|
+
test_files:
|
144
|
+
- spec/bcx/client_spec.rb
|
145
|
+
- spec/bcx/project_spec.rb
|
146
|
+
- spec/bcx/todolist_spec.rb
|
147
|
+
- spec/cassettes/Bcx_Resources_Project/DELETE_/projects/2937644/should_delete_a_project.yml
|
148
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/2937644/should_have_the_correct_id.yml
|
149
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/2937644/should_return_a_hash.yml
|
150
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/archived/should_be_an_array.yml
|
151
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/archived/should_be_empty.yml
|
152
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/first_project_should_have_the_correct_id.yml
|
153
|
+
- spec/cassettes/Bcx_Resources_Project/GET_/projects/should_be_an_array.yml
|
154
|
+
- spec/cassettes/Bcx_Resources_Project/POST_/projects/should_create_a_new_project.yml
|
155
|
+
- spec/cassettes/Bcx_Resources_Project/PUT_/projects/2937644/should_update_an_existing_project.yml
|
156
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/1/todolists/completed_json/first_todolist_should_have_the_correct_id.yml
|
157
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/1/todolists/completed_json/should_be_an_array.yml
|
158
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/123/todolists/456_json/should_have_the_correct_id.yml
|
159
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/123/todolists/456_json/should_return_a_hash.yml
|
160
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2937644/todolists_json/first_todolist_should_have_the_correct_id.yml
|
161
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2937644/todolists_json/should_be_an_array.yml
|
162
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2956584/todolists/completed_json/first_todolist_should_have_the_correct_id.yml
|
163
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/projects/2956584/todolists/completed_json/should_be_an_array.yml
|
164
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists/completed_json/first_todolist_should_have_the_correct_id.yml
|
165
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists/completed_json/should_be_an_array.yml
|
166
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists_json/first_todolist_should_have_the_correct_id.yml
|
167
|
+
- spec/cassettes/Bcx_Resources_Todolist/GET_/todolists_json/should_be_an_array.yml
|
168
|
+
- spec/cassettes/Bcx_Resources_Todolist/projects/123/todolists_json/should_create_a_new_todolist.yml
|
169
|
+
- spec/spec_helper.rb
|
75
170
|
has_rdoc:
|