jira-cli 0.1.0 → 0.1.1

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: 0ca6267c77e326c0be178c9b35257a49553174d2
4
- data.tar.gz: a0320f7c4ae0fc4196c6b4386b7efd3da643f98d
3
+ metadata.gz: 05ecfb6b91a13591c35968f449ba01334ae531a1
4
+ data.tar.gz: 2592664fc4ef27e33e36f9cbbba031108fd49395
5
5
  SHA512:
6
- metadata.gz: 176917e6f4b0eb6773ea0ee302788b0b5957215ffa1deb3c48233c3d0ad867dce4a9f065b4cf8c829d83eb05de010cdc28d85e200de3a7df870db8557b5b1f54
7
- data.tar.gz: 3578a7a0559bf7c51ff21a28d519a47ef571ab1c163f6d6cfcad1e3c8fb29fc091bcfb537938ebc838029cb531282dd823df554423e674aaca3218ce2c36930b
6
+ metadata.gz: ef02db87d86416029554e350f732044b4a21322f8786b6110e3fdefa5ef4583123e9db1935ad0e3adf0aea5c2002bf2900e33aba8a7026c0b0209848347163bf
7
+ data.tar.gz: b99f722bcdb47d5a431cf4e7872872fd4f1546fafda8bc0872dda5353690763287beac4f4accfdf000c4c9f022ec849e346bbf75b97792527b7a522fe3d8452d
@@ -4,7 +4,7 @@ module Jira
4
4
  desc "describe", "Describes the input ticket"
5
5
  def describe(ticket=Jira::Core.ticket)
6
6
  if Jira::Core.ticket?(ticket)
7
- output = description(ticket.strip, false, true)
7
+ output = description(ticket.strip, false, true, true)
8
8
  puts output if !output.strip.empty?
9
9
  end
10
10
  end
@@ -59,16 +59,19 @@ module Jira
59
59
  #
60
60
  # @return [String] formatted summary string
61
61
  #
62
- def description(ticket, star=false, verbose=false)
62
+ def description(ticket, star=false, verbose=false, describe=false)
63
63
  self.api.get("issue/#{ticket}", nil, verbose) do |json|
64
64
  summary = json['fields']['summary']
65
65
  status = json['fields']['status']['name']
66
66
  assignee = json['fields']['assignee']['name']
67
+ description = describe ? "\n" + json['fields']['description'] : ""
68
+
67
69
  return Jira::Format.ticket(ticket) +
68
70
  (star ? Jira::Format.star : " ") + " " +
69
71
  ("(" + Jira::Format.user(assignee) + ")").ljust(20) +
70
72
  Jira::Format.status(status).ljust(26) +
71
- Jira::Format.summary(summary)
73
+ Jira::Format.summary(summary) +
74
+ description
72
75
  end
73
76
  return ""
74
77
  end
@@ -29,9 +29,12 @@ module Jira
29
29
  # post issue to server
30
30
  self.api.post("issue", params) do |json|
31
31
  ticket = json['key']
32
- `git checkout -b #{ticket} 2> /dev/null`
33
- `git checkout #{ticket} 2> /dev/null`
34
- puts "\nTicket and branch #{Jira::Format.ticket(ticket)} created."
32
+ prompt = "\nTicket #{Jira::Format.ticket(ticket)} created."\
33
+ " Checkout branch? (yes/no) "
34
+ if self.cli.agree(prompt)
35
+ `git checkout -b #{ticket} 2> /dev/null`
36
+ `git checkout #{ticket} 2> /dev/null`
37
+ end
35
38
  return
36
39
  end
37
40
  end
@@ -1,5 +1,5 @@
1
1
  module Jira
2
2
 
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
 
5
5
  end
data/lib/jira/mixins.rb CHANGED
@@ -4,6 +4,7 @@ module Jira
4
4
  require 'highline/import'
5
5
  require 'json'
6
6
  require 'faraday'
7
+ require 'pry-remote' rescue nil
7
8
  include Thor::Actions
8
9
 
9
10
  protected
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jira-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Lin Cheng
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-13 00:00:00.000000000 Z
11
+ date: 2014-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -17,6 +17,9 @@ dependencies:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.18.1
20
+ - - '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 0.18.1
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -24,6 +27,9 @@ dependencies:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
26
29
  version: 0.18.1
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 0.18.1
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: highline
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -31,6 +37,9 @@ dependencies:
31
37
  - - ~>
32
38
  - !ruby/object:Gem::Version
33
39
  version: 1.6.20
40
+ - - '>='
41
+ - !ruby/object:Gem::Version
42
+ version: 1.6.20
34
43
  type: :runtime
35
44
  prerelease: false
36
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -38,6 +47,9 @@ dependencies:
38
47
  - - ~>
39
48
  - !ruby/object:Gem::Version
40
49
  version: 1.6.20
50
+ - - '>='
51
+ - !ruby/object:Gem::Version
52
+ version: 1.6.20
41
53
  - !ruby/object:Gem::Dependency
42
54
  name: faraday
43
55
  requirement: !ruby/object:Gem::Requirement
@@ -45,6 +57,9 @@ dependencies:
45
57
  - - ~>
46
58
  - !ruby/object:Gem::Version
47
59
  version: 0.8.8
60
+ - - '>='
61
+ - !ruby/object:Gem::Version
62
+ version: 0.8.9
48
63
  type: :runtime
49
64
  prerelease: false
50
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -52,6 +67,29 @@ dependencies:
52
67
  - - ~>
53
68
  - !ruby/object:Gem::Version
54
69
  version: 0.8.8
70
+ - - '>='
71
+ - !ruby/object:Gem::Version
72
+ version: 0.8.9
73
+ - !ruby/object:Gem::Dependency
74
+ name: pry-remote
75
+ requirement: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ~>
78
+ - !ruby/object:Gem::Version
79
+ version: 0.1.7
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: 0.1.7
83
+ type: :development
84
+ prerelease: false
85
+ version_requirements: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: 0.1.7
90
+ - - '>='
91
+ - !ruby/object:Gem::Version
92
+ version: 0.1.7
55
93
  description: CLI used to manage JIRA workflows leveraging git
56
94
  email: darren@thanx.com
57
95
  executables:
@@ -59,7 +97,9 @@ executables:
59
97
  extensions: []
60
98
  extra_rdoc_files: []
61
99
  files:
100
+ - README.md
62
101
  - bin/jira
102
+ - lib/jira.rb
63
103
  - lib/jira/api.rb
64
104
  - lib/jira/commands/browse.rb
65
105
  - lib/jira/commands/comment.rb
@@ -76,8 +116,6 @@ files:
76
116
  - lib/jira/exceptions.rb
77
117
  - lib/jira/format.rb
78
118
  - lib/jira/mixins.rb
79
- - lib/jira.rb
80
- - README.md
81
119
  homepage: https://github.com/darrenli/jira-cli
82
120
  licenses:
83
121
  - MIT
@@ -98,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
136
  version: '0'
99
137
  requirements: []
100
138
  rubyforge_project:
101
- rubygems_version: 2.1.4
139
+ rubygems_version: 2.2.0
102
140
  signing_key:
103
141
  specification_version: 4
104
142
  summary: JIRA CLI