clubhouse_ruby 0.4.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE.txt +1 -1
- data/README.md +35 -9
- data/clubhouse_ruby.gemspec +11 -12
- data/lib/clubhouse_ruby/constants.rb +10 -2
- data/lib/clubhouse_ruby/path_builder.rb +1 -1
- data/lib/clubhouse_ruby/version.rb +1 -1
- metadata +23 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 45522d24c367a84e7e275c02608bebb005817a4d72273378be276a829e821450
|
4
|
+
data.tar.gz: 25d17170885a8b17586b5a65a66b13367a1cdd16801f32d268b6b7ce5358e85a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e975109f0422f5cc0360706d3fc7dad7dcb6b4bb27a55153b38bac8f167d5e3f0f84cc0dd191aae21f8c64f791cccfd5828bad9cf3b37a5fa96911ea3a835e3
|
7
|
+
data.tar.gz: 59c2e807d9e41a6b7a5bd05c9f7fa1afc76fc4ec56851ee8885ceafd9010a035bf76989379dc433de691d715bb83f882164ece6960cd90f354de11baeb198133
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# ClubhouseRuby
|
2
2
|
|
3
3
|
ClubhouseRuby is a lightweight Ruby wrapper of the
|
4
|
-
[Clubhouse REST API](https://clubhouse.io/api/rest/
|
4
|
+
[Clubhouse REST API](https://clubhouse.io/api/rest/v3/).
|
5
5
|
|
6
6
|
[Clubhouse](https://clubhouse.io) is a radical project management tool
|
7
7
|
particularly well suited to software development. If you're not familiar with
|
@@ -41,10 +41,10 @@ operates as an effective turing machine when lubricated with oil.
|
|
41
41
|
## Usage
|
42
42
|
|
43
43
|
This gem is a lightweight API wrapper. That means you'll need to refer to the
|
44
|
-
[API documentation](https://clubhouse.io/api/rest/
|
45
|
-
|
44
|
+
[API documentation](https://clubhouse.io/api/rest/v3/) to figure out what resources
|
45
|
+
and actions exist.
|
46
46
|
|
47
|
-
On the plus side, once you know what you want to do, using this gem should be
|
47
|
+
On the plus side, once you know what you want to do, using this gem should be
|
48
48
|
simple.
|
49
49
|
|
50
50
|
Instantiate an object to interface with the API:
|
@@ -61,7 +61,7 @@ clubhouse = ClubhouseRuby::Clubhouse.new(<YOUR CLUBHOUSE API TOKEN>, response_fo
|
|
61
61
|
|
62
62
|
Then, call methods on the object matching the resource(s) and action you are
|
63
63
|
interested in. For example, if you want to list all available epics, you need to
|
64
|
-
access the endpoint at https://api.clubhouse.io/api/v1/epics. The
|
64
|
+
access the endpoint at https://api.clubhouse.io/api/v1/epics. The
|
65
65
|
clubhouse_ruby gem uses an explicit action:
|
66
66
|
|
67
67
|
```ruby
|
@@ -147,6 +147,28 @@ clubhouse.projects(<project_id>).stories.list
|
|
147
147
|
# }
|
148
148
|
```
|
149
149
|
|
150
|
+
You can search stories, using standard Clubhouse [search operators](https://help.clubhouse.io/hc/en-us/articles/360000046646-Search-Operators):
|
151
|
+
|
152
|
+
```ruby
|
153
|
+
clubhouse.search_stories(page_size: 25, query: 'state:500000016')
|
154
|
+
# => {
|
155
|
+
# code: "200",
|
156
|
+
# status: "OK",
|
157
|
+
# content: {
|
158
|
+
# "next" => "/api/v3/search/stories?query=state%3A500000016&page_size=25&next=a8acc6577548df7a213272f7f9f617bcb1f8a831~24",
|
159
|
+
# "data" => [
|
160
|
+
# {
|
161
|
+
# "entity_type" => "story",
|
162
|
+
# "archived" => false,
|
163
|
+
# "created_at" => "...",
|
164
|
+
# "updated_at" => "...",
|
165
|
+
# ...
|
166
|
+
# }, ...
|
167
|
+
# ]
|
168
|
+
# }
|
169
|
+
# }
|
170
|
+
```
|
171
|
+
|
150
172
|
You can build a path in steps rather than all at once, and execution is deferred
|
151
173
|
until the action call:
|
152
174
|
|
@@ -174,7 +196,7 @@ accessing nested resources) followed by a final action that matches the methods
|
|
174
196
|
in the Clubhouse API documentation.
|
175
197
|
|
176
198
|
These resources and methods are enumerated in the source code
|
177
|
-
[here](https://github.com/
|
199
|
+
[here](https://github.com/jakesorce/clubhouse_ruby/blob/master/lib/clubhouse_ruby/constants.rb)
|
178
200
|
but generally you should find the url you are interested in from the docs.
|
179
201
|
|
180
202
|
## Errors
|
@@ -235,8 +257,12 @@ clubhouse.projects.stories.list
|
|
235
257
|
## Version
|
236
258
|
|
237
259
|
The current version of the clubhouse_ruby gem supports the current version of
|
238
|
-
the API, version
|
239
|
-
|
260
|
+
the API, version 3.
|
261
|
+
|
262
|
+
If you want something that definitely works with:
|
263
|
+
|
264
|
+
- v1, use version 0.2.0 of clubhouse_ruby
|
265
|
+
- v2, use version 0.3.0 of clubhouse_ruby
|
240
266
|
|
241
267
|
## Development
|
242
268
|
|
@@ -262,7 +288,7 @@ will be in publically visible from the code in this repo.**
|
|
262
288
|
## Contributing
|
263
289
|
|
264
290
|
Bug reports and pull requests are entirely welcome on GitHub at
|
265
|
-
https://github.com/
|
291
|
+
https://github.com/jakesorce/clubhouse_ruby.
|
266
292
|
|
267
293
|
## License
|
268
294
|
|
data/clubhouse_ruby.gemspec
CHANGED
@@ -1,16 +1,15 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
3
|
+
require "clubhouse_ruby/version"
|
5
4
|
|
6
5
|
Gem::Specification.new do |spec|
|
7
6
|
spec.name = "clubhouse_ruby"
|
8
7
|
spec.version = ClubhouseRuby::VERSION
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = ["
|
8
|
+
spec.authors = ["Jake Sorce"]
|
9
|
+
spec.email = ["jakesorce@gmail.com"]
|
11
10
|
|
12
|
-
spec.summary =
|
13
|
-
spec.homepage = "https://github.com/
|
11
|
+
spec.summary = "A lightweight Ruby wrapper for the Clubhouse REST API."
|
12
|
+
spec.homepage = "https://github.com/jakesorce/clubhouse_ruby"
|
14
13
|
spec.license = "MIT"
|
15
14
|
|
16
15
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
@@ -18,10 +17,10 @@ Gem::Specification.new do |spec|
|
|
18
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
18
|
spec.require_paths = ["lib"]
|
20
19
|
|
21
|
-
spec.add_development_dependency "bundler", "~> 1
|
22
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
20
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
24
21
|
spec.add_development_dependency "dotenv", "~> 2.1"
|
25
|
-
spec.add_development_dependency "
|
26
|
-
spec.add_development_dependency "
|
22
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
23
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
24
|
+
spec.add_development_dependency "vcr", "~> 6.0"
|
25
|
+
spec.add_development_dependency "webmock", "~> 3.7"
|
27
26
|
end
|
@@ -2,7 +2,7 @@ require 'json'
|
|
2
2
|
require 'csv'
|
3
3
|
|
4
4
|
module ClubhouseRuby
|
5
|
-
API_URL = "https://api.clubhouse.io/api/
|
5
|
+
API_URL = "https://api.clubhouse.io/api/v3/".freeze
|
6
6
|
|
7
7
|
# Response formats the clubhouse api knows about
|
8
8
|
FORMATS = {
|
@@ -28,10 +28,13 @@ module ClubhouseRuby
|
|
28
28
|
# These are the resource for the clubhouse api and can form part of the path
|
29
29
|
RESOURCES = [
|
30
30
|
:categories,
|
31
|
+
:entity_templates,
|
31
32
|
:epics,
|
32
33
|
:files,
|
34
|
+
:iterations,
|
33
35
|
:labels,
|
34
36
|
:linked_files,
|
37
|
+
:member,
|
35
38
|
:members,
|
36
39
|
:milestones,
|
37
40
|
:projects,
|
@@ -41,7 +44,8 @@ module ClubhouseRuby
|
|
41
44
|
:teams,
|
42
45
|
:workflows,
|
43
46
|
:tasks,
|
44
|
-
:comments
|
47
|
+
:comments,
|
48
|
+
:groups
|
45
49
|
].freeze
|
46
50
|
|
47
51
|
# These are the annoying edge cases in the clubhouse api that are don't fit
|
@@ -53,6 +57,10 @@ module ClubhouseRuby
|
|
53
57
|
bulk_update: {
|
54
58
|
path: :bulk,
|
55
59
|
action: :Put
|
60
|
+
},
|
61
|
+
search_stories: {
|
62
|
+
path: 'search/stories',
|
63
|
+
action: :Get
|
56
64
|
}
|
57
65
|
}.freeze
|
58
66
|
end
|
@@ -16,7 +16,7 @@ module ClubhouseRuby
|
|
16
16
|
#
|
17
17
|
# This example will execute a call to:
|
18
18
|
#
|
19
|
-
# `https://api.clubhouse.io/api/
|
19
|
+
# `https://api.clubhouse.io/api/v3/stories/{story-id}/comments/{comment-id}`
|
20
20
|
#
|
21
21
|
# with arguments:
|
22
22
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clubhouse_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Jake Sorce
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,87 +16,87 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '2.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: dotenv
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: vcr
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '6.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '6.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: webmock
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
89
|
+
version: '3.7'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
96
|
+
version: '3.7'
|
97
97
|
description:
|
98
98
|
email:
|
99
|
-
-
|
99
|
+
- jakesorce@gmail.com
|
100
100
|
executables: []
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files: []
|
@@ -116,7 +116,7 @@ files:
|
|
116
116
|
- lib/clubhouse_ruby/path_builder.rb
|
117
117
|
- lib/clubhouse_ruby/request.rb
|
118
118
|
- lib/clubhouse_ruby/version.rb
|
119
|
-
homepage: https://github.com/
|
119
|
+
homepage: https://github.com/jakesorce/clubhouse_ruby
|
120
120
|
licenses:
|
121
121
|
- MIT
|
122
122
|
metadata: {}
|
@@ -135,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
|
-
|
139
|
-
rubygems_version: 2.6.8
|
138
|
+
rubygems_version: 3.1.4
|
140
139
|
signing_key:
|
141
140
|
specification_version: 4
|
142
141
|
summary: A lightweight Ruby wrapper for the Clubhouse REST API.
|