terjira 0.2.10 → 0.3.0
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 +7 -3
- data/lib/terjira.rb +3 -1
- data/lib/terjira/client/auth_option_builder.rb +25 -5
- data/lib/terjira/version.rb +1 -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: bc00a634cbac432a593310af4985c73fa92421f4
|
4
|
+
data.tar.gz: 5aa56eee111094f2b6f6532349b30bfe80442a59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46181357f2101bcda15d73a7d857a06e688afebbc22329d3816ade60391d82da5ccd9470009bfef03cd1482b6fe8cc3b48dd948eb94eabcb8ecac76b6635b6f0
|
7
|
+
data.tar.gz: 0c4fae494037923f76bc1a3487ba417c8cdc02f315d9637bf575d8cf21eb65fea9ed3d3ee4fdbc6c11a919d5def43d55782df1416af264568cd772fa8eb5f1f8
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -35,6 +35,8 @@ or check OSX 10.11 issue [#12](https://github.com/keepcosmos/terjira/issues/12)
|
|
35
35
|
```
|
36
36
|
Authentication:
|
37
37
|
jira login # Login your Jira
|
38
|
+
# [--ssl-config] with ssl configuration
|
39
|
+
# [--proxy-config] with proxy configuration
|
38
40
|
jira logout # Logout your Jira
|
39
41
|
|
40
42
|
Project:
|
@@ -53,13 +55,15 @@ Sprint:
|
|
53
55
|
jira sprint ( ls | list ) # List of all sprint from the board
|
54
56
|
jira sprint [SPRINT_ID] # Show the sprint
|
55
57
|
jira sprint active # Show active sprints and issues
|
58
|
+
# To show issues on the sprint(include no assignee)
|
59
|
+
# pass `--assignee ALL` or `-a ALL`.
|
56
60
|
|
57
61
|
Issue:
|
58
62
|
jira issue help [COMMAND] # Describe one specific subcommand
|
59
63
|
jira issue ( ls | list ) # List of issues
|
60
64
|
# default assignee option is current loggined user
|
61
65
|
# To show issues of all users(include no assignee)
|
62
|
-
# pass `--assignee ALL`
|
66
|
+
# pass `--assignee ALL` or `-a ALL`.
|
63
67
|
jira issue jql "[QUERY]" # Search issues with JQL
|
64
68
|
# ex)
|
65
69
|
# jira issue jql "project = 'TEST' AND summary ~ 'authentication'"
|
@@ -76,7 +80,8 @@ Issue:
|
|
76
80
|
|
77
81
|
```
|
78
82
|
|
79
|
-
|
83
|
+
|
84
|
+
## Feature Todo
|
80
85
|
**Contributions are welcome!**
|
81
86
|
- [x] Add JQL command for find issues
|
82
87
|
- [x] Search issues by keyword
|
@@ -84,7 +89,6 @@ Issue:
|
|
84
89
|
- [ ] Manage component and version of issues
|
85
90
|
- [ ] Track history of transitions
|
86
91
|
- [ ] More friendly help
|
87
|
-
- [ ] Improve test coverage
|
88
92
|
|
89
93
|
## Development
|
90
94
|
|
data/lib/terjira.rb
CHANGED
@@ -11,10 +11,12 @@ module Terjira
|
|
11
11
|
# Main CLI
|
12
12
|
class CLI < Thor
|
13
13
|
desc 'login', 'login your Jira'
|
14
|
+
option "ssl-config", type: :boolean
|
15
|
+
option "proxy-config", type: :boolean
|
14
16
|
def login
|
15
17
|
pastel = Pastel.new
|
16
18
|
Client::Base.expire_auth_options
|
17
|
-
Client::Base.build_auth_options
|
19
|
+
Client::Base.build_auth_options(options)
|
18
20
|
|
19
21
|
# for touch base resource
|
20
22
|
Client::Field.all
|
@@ -6,21 +6,23 @@ module Terjira
|
|
6
6
|
module AuthOptionBuilder
|
7
7
|
AUTH_CACHE_KEY = 'auth'.freeze
|
8
8
|
|
9
|
-
def build_auth_options(
|
9
|
+
def build_auth_options(options = {})
|
10
|
+
cache_key = options[:cache_key] || AUTH_CACHE_KEY
|
10
11
|
auth_file_cache.fetch cache_key do
|
11
|
-
build_auth_options_by_tty
|
12
|
+
build_auth_options_by_tty(options)
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
15
|
-
def build_auth_options_by_cached(
|
16
|
+
def build_auth_options_by_cached(options = {})
|
17
|
+
cache_key = options[:cache_key] || AUTH_CACHE_KEY
|
16
18
|
auth_file_cache.get(cache_key)
|
17
19
|
end
|
18
20
|
|
19
|
-
def expire_auth_options
|
21
|
+
def expire_auth_options
|
20
22
|
Terjira::FileCache.clear_all
|
21
23
|
end
|
22
24
|
|
23
|
-
def build_auth_options_by_tty
|
25
|
+
def build_auth_options_by_tty(options = {})
|
24
26
|
puts 'Login will be required...'
|
25
27
|
prompt = TTY::Prompt.new
|
26
28
|
|
@@ -29,8 +31,26 @@ module Terjira
|
|
29
31
|
key(:context_path).ask('Context path:', default: '')
|
30
32
|
key(:username).ask('Username:', required: true)
|
31
33
|
key(:password).mask('Password:', required: true)
|
34
|
+
|
35
|
+
if options['ssl-config']
|
36
|
+
key(:use_ssl).yes?('Use SSL?')
|
37
|
+
key(:ssl_verify_mode).select('Verify mode:') do |menu|
|
38
|
+
menu.choice 'Verify peer', OpenSSL::SSL::VERIFY_PEER
|
39
|
+
menu.choice 'Verify client once', OpenSSL::SSL::VERIFY_CLIENT_ONCE
|
40
|
+
menu.choice 'Verify fail if no peer cert', OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT
|
41
|
+
menu.choice 'Verify none', OpenSSL::SSL::VERIFY_NONE
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
if options['proxy-config']
|
46
|
+
key(:proxy_address).ask("Proxy address: ", default: nil)
|
47
|
+
key(:proxy_port).ask("Proxy port: ", default: nil)
|
48
|
+
end
|
32
49
|
end
|
50
|
+
|
33
51
|
result[:auth_type] = :basic
|
52
|
+
result[:use_ssl] ||= false if result[:site] =~ /http\:\/\//
|
53
|
+
|
34
54
|
result
|
35
55
|
end
|
36
56
|
|
data/lib/terjira/version.rb
CHANGED
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.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaehyun Shin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|