jirify 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: d34a196680bd203192c9fde39ca7362eb56c9c65653dfa84f00ec120ab03dbc6
4
- data.tar.gz: f09f21fe44f6eafd4de90e3a26295cb76ee9392f714821578318e54ccc8f7111
3
+ metadata.gz: b3bdf3d78cad93234c987b4f0fe19a1c90909107532c2f6b371dd94078e9574f
4
+ data.tar.gz: bb9d83d6a6506ab4e310378656f0750eaded4c8a111d50f14d3664a858d1efa4
5
5
  SHA512:
6
- metadata.gz: 0fca23453456df3af0cea03b8183344bdcba4a4a1656b55b16200ef1fb8c127d3006afbf96ec4b799044d9d27ee8024740662f2be07897a8ffecac4b01fafec4
7
- data.tar.gz: 70e29cd55453df39f68a25707a37f3c9cb958f35cd0cf3d845b618f20aefe489e928daf8ae4ab55b1d6b8ac48cedfb4d4bcb254bf617e25a88033244cdbace11
6
+ metadata.gz: 0fc9f799bcc20fecc4cb44fbb528de7a99fe981b63046379f9d5339ae8c29a64ed9dd598f8a8c3c5894f74ef1494a3172ef2a0cc1fd432628a2704694d34f5fb
7
+ data.tar.gz: f4a5c0203a6317822c3a62b5863f4e80c3760c08fa51f0014ab9d59dc68a8e3c301a831cf4dcab20dec23104bb9d71fbaeebc4f2bc3bcef952e05f9e8f277b21
@@ -28,8 +28,8 @@ _jirify_completions() {
28
28
 
29
29
  top_level_commands="help issues projects setup sprint version"
30
30
  projects_commands="help list"
31
- setup_commands="help init verbose"
32
- issues_commands="help assignee block close mine open review start status take todo transition transitions unassign unblock"
31
+ setup_commands="help init bash_completion verbose"
32
+ issues_commands="help assignee block close describe mine open review start status take todo transition transitions unassign unblock"
33
33
 
34
34
  _compgen_issue_keys() {
35
35
  _jirify_maybe_reload_cache
@@ -44,6 +44,19 @@ module Jirify
44
44
  Launchy.open("#{Config.issue_browse_url}#{issue_id}")
45
45
  end
46
46
 
47
+ desc 'describe [ISSUE]', 'Describes an issue'
48
+ def describe(issue_id)
49
+ issue = get_issue_or_exit issue_id
50
+ cell = UI::SprintCell.new(issue, IO.console.winsize[1])
51
+
52
+ options = {}
53
+ options[:url] = true
54
+ options[:summary] = true
55
+ options[:assignee] = true
56
+
57
+ say cell.to_s(options)
58
+ end
59
+
47
60
  #-------------------------#
48
61
  # Issue Assignee commands #
49
62
  #-------------------------#
@@ -33,7 +33,7 @@ module Jirify
33
33
 
34
34
  Config.write(options)
35
35
 
36
- say 'Done!'
36
+ say 'Done!'.green
37
37
  say "If you want to enable bash completion, source #{Config.config_folder}/jirify.bash_completion.sh"
38
38
  end
39
39
 
@@ -42,6 +42,14 @@ module Jirify
42
42
  def verbose
43
43
  Config.verbose = options[:enable]
44
44
  end
45
+
46
+ desc 'bash_completion', 'Update your bash_completion file when a new version comes out'
47
+ def bash_completion
48
+ say "Updating #{Config.config_folder}/jirify.bash_completion.sh ...".blue
49
+ Config.copy_bash_completion!
50
+
51
+ say 'Done! You have to source the file again or open a new shell! :)'.green
52
+ end
45
53
  end
46
54
  end
47
55
  end
data/lib/jirify/config.rb CHANGED
@@ -24,6 +24,10 @@ module Jirify
24
24
  def initialize!
25
25
  FileUtils.mkdir_p CONFIG_FOLDER
26
26
  FileUtils.touch CONFIG_FILE
27
+ copy_bash_completion!
28
+ end
29
+
30
+ def copy_bash_completion!
27
31
  FileUtils.cp "#{File.expand_path('..', File.dirname(__dir__))}/jirify.bash_completion.sh", CONFIG_FOLDER
28
32
  end
29
33
 
@@ -1,4 +1,3 @@
1
- require 'io/console'
2
1
  require 'terminal-table'
3
2
 
4
3
  module Jirify
@@ -1,3 +1,3 @@
1
1
  module Jirify
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
data/lib/jirify.rb CHANGED
@@ -2,6 +2,7 @@ require 'jira-ruby'
2
2
  require 'thor'
3
3
  require 'colorize'
4
4
  require 'colorized_string'
5
+ require 'io/console'
5
6
 
6
7
  require 'jirify/version'
7
8
  require 'jirify/config'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jirify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georgi Gardev