bl 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bl.rb +1 -0
- data/lib/bl/category.rb +28 -0
- data/lib/bl/cli.rb +3 -0
- data/lib/bl/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ca2c240c6a93cd7609d167895a09361bb836215
|
4
|
+
data.tar.gz: a2567131cbaf4b4b6c4790a31ba2b42b6afbabdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35768a754d72140c1298e26424babad7b9b43f167a77a597c87be58aaae2ecfee1af5c5f69730a42f53ffa51b1236c3219bfa0c8ddaa1ffa2621406d26e4f471
|
7
|
+
data.tar.gz: 03aa5fea30c5fae3d871a9cad3c8f87b9ddbee0fc1900f2ba058e95dc7658400ffd345c443c3c70ea6df123e98f02b828daf37468e4c94f531b8a1e54e796192
|
data/lib/bl.rb
CHANGED
data/lib/bl/category.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
module Bl
|
2
|
+
class Category < Thor
|
3
|
+
def initialize(*)
|
4
|
+
@config = YAML.load_file(File.join(Dir.home, Bl::CONFIG_FILE))
|
5
|
+
@client = BacklogKit::Client.new(
|
6
|
+
space_id: @config[:space_id],
|
7
|
+
api_key: @config[:api_key]
|
8
|
+
)
|
9
|
+
super
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'add NAME', 'add categories'
|
13
|
+
def add(*names)
|
14
|
+
names.each do |name|
|
15
|
+
res = @client.post("projects/#{@config[:project_key]}/categories", name: name)
|
16
|
+
puts "category added: #{res.body.id}\t#{res.body.name}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
desc 'delete CATEGORY_ID', 'delete categories'
|
21
|
+
def delete(*ids)
|
22
|
+
ids.each do |id|
|
23
|
+
res = @client.delete("projects/#{@config[:project_key]}/categories/#{id}")
|
24
|
+
puts "category deleted: #{res.body.id}\t#{res.body.name}"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/bl/cli.rb
CHANGED
@@ -235,6 +235,9 @@ module Bl
|
|
235
235
|
end
|
236
236
|
end
|
237
237
|
|
238
|
+
desc 'category SUBCOMMAND ...ARGS', 'manage categoryies'
|
239
|
+
subcommand 'category', Category
|
240
|
+
|
238
241
|
desc 'project-status PROJECT_ID', 'show project status'
|
239
242
|
def project_status(pid)
|
240
243
|
all_issues_count = @client.get('issues/count', projectId: [pid]).body.count
|
data/lib/bl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- saki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- bl.gemspec
|
128
128
|
- exe/bl
|
129
129
|
- lib/bl.rb
|
130
|
+
- lib/bl/category.rb
|
130
131
|
- lib/bl/cli.rb
|
131
132
|
- lib/bl/version.rb
|
132
133
|
homepage: https://github.com/sakihet/bl
|