bl 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bl/cli.rb +18 -0
  3. data/lib/bl/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c80a172ab9ee26dc36c2211eb540d772f99bdfc
4
- data.tar.gz: ca89d313471de4e5f0491aaf7db0fa948cb19e02
3
+ metadata.gz: 3f0b7880c7b13e2ce3d30fd3516293989c1446b8
4
+ data.tar.gz: 355646a62991653938cef32ef6a0facdcb6e43fe
5
5
  SHA512:
6
- metadata.gz: 4aa146632042b305f23c2c86758c98cf8c988653cd8219d9c980ae74ffe56b5eb6fd46d5e5de9a474fde4a88897018643bc6626fd6e13066183e7e981101f1fa
7
- data.tar.gz: 75be3944b2d396ee5098c353c64362ef0df3246676fbaf115d8a05b088ed3ae4420f6e747f3afd4628492750b65e71ff40d91c71d26289a3e03b4a6ce36ed925
6
+ metadata.gz: da6d2a6ead0b249f43b967f17c900954c8628d0c45d4a2bbcbb8125a69d50dbf4e6ab53c3a7f23370dbe98590b8b8a21caa98220a24ff34eaa9bbc54257a4a02
7
+ data.tar.gz: 21c6b8f48493fa867541afdccd05fbcade7ebd6d1b18acb19e12d64d6c1d78aa1bac0a1eecc49905517ce4df7fd34e6a3a294a3db09eadad00df665cf4c2dfc7
@@ -201,6 +201,24 @@ module Bl
201
201
  end
202
202
  end
203
203
 
204
+ desc 'edit KEY', "edit issues' description by $EDITOR"
205
+ def edit(key)
206
+ issue_description = client.get("issues/#{key}").body.description
207
+ file = Tempfile.new
208
+ file.puts(issue_description)
209
+ file.close
210
+ begin
211
+ file.open
212
+ system("$EDITOR #{file.path}")
213
+ new_content = file.read
214
+ client.patch("issues/#{key}", description: new_content)
215
+ puts "issue #{key} updated."
216
+ ensure
217
+ file.close
218
+ file.unlink
219
+ end
220
+ end
221
+
204
222
  desc 'statuses', 'list statuses'
205
223
  def statuses
206
224
  client.get('statuses').body.each do |s|
@@ -1,3 +1,3 @@
1
1
  module Bl
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.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.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - saki