git-issue 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -59,6 +59,7 @@ set user and password of github(for authentication)
59
59
 
60
60
  Commnads:
61
61
  show s show given issue summary. if given no id, geuss id from current branch name.
62
+ view v view issue in browser. if given no id, geuss id from current branch name.
62
63
  list l listing issues.
63
64
  mine m display issues that assigned to you.
64
65
  commit c commit with filling issue subject to messsage.if given no id, geuss id from current branch name.
@@ -104,6 +105,7 @@ set user and password of github(for authentication)
104
105
 
105
106
  Commnads:
106
107
  show s show given issue summary. if given no id, geuss id from current branch name.
108
+ view v view issue in browser. if given no id, geuss id from current branch name.
107
109
  list l listing issues.
108
110
  mine m display issues that assigned to you.
109
111
  commit c commit with filling issue subject to messsage.if given no id, geuss id from current branch name.
@@ -21,5 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency 'activesupport'
22
22
  s.add_dependency 'pit'
23
23
  s.add_dependency 'term-ansicolor'
24
+ s.add_development_dependency 'rake'
24
25
  end
25
26
 
@@ -107,6 +107,7 @@ class GitIssue::Base
107
107
  def commands
108
108
  [
109
109
  GitIssue::Command.new(:show, :s, 'show given issue summary. if given no id, geuss id from current branch name.'),
110
+ GitIssue::Command.new(:view, :v, 'view issue in browser. if given no id, geuss id from current branch name.'),
110
111
  GitIssue::Command.new(:list, :l, 'listing issues.'),
111
112
  GitIssue::Command.new(:mine, :m, 'display issues that assigned to you.'),
112
113
  GitIssue::Command.new(:commit, :c, 'commit with filling issue subject to messsage.if given no id, geuss id from current branch name.'),
@@ -307,8 +308,8 @@ class GitIssue::Base
307
308
  env = ENV['http_proxy'] || ENV['HTTP_PROXY']
308
309
  if env
309
310
  uri = URI(env)
310
- proxy_host, proxy_port = uri.host, uri.port
311
- Net::HTTP::Proxy(proxy_host, proxy_port).new(host, port)
311
+ proxy_host, proxy_port, proxy_user, proxy_pass = uri.host, uri.port, uri.user, uri.password
312
+ Net::HTTP::Proxy(proxy_host, proxy_port, proxy_user, proxy_pass).new(host, port)
312
313
  else
313
314
  Net::HTTP.new(host, port)
314
315
  end
@@ -55,6 +55,13 @@ class GitIssue::Github < GitIssue::Base
55
55
  end
56
56
  end
57
57
 
58
+ def view(options = {})
59
+ ticket = options[:ticket_id]
60
+ raise 'ticket_id is required.' unless ticket
61
+ url = URI.join('https://github.com/', [@user, @repo, 'issues', ticket].join("/"))
62
+ system "git web--browse #{url}"
63
+ end
64
+
58
65
  def list(options = {})
59
66
  state = options[:state] || "open"
60
67
 
@@ -37,9 +37,17 @@ class Redmine < GitIssue::Base
37
37
  end
38
38
  end
39
39
 
40
+ def view(options = {})
41
+ ticket = options[:ticket_id]
42
+ raise 'ticket_id is required.' unless ticket
43
+ url = to_url('issues', ticket)
44
+ system "git web--browse #{url}"
45
+ end
46
+
40
47
  def list(options = {})
41
48
  url = to_url('issues')
42
- params = {"limit" => options[:max_count] || "100" }
49
+ max_count = options[:max_count].to_s if options[:max_count]
50
+ params = {"limit" => max_count || "100" }
43
51
  params.merge!("assigned_to_id" => "me") if options[:mine]
44
52
  params.merge!(Hash[*(options[:query].split("&").map{|s| s.split("=") }.flatten)]) if options[:query]
45
53
 
@@ -1,3 +1,3 @@
1
1
  module GitIssue
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,75 +1,88 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: git-issue
3
- version: !ruby/object:Gem::Version
4
- hash: 59
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 9
9
- - 0
10
- version: 0.9.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Tomohito Ozaki
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-11-19 00:00:00 +09:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2014-04-11 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: activesupport
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: pit
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: pit
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
47
38
  type: :runtime
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: term-ansicolor
51
39
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: term-ansicolor
48
+ requirement: !ruby/object:Gem::Requirement
53
49
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
61
54
  type: :runtime
62
- version_requirements: *id003
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rake
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
63
78
  description:
64
- email:
79
+ email:
65
80
  - ozaki@yuroyoro.com
66
- executables:
81
+ executables:
67
82
  - git-issue
68
83
  extensions: []
69
-
70
84
  extra_rdoc_files: []
71
-
72
- files:
85
+ files:
73
86
  - .document
74
87
  - .gitignore
75
88
  - Gemfile
@@ -93,41 +106,31 @@ files:
93
106
  - spec/git_issue_spec.rb
94
107
  - spec/spec.opts
95
108
  - spec/spec_helper.rb
96
- has_rdoc: true
97
109
  homepage: https://github.com/yuroyoro/git-issue
98
110
  licenses: []
99
-
100
111
  post_install_message:
101
112
  rdoc_options: []
102
-
103
- require_paths:
113
+ require_paths:
104
114
  - lib
105
- required_ruby_version: !ruby/object:Gem::Requirement
115
+ required_ruby_version: !ruby/object:Gem::Requirement
106
116
  none: false
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- hash: 3
111
- segments:
112
- - 0
113
- version: "0"
114
- required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ! '>='
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
122
  none: false
116
- requirements:
117
- - - ">="
118
- - !ruby/object:Gem::Version
119
- hash: 3
120
- segments:
121
- - 0
122
- version: "0"
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
123
127
  requirements: []
124
-
125
128
  rubyforge_project: git-issue
126
- rubygems_version: 1.5.2
129
+ rubygems_version: 1.8.23
127
130
  signing_key:
128
131
  specification_version: 3
129
132
  summary: git extention command for issue tracker system.
130
- test_files:
133
+ test_files:
131
134
  - spec/git_issue/base_spec.rb
132
135
  - spec/git_issue/github_spec.rb
133
136
  - spec/git_issue/redmine_spec.rb