jenkins-status-tool 0.0.5 → 0.0.6

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.
@@ -51,19 +51,26 @@ Useful for embedding Jenkins CI status images on your Github project.
51
51
 
52
52
 
53
53
  ## Installation
54
- currently available only via source
54
+
55
+ **RubyGems.org**
56
+
57
+ ```bash
58
+ gem install jenkins-status-tool
59
+ ```
60
+
61
+ **Source**
55
62
 
56
63
  ```bash
57
- [root@far-far-away] git clone git@github.com:kontera-technologies/jenkins-status-tool.git
58
- [root@far-far-away] bundle install
59
- [root@far-far-away] bundle exec rake install
64
+ [root@far-away] git clone git@github.com:kontera-technologies/jenkins-status-tool.git
65
+ [root@far-away] bundle install
66
+ [root@far-away] bundle exec rake install
60
67
  ```
61
68
 
62
69
  ## Usage
63
70
  after installing the gem, the `jenkins-status-tool` command should be available
64
71
 
65
72
  ```bash
66
- [root@far-far-away] jenkins-status-tool --help
73
+ [root@far-away] jenkins-status-tool --help
67
74
 
68
75
  The Jenkins Status Tool
69
76
  Usage: jenkins-status-tool [options]
@@ -84,8 +91,8 @@ https://github.com/kontera-technologies/jenkins-status-tool
84
91
  lets say that our Jenkins server is running on ```jenkins-server:1234```
85
92
 
86
93
  ```
87
- [root@far-far-away] jenkins-status-tool --jenkins jenkins-server:1234 --port 5555 --daemonize
88
- [root@far-far-away] curl http://localhost:5555/project/my-project/status.json
94
+ [root@far-away] jenkins-status-tool --jenkins jenkins-server:1234 --port 5555 --daemonize
95
+ [root@far-away] curl http://localhost:5555/project/my-project/status.json
89
96
  {"status":"pass"}
90
97
  [root@far-far-away] wget http://localhost:5555/project/my-project/status.png
91
98
  [...SHOULD DOWNLOAD ONE OF THE IMAGES ABOVE...]
@@ -94,6 +101,10 @@ lets say that our Jenkins server is running on ```jenkins-server:1234```
94
101
  ## Embed it
95
102
  you can easily embed the current status of your builds in any html type document.
96
103
 
104
+ ```
105
+ <img src="https://jenkins-status-tool-url/projects/PROJECT-NAME/status.png"/>
106
+ ```
107
+
97
108
  TextLite
98
109
 
99
110
  ```bash
@@ -11,10 +11,10 @@ module JenkinsStatusTool
11
11
  json["jobs"].select {|o| o["name"] == project}.first rescue Hash.new
12
12
  end
13
13
 
14
- def project_rcov_graph project
15
- open("http://#{Config.instance.jenkins}/job/#{project}/rcov/graph").read rescue nil
14
+ def raw relative_path
15
+ open("http://#{Config.instance.jenkins}/#{relative_path}").read rescue nil
16
16
  end
17
-
17
+
18
18
  private
19
19
  def json
20
20
  JSON.parse open("http://#{Config.instance.jenkins}/api/json").read
@@ -23,10 +23,13 @@ module JenkinsStatusTool
23
23
  end
24
24
 
25
25
  def rcov_image
26
- jenkins.project_rcov_graph project
26
+ jenkins.raw rcov_path
27
27
  end
28
28
 
29
29
  private
30
+ def rcov_path
31
+ [job,project,rcov,graph].join "/"
32
+ end
30
33
 
31
34
  def data
32
35
  jenkins.project_info project
@@ -1,5 +1,5 @@
1
1
  module JenkinsStatusTool
2
2
  class Version
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -54,7 +54,7 @@ module JenkinsStatusTool
54
54
  end
55
55
 
56
56
  def config
57
- self.class.config
57
+ Config::instance
58
58
  end
59
59
 
60
60
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jenkins-status-tool
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
16
- requirement: &70096697981980 !ruby/object:Gem::Requirement
16
+ requirement: &70176230374160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70096697981980
24
+ version_requirements: *70176230374160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &70096697981440 !ruby/object:Gem::Requirement
27
+ requirement: &70176230373560 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70096697981440
35
+ version_requirements: *70176230373560
36
36
  description: JenkinsStatusTool - get jenkins status
37
37
  email: eran@kontera.com
38
38
  executables: