terjira 0.2.10 → 0.3.0

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: 012b4a96e8ff0af5e8334b8a4cb9880c4f921c72
4
- data.tar.gz: 52b0f05b4aebd177bf64fd2913b66c6a480605e7
3
+ metadata.gz: bc00a634cbac432a593310af4985c73fa92421f4
4
+ data.tar.gz: 5aa56eee111094f2b6f6532349b30bfe80442a59
5
5
  SHA512:
6
- metadata.gz: d0526a0f92ddda17c37ae9921d399bee29e8aee7d110d8cf1bcad6d9a347f159270ff6df5cf52d94049c0cf5c402cec0b6a81e392478fb4aa8c498c42526a5d5
7
- data.tar.gz: 64da778a5496aa54f8ff6fa54dcde74a9bb6723109499794df883c984dd819f7be22f3efc109a7951803e06b32f274b4ef8be0ce77a6748bf9d289b00277374a
6
+ metadata.gz: 46181357f2101bcda15d73a7d857a06e688afebbc22329d3816ade60391d82da5ccd9470009bfef03cd1482b6fe8cc3b48dd948eb94eabcb8ecac76b6635b6f0
7
+ data.tar.gz: 0c4fae494037923f76bc1a3487ba417c8cdc02f315d9637bf575d8cf21eb65fea9ed3d3ee4fdbc6c11a919d5def43d55782df1416af264568cd772fa8eb5f1f8
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- terjira (0.2.9)
4
+ terjira (0.3.0)
5
5
  activesupport (= 4.0.13)
6
6
  jira-ruby (~> 1.1.3)
7
7
  thor (~> 0.19.0)
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` option.
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
- ## Todo
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
 
@@ -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(cache_key = AUTH_CACHE_KEY)
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(cache_key = AUTH_CACHE_KEY)
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(cache_key = AUTH_CACHE_KEY)
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
 
@@ -1,7 +1,7 @@
1
1
  require 'terjira/utils/file_cache'
2
2
 
3
3
  module Terjira
4
- VERSION = '0.2.10'.freeze
4
+ VERSION = '0.3.0'.freeze
5
5
 
6
6
  class VersionChecker
7
7
  VERSION_CHECK_DURATION = (60 * 60 * 24 * 5).freeze
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.10
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-13 00:00:00.000000000 Z
11
+ date: 2017-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor