terjira 0.2.2 → 0.2.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +23 -23
- data/bin/jira +1 -0
- data/bin/terjira +1 -0
- data/lib/terjira/issue_cli.rb +3 -3
- data/lib/terjira/option_support/option_selector.rb +1 -1
- data/lib/terjira/version.rb +46 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bc688d0fc988c4c13e0aa1062a838a09943a86e
|
4
|
+
data.tar.gz: d4561eca0805efdb80904092b115dcbecd62f685
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed1d69fdef510881cdc5660da8b5da534076a62b2cc44f7f3ad865481c7ba8d147f7544ffcc61b299d1059e0544108be7a0afa651faf4eafbfefcf7b337aa851
|
7
|
+
data.tar.gz: bd8f00b89bd433a7205f67c34848ddc8cf892efe4e38c177edda06348aa27fbebd2d347a97a3de33d1dbce4dd36d030dc7af543e6ce9e2dd4bad34bf36fbf2c5
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -10,9 +10,9 @@ Terjira is an interactive and easy to use command line interface (or Application
|
|
10
10
|
Your Jira must support Rest API 2.0 and Agile Rest API 1.0
|
11
11
|
|
12
12
|
## Domo
|
13
|
-
[Watch
|
13
|
+
[Watch full demo](https://www.youtube.com/watch?v=T0hbhaXtH-Y)
|
14
14
|
|
15
|
-
[](https://www.youtube.com/watch?v=T0hbhaXtH-Y)
|
16
16
|
|
17
17
|
## Installation
|
18
18
|
|
@@ -32,37 +32,37 @@ If you have permission problem,
|
|
32
32
|
## Usage
|
33
33
|
```
|
34
34
|
Authentication:
|
35
|
-
jira login
|
36
|
-
jira logout
|
35
|
+
jira login # Login your Jira
|
36
|
+
jira logout # Logout your Jira
|
37
37
|
|
38
38
|
Project:
|
39
|
-
jira project help [COMMAND]
|
40
|
-
jira project ( ls | list )
|
41
|
-
jira project [PROJECT_KEY]
|
39
|
+
jira project help [COMMAND] # Describe one specific subcommand
|
40
|
+
jira project ( ls | list ) # List of all projects
|
41
|
+
jira project [PROJECT_KEY] # Show detail of the project
|
42
42
|
|
43
43
|
Board:
|
44
|
-
jira board help [COMMAND]
|
45
|
-
jira board ( ls | list)
|
46
|
-
jira board backlog
|
44
|
+
jira board help [COMMAND] # Describe one specific subcommand
|
45
|
+
jira board ( ls | list) # List of all boards
|
46
|
+
jira board backlog # Backlog from the board
|
47
47
|
|
48
48
|
|
49
49
|
Sprint:
|
50
|
-
jira sprint help [COMMAND]
|
51
|
-
jira sprint ( ls | list )
|
52
|
-
jira sprint [SPRINT_ID]
|
53
|
-
jira sprint active
|
50
|
+
jira sprint help [COMMAND] # Describe one specific subcommand
|
51
|
+
jira sprint ( ls | list ) # List of all sprint from the board
|
52
|
+
jira sprint [SPRINT_ID] # Show the sprint
|
53
|
+
jira sprint active # Show active sprints and issues
|
54
54
|
|
55
55
|
Issue:
|
56
|
-
jira issue help [COMMAND]
|
57
|
-
jira issue ( ls | list )
|
58
|
-
jira issue [ISSUE_KEY]
|
56
|
+
jira issue help [COMMAND] # Describe one specific subcommand
|
57
|
+
jira issue ( ls | list ) # List of issues
|
58
|
+
jira issue [ISSUE_KEY] # Show detail of the issue
|
59
59
|
jira issue assign [ISSUE_KEY] ([ASSIGNEE]) # Assign the issue to user
|
60
|
-
jira issue comment
|
61
|
-
jira issue delete
|
62
|
-
jira issue edit
|
63
|
-
jira issue new
|
64
|
-
jira issue open [ISSUE_KEY]
|
65
|
-
jira issue take [ISSUE_KEY]
|
60
|
+
jira issue comment [ISSUE_KEY] # Write comment on the issue
|
61
|
+
jira issue delete [ISSUE_KEY] # Delete the issue
|
62
|
+
jira issue edit [ISSUE_KEY] # Edit the issue
|
63
|
+
jira issue new # Create an issue
|
64
|
+
jira issue open [ISSUE_KEY] # Open browser
|
65
|
+
jira issue take [ISSUE_KEY] # Assign the issue to self
|
66
66
|
jira issue trans [ISSUE_KEY] ([STATUS]) # Do transition
|
67
67
|
|
68
68
|
```
|
data/bin/jira
CHANGED
data/bin/terjira
CHANGED
data/lib/terjira/issue_cli.rb
CHANGED
@@ -54,7 +54,7 @@ module Terjira
|
|
54
54
|
render_issue_detail(issue)
|
55
55
|
end
|
56
56
|
|
57
|
-
desc 'edit', 'Edit the issue'
|
57
|
+
desc 'edit [ISSUE_KEY]', 'Edit the issue'
|
58
58
|
jira_options :summary, :description, :project, :issuetype,
|
59
59
|
:priority, :assignee, :epiclink
|
60
60
|
def edit(issue)
|
@@ -67,13 +67,13 @@ module Terjira
|
|
67
67
|
render_issue_detail(issue)
|
68
68
|
end
|
69
69
|
|
70
|
-
desc 'delete', 'Delete the issue'
|
70
|
+
desc 'delete [ISSUE_KEY]', 'Delete the issue'
|
71
71
|
def delete(issue)
|
72
72
|
client_class.delete(issue)
|
73
73
|
render("Deleted")
|
74
74
|
end
|
75
75
|
|
76
|
-
desc 'comment', 'Write comment on the issue'
|
76
|
+
desc 'comment [ISSUE_KEY]', 'Write comment on the issue'
|
77
77
|
jira_options :comment
|
78
78
|
def comment(issue)
|
79
79
|
opts = suggest_options(required: [:comment])
|
data/lib/terjira/version.rb
CHANGED
@@ -1,3 +1,48 @@
|
|
1
|
+
require 'terjira/utils/file_cache'
|
2
|
+
|
1
3
|
module Terjira
|
2
|
-
VERSION = '0.2.
|
4
|
+
VERSION = '0.2.3'.freeze
|
5
|
+
|
6
|
+
class VersionChecker
|
7
|
+
VERSION_CHECK_DURATION = (60 * 60 * 24 * 5).freeze
|
8
|
+
|
9
|
+
class << self
|
10
|
+
def check_version
|
11
|
+
version_alert_cache.fetch :alert do
|
12
|
+
if new_version_exists?
|
13
|
+
puts "* New version of terjira was released! Run `gem update terjira` if you want to update"
|
14
|
+
end
|
15
|
+
'checked!'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def new_version_exists?
|
20
|
+
current = Terjira::VERSION.split(".").map(&:to_i)
|
21
|
+
remote = parse_remote_version
|
22
|
+
|
23
|
+
(current[0] < remote[0]) ||
|
24
|
+
((current[0] == remote[0]) && (current[1] < remote[1])) ||
|
25
|
+
((current[0] == remote[0]) && (current[1] == remote[1]) && (current[2] < remote[2]))
|
26
|
+
rescue => e
|
27
|
+
puts "Can not check new version of terjira, #{e.message}"
|
28
|
+
false
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def parse_remote_version
|
34
|
+
remote_version = search_remote_version
|
35
|
+
(remote_version.scan(/(?<=terjira\s\()\d+\.\d+\.\d+/).first || '0.0.0').split(".").map(&:to_i)
|
36
|
+
end
|
37
|
+
|
38
|
+
def search_remote_version
|
39
|
+
@remote_version_str ||= `gem search terjira`
|
40
|
+
end
|
41
|
+
|
42
|
+
def version_alert_cache
|
43
|
+
@version_alert_cache ||= Terjira::FileCache.new("version", VERSION_CHECK_DURATION)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
3
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terjira
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaehyun Shin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|