github_pulley 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/github_pulley.gemspec +1 -1
- data/lib/github_pulley/base.rb +5 -4
- data/lib/github_pulley/version.rb +1 -1
- metadata +9 -11
data/github_pulley.gemspec
CHANGED
@@ -18,6 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_paths = ["lib"]
|
20
20
|
s.add_runtime_dependency 'json'
|
21
|
-
s.add_runtime_dependency 'octokit', "=
|
21
|
+
s.add_runtime_dependency 'octokit', "= 1.7.0"
|
22
22
|
s.add_runtime_dependency 'optitron'
|
23
23
|
end
|
data/lib/github_pulley/base.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
module GithubPulley
|
2
2
|
class Base
|
3
3
|
def initialize
|
4
|
-
@octokit = Octokit::Client.new(:login => github_user, :
|
4
|
+
@octokit = Octokit::Client.new(:login => github_user, :oauth_token => github_token)
|
5
5
|
end
|
6
6
|
|
7
7
|
def get_open_issues(opts={})
|
8
8
|
# Listing by assignee seems to be broken
|
9
9
|
all_open_issues.each do |issue|
|
10
|
-
print_issue(issue)
|
10
|
+
print_issue(issue, "")
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -46,7 +46,8 @@ module GithubPulley
|
|
46
46
|
private
|
47
47
|
|
48
48
|
def all_open_issues
|
49
|
-
|
49
|
+
#@octokit.get("/api/v2/json/issues/list/#{Octokit::Repository.new(repo)}/open")['issues']
|
50
|
+
@octokit.list_issues(repo, :state => "open")
|
50
51
|
end
|
51
52
|
|
52
53
|
def github_user
|
@@ -57,7 +58,7 @@ module GithubPulley
|
|
57
58
|
|
58
59
|
def github_token
|
59
60
|
@github_token ||= `git config github.token`.strip
|
60
|
-
raise Error, "Please set github.token" if @github_token.empty?
|
61
|
+
raise Error, "Please set github.token \nExample: curl -ku #{github_user} -d '{\"scopes\":[\"repo\"],\"note\":\"pulley\"}' -X POST 'https://api.github.com/authorizations'" if @github_token.empty?
|
61
62
|
@github_token
|
62
63
|
end
|
63
64
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_pulley
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mark Percival
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2012-06-21 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: json
|
@@ -40,12 +39,12 @@ dependencies:
|
|
40
39
|
requirements:
|
41
40
|
- - "="
|
42
41
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
42
|
+
hash: 11
|
44
43
|
segments:
|
44
|
+
- 1
|
45
|
+
- 7
|
45
46
|
- 0
|
46
|
-
|
47
|
-
- 4
|
48
|
-
version: 0.6.4
|
47
|
+
version: 1.7.0
|
49
48
|
type: :runtime
|
50
49
|
version_requirements: *id002
|
51
50
|
- !ruby/object:Gem::Dependency
|
@@ -82,7 +81,6 @@ files:
|
|
82
81
|
- lib/github_pulley/base.rb
|
83
82
|
- lib/github_pulley/exception.rb
|
84
83
|
- lib/github_pulley/version.rb
|
85
|
-
has_rdoc: true
|
86
84
|
homepage: https://github.com/mdp/pulley
|
87
85
|
licenses: []
|
88
86
|
|
@@ -112,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
110
|
requirements: []
|
113
111
|
|
114
112
|
rubyforge_project: pulley
|
115
|
-
rubygems_version: 1.
|
113
|
+
rubygems_version: 1.8.18
|
116
114
|
signing_key:
|
117
115
|
specification_version: 3
|
118
116
|
summary: Work with Github Issues and Pull Requests
|