bl 0.2.5 → 0.2.6

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bl/cli.rb +21 -10
  3. data/lib/bl/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2cfe9f5b37e14eeb20f957ba1ad622c50e48de77
4
- data.tar.gz: 99c6dd58f03c6479330dd24f70fae8a512d669cc
3
+ metadata.gz: fa5656ab6dfe65a6498bdc64e2ef5fb6b731d878
4
+ data.tar.gz: d9c708446001ddab6b26c02a1299ed13c103d73b
5
5
  SHA512:
6
- metadata.gz: ef354cd8a4a3fa6af921b00a45c10468c8730f7e4af962f29c68ea2a29f18f1a42fdef482dd073e8b06a4be9a7f715585e0681ca094d9b6fa94ccd2da25257cd
7
- data.tar.gz: 700e5b54e2b64547c2db75cc20d44931730a7913df61d5cb2bd208fa22fef0e1db20d7eefc4a2e7ef1bc70f955c3a2e6cbd2b72c50f8bdffb84efd49fc41ffed
6
+ metadata.gz: 5b60c9f15504c1025fd6da11fe7663c12b8846b8d1a32952bd342c9c9fa0a7769e35ab048b1f47f1c48d992e0a034cc98b50d36db0a9c0d86f1892843f9ff348
7
+ data.tar.gz: 2b27698e34ae94623b9e008469ce5fbda8cbfd5c13e8a31ea46e6448fc990ecbcc0eea5e30d2b40aa27ddb2d898939680b29ac8df9c379ed20160f65e4979882
@@ -89,12 +89,12 @@ module Bl
89
89
 
90
90
  desc 'init', 'initialize a default config file'
91
91
  def init
92
- filename = File.join(Dir.home, Bl::CONFIG_FILE)
93
- if File.exist?(filename)
92
+ filename = ::File.join(Dir.home, Bl::CONFIG_FILE)
93
+ if ::File.exist?(filename)
94
94
  puts "#{filename} exits."
95
95
  else
96
96
  config = Bl::Config.instance.default_config
97
- f = File.new(filename, 'w')
97
+ f = ::File.new(filename, 'w')
98
98
  f.write(config.to_yaml)
99
99
  puts "#{filename} generated."
100
100
  end
@@ -113,12 +113,12 @@ module Bl
113
113
  end
114
114
 
115
115
  desc 'list', 'list issues by typical ways'
116
- option :all, type: :boolean
117
- option :unassigned, type: :boolean
118
- option :today, type: :boolean
119
- option :overdue, type: :boolean
120
- option :priority, type: :boolean
121
- option :nocategory, type: :boolean
116
+ option :all
117
+ option :unassigned
118
+ option :today
119
+ option :overdue
120
+ option :priority
121
+ option :nocategory
122
122
  def list
123
123
  opts = {}
124
124
  opts[:statusId] = [1, 2, 3] unless options[:all]
@@ -157,11 +157,22 @@ module Bl
157
157
  puts "version: #{body.versions}"
158
158
  puts "status: #{body.status.name}"
159
159
  puts "milestone: #{body.milestone}"
160
- puts "assignee: #{body.assignee.name}"
160
+ puts "assignee: #{body.assignee&.name}"
161
161
  puts "created user: #{body.createdUser.name}"
162
162
  puts '--'
163
163
  puts "description:"
164
164
  puts body.description
165
+ puts "attachments:"
166
+ body.attachments.each do |file|
167
+ puts ['-', file.id, file.name, file.size].join("\t")
168
+ puts "\tview url: https://#{@config[:space_id]}.backlog.jp/ViewAttachment.action?attachmentId=#{file.id}"
169
+ puts "\tdownload url: https://#{@config[:space_id]}.backlog.jp/downloadAttachment/#{file.id}/#{file.name}"
170
+ end
171
+ puts "shared files:"
172
+ body.sharedFiles.each do |file|
173
+ puts ['-', file.id, file.name, file.size].join("\t")
174
+ puts "\tfile url: https://#{@config[:space_id]}.backlog.jp/ViewSharedFile.action?projectKey=#{@config[:project_key]}&sharedFileId=#{file.id}"
175
+ end
165
176
  end
166
177
 
167
178
  desc 'browse KEY', 'browse an issue'
@@ -1,3 +1,3 @@
1
1
  module Bl
2
- VERSION = '0.2.5'.freeze
2
+ VERSION = '0.2.6'.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.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - saki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-08 00:00:00.000000000 Z
11
+ date: 2016-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor