update_status 0.1.0 → 0.1.1
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/README.rdoc +28 -1
- data/VERSION +1 -1
- data/lib/status/config.rb +1 -0
- data/lib/status/request.rb +12 -2
- data/update_status.gemspec +1 -1
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -1,6 +1,33 @@
|
|
1
1
|
= status
|
2
2
|
|
3
|
-
Updates pull requests on github, with latest build from Jenkins and QA status
|
3
|
+
Updates pull requests on github using the statuses api (http://developer.github.com/v3/repos/statuses/), with latest build from Jenkins and QA status
|
4
|
+
|
5
|
+
= Usage
|
6
|
+
|
7
|
+
on your branch run
|
8
|
+
|
9
|
+
$: status
|
10
|
+
|
11
|
+
This will take you through some config:
|
12
|
+
eg
|
13
|
+
|
14
|
+
:owner => "dougdroper",
|
15
|
+
|
16
|
+
:repo => "status",
|
17
|
+
|
18
|
+
:ci_url => "http://jenkins-ci.org/",
|
19
|
+
|
20
|
+
:token => "your github token http://developer.github.com/v3/oauth/",
|
21
|
+
|
22
|
+
:username => "your ci username",
|
23
|
+
|
24
|
+
:password => "your ci password"
|
25
|
+
|
26
|
+
When your branch has passed QA
|
27
|
+
|
28
|
+
$: status pass
|
29
|
+
|
30
|
+
|
4
31
|
|
5
32
|
== Contributing to status
|
6
33
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/status/config.rb
CHANGED
data/lib/status/request.rb
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
|
3
|
+
module Status
|
4
|
+
class NotFoundException < Exception
|
5
|
+
def initialize
|
6
|
+
puts "Not found"
|
7
|
+
puts "Make sure #{ENV['HOME']}/.status.conf is set up correctly"
|
8
|
+
abort("exit")
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
3
13
|
module Status
|
4
14
|
class GithubRequest
|
5
15
|
attr_reader :url, :options
|
@@ -34,7 +44,7 @@ module Status
|
|
34
44
|
begin
|
35
45
|
MultiJson.decode @site[path].get
|
36
46
|
rescue
|
37
|
-
|
47
|
+
raise NotFoundException.new
|
38
48
|
end
|
39
49
|
end
|
40
50
|
|
@@ -42,7 +52,7 @@ module Status
|
|
42
52
|
begin
|
43
53
|
MultiJson.decode @site[path].post(MultiJson.encode(data))
|
44
54
|
rescue
|
45
|
-
|
55
|
+
raise NotFoundException.new
|
46
56
|
end
|
47
57
|
end
|
48
58
|
end
|
data/update_status.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: update_status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Douglas Roper
|