bl 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55f1e902cbc7a85e120ad076f71f125c5228eb4b
4
- data.tar.gz: 1e65288f69871539a379a1b8edf6bd92f99def0b
3
+ metadata.gz: e087c0d9b83f0f2b496999e8d77d3974ed8d8c27
4
+ data.tar.gz: 243d3b8b14045d2234918a447135c34eb81826f2
5
5
  SHA512:
6
- metadata.gz: a564cf036ac05442c1f882b949ae14f7760e7ddf7891b892233c9f2534ff7a5264c10dba12ec4daaeefe6673abf2b7b4ee808df4e0f8382b2618ce80c6b3aa5b
7
- data.tar.gz: d506a364760865d6c0d3388fac93c34c8ee1bc0e5da0c97b31af9d2db9716d67c039c557f7ffbd6795a6b41bf5577aa8afda9f894f0425c159ddef8b7318667f
6
+ metadata.gz: 92ee36f006ae99b808512cef1569d17b0fc0d3ecbb6391b21ded95e357b55dbe7f1903eec1a95cfe27fd8b15c9d845232e4b17bec3b6c5a9a4b07d27a1cd6c99
7
+ data.tar.gz: ddb775a3724cb84cfb72ec5802ff25a3cfb77c755010a554ad9b94b09e744c48fdf98413c7860bfd7830a08d30bc63972eacd717860a6bb1fdb36ff5ef40fa0b
data/README.md CHANGED
@@ -56,7 +56,6 @@ Commands:
56
56
  bl close [KEY...] # close issues
57
57
  bl config # show config
58
58
  bl count # count issues
59
- bl doctor # check issues
60
59
  bl edit KEY # edit issues' description by $EDITOR
61
60
  bl file SUBCOMMAND ...ARGS # manage files
62
61
  bl gitrepo SUBCOMMAND ...ARGS # show gitrepos
data/Rakefile CHANGED
@@ -67,16 +67,22 @@ task :system_test do
67
67
  'help',
68
68
  'list',
69
69
  'milestone list',
70
+ 'notifications count',
70
71
  'notifications list',
71
72
  'priorities',
72
73
  'project list',
73
74
  'resolutions',
74
75
  'roles',
75
76
  'search',
77
+ 'space activities',
78
+ 'space disk-usage',
79
+ 'space get-notification',
76
80
  'space info',
77
81
  'statuses',
82
+ 'type colors',
78
83
  'type list',
79
84
  'users list',
85
+ 'users myself',
80
86
  'webhooks list',
81
87
  'wiki list'
82
88
  ]
@@ -8,7 +8,6 @@ Commands:
8
8
  bl close [KEY...] # close issues
9
9
  bl config # show config
10
10
  bl count # count issues
11
- bl doctor # check issues
12
11
  bl edit KEY # edit issues' description by $EDITOR
13
12
  bl file SUBCOMMAND ...ARGS # manage files
14
13
  bl gitrepo SUBCOMMAND ...ARGS # show gitrepos
@@ -179,46 +179,23 @@ module Bl
179
179
  puts formatter.render(ROLES, fields: %i(id name))
180
180
  end
181
181
 
182
- desc 'doctor', 'check issues'
183
- def doctor
184
- unassigned_issues = client.get('issues', assigneeId: [-1]).body
185
- overdue_issues = client.get(
186
- 'issues',
187
- statusId: [1, 2, 3],
188
- dueDateUntil: Date.today.to_s,
189
- ).body
190
- unless unassigned_issues.empty?
191
- puts 'warning: unassigned issues found.'
192
- puts 'issues:'
193
- unassigned_issues.map {|i| print_issue(i)}
194
- end
195
- unless overdue_issues.empty?
196
- puts 'warning: overdue issues found.'
197
- puts 'issues:'
198
- overdue_issues.map {|i| print_issue(i)}
199
- end
200
- end
182
+ desc 'category SUBCOMMAND ...ARGS', 'manage categories'
183
+ subcommand 'category', Category
201
184
 
202
- desc 'space SUBCOMMAND ...ARGS', ''
203
- subcommand 'space', Space
185
+ desc 'file SUBCOMMAND ...ARGS', 'manage files'
186
+ subcommand 'file', File
204
187
 
205
- desc 'users SUBCOMMAND ...ARGS', ''
206
- subcommand 'users', Users
188
+ desc 'gitrepo SUBCOMMAND ...ARGS', 'show gitrepos'
189
+ subcommand 'gitrepo', GitRepo
207
190
 
208
191
  desc 'groups SUBCOMMAND ...ARGS', ''
209
192
  subcommand 'groups', Groups
