bugherd_client 0.0.6 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rspec +2 -1
- data/.travis.yml +4 -1
- data/README.md +23 -38
- data/Rakefile +6 -1
- data/bin/console +17 -0
- data/bugherd_client.gemspec +17 -13
- data/lib/bugherd_client.rb +19 -16
- data/lib/bugherd_client/client.rb +44 -18
- data/lib/bugherd_client/errors.rb +19 -5
- data/lib/bugherd_client/resources/v1/base.rb +2 -2
- data/lib/bugherd_client/resources/v1/comment.rb +1 -1
- data/lib/bugherd_client/resources/v1/project.rb +4 -4
- data/lib/bugherd_client/resources/v1/task.rb +11 -8
- data/lib/bugherd_client/resources/v2/attachment.rb +73 -0
- data/lib/bugherd_client/resources/v2/base.rb +24 -5
- data/lib/bugherd_client/resources/v2/comment.rb +2 -2
- data/lib/bugherd_client/resources/v2/organization.rb +5 -5
- data/lib/bugherd_client/resources/v2/project.rb +22 -13
- data/lib/bugherd_client/resources/v2/task.rb +34 -14
- data/lib/bugherd_client/resources/v2/webhook.rb +54 -0
- data/lib/bugherd_client/version.rb +1 -1
- data/spec/bugherd_client/client_spec.rb +63 -11
- data/spec/bugherd_client/v2/organization_spec.rb +21 -0
- data/spec/bugherd_client/v2/project_spec.rb +66 -0
- data/spec/bugherd_client/v2/task_spec.rb +46 -0
- data/spec/bugherd_client/v2/user_spec.rb +50 -0
- data/spec/bugherd_client/v2/webhook_spec.rb +20 -0
- data/spec/cassettes/guests_all.yml +64 -0
- data/spec/cassettes/members_all.yml +66 -0
- data/spec/cassettes/organizations_get.yml +62 -0
- data/spec/cassettes/projects_active.yml +65 -0
- data/spec/cassettes/projects_all.yml +65 -0
- data/spec/cassettes/projects_find_failure.yml +60 -0
- data/spec/cassettes/projects_find_success.yml +65 -0
- data/spec/cassettes/tasks_all.yml +87 -0
- data/spec/cassettes/tasks_find_success.yml +69 -0
- data/spec/cassettes/users_all.yml +66 -0
- data/spec/cassettes/webhooks_all.yml +64 -0
- data/spec/spec_helper.rb +23 -9
- data/spec/support/http_helper.rb +7 -0
- metadata +130 -23
@@ -0,0 +1,64 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://testing:x@www.bugherd.com/api_v2/webhooks
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Accept:
|
11
|
+
- application/json
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip, deflate
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Server:
|
24
|
+
- nginx
|
25
|
+
X-Rack-Cache:
|
26
|
+
- miss
|
27
|
+
Cache-Control:
|
28
|
+
- must-revalidate, private, max-age=0
|
29
|
+
Content-Type:
|
30
|
+
- application/json; charset=utf-8
|
31
|
+
Date:
|
32
|
+
- Tue, 16 Dec 2014 12:45:50 GMT
|
33
|
+
Status:
|
34
|
+
- 200 OK
|
35
|
+
X-Request-Id:
|
36
|
+
- 87f7af4298103ba30f78cb1a9e407643
|
37
|
+
X-Xss-Protection:
|
38
|
+
- 1; mode=block
|
39
|
+
Transfer-Encoding:
|
40
|
+
- chunked
|
41
|
+
X-Runtime:
|
42
|
+
- '0.022153'
|
43
|
+
X-Content-Type-Options:
|
44
|
+
- nosniff
|
45
|
+
Etag:
|
46
|
+
- '"4b3512925a610e5343e3e30cf3481dd7"'
|
47
|
+
Connection:
|
48
|
+
- keep-alive
|
49
|
+
Set-Cookie:
|
50
|
+
- X-Mapping-fjhppofk=E1227771D62C08D6CA46945339FEFF4D; path=/
|
51
|
+
- landing=%7B%22utm_source%22%3Anull%2C%22utm_medium%22%3Anull%2C%22utm_campaign%22%3Anull%2C%22utm_term%22%3Anull%2C%22utm_content%22%3Anull%2C%22path%22%3A%22%2Fapi_v2%2Fwebhooks%22%2C%22referer%22%3Anull%2C%22remote_ip%22%3A%2290.156.0.165%22%2C%22time%22%3A%222014-12-16T12%3A45%3A50%2B00%3A00%22%7D;
|
52
|
+
path=/; expires=Sat, 16-Dec-2034 12:45:50 GMT
|
53
|
+
X-Frame-Options:
|
54
|
+
- SAMEORIGIN
|
55
|
+
X-Ua-Compatible:
|
56
|
+
- IE=Edge,chrome=1
|
57
|
+
X-Powered-By:
|
58
|
+
- cloud66
|
59
|
+
body:
|
60
|
+
encoding: UTF-8
|
61
|
+
string: '{"webhooks":[]}'
|
62
|
+
http_version:
|
63
|
+
recorded_at: Tue, 16 Dec 2014 12:45:50 GMT
|
64
|
+
recorded_with: VCR 2.9.3
|
data/spec/spec_helper.rb
CHANGED
@@ -1,23 +1,37 @@
|
|
1
|
-
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
-
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
-
# Require this file using `require "spec_helper"` to ensure that it is only
|
4
|
-
# loaded once.
|
5
|
-
#
|
6
1
|
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
2
|
|
8
|
-
lib = File.expand_path(
|
9
|
-
|
3
|
+
lib = File.expand_path('../../lib', __FILE__)
|
4
|
+
support = File.expand_path('../support', __FILE__)
|
5
|
+
[lib, support].each { |path| $:.unshift(path) unless $:.include?(path) }
|
6
|
+
require 'pry'
|
7
|
+
|
8
|
+
# coverage
|
9
|
+
require 'simplecov'
|
10
|
+
SimpleCov.start do
|
11
|
+
add_filter '/spec/'
|
12
|
+
add_group 'api_v1', 'bugherd_client/resources/v1'
|
13
|
+
add_group 'api_v2', 'bugherd_client/resources/v2'
|
14
|
+
end
|
10
15
|
|
11
16
|
require 'bugherd_client'
|
12
17
|
|
13
18
|
RSpec.configure do |config|
|
14
|
-
|
19
|
+
|
15
20
|
config.run_all_when_everything_filtered = true
|
16
21
|
config.filter_run :focus
|
17
22
|
|
23
|
+
# Use expext(...).to syntax
|
24
|
+
config.expect_with(:rspec) do |c|
|
25
|
+
c.syntax = :expect
|
26
|
+
end
|
27
|
+
|
18
28
|
# Run specs in random order to surface order dependencies. If you find an
|
19
29
|
# order dependency and want to debug it, you can fix the order by providing
|
20
30
|
# the seed, which is printed after each run.
|
21
31
|
# --seed 1234
|
22
|
-
config.order =
|
32
|
+
config.order = :random
|
33
|
+
Kernel.srand(config.seed)
|
34
|
+
|
35
|
+
# Show the 10 slowest tests
|
36
|
+
config.profile_examples = 10
|
23
37
|
end
|
metadata
CHANGED
@@ -1,91 +1,161 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bugherd_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Faucett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hashie
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: activesupport
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- -
|
45
|
+
- - ">"
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '3.0'
|
34
|
-
- - <
|
48
|
+
- - "<"
|
35
49
|
- !ruby/object:Gem::Version
|
36
50
|
version: '5.0'
|
37
51
|
type: :runtime
|
38
52
|
prerelease: false
|
39
53
|
version_requirements: !ruby/object:Gem::Requirement
|
40
54
|
requirements:
|
41
|
-
- -
|
55
|
+
- - ">"
|
42
56
|
- !ruby/object:Gem::Version
|
43
57
|
version: '3.0'
|
44
|
-
- - <
|
58
|
+
- - "<"
|
45
59
|
- !ruby/object:Gem::Version
|
46
60
|
version: '5.0'
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
name: bundler
|
49
63
|
requirement: !ruby/object:Gem::Requirement
|
50
64
|
requirements:
|
51
|
-
- -
|
65
|
+
- - ">="
|
52
66
|
- !ruby/object:Gem::Version
|
53
67
|
version: '1.5'
|
54
68
|
type: :development
|
55
69
|
prerelease: false
|
56
70
|
version_requirements: !ruby/object:Gem::Requirement
|
57
71
|
requirements:
|
58
|
-
- -
|
72
|
+
- - ">="
|
59
73
|
- !ruby/object:Gem::Version
|
60
74
|
version: '1.5'
|
61
75
|
- !ruby/object:Gem::Dependency
|
62
76
|
name: rspec
|
63
77
|
requirement: !ruby/object:Gem::Requirement
|
64
78
|
requirements:
|
65
|
-
- -
|
79
|
+
- - ">="
|
66
80
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
81
|
+
version: '3'
|
68
82
|
type: :development
|
69
83
|
prerelease: false
|
70
84
|
version_requirements: !ruby/object:Gem::Requirement
|
71
85
|
requirements:
|
72
|
-
- -
|
86
|
+
- - ">="
|
73
87
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
88
|
+
version: '3'
|
75
89
|
- !ruby/object:Gem::Dependency
|
76
90
|
name: rake
|
77
91
|
requirement: !ruby/object:Gem::Requirement
|
78
92
|
requirements:
|
79
|
-
- -
|
93
|
+
- - ">="
|
80
94
|
- !ruby/object:Gem::Version
|
81
95
|
version: '0'
|
82
96
|
type: :development
|
83
97
|
prerelease: false
|
84
98
|
version_requirements: !ruby/object:Gem::Requirement
|
85
99
|
requirements:
|
86
|
-
- -
|
100
|
+
- - ">="
|
87
101
|
- !ruby/object:Gem::Version
|
88
102
|
version: '0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: webmock
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '1.20'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '1.20'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: vcr
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '2.9'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '2.9'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: pry
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - "~>"
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 0.10.1
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - "~>"
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.10.1
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: simplecov
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - '='
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: 0.9.1
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - '='
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: 0.9.1
|
89
159
|
description: Ruby Client for the Bugherd Rest API
|
90
160
|
email:
|
91
161
|
- jwaterfaucett@gmail.com
|
@@ -93,13 +163,14 @@ executables: []
|
|
93
163
|
extensions: []
|
94
164
|
extra_rdoc_files: []
|
95
165
|
files:
|
96
|
-
- .gitignore
|
97
|
-
- .rspec
|
98
|
-
- .travis.yml
|
166
|
+
- ".gitignore"
|
167
|
+
- ".rspec"
|
168
|
+
- ".travis.yml"
|
99
169
|
- Gemfile
|
100
170
|
- LICENSE.txt
|
101
171
|
- README.md
|
102
172
|
- Rakefile
|
173
|
+
- bin/console
|
103
174
|
- bugherd_client.gemspec
|
104
175
|
- lib/bugherd_client.rb
|
105
176
|
- lib/bugherd_client/client.rb
|
@@ -109,16 +180,35 @@ files:
|
|
109
180
|
- lib/bugherd_client/resources/v1/project.rb
|
110
181
|
- lib/bugherd_client/resources/v1/task.rb
|
111
182
|
- lib/bugherd_client/resources/v1/user.rb
|
183
|
+
- lib/bugherd_client/resources/v2/attachment.rb
|
112
184
|
- lib/bugherd_client/resources/v2/base.rb
|
113
185
|
- lib/bugherd_client/resources/v2/comment.rb
|
114
186
|
- lib/bugherd_client/resources/v2/organization.rb
|
115
187
|
- lib/bugherd_client/resources/v2/project.rb
|
116
188
|
- lib/bugherd_client/resources/v2/task.rb
|
117
189
|
- lib/bugherd_client/resources/v2/user.rb
|
190
|
+
- lib/bugherd_client/resources/v2/webhook.rb
|
118
191
|
- lib/bugherd_client/version.rb
|
119
192
|
- spec/bugherd_client/client_spec.rb
|
193
|
+
- spec/bugherd_client/v2/organization_spec.rb
|
194
|
+
- spec/bugherd_client/v2/project_spec.rb
|
195
|
+
- spec/bugherd_client/v2/task_spec.rb
|
196
|
+
- spec/bugherd_client/v2/user_spec.rb
|
197
|
+
- spec/bugherd_client/v2/webhook_spec.rb
|
198
|
+
- spec/cassettes/guests_all.yml
|
199
|
+
- spec/cassettes/members_all.yml
|
200
|
+
- spec/cassettes/organizations_get.yml
|
201
|
+
- spec/cassettes/projects_active.yml
|
202
|
+
- spec/cassettes/projects_all.yml
|
203
|
+
- spec/cassettes/projects_find_failure.yml
|
204
|
+
- spec/cassettes/projects_find_success.yml
|
205
|
+
- spec/cassettes/tasks_all.yml
|
206
|
+
- spec/cassettes/tasks_find_success.yml
|
207
|
+
- spec/cassettes/users_all.yml
|
208
|
+
- spec/cassettes/webhooks_all.yml
|
120
209
|
- spec/spec_helper.rb
|
121
|
-
|
210
|
+
- spec/support/http_helper.rb
|
211
|
+
homepage: http://jwaterfaucett.github.io/bugherd_client
|
122
212
|
licenses:
|
123
213
|
- MIT
|
124
214
|
metadata: {}
|
@@ -128,20 +218,37 @@ require_paths:
|
|
128
218
|
- lib
|
129
219
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
220
|
requirements:
|
131
|
-
- -
|
221
|
+
- - ">="
|
132
222
|
- !ruby/object:Gem::Version
|
133
223
|
version: '0'
|
134
224
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
225
|
requirements:
|
136
|
-
- -
|
226
|
+
- - ">="
|
137
227
|
- !ruby/object:Gem::Version
|
138
228
|
version: '0'
|
139
229
|
requirements: []
|
140
230
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.
|
231
|
+
rubygems_version: 2.2.2
|
142
232
|
signing_key:
|
143
233
|
specification_version: 4
|
144
234
|
summary: Ruby Client for the Bugherd API
|
145
235
|
test_files:
|
146
236
|
- spec/bugherd_client/client_spec.rb
|
237
|
+
- spec/bugherd_client/v2/organization_spec.rb
|
238
|
+
- spec/bugherd_client/v2/project_spec.rb
|
239
|
+
- spec/bugherd_client/v2/task_spec.rb
|
240
|
+
- spec/bugherd_client/v2/user_spec.rb
|
241
|
+
- spec/bugherd_client/v2/webhook_spec.rb
|
242
|
+
- spec/cassettes/guests_all.yml
|
243
|
+
- spec/cassettes/members_all.yml
|
244
|
+
- spec/cassettes/organizations_get.yml
|
245
|
+
- spec/cassettes/projects_active.yml
|
246
|
+
- spec/cassettes/projects_all.yml
|
247
|
+
- spec/cassettes/projects_find_failure.yml
|
248
|
+
- spec/cassettes/projects_find_success.yml
|
249
|
+
- spec/cassettes/tasks_all.yml
|
250
|
+
- spec/cassettes/tasks_find_success.yml
|
251
|
+
- spec/cassettes/users_all.yml
|
252
|
+
- spec/cassettes/webhooks_all.yml
|
147
253
|
- spec/spec_helper.rb
|
254
|
+
- spec/support/http_helper.rb
|