git-issue 0.7.1 → 0.7.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.7.2
data/git-issue.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{git-issue}
8
- s.version = "0.7.1"
8
+ s.version = "0.7.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tomohito Ozaki"]
@@ -15,6 +15,7 @@ class GitIssue::Github < GitIssue::Base
15
15
  @user = options[:user] || configured_value('user')
16
16
  @user = global_configured_value('github.user') if @user.blank?
17
17
  configure_error('user', "git config issue.user yuroyoro") if @user.blank?
18
+ @sslNoVerify = options[:sslNoVerify] || configured_value('apikey') ? 1 : 0
18
19
  end
19
20
 
20
21
  def commands
@@ -149,10 +150,11 @@ class GitIssue::Github < GitIssue::Base
149
150
  def fetch_json(url, params = {})
150
151
  url += "?" + params.map{|k,v| "#{k}=#{v}"}.join("&") unless params.empty?
151
152
 
152
- if @debug
153
- puts url
154
- end
155
- json = open(url, {"Authorizaion" => "#{@user}/token:#{@apikey}"}) {|io|
153
+ puts url if @debug
154
+
155
+ opt = {"Authorizaion" => "#{@user}/token:#{@apikey}"}
156
+ opt[:ssl_verify_mode] = OpenSSL::SSL::VERIFY_NONE if @sslNoVerify
157
+ json = open(url, opt) {|io|
156
158
  JSON.parse(io.read)
157
159
  }
158
160
 
@@ -355,6 +357,7 @@ class GitIssue::Github < GitIssue::Base
355
357
  opts.on("--since=VALUE", "Query of listing issue, (Optional string of a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ)"){|v| @options[:since] = v }
356
358
 
357
359
  opts.on("--password=VALUE", "For Authorizaion of create/update issue. Github API v3 does'nt supports API token base authorization for now. then, use Basic Authorizaion instead token." ){|v| @options[:password]}
360
+ opts.on("--sslnoverify", "don't verify SSL"){ @options[:sslNoVerify] = true}
358
361
  opts
359
362
  end
360
363
 
@@ -184,7 +184,7 @@ class Redmine < GitIssue::Base
184
184
 
185
185
  http = Net::HTTP.new(uri.host, uri.port)
186
186
  http.set_debug_output $stderr if @debug && http.respond_to?(:set_debug_output)
187
- http.start(uri.host, uri.port){|http|
187
+ http.start{|http|
188
188
 
189
189
  path = "#{uri.path}?key=#{@apikey}"
190
190
  path += "&" + params.map{|k,v| "#{k}=#{v}"}.join("&") unless params.empty?
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-issue
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 1
10
- version: 0.7.1
9
+ - 2
10
+ version: 0.7.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tomohito Ozaki