bl 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b040caff6e6605bdfc87fc409506acc499df387
4
- data.tar.gz: cbd0d47fa7d93f70ca735e7c9884564ade4a56e9
3
+ metadata.gz: 45be41d8aefab74ca033976af77670a3d80509cc
4
+ data.tar.gz: ad8cfa27ddd7d1687b6e32eba423db290a4c4022
5
5
  SHA512:
6
- metadata.gz: 36b7bf942dcf453bf10bb21c3c7ce7c75588852ad48f4e894bf32b7ad8eaca9df7d3c75ff21e739aff0fa9aa28a4dc502959c3abf821be693eb8ca56202d4640
7
- data.tar.gz: 57e0f71dc0eca5ffd55655f57672ef25aeafe21bb28485b39ab3f3b4edcd72b011287db9e02039e4c1b3ae7c39b4db46c630b742ce07d79496856a0e0c412ae5
6
+ metadata.gz: 413732648dbd6df0714f5e94f54ff023d9ca85d4108335bbb94dd89d1fa5d9c02a9a4c7fc6e102b675929c298eec88402ec58d4afc80cc6ef42592b860f8d712
7
+ data.tar.gz: bd4c258f3d7e8ff0b4e6cee0a5c87061f6ae24d194273072f18b5433f6a7daed91e64d82a363675da7633715dc6946ad6ef57ef6bd43f3be2e75ce14bc7a9329
data/README.md CHANGED
@@ -7,8 +7,10 @@ bl is a command line tool for Nulab's [Backlog](http://www.backlog.jp/).
7
7
  ![License](https://img.shields.io/github/license/sakihet/bl.svg)
8
8
 
9
9
  ## Table of Contents
10
+ - [Requirements](https://github.com/sakihet/bl#requirements)
10
11
  - [Installation](https://github.com/sakihet/bl#installation)
11
12
  - [Configuration](https://github.com/sakihet/bl#configuration)
13
+ - [Help](https://github.com/sakihet/bl#help)
12
14
  - [Usage](https://github.com/sakihet/bl#usage)
13
15
  - [Contributing](https://github.com/sakihet/bl#contributing)
14
16
  - [License](https://github.com/sakihet/bl#license)
@@ -25,63 +27,77 @@ bl is a command line tool for Nulab's [Backlog](http://www.backlog.jp/).
25
27
 
26
28
  bl uses `~/.bl.yml` for configuration.
27
29
 
28
- bl init
29
- $EDITOR ~/.bl.yml
30
+ ```
31
+ bl init
32
+ $EDITOR ~/.bl.yml
33
+ ```
30
34
 
31
35
  ### .bl.yml Parameters
32
36
 
33
- :space_id: '***' # your backlog space id
34
- :api_key: '***' # your backlog api key
35
- :project_key: '***' # your backlog project key
36
- :issue:
37
- :default: # issue default parameters(add command use this for easiness)
38
- :projectId:
39
- :issueTypeId:
40
- :priorityId:
41
- :assigneeId:
37
+ ```
38
+ :space_id: '***' # your backlog space id
39
+ :api_key: '***' # your backlog api key
40
+ :project_key: '***' # your backlog project key
41
+ :issue:
42
+ :default: # issue default parameters(add command use this for easiness)
43
+ :projectId:
44
+ :issueTypeId:
45
+ :priorityId:
46
+ :assigneeId:
47
+ ```
42
48
 
43
- ## Usage
49
+ ## Help
44
50
 
45
51
  ```
46
- bl add [SUBJECT...] # add issues
47
- bl browse KEY # browse an issue
48
- bl category SUBCOMMAND ...ARGS # manage categories
49
- bl close [KEY...] # close issues
50
- bl config # show config
51
- bl count # count issues
52
- bl doctor # check issues
53
- bl edit KEY # edit issues' description by $EDITOR
54
- bl file SUBCOMMAND ...ARGS # manage files
55
- bl gitrepo SUBCOMMAND ...ARGS # show gitrepos
56
- bl groups SUBCOMMAND ...ARGS #
57
- bl help [COMMAND] # Describe available commands or one specific command
58
- bl init # initialize a default config file
59
- bl list # list issues by typical ways
60
- bl milestone SUBCOMMAND ...ARGS # manage milestones
61
- bl notifications SUBCOMMAND ...ARGS #
62
- bl priorities # list priorities
63
- bl project SUBCOMMAND ...ARGS # manage projects
64
- bl recent SUBCOMMAND ...ARGS # list recent stuff
65
- bl resolutions # list resolutions
66
- bl search # search issues
67
- bl show KEY # show an issue's details
68
- bl space SUBCOMMAND ...ARGS #
69
- bl statuses # list statuses
70
- bl type SUBCOMMAND ...ARGS # manage types
71
- bl update [KEY...] # update issues
72
- bl users SUBCOMMAND ...ARGS #
73
- bl version # show version
74
- bl watchings SUBCOMMAND ...ARGS #
75
- bl webhooks SUBCOMMAND ...ARGS #
76
- bl wiki SUBCOMMAND ...ARGS # manage wikis
52
+ Commands:
53
+ bl add [SUBJECT...] # add issues
54
+ bl browse KEY # browse an issue
55
+ bl category SUBCOMMAND ...ARGS # manage categories
56
+ bl close [KEY...] # close issues
57
+ bl config # show config
58
+ bl count # count issues
59
+ bl doctor # check issues
60
+ bl edit KEY # edit issues' description by $EDITOR
61
+ bl file SUBCOMMAND ...ARGS # manage files
62
+ bl gitrepo SUBCOMMAND ...ARGS # show gitrepos
63
+ bl groups SUBCOMMAND ...ARGS #
64
+ bl help [COMMAND] # Describe available commands or one specific command
65
+ bl init # initialize a default config file
66
+ bl list # list issues by typical ways
67
+ bl milestone SUBCOMMAND ...ARGS # manage milestones
68
+ bl notifications SUBCOMMAND ...ARGS #
69
+ bl priorities # list priorities
70
+ bl project SUBCOMMAND ...ARGS # manage projects
71
+ bl recent SUBCOMMAND ...ARGS # list recent stuff
72
+ bl resolutions # list resolutions
73
+ bl search # search issues
74
+ bl show KEY # show an issue's details
75
+ bl space SUBCOMMAND ...ARGS #
76
+ bl statuses # list statuses
77
+ bl type SUBCOMMAND ...ARGS # manage types
78
+ bl update [KEY...] # update issues
79
+ bl users SUBCOMMAND ...ARGS #
80
+ bl version # show version
81
+ bl watchings SUBCOMMAND ...ARGS #
82
+ bl webhooks SUBCOMMAND ...ARGS #
83
+ bl wiki SUBCOMMAND ...ARGS # manage wikis
84
+
85
+ Options:
86
+ [--format=FORMAT] # set output format
87
+ # Default: table
88
+
77
89
  ```
78
90
 
79
91
  View global or command specific help:
80
92
 
81
- bl help
82
- bl help list
83
- bl help search
84
- bl help add
93
+ ```
94
+ bl help
95
+ bl help list
96
+ bl help search
97
+ bl help add
98
+ ```
99
+
100
+ ## Usage
85
101
 
86
102
  ### Issue
87
103
 
@@ -105,10 +121,6 @@ Edit issue by your favorite $EDITOR:
105
121
 
106
122
  bl edit ISSUE-12
107
123
 
108
- Update unassigned issues:
109
-
110
- bl list --unassigned | awk '{print $2}' | xargs bl update --assigneeId 12345
111
-
112
124
  ### Project
113
125
 
114
126
  List projects:
@@ -139,10 +151,6 @@ Download file:
139
151
 
140
152
  bl file get 12345
141
153
 
142
- ## Backlog API
143
-
144
- http://developer.nulab-inc.com/docs/backlog
145
-
146
154
  ## Contributing
147
155
 
148
156
  Bug reports and pull requests are welcome on GitHub at https://github.com/sakihet/bl.
@@ -150,3 +158,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/sakihe
150
158
  ## License
151
159
 
152
160
  [MIT](http://opensource.org/licenses/MIT).
161
+
data/Rakefile CHANGED
@@ -11,3 +11,45 @@ end
11
11
  task default: :test
12
12
 
13
13
  RuboCop::RakeTask.new
14
+
15
+ desc 'generate README.md'
16
+ task :readme do
17
+ puts 'generate README.md'
18
+ File.open('./etc/help.md', 'w') do |f|
19
+ f.puts('## Help')
20
+ f.puts("\n")
21
+ f.puts('```')
22
+ f.puts(`bl help`)
23
+ f.puts('```')
24
+ f.puts("\n")
25
+ str = <<-EOS
26
+ View global or command specific help:
27
+
28
+ ```
29
+ bl help
30
+ bl help list
31
+ bl help search
32
+ bl help add
33
+ ```
34
+ EOS
35
+ f.puts(str)
36
+ end
37
+ files = %w(
38
+ overview.md
39
+ index.md
40
+ requirements.md
41
+ installation.md
42
+ configuration.md
43
+ help.md
44
+ usage.md
45
+ contributing.md
46
+ license.md
47
+ )
48
+ File.open('README.md', 'w') do |f|
49
+ files.each do |ff|
50
+ input_file = File.read("./etc/#{ff}")
51
+ f.puts(input_file)
52
+ f.puts("\n")
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,22 @@
1
+ ## Configuration
2
+
3
+ bl uses `~/.bl.yml` for configuration.
4
+
5
+ ```
6
+ bl init
7
+ $EDITOR ~/.bl.yml
8
+ ```
9
+
10
+ ### .bl.yml Parameters
11
+
12
+ ```
13
+ :space_id: '***' # your backlog space id
14
+ :api_key: '***' # your backlog api key
15
+ :project_key: '***' # your backlog project key
16
+ :issue:
17
+ :default: # issue default parameters(add command use this for easiness)
18
+ :projectId:
19
+ :issueTypeId:
20
+ :priorityId:
21
+ :assigneeId:
22
+ ```
@@ -0,0 +1,3 @@
1
+ ## Contributing
2
+
3
+ Bug reports and pull requests are welcome on GitHub at https://github.com/sakihet/bl.
@@ -0,0 +1,50 @@
1
+ ## Help
2
+
3
+ ```
4
+ Commands:
5
+ bl add [SUBJECT...] # add issues
6
+ bl browse KEY # browse an issue
7
+ bl category SUBCOMMAND ...ARGS # manage categories
8
+ bl close [KEY...] # close issues
9
+ bl config # show config
10
+ bl count # count issues
11
+ bl doctor # check issues
12
+ bl edit KEY # edit issues' description by $EDITOR
13
+ bl file SUBCOMMAND ...ARGS # manage files
14
+ bl gitrepo SUBCOMMAND ...ARGS # show gitrepos
15
+ bl groups SUBCOMMAND ...ARGS #
16
+ bl help [COMMAND] # Describe available commands or one specific command
17
+ bl init # initialize a default config file
18
+ bl list # list issues by typical ways
19
+ bl milestone SUBCOMMAND ...ARGS # manage milestones
20
+ bl notifications SUBCOMMAND ...ARGS #
21
+ bl priorities # list priorities
22
+ bl project SUBCOMMAND ...ARGS # manage projects
23
+ bl recent SUBCOMMAND ...ARGS # list recent stuff
24
+ bl resolutions # list resolutions
25
+ bl search # search issues
26
+ bl show KEY # show an issue's details
27
+ bl space SUBCOMMAND ...ARGS #
28
+ bl statuses # list statuses
29
+ bl type SUBCOMMAND ...ARGS # manage types
30
+ bl update [KEY...] # update issues
31
+ bl users SUBCOMMAND ...ARGS #
32
+ bl version # show version
33
+ bl watchings SUBCOMMAND ...ARGS #
34
+ bl webhooks SUBCOMMAND ...ARGS #
35
+ bl wiki SUBCOMMAND ...ARGS # manage wikis
36
+
37
+ Options:
38
+ [--format=FORMAT] # set output format
39
+ # Default: table
40
+
41
+ ```
42
+
43
+ View global or command specific help:
44
+
45
+ ```
46
+ bl help
47
+ bl help list
48
+ bl help search
49
+ bl help add
50
+ ```
@@ -0,0 +1,8 @@
1
+ ## Table of Contents
2
+ - [Requirements](https://github.com/sakihet/bl#requirements)
3
+ - [Installation](https://github.com/sakihet/bl#installation)
4
+ - [Configuration](https://github.com/sakihet/bl#configuration)
5
+ - [Help](https://github.com/sakihet/bl#help)
6
+ - [Usage](https://github.com/sakihet/bl#usage)
7
+ - [Contributing](https://github.com/sakihet/bl#contributing)
8
+ - [License](https://github.com/sakihet/bl#license)
@@ -0,0 +1,3 @@
1
+ ## Installation
2
+
3
+ gem install bl
@@ -0,0 +1,3 @@
1
+ ## License
2
+
3
+ [MIT](http://opensource.org/licenses/MIT).
@@ -0,0 +1,7 @@
1
+ # bl
2
+
3
+ bl is a command line tool for Nulab's [Backlog](http://www.backlog.jp/).
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/bl.svg)](https://badge.fury.io/rb/bl)
6
+ [![Dependency Status](https://gemnasium.com/badges/github.com/sakihet/bl.svg)](https://gemnasium.com/github.com/sakihet/bl)
7
+ ![License](https://img.shields.io/github/license/sakihet/bl.svg)
@@ -0,0 +1,3 @@
1
+ ## Requirements
2
+
3
+ - ruby 2.3+
@@ -0,0 +1,53 @@
1
+ ## Usage
2
+
3
+ ### Issue
4
+
5
+ List unclosed issues:
6
+
7
+ bl list
8
+
9
+ List overdue issues:
10
+
11
+ bl list --overdue
12
+
13
+ Add an issue:
14
+
15
+ bl add "Update OpenSSL immediately" --priorityId 2 --assigneeId 11111 --dueDate 2014-04-07
16
+
17
+ Add multi issues:
18
+
19
+ cat list.txt | xargs -I {} bl add {}
20
+
21
+ Edit issue by your favorite $EDITOR:
22
+
23
+ bl edit ISSUE-12
24
+
25
+ ### Project
26
+
27
+ List projects:
28
+
29
+ bl project list
30
+
31
+ Show project progress:
32
+
33
+ bl project progress 12345
34
+
35
+ ### Wiki
36
+
37
+ List wiki pages:
38
+
39
+ bl wiki list
40
+
41
+ Edit wiki page by $EDITOR:
42
+
43
+ bl wiki edit 12345
44
+
45
+ ### File
46
+
47
+ List files:
48
+
49
+ bl file list
50
+
51
+ Download file:
52
+
53
+ bl file get 12345
@@ -14,9 +14,15 @@ module Bl
14
14
  end
15
15
 
16
16
  desc 'list', 'list milestones'
17
+ option :all
17
18
  def list
18
19
  res = client.get(@url)
19
- puts formatter.render(res.body, fields: %i(id projectId name description startDate releaseDueDate archived))
20
+ if options[:all]
21
+ body = res.body
22
+ else
23
+ body = res.body.select { |m| m.archived == false } unless options[:all]
24
+ end
25
+ puts formatter.render(body, fields: %i(id projectId name description startDate releaseDueDate archived))
20
26
  end
21
27
 
22
28
  desc 'add [NAME...]', 'add milestones'
@@ -1,3 +1,3 @@
1
1
  module Bl
2
- VERSION = '0.5.1'.freeze
2
+ VERSION = '0.5.2'.freeze
3
3
  end
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.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - saki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-12 00:00:00.000000000 Z
11
+ date: 2017-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -167,6 +167,15 @@ files:
167
167
  - bin/console
168
168
  - bin/setup
169
169
  - bl.gemspec
170
+ - etc/configuration.md
171
+ - etc/contributing.md
172
+ - etc/help.md
173
+ - etc/index.md
174
+ - etc/installation.md
175
+ - etc/license.md
176
+ - etc/overview.md
177
+ - etc/requirements.md
178
+ - etc/usage.md
170
179
  - exe/bl
171
180
  - lib/bl.rb
172
181
  - lib/bl/category.rb