fast_ci 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fast_ci.gemspec +1 -1
- data/lib/fast_ci/configuration.rb +24 -3
- data/lib/fast_ci/version.rb +1 -1
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bcf8f013e9598e2122841f30d951528519bffa648cfcf7c7872642ebd00d351
|
4
|
+
data.tar.gz: 72915e82ca7728225880a297bd59d44f1bf70f75086fb74245ae0ffef21e4e21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 775e9c9368f928d4d8fb0e260f2a9d2909bbc132a038673b561ea5dd966c1e220dbbeb313157cc32ba966af28ab490b14643e1626087d24ca67f37247aa4c02c
|
7
|
+
data.tar.gz: 505db9f73edbbcced7b53e8844b6eb967a00c24a4d3dfb04d7f551a0a626aba4063c76795739452ff60c0112dd6c20a2f5980de0999ca7cce507d082feb62861
|
data/fast_ci.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = "Ruby wrapper for creating FastCI integrations"
|
12
12
|
spec.description = "Ruby wrapper for creating FastCI integrations"
|
13
|
-
spec.homepage = "https://github.com/
|
13
|
+
spec.homepage = "https://github.com/RubyCI/fast_ci_gem"
|
14
14
|
spec.license = "MIT"
|
15
15
|
spec.required_ruby_version = ">= 2.4.0"
|
16
16
|
|
@@ -7,9 +7,9 @@ module FastCI
|
|
7
7
|
def initialize
|
8
8
|
# Settings defaults
|
9
9
|
self.run_key = nil
|
10
|
-
self.build_id =
|
11
|
-
self.commit =
|
12
|
-
self.branch =
|
10
|
+
self.build_id = guess_build_id
|
11
|
+
self.commit = guess_commit
|
12
|
+
self.branch = guess_branch
|
13
13
|
self.api_url = ENV["FAST_CI_API_URL"] || "api.fast.ci"
|
14
14
|
self.secret_key = ENV.fetch("FAST_CI_SECRET_KEY")
|
15
15
|
end
|
@@ -21,5 +21,26 @@ module FastCI
|
|
21
21
|
def run_key
|
22
22
|
@run_key || raise("#run_key was not configured.")
|
23
23
|
end
|
24
|
+
|
25
|
+
def guess_build_id
|
26
|
+
%w[GITHUB_RUN_ID BUILD_ID CIRCLE_BUILD_NUM].find do |keyword|
|
27
|
+
key = ENV.keys.find { |k| k[keyword] }
|
28
|
+
break ENV[key] if key && ENV[key]
|
29
|
+
end || guess_commit
|
30
|
+
end
|
31
|
+
|
32
|
+
def guess_commit
|
33
|
+
%w[_COMMIT _SHA1 _SHA].find do |keyword|
|
34
|
+
key = ENV.keys.find { |k| k[keyword] }
|
35
|
+
break ENV[key] if key && ENV[key]
|
36
|
+
end || `git rev-parse --short HEAD`.chomp
|
37
|
+
end
|
38
|
+
|
39
|
+
def guess_branch
|
40
|
+
%w[_BRANCH _REF].find do |keyword|
|
41
|
+
key = ENV.keys.find { |k| k[keyword] }
|
42
|
+
break ENV[key] if key && ENV[key]
|
43
|
+
end || `git rev-parse --abbrev-ref HEAD`.chomp
|
44
|
+
end
|
24
45
|
end
|
25
46
|
end
|
data/lib/fast_ci/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast_ci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ale ∴
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-websocket
|
@@ -60,14 +60,14 @@ files:
|
|
60
60
|
- lib/fast_ci/configuration.rb
|
61
61
|
- lib/fast_ci/exceptions.rb
|
62
62
|
- lib/fast_ci/version.rb
|
63
|
-
homepage: https://github.com/
|
63
|
+
homepage: https://github.com/RubyCI/fast_ci_gem
|
64
64
|
licenses:
|
65
65
|
- MIT
|
66
66
|
metadata:
|
67
|
-
homepage_uri: https://github.com/
|
68
|
-
source_code_uri: https://github.com/
|
69
|
-
changelog_uri: https://github.com/
|
70
|
-
post_install_message:
|
67
|
+
homepage_uri: https://github.com/RubyCI/fast_ci_gem
|
68
|
+
source_code_uri: https://github.com/RubyCI/fast_ci_gem
|
69
|
+
changelog_uri: https://github.com/RubyCI/fast_ci_gem
|
70
|
+
post_install_message:
|
71
71
|
rdoc_options: []
|
72
72
|
require_paths:
|
73
73
|
- lib
|
@@ -82,8 +82,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
|
-
|
86
|
-
|
85
|
+
rubyforge_project:
|
86
|
+
rubygems_version: 2.7.7
|
87
|
+
signing_key:
|
87
88
|
specification_version: 4
|
88
89
|
summary: Ruby wrapper for creating FastCI integrations
|
89
90
|
test_files: []
|