bl 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bl/category.rb +0 -1
- data/lib/bl/cli.rb +7 -10
- data/lib/bl/formatter.rb +1 -1
- data/lib/bl/groups.rb +1 -2
- data/lib/bl/milestone.rb +2 -2
- data/lib/bl/project.rb +2 -1
- data/lib/bl/users.rb +9 -2
- data/lib/bl/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d05f12acc0e75e703832ab0cce2346b918a8ab72
|
4
|
+
data.tar.gz: 823008f346a5f109ff1d7273d9a01af2f9f10d4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d375b572e522e8ccef165b619e8b1bc1b1d7ed51fd4982403acfbc9ddb5b1cfdc653664e25f7a6f6966c85b1f34d2a14f4a66d9a5a0772bf4025bb95271b29be
|
7
|
+
data.tar.gz: c64446967123dae6b41cce1da774cf95404baf178b264d6e310816756e70469550e28dcfc73c319c10f2052e1f3ec9aa8b236101eee3521a391718c3bc2e0791
|
data/lib/bl/category.rb
CHANGED
data/lib/bl/cli.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
module Bl
|
2
|
-
|
3
2
|
class CLI < Command
|
4
|
-
|
5
3
|
def initialize(*)
|
6
4
|
@config = Bl::Config.instance
|
7
5
|
super
|
@@ -72,8 +70,8 @@ module Bl
|
|
72
70
|
end
|
73
71
|
opts[:dueDateUntil] = Date.today.to_s if options[:overdue]
|
74
72
|
if options[:priority]
|
75
|
-
opts[:sort] =
|
76
|
-
opts[:order] =
|
73
|
+
opts[:sort] = 'priority'
|
74
|
+
opts[:order] = 'asc'
|
77
75
|
end
|
78
76
|
opts[:categoryId] = [-1] if options[:nocategory]
|
79
77
|
res = request(:get, 'issues', opts)
|
@@ -103,13 +101,13 @@ module Bl
|
|
103
101
|
puts formatter.render(body, fields: fields, vertical: true)
|
104
102
|
|
105
103
|
puts '--'
|
106
|
-
puts
|
104
|
+
puts 'attachments:'
|
107
105
|
body[0].attachments.each do |file|
|
108
106
|
puts ['-', file.id, file.name, file.size].join("\t")
|
109
107
|
puts "\tview url: https://#{@config[:space_id]}.backlog.jp/ViewAttachment.action?attachmentId=#{file.id}"
|
110
108
|
puts "\tdownload url: https://#{@config[:space_id]}.backlog.jp/downloadAttachment/#{file.id}/#{file.name}"
|
111
109
|
end
|
112
|
-
puts
|
110
|
+
puts 'shared files:'
|
113
111
|
body[0].sharedFiles.each do |file|
|
114
112
|
puts ['-', file.id, file.name, file.size].join("\t")
|
115
113
|
puts "\tfile url: https://#{@config[:space_id]}.backlog.jp/ViewSharedFile.action?projectKey=#{@config[:project_key]}&sharedFileId=#{file.id}"
|
@@ -132,7 +130,7 @@ module Bl
|
|
132
130
|
issue_default_options.merge({summary: s}).merge(delete_class_options(options.to_h))
|
133
131
|
)
|
134
132
|
puts '💡 issue added'
|
135
|
-
|
133
|
+
print_response(res, :issue)
|
136
134
|
end
|
137
135
|
end
|
138
136
|
|
@@ -143,7 +141,7 @@ module Bl
|
|
143
141
|
keys.each do |k|
|
144
142
|
res = request(:patch, "issues/#{k}", delete_class_options(options.to_h))
|
145
143
|
puts 'issue updated'
|
146
|
-
|
144
|
+
print_response(res, :issue)
|
147
145
|
end
|
148
146
|
end
|
149
147
|
|
@@ -152,7 +150,7 @@ module Bl
|
|
152
150
|
keys.each do |k|
|
153
151
|
res = request(:patch, "issues/#{k}", statusId: 4)
|
154
152
|
puts '🎉 issue closed'
|
155
|
-
|
153
|
+
print_response(res, :issue)
|
156
154
|
end
|
157
155
|
end
|
158
156
|
|
@@ -238,6 +236,5 @@ module Bl
|
|
238
236
|
|
239
237
|
desc 'wiki SUBCOMMAND ...ARGS', 'manage wikis'
|
240
238
|
subcommand 'wiki', Wiki
|
241
|
-
|
242
239
|
end
|
243
240
|
end
|
data/lib/bl/formatter.rb
CHANGED
data/lib/bl/groups.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module Bl
|
2
2
|
class Groups < Command
|
3
|
-
|
4
3
|
def initialize(*)
|
5
4
|
@config = Bl::Config.instance
|
6
5
|
@url = 'groups'
|
@@ -23,7 +22,7 @@ module Bl
|
|
23
22
|
desc 'add GROUP_NAME', ''
|
24
23
|
options members: :array
|
25
24
|
def add(name)
|
26
|
-
res = request(:post, @url, {name: name}.merge(delete_class_options(options)))
|
25
|
+
res = request(:post, @url, { name: name }.merge(delete_class_options(options)))
|
27
26
|
puts 'group added'
|
28
27
|
print_group_and_members(res.body)
|
29
28
|
end
|
data/lib/bl/milestone.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module Bl
|
2
2
|
class Milestone < Command
|
3
|
-
|
4
3
|
def initialize(*)
|
5
4
|
@config = Bl::Config.instance
|
6
5
|
@url = "projects/#{@config[:project_key]}/versions"
|
@@ -22,7 +21,8 @@ module Bl
|
|
22
21
|
options MILESTONE_PARAMS
|
23
22
|
def add(*names)
|
24
23
|
names.each do |name|
|
25
|
-
res = request(
|
24
|
+
res = request(
|
25
|
+
:post,
|
26
26
|
@url,
|
27
27
|
name: name,
|
28
28
|
description: options[:description],
|
data/lib/bl/project.rb
CHANGED
data/lib/bl/users.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module Bl
|
2
2
|
class Users < Command
|
3
|
-
|
4
3
|
def initialize(*)
|
5
4
|
@config = Bl::Config.instance
|
6
5
|
@url = 'users'
|
@@ -21,7 +20,15 @@ module Bl
|
|
21
20
|
|
22
21
|
desc 'add USER_ID PASSWORD NAME MAIL_ADDRESS ROLE_TYPE', ''
|
23
22
|
def add(id, pass, name, mail_address, role_type)
|
24
|
-
res = request(
|
23
|
+
res = request(
|
24
|
+
:post,
|
25
|
+
@url,
|
26
|
+
userId: id,
|
27
|
+
password: pass,
|
28
|
+
name: name,
|
29
|
+
mailAddress: mail_address,
|
30
|
+
roleType: role_type
|
31
|
+
)
|
25
32
|
puts 'user added'
|
26
33
|
print_response(res)
|
27
34
|
end
|
data/lib/bl/version.rb
CHANGED