gocd 0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 63993090abad17999418558d8b6e606750f54040
4
+ data.tar.gz: 4307c49d5512dde53787187d2ddb03d9c2b6fe1d
5
+ SHA512:
6
+ metadata.gz: 68a632187ddaf3d085c44f325ae164798ed7c8f870f9a22649ef9696b2a76fd72c85b4c0dfbe046b650c07cdb9d3505d3b46833c5564fd2fe9d6311c91347d1a
7
+ data.tar.gz: 8d4e5a047341f4a6ff82bbfdff73dd66e13962a959f383657716fd199577b7594194b80cd02d3dc92e54d86a04bcf0684192e8d1b2bfa36360fc8d2c3c79b20b
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gem 'activesupport'
@@ -0,0 +1,23 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ activesupport (5.0.0.1)
5
+ concurrent-ruby (~> 1.0, >= 1.0.2)
6
+ i18n (~> 0.7)
7
+ minitest (~> 5.1)
8
+ tzinfo (~> 1.1)
9
+ concurrent-ruby (1.0.2)
10
+ i18n (0.7.0)
11
+ minitest (5.9.0)
12
+ thread_safe (0.3.5)
13
+ tzinfo (1.2.2)
14
+ thread_safe (~> 0.1)
15
+
16
+ PLATFORMS
17
+ ruby
18
+
19
+ DEPENDENCIES
20
+ activesupport
21
+
22
+ BUNDLED WITH
23
+ 1.13.1
@@ -0,0 +1,21 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require_relative './lib/gocd/version.rb'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'gocd'
8
+ s.version = GOCD::VERSION
9
+ s.date = '2016-09-18'
10
+ s.summary = 'Get info from gocd using its apis'
11
+ s.description = s.summary
12
+ s.authors = ['Ajit Singh']
13
+ s.email = 'jeetsingh.ajit@gamil.com'
14
+ s.license = 'MIT'
15
+ s.homepage = 'https://github.com/ajitsing/gocd.git'
16
+
17
+ s.files = `git ls-files -z`.split("\x0")
18
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
20
+ s.require_paths = ["lib"]
21
+ end
@@ -0,0 +1,27 @@
1
+ require 'active_support/core_ext/hash/conversions'
2
+
3
+ module GOCD
4
+ module PipelineStatus
5
+ class BuildInformer
6
+ def initialize(gocd_url)
7
+ @pipeline_statuses ||= Hash.from_xml(`curl -s #{gocd_url}/go/cctray.xml`)
8
+ end
9
+
10
+ def information_available?
11
+ !@pipeline_statuses.nil?
12
+ end
13
+
14
+ def red_pipelines
15
+ pipelines.select { |stage| stage['lastBuildStatus'] == 'Failure' }
16
+ end
17
+
18
+ def status
19
+ pipelines
20
+ end
21
+
22
+ def pipelines
23
+ @pipeline_statuses['Projects']['Project']
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,3 @@
1
+ module GOCD
2
+ VERSION = "0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gocd
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ platform: ruby
6
+ authors:
7
+ - Ajit Singh
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-09-18 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Get info from gocd using its apis
14
+ email: jeetsingh.ajit@gamil.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - Gemfile
20
+ - Gemfile.lock
21
+ - gocd.gemspec
22
+ - lib/gocd.rb
23
+ - lib/gocd/version.rb
24
+ homepage: https://github.com/ajitsing/gocd.git
25
+ licenses:
26
+ - MIT
27
+ metadata: {}
28
+ post_install_message:
29
+ rdoc_options: []
30
+ require_paths:
31
+ - lib
32
+ required_ruby_version: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ required_rubygems_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ requirements: []
43
+ rubyforge_project:
44
+ rubygems_version: 2.5.1
45
+ signing_key:
46
+ specification_version: 4
47
+ summary: Get info from gocd using its apis
48
+ test_files: []