concourse-github-status 0.2.2 → 0.2.4
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.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/Dockerfile +3 -1
- data/bin/in +8 -1
- data/concourse-github-status.gemspec +7 -3
- data/lib/github-status.rb +4 -0
- data/lib/github-status/in.rb +6 -0
- data/lib/github-status/out.rb +4 -20
- data/lib/github-status/support/git.rb +24 -0
- data/lib/github-status/support/github.rb +17 -0
- data/lib/github-status/support/params.rb +1 -1
- data/lib/github-status/support/source.rb +5 -0
- data/lib/github-status/version.rb +3 -0
- metadata +10 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 892aa1f4770c7ad1279e6cd534f9027c8990cb9a
|
4
|
+
data.tar.gz: fee96e8be52180a4ced6a83f10ac0b1b6f86eb0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c39f6ea2fe317075f688928cfcc12e4aee79a58908dc3cbd8c9c4d458fd7072ebbfbee471811f9f3f6f8c3dfa585f2ccb9a0f4c40433e333b67aa789cdb3ce4d
|
7
|
+
data.tar.gz: 25380ea07127d3331921431c1ff27400045bf54d5d5128e53b11d50e23443e4654f3f64571d776c78c539e5486d97025223c274adf19756b3540a7d8f55d00a7
|
data/.gitignore
CHANGED
data/Dockerfile
CHANGED
data/bin/in
CHANGED
@@ -1,10 +1,14 @@
|
|
1
|
+
require_relative 'lib/github-status'
|
2
|
+
|
1
3
|
Gem::Specification.new do |gem|
|
2
4
|
gem.name = 'concourse-github-status'
|
3
|
-
gem.version =
|
4
|
-
gem.authors = ['Chris Olstrom']
|
5
|
+
gem.version = GitHubStatus::VERSION
|
5
6
|
gem.license = 'Apache-2.0'
|
6
7
|
gem.summary = 'GitHub Status resource for Concourse'
|
7
|
-
|
8
|
+
|
9
|
+
gem.author = 'Chris Olstrom'
|
10
|
+
gem.email = 'chris@olstrom.com'
|
11
|
+
gem.homepage = 'https://github.com/colstrom/concourse-github-status'
|
8
12
|
|
9
13
|
gem.files = `git ls-files`.split("\n")
|
10
14
|
gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
data/lib/github-status/out.rb
CHANGED
@@ -2,15 +2,17 @@
|
|
2
2
|
|
3
3
|
require 'concourse-fuselage'
|
4
4
|
require 'contracts'
|
5
|
-
require 'git'
|
6
|
-
require 'octokit'
|
7
5
|
require_relative 'core'
|
8
6
|
require_relative 'support/params'
|
7
|
+
require_relative 'support/git'
|
8
|
+
require_relative 'support/github'
|
9
9
|
|
10
10
|
module GitHubStatus
|
11
11
|
class Out < Fuselage::Out
|
12
12
|
include Core
|
13
13
|
include Support::Params
|
14
|
+
include Support::Git
|
15
|
+
include Support::GitHub
|
14
16
|
|
15
17
|
Contract None => Sawyer::Resource
|
16
18
|
def update!
|
@@ -38,23 +40,5 @@ module GitHubStatus
|
|
38
40
|
description: description
|
39
41
|
}
|
40
42
|
end
|
41
|
-
|
42
|
-
Contract None => Git::Base
|
43
|
-
def git
|
44
|
-
@git ||= Git.open "#{workdir}/#{path}"
|
45
|
-
rescue ArgumentError
|
46
|
-
STDERR.puts "#{path} is not a git repository"
|
47
|
-
abort
|
48
|
-
end
|
49
|
-
|
50
|
-
Contract None => String
|
51
|
-
def sha
|
52
|
-
@sha ||= git.revparse 'HEAD'
|
53
|
-
end
|
54
|
-
|
55
|
-
Contract None => Octokit::Client
|
56
|
-
def github
|
57
|
-
@github ||= Octokit::Client.new access_token: access_token
|
58
|
-
end
|
59
43
|
end
|
60
44
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'contracts'
|
2
|
+
require 'git'
|
3
|
+
|
4
|
+
module GitHubStatus
|
5
|
+
module Support
|
6
|
+
module Git
|
7
|
+
include ::Contracts::Core
|
8
|
+
include ::Contracts::Builtin
|
9
|
+
|
10
|
+
Contract None => ::Git::Base
|
11
|
+
def git
|
12
|
+
@git ||= Git.open "#{workdir}/#{path}"
|
13
|
+
rescue ArgumentError
|
14
|
+
STDERR.puts "#{path} is not a git repository"
|
15
|
+
abort
|
16
|
+
end
|
17
|
+
|
18
|
+
Contract None => String
|
19
|
+
def sha
|
20
|
+
@sha ||= git.revparse 'HEAD'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'contracts'
|
2
|
+
require 'octokit'
|
3
|
+
|
4
|
+
module GitHubStatus
|
5
|
+
module Support
|
6
|
+
module GitHub
|
7
|
+
include ::Contracts::Core
|
8
|
+
include ::Contracts::Builtin
|
9
|
+
include Source
|
10
|
+
|
11
|
+
Contract None => Octokit::Client
|
12
|
+
def github
|
13
|
+
@github ||= Octokit::Client.new access_token: access_token
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concourse-github-status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Olstrom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concourse-fuselage
|
@@ -70,8 +70,8 @@ dependencies:
|
|
70
70
|
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: 4.2.0
|
73
|
-
description:
|
74
|
-
email:
|
73
|
+
description:
|
74
|
+
email: chris@olstrom.com
|
75
75
|
executables:
|
76
76
|
- check
|
77
77
|
- in
|
@@ -89,11 +89,16 @@ files:
|
|
89
89
|
- bin/in
|
90
90
|
- bin/out
|
91
91
|
- concourse-github-status.gemspec
|
92
|
+
- lib/github-status.rb
|
92
93
|
- lib/github-status/core.rb
|
94
|
+
- lib/github-status/in.rb
|
93
95
|
- lib/github-status/out.rb
|
96
|
+
- lib/github-status/support/git.rb
|
97
|
+
- lib/github-status/support/github.rb
|
94
98
|
- lib/github-status/support/params.rb
|
95
99
|
- lib/github-status/support/source.rb
|
96
|
-
|
100
|
+
- lib/github-status/version.rb
|
101
|
+
homepage: https://github.com/colstrom/concourse-github-status
|
97
102
|
licenses:
|
98
103
|
- Apache-2.0
|
99
104
|
metadata: {}
|