committer-tools 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/committer-tools.gemspec +1 -1
- data/lib/committer-tools.rb +8 -12
- 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: fcaad1fc901c04101cd063b39b78a34adfdc2b4c
|
4
|
+
data.tar.gz: c7423a9a9f38ca64453829407d8e2f626cd3575a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce9881ab452e6d79b800906cd84112c83da8d5efb35b704050f9e53844961f9ca290b33c82fcb92a0d285da3cb67e6eee4e765eb21251f66ff513beea38ae7c6
|
7
|
+
data.tar.gz: ebcbafcea24a3b5d11efedeb72494060be24abacfeb0a51c4e85d49dcf45b111df2026ac6eb258d5c243842330b37df39c76ccfb4ab9894bdae761614071134c
|
data/committer-tools.gemspec
CHANGED
data/lib/committer-tools.rb
CHANGED
@@ -2,20 +2,17 @@ require 'json'
|
|
2
2
|
require 'rest-client'
|
3
3
|
|
4
4
|
class HTTPHelper
|
5
|
+
class << self
|
6
|
+
attr_writer :token
|
7
|
+
end
|
8
|
+
|
5
9
|
def self.get(url)
|
6
|
-
RestClient.get(url, { params: { access_token:
|
10
|
+
RestClient.get(url, { params: { access_token: @token } }).body
|
7
11
|
end
|
8
12
|
|
9
13
|
def self.get_json(url)
|
10
14
|
JSON.parse(get(url))
|
11
15
|
end
|
12
|
-
|
13
|
-
def self.with_auth(token, &block)
|
14
|
-
@@token = token
|
15
|
-
ret = yield block
|
16
|
-
@@token = nil
|
17
|
-
ret
|
18
|
-
end
|
19
16
|
end
|
20
17
|
|
21
18
|
class Lander
|
@@ -141,10 +138,9 @@ class Preparer
|
|
141
138
|
AUTH_FILE = '.ctconfig'
|
142
139
|
|
143
140
|
def run
|
144
|
-
HTTPHelper.
|
145
|
-
|
146
|
-
|
147
|
-
end
|
141
|
+
HTTPHelper.token = get_auth()
|
142
|
+
pr = get_pr()
|
143
|
+
get_github_pr(pr)
|
148
144
|
end
|
149
145
|
|
150
146
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: committer-tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Moss
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|