210
193
 
211
- desc 'type SUBCOMMAND ...ARGS', 'manage types'
212
- subcommand 'type', Type
213
-
214
- desc 'category SUBCOMMAND ...ARGS', 'manage categories'
215
- subcommand 'category', Category
216
-
217
194
  desc 'milestone SUBCOMMAND ...ARGS', 'manage milestones'
218
195
  subcommand 'milestone', Milestone
219
196
 
220
- desc 'wiki SUBCOMMAND ...ARGS', 'manage wikis'
221
- subcommand 'wiki', Wiki
197
+ desc 'notifications SUBCOMMAND ...ARGS', ''
198
+ subcommand 'notifications', Notifications
222
199
 
223
200
  desc 'project SUBCOMMAND ...ARGS', 'manage projects'
224
201
  subcommand 'project', Project
@@ -226,20 +203,23 @@ module Bl
226
203
  desc 'recent SUBCOMMAND ...ARGS', 'list recent stuff'
227
204
  subcommand 'recent', Recent
228
205
 
229
- desc 'file SUBCOMMAND ...ARGS', 'manage files'
230
- subcommand 'file', File
231
-
232
- desc 'gitrepo SUBCOMMAND ...ARGS', 'show gitrepos'
233
- subcommand 'gitrepo', GitRepo
206
+ desc 'space SUBCOMMAND ...ARGS', ''
207
+ subcommand 'space', Space
234
208
 
235
- desc 'webhooks SUBCOMMAND ...ARGS', ''
236
- subcommand 'webhooks', Webhooks
209
+ desc 'type SUBCOMMAND ...ARGS', 'manage types'
210
+ subcommand 'type', Type
237
211
 
238
- desc 'notifications SUBCOMMAND ...ARGS', ''
239
- subcommand 'notifications', Notifications
212
+ desc 'users SUBCOMMAND ...ARGS', ''
213
+ subcommand 'users', Users
240
214
 
241
215
  desc 'watchings SUBCOMMAND ...ARGS', ''
242
216
  subcommand 'watchings', Watchings
243
217
 
218
+ desc 'webhooks SUBCOMMAND ...ARGS', ''
219
+ subcommand 'webhooks', Webhooks
220
+
221
+ desc 'wiki SUBCOMMAND ...ARGS', 'manage wikis'
222
+ subcommand 'wiki', Wiki
223
+
244
224
  end
245
225
  end
@@ -34,69 +34,5 @@ module Bl
34
34
  end
35
35
  end
36
36
 
37
- def print_issue(issue)
38
- puts [
39
- colorize_type(issue.issueType.name, issue.issueType.color),
40
- issue.issueKey,
41
- issue.summary,
42
- colorize_priority(issue.priority.id, issue.priority.name),
43
- issue.created,
44
- issue.dueDate,
45
- issue.updated,
46
- issue.createdUser.name,
47
- issue.assignee&.name,
48
- colorize_status(issue.status.id, issue.status.name)
49
- ].join("\t")
50
- end
51
-
52
- def print_activity(a)
53
- puts [
54
- ACTIVITY_TYPES[a.type],
55
- a.content.inspect,
56
- a.createdUser.name,
57
- a.created
58
- ].join("\t")
59
- end
60
-
61
- def print_user(user)
62
- puts [
63
- user.id,
64
- user.userId,
65
- user.name,
66
- user.roleType,
67
- user.lang,
68
- user.mailAddress
69
- ].join("\t")
70
- end
71
-
72
- def print_group(group)
73
- puts [
74
- group.id,
75
- group.name
76
- ].join("\t")
77
- end
78
-
79
- def print_group_members(members)
80
- members.map { |m| print_user(m) }
81
- end
82
-
83
- def print_group_and_members(group)
84
- print_group(group)
85
- puts 'members:'
86
- print_group_members(group.members)
87
- end
88
-
89
- def print_webhook(webhook)
90
- puts [
91
- webhook.id,
92
- webhook.name,
93
- webhook.description,
94
- webhook.hookUrl
95
- ].join("\t")
96
- end
97
-
98
- def print_watch_target(target)
99
- p target
100
- end
101
37
  end
102
38
  end
@@ -15,7 +15,7 @@ module Bl
15
15
  desc 'activities', 'show space activities'
16
16
  def activities
17
17
  client.get('space/activities').body.each do |a|
18
- print_activity(a)
18
+ p a.pretty_inspect
19
19
  end
20
20
  end
21
21
 
@@ -1,3 +1,3 @@
1
1
  module Bl
2
- VERSION = '0.5.4'.freeze
2
+ VERSION = '0.5.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - saki