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 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.0
1
+ 0.1.1
data/lib/status/config.rb CHANGED
@@ -41,6 +41,7 @@ module Status
41
41
  # :ci_url => "http://jenkins-ci.org/"
42
42
  }
43
43
  save
44
+ abort("Config setup: Run status")
44
45
  end
45
46
 
46
47
  def attrs=(attribute={})
@@ -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
- "not found"
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
- "not found"
55
+ raise NotFoundException.new
46
56
  end
47
57
  end
48
58
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "update_status"
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Douglas Roper"]
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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Douglas Roper