update_status 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ gem "multi_json", ">= 1.0.3"
5
+ gem "rest-client", ">= 1.6.7"
6
+
7
+ # Add dependencies to develop your gem here.
8
+ # Include everything needed to run rake, tests, features, etc.
9
+ group :development do
10
+ gem "rspec", ">= 0"
11
+ gem "rdoc", "~> 3.12"
12
+ gem "bundler", ">= 1.2.1"
13
+ gem "jeweler", "~> 1.8.4"
14
+ gem "rcov", ">= 0"
15
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,39 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ diff-lcs (1.1.3)
5
+ git (1.2.5)
6
+ jeweler (1.8.4)
7
+ bundler (~> 1.0)
8
+ git (>= 1.2.5)
9
+ rake
10
+ rdoc
11
+ json (1.7.5)
12
+ mime-types (1.19)
13
+ multi_json (1.3.6)
14
+ rake (0.9.2.2)
15
+ rcov (0.9.9)
16
+ rdoc (3.12)
17
+ json (~> 1.4)
18
+ rest-client (1.6.7)
19
+ mime-types (>= 1.16)
20
+ rspec (2.9.0)
21
+ rspec-core (~> 2.9.0)
22
+ rspec-expectations (~> 2.9.0)
23
+ rspec-mocks (~> 2.9.0)
24
+ rspec-core (2.9.0)
25
+ rspec-expectations (2.9.1)
26
+ diff-lcs (~> 1.1.3)
27
+ rspec-mocks (2.9.0)
28
+
29
+ PLATFORMS
30
+ ruby
31
+
32
+ DEPENDENCIES
33
+ bundler (>= 1.2.1)
34
+ jeweler (~> 1.8.4)
35
+ multi_json (>= 1.0.3)
36
+ rcov
37
+ rdoc (~> 3.12)
38
+ rest-client (>= 1.6.7)
39
+ rspec
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Douglas Roper
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,19 @@
1
+ = status
2
+
3
+ Updates pull requests on github, with latest build from Jenkins and QA status
4
+
5
+ == Contributing to status
6
+
7
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
8
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
9
+ * Fork the project.
10
+ * Start a feature/bugfix branch.
11
+ * Commit and push until you are happy with your contribution.
12
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
+
15
+ == Copyright
16
+
17
+ Copyright (c) 2012 Douglas Roper. See LICENSE.txt for
18
+ further details.
19
+
data/Rakefile ADDED
@@ -0,0 +1,53 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "update_status"
18
+ gem.homepage = "http://github.com/dougdroper/status"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Status update for pull requests}
21
+ gem.description = %Q{Updates pull requests on github, with latest build from Jenkins and QA status}
22
+ gem.email = "douglasroper@notonthehighstreet.com"
23
+ gem.authors = ["Douglas Roper"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rake/testtask'
29
+ Rake::TestTask.new(:test) do |test|
30
+ test.libs << 'lib' << 'test'
31
+ test.pattern = 'test/**/test_*.rb'
32
+ test.verbose = true
33
+ end
34
+
35
+ require 'rcov/rcovtask'
36
+ Rcov::RcovTask.new do |test|
37
+ test.libs << 'test'
38
+ test.pattern = 'test/**/test_*.rb'
39
+ test.verbose = true
40
+ test.rcov_opts << '--exclude "gems/*"'
41
+ end
42
+
43
+ task :default => :test
44
+
45
+ require 'rdoc/task'
46
+ Rake::RDocTask.new do |rdoc|
47
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
+
49
+ rdoc.rdoc_dir = 'rdoc'
50
+ rdoc.title = "status #{version}"
51
+ rdoc.rdoc_files.include('README*')
52
+ rdoc.rdoc_files.include('lib/**/*.rb')
53
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/bin/status ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ # coding: utf-8
3
+
4
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
5
+
6
+ require 'status'
7
+
8
+ Status::Base.new(*ARGV).update
data/lib/status.rb ADDED
@@ -0,0 +1,65 @@
1
+ # coding: utf-8
2
+
3
+ begin
4
+ require 'rubygems'
5
+ rescue LoadError
6
+ end
7
+
8
+ require 'fileutils'
9
+ require 'multi_json'
10
+ require 'rest-client'
11
+
12
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
13
+
14
+ require 'status/base'
15
+ require 'status/jenkins'
16
+ require 'status/config'
17
+ require 'status/request'
18
+
19
+ require 'status/github/statuses'
20
+ require 'status/github/pull_request'
21
+
22
+ module Status
23
+ extend self
24
+
25
+ def config
26
+ @config ||= Status::Config.new
27
+ end
28
+
29
+ def sha
30
+ `git log -1 --pretty=format:'%H'`
31
+ end
32
+
33
+ def title
34
+ `git log -1 --pretty=format:'%s'`
35
+ end
36
+
37
+ def branch
38
+ `git rev-parse --abbrev-ref HEAD`.chomp
39
+ end
40
+
41
+ def token
42
+ Status.config.attrs["token"]
43
+ end
44
+
45
+ def repo
46
+ Status.config.attrs["repo"]
47
+ end
48
+
49
+ def owner
50
+ Status.config.attrs["owner"]
51
+ end
52
+
53
+ def ci_url
54
+ Status.config.attrs["ci_url"]
55
+ end
56
+
57
+ def ci_user
58
+ Status.config.attrs["username"]
59
+ end
60
+
61
+ def ci_password
62
+ Status.config.attrs["password"]
63
+ end
64
+
65
+ end
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ require File.dirname(__FILE__) + '/github/pull_request'
3
+ require File.dirname(__FILE__) + '/github/statuses'
4
+
5
+ module Status
6
+ class Base
7
+ attr_reader :qa_status
8
+
9
+ def initialize(qa_status="pending")
10
+ @qa_status = qa_status
11
+ @statuses = Status::Github::Statuses.new(qa_status)
12
+ end
13
+
14
+ def update
15
+ puts "Updating..."
16
+ pull = Status::Github::PullRequest.new
17
+ pull.create_pull_request unless pull.pull_request_found?
18
+ @statuses.request
19
+ puts "Done."
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,60 @@
1
+ # coding: utf-8
2
+
3
+ module Status
4
+ class Config
5
+ FILE = "#{ENV['HOME']}/.status.conf"
6
+
7
+ attr_reader :attrs
8
+
9
+ def initialize
10
+ bootstrap unless File.exist?(file)
11
+ load_config
12
+ validate
13
+ end
14
+
15
+ def file
16
+ FILE
17
+ end
18
+
19
+ def validate
20
+ validate_presence_of :owner
21
+ validate_presence_of :repo
22
+ validate_presence_of :token
23
+ validate_presence_of :ci_url, "ci"
24
+ validate_presence_of :username, "ci"
25
+ validate_presence_of :password, "ci"
26
+ end
27
+
28
+ def validate_presence_of(sym, type="github")
29
+ unless attrs.include?(sym.to_s)
30
+ puts "You have not entered a #{sym} for #{type}"
31
+ attribute = gets
32
+ self.attrs = ({sym => attribute.chomp})
33
+ end
34
+ end
35
+
36
+ def bootstrap
37
+ @attrs = {
38
+ # eg:
39
+ # :owner => "dougdroper",
40
+ # :repo => "status",
41
+ # :ci_url => "http://jenkins-ci.org/"
42
+ }
43
+ save
44
+ end
45
+
46
+ def attrs=(attribute={})
47
+ @attrs.merge!(attribute)
48
+ save
49
+ end
50
+
51
+ def load_config
52
+ @attrs = MultiJson.decode(File.new(file, 'r').read)
53
+ end
54
+
55
+ def save
56
+ json = MultiJson.encode(attrs)
57
+ File.open(file, 'w') {|f| f.write(json) }
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,41 @@
1
+ # coding: utf-8
2
+
3
+ module Status
4
+ module Github
5
+ class PullRequest
6
+ def pull_request_found?
7
+ !get_pull_request.select {|pull| pull["head"]["ref"] == Status.branch}.empty?
8
+ end
9
+
10
+ def create_pull_request
11
+ puts "no pull request found create one? (y/n)"
12
+ answer = gets
13
+ answer.chomp.downcase == "y" ? new_pull_request : abort("exit")
14
+ end
15
+
16
+ def new_pull_request
17
+ response = post_pull_request
18
+ puts response == "not found" ? response : response["url"]
19
+ end
20
+
21
+ def payload
22
+ puts "enter a description"
23
+ body = gets
24
+
25
+ {:title => Status.title, :body => body, :base => "master", :head => Status.branch }
26
+ end
27
+
28
+ def get_pull_request
29
+ Status::Request.new.get(pull_request_api)
30
+ end
31
+
32
+ def post_pull_request
33
+ Status::Request.new.post(pull_request_api, payload)
34
+ end
35
+
36
+ def pull_request_api
37
+ "/repos/#{Status.owner}/#{Status.repo}/pulls?access_token=#{Status.token}"
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+
3
+ module Status
4
+ module Github
5
+ class Statuses
6
+ def initialize(qa_status="pending")
7
+ @qa_status = qa_status
8
+ end
9
+
10
+ def request
11
+ Status::Request.new.post(status_api, payload)
12
+ end
13
+
14
+ private
15
+
16
+ def status_api
17
+ "/repos/#{Status.owner}/#{Status.repo}/statuses/" + Status.sha + "?access_token=" + Status.token
18
+ end
19
+
20
+ def description
21
+ "Build status: #{Jenkins.state}, QA #{@qa_status}"
22
+ end
23
+
24
+ def payload
25
+ {:state => state, :description => description, :target_url => "#{Status.ci_url}#{Status.branch}"}
26
+ end
27
+
28
+ def state
29
+ (Jenkins.pass? && @qa_status == "pass") ? states[3] : states[2]
30
+ end
31
+
32
+ def states
33
+ %w(error failure pending success)
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+
3
+ module Status
4
+ module Jenkins
5
+ extend self
6
+
7
+ def state
8
+ return "Green" if pass?
9
+ "building"
10
+ end
11
+
12
+ def pass?
13
+ @status ||= get_ci_status
14
+ return false if @status == "building" || @status == "not found"
15
+ true
16
+ end
17
+
18
+ def get_ci_status
19
+ response = Request.new(:ci).get(path)
20
+ return response if response == "not found"
21
+ response["building"] == true ? "building" : response["result"]
22
+ end
23
+
24
+ def path
25
+ "/job/#{Status.branch}/lastBuild/api/json"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,49 @@
1
+ # coding: utf-8
2
+
3
+ module Status
4
+ class GithubRequest
5
+ attr_reader :url, :options
6
+ def initialize
7
+ @url = "https://api.github.com"
8
+ @options = {}
9
+ end
10
+ end
11
+ end
12
+
13
+ module Status
14
+ class CiRequest
15
+ attr_reader :url, :options
16
+ def initialize
17
+ @url = Status.ci_url
18
+ @options = {:user => Status.ci_user, :password => Status.ci_password}
19
+ end
20
+ end
21
+ end
22
+
23
+
24
+ module Status
25
+ class Request
26
+ attr_reader :conn
27
+ def initialize(type=:github)
28
+ @klass = {:github => GithubRequest, :ci => CiRequest}[type]
29
+ @klass = @klass.new
30
+ @site = RestClient::Resource.new(@klass.url, @klass.options, :headers => { :accept => :json, :content_type => :json })
31
+ end
32
+
33
+ def get(path)
34
+ begin
35
+ MultiJson.decode @site[path].get
36
+ rescue
37
+ "not found"
38
+ end
39
+ end
40
+
41
+ def post(path, data)
42
+ begin
43
+ MultiJson.decode @site[path].post(MultiJson.encode(data))
44
+ rescue
45
+ "not found"
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,3 @@
1
+ $:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
2
+
3
+ require 'status'
@@ -0,0 +1,50 @@
1
+ require 'spec_helper'
2
+
3
+ describe Status::Github::PullRequest do
4
+ subject { Status::Github::PullRequest.new }
5
+
6
+ before do
7
+ Status.stub(:config => stub(:attrs => {}))
8
+ end
9
+
10
+ context "#pull_request_found?" do
11
+ before do
12
+ Status::Request.stub(:new => stub(:get => [{"head" => {"ref" => "branch_name"}}]))
13
+ end
14
+
15
+ it "is not found if a pull request does not exists" do
16
+ Status.stub(:branch => "new_branch")
17
+ subject.pull_request_found?.should be_false
18
+ end
19
+
20
+ it "is found if a pull request does exists" do
21
+ Status.stub(:branch => "branch_name")
22
+ subject.pull_request_found?.should be_true
23
+ end
24
+ end
25
+
26
+ context "#create_pull_request" do
27
+ before do
28
+ subject.stub(:puts)
29
+ subject.stub(:gets => "y\n")
30
+ end
31
+
32
+ it "creates a pull request" do
33
+ Status::Request.stub(:new => stub(:post => "{\"status\":\"success\"}"))
34
+ subject.stub(:puts => "url")
35
+ subject.create_pull_request.should == "url"
36
+ end
37
+
38
+ it "returns error msg when pull request creation fails" do
39
+ Status::Request.stub(:new => stub(:post => "{\"message\":\"server error\"}"))
40
+ subject.stub(:puts => "not found")
41
+ subject.create_pull_request.should == "not found"
42
+ end
43
+
44
+ it "aborts pull request creation" do
45
+ subject.stub(:gets => "n")
46
+ subject.should_receive(:abort)
47
+ subject.create_pull_request
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,33 @@
1
+ require 'spec_helper'
2
+
3
+ describe Status::Jenkins do
4
+ class Test
5
+ include Status::Jenkins
6
+ end
7
+
8
+ subject {Test.new}
9
+
10
+ before do
11
+ Status.stub(:config => stub(:attrs => {}))
12
+ Status.stub(:branch => "")
13
+
14
+ stub(Status::Request)
15
+ end
16
+
17
+ context "#state" do
18
+ it "is Green when ci result is success" do
19
+ Status::Request.stub(:new => stub(:get => {"building" => false, "result" => "success"}))
20
+ subject.state.should == "Green"
21
+ end
22
+
23
+ it "is Building when ci result is building" do
24
+ Status::Request.stub(:new => stub(:get => {"building" => true, "result" => "success"}))
25
+ subject.state.should == "building"
26
+ end
27
+
28
+ it "is Building when ci result is not found" do
29
+ Status::Request.stub(:new => stub(:get => "not found"))
30
+ subject.state.should == "building"
31
+ end
32
+ end
33
+ end
data/status.gemspec ADDED
@@ -0,0 +1,79 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "status"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Douglas Roper"]
12
+ s.date = "2012-10-25"
13
+ s.description = "Updates pull requests on github, with latest build from Jenkins and QA status"
14
+ s.email = "douglasroper@notonthehighstreet.com"
15
+ s.executables = ["status"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE.txt",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "bin/status",
29
+ "lib/status.rb",
30
+ "lib/status/base.rb",
31
+ "lib/status/config.rb",
32
+ "lib/status/github/pull_request.rb",
33
+ "lib/status/github/statuses.rb",
34
+ "lib/status/jenkins.rb",
35
+ "lib/status/request.rb",
36
+ "spec/spec_helper.rb",
37
+ "spec/status/github/pull_request_spec.rb",
38
+ "spec/status/jenkins_spec.rb",
39
+ "status.gemspec",
40
+ "test/helper.rb",
41
+ "test/test_status.rb"
42
+ ]
43
+ s.homepage = "http://github.com/dougdroper/status"
44
+ s.licenses = ["MIT"]
45
+ s.require_paths = ["lib"]
46
+ s.rubygems_version = "1.8.24"
47
+ s.summary = "Status update for pull requests"
48
+
49
+ if s.respond_to? :specification_version then
50
+ s.specification_version = 3
51
+
52
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
+ s.add_runtime_dependency(%q<multi_json>, [">= 1.0.3"])
54
+ s.add_runtime_dependency(%q<rest-client>, [">= 1.6.7"])
55
+ s.add_development_dependency(%q<rspec>, [">= 0"])
56
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
57
+ s.add_development_dependency(%q<bundler>, [">= 1.2.1"])
58
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
59
+ s.add_development_dependency(%q<rcov>, [">= 0"])
60
+ else
61
+ s.add_dependency(%q<multi_json>, [">= 1.0.3"])
62
+ s.add_dependency(%q<rest-client>, [">= 1.6.7"])
63
+ s.add_dependency(%q<rspec>, [">= 0"])
64
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
65
+ s.add_dependency(%q<bundler>, [">= 1.2.1"])
66
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
67
+ s.add_dependency(%q<rcov>, [">= 0"])
68
+ end
69
+ else
70
+ s.add_dependency(%q<multi_json>, [">= 1.0.3"])
71
+ s.add_dependency(%q<rest-client>, [">= 1.6.7"])
72
+ s.add_dependency(%q<rspec>, [">= 0"])
73
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
74
+ s.add_dependency(%q<bundler>, [">= 1.2.1"])
75
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
76
+ s.add_dependency(%q<rcov>, [">= 0"])
77
+ end
78
+ end
79
+
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'status'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestStatus < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
@@ -0,0 +1,80 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "update_status"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Douglas Roper"]
12
+ s.date = "2012-10-25"
13
+ s.description = "Updates pull requests on github, with latest build from Jenkins and QA status"
14
+ s.email = "douglasroper@notonthehighstreet.com"
15
+ s.executables = ["status"]
16
+ s.extra_rdoc_files = [
17
+ "LICENSE.txt",
18
+ "README.rdoc"
19
+ ]
20
+ s.files = [
21
+ ".document",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "bin/status",
29
+ "lib/status.rb",
30
+ "lib/status/base.rb",
31
+ "lib/status/config.rb",
32
+ "lib/status/github/pull_request.rb",
33
+ "lib/status/github/statuses.rb",
34
+ "lib/status/jenkins.rb",
35
+ "lib/status/request.rb",
36
+ "spec/spec_helper.rb",
37
+ "spec/status/github/pull_request_spec.rb",
38
+ "spec/status/jenkins_spec.rb",
39
+ "status.gemspec",
40
+ "test/helper.rb",
41
+ "test/test_status.rb",
42
+ "update_status.gemspec"
43
+ ]
44
+ s.homepage = "http://github.com/dougdroper/status"
45
+ s.licenses = ["MIT"]
46
+ s.require_paths = ["lib"]
47
+ s.rubygems_version = "1.8.24"
48
+ s.summary = "Status update for pull requests"
49
+
50
+ if s.respond_to? :specification_version then
51
+ s.specification_version = 3
52
+
53
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
54
+ s.add_runtime_dependency(%q<multi_json>, [">= 1.0.3"])
55
+ s.add_runtime_dependency(%q<rest-client>, [">= 1.6.7"])
56
+ s.add_development_dependency(%q<rspec>, [">= 0"])
57
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
58
+ s.add_development_dependency(%q<bundler>, [">= 1.2.1"])
59
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
60
+ s.add_development_dependency(%q<rcov>, [">= 0"])
61
+ else
62
+ s.add_dependency(%q<multi_json>, [">= 1.0.3"])
63
+ s.add_dependency(%q<rest-client>, [">= 1.6.7"])
64
+ s.add_dependency(%q<rspec>, [">= 0"])
65
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
66
+ s.add_dependency(%q<bundler>, [">= 1.2.1"])
67
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
68
+ s.add_dependency(%q<rcov>, [">= 0"])
69
+ end
70
+ else
71
+ s.add_dependency(%q<multi_json>, [">= 1.0.3"])
72
+ s.add_dependency(%q<rest-client>, [">= 1.6.7"])
73
+ s.add_dependency(%q<rspec>, [">= 0"])
74
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
75
+ s.add_dependency(%q<bundler>, [">= 1.2.1"])
76
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
77
+ s.add_dependency(%q<rcov>, [">= 0"])
78
+ end
79
+ end
80
+
metadata ADDED
@@ -0,0 +1,193 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: update_status
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Douglas Roper
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-10-25 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: multi_json
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ hash: 17
28
+ segments:
29
+ - 1
30
+ - 0
31
+ - 3
32
+ version: 1.0.3
33
+ type: :runtime
34
+ requirement: *id001
35
+ prerelease: false
36
+ - !ruby/object:Gem::Dependency
37
+ name: rest-client
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 1
44
+ segments:
45
+ - 1
46
+ - 6
47
+ - 7
48
+ version: 1.6.7
49
+ type: :runtime
50
+ requirement: *id002
51
+ prerelease: false
52
+ - !ruby/object:Gem::Dependency
53
+ name: rspec
54
+ version_requirements: &id003 !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ hash: 3
60
+ segments:
61
+ - 0
62
+ version: "0"
63
+ type: :development
64
+ requirement: *id003
65
+ prerelease: false
66
+ - !ruby/object:Gem::Dependency
67
+ name: rdoc
68
+ version_requirements: &id004 !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ~>
72
+ - !ruby/object:Gem::Version
73
+ hash: 31
74
+ segments:
75
+ - 3
76
+ - 12
77
+ version: "3.12"
78
+ type: :development
79
+ requirement: *id004
80
+ prerelease: false
81
+ - !ruby/object:Gem::Dependency
82
+ name: bundler
83
+ version_requirements: &id005 !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 29
89
+ segments:
90
+ - 1
91
+ - 2
92
+ - 1
93
+ version: 1.2.1
94
+ type: :development
95
+ requirement: *id005
96
+ prerelease: false
97
+ - !ruby/object:Gem::Dependency
98
+ name: jeweler
99
+ version_requirements: &id006 !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
102
+ - - ~>
103
+ - !ruby/object:Gem::Version
104
+ hash: 63
105
+ segments:
106
+ - 1
107
+ - 8
108
+ - 4
109
+ version: 1.8.4
110
+ type: :development
111
+ requirement: *id006
112
+ prerelease: false
113
+ - !ruby/object:Gem::Dependency
114
+ name: rcov
115
+ version_requirements: &id007 !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ hash: 3
121
+ segments:
122
+ - 0
123
+ version: "0"
124
+ type: :development
125
+ requirement: *id007
126
+ prerelease: false
127
+ description: Updates pull requests on github, with latest build from Jenkins and QA status
128
+ email: douglasroper@notonthehighstreet.com
129
+ executables:
130
+ - status
131
+ extensions: []
132
+
133
+ extra_rdoc_files:
134
+ - LICENSE.txt
135
+ - README.rdoc
136
+ files:
137
+ - .document
138
+ - Gemfile
139
+ - Gemfile.lock
140
+ - LICENSE.txt
141
+ - README.rdoc
142
+ - Rakefile
143
+ - VERSION
144
+ - bin/status
145
+ - lib/status.rb
146
+ - lib/status/base.rb
147
+ - lib/status/config.rb
148
+ - lib/status/github/pull_request.rb
149
+ - lib/status/github/statuses.rb
150
+ - lib/status/jenkins.rb
151
+ - lib/status/request.rb
152
+ - spec/spec_helper.rb
153
+ - spec/status/github/pull_request_spec.rb
154
+ - spec/status/jenkins_spec.rb
155
+ - status.gemspec
156
+ - test/helper.rb
157
+ - test/test_status.rb
158
+ - update_status.gemspec
159
+ homepage: http://github.com/dougdroper/status
160
+ licenses:
161
+ - MIT
162
+ post_install_message:
163
+ rdoc_options: []
164
+
165
+ require_paths:
166
+ - lib
167
+ required_ruby_version: !ruby/object:Gem::Requirement
168
+ none: false
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ hash: 3
173
+ segments:
174
+ - 0
175
+ version: "0"
176
+ required_rubygems_version: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ hash: 3
182
+ segments:
183
+ - 0
184
+ version: "0"
185
+ requirements: []
186
+
187
+ rubyforge_project:
188
+ rubygems_version: 1.8.24
189
+ signing_key:
190
+ specification_version: 3
191
+ summary: Status update for pull requests
192
+ test_files: []
193
+