cucumber-ci-environment 9.0.1 → 9.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fa280ae7a64a91f8851d28e4419f2d391ba080e0e511ed045594175d58c8225
|
4
|
+
data.tar.gz: 9bbe09efed429d2bcad1852c934357d0706a663f6450c33a9dadc62e990e005f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fde55b617bd13cfbdc6766dcf75d67cc6f4cfe0ac9e67d906194ff8b5f7ca1422227dce609435ee420a95fd24048a5d606861c5e4d5a1659f257c88a63439d5
|
7
|
+
data.tar.gz: 0c26bd5ec292118386175d6a2aa707fc025d2994cd516184cdced9aadcbd215d259c3c442181decdf7c781ac34dcbd10b1b8bf8f2a15c049e8f4411ae0437337
|
@@ -55,8 +55,8 @@ module Cucumber
|
|
55
55
|
if env['GITHUB_EVENT_NAME'] == 'pull_request'
|
56
56
|
raise StandardError('GITHUB_EVENT_PATH not set') unless env['GITHUB_EVENT_PATH']
|
57
57
|
event = JSON.parse(file_reader.call(env['GITHUB_EVENT_PATH']))
|
58
|
-
raise StandardError(
|
59
|
-
return event['
|
58
|
+
raise StandardError("No after property in #{env['GITHUB_EVENT_PATH']}:\n#{JSON.pretty_generate(event)}") unless event['after']
|
59
|
+
return event['after']
|
60
60
|
end
|
61
61
|
|
62
62
|
return evaluate(ci_environment['git']['revision'], env)
|
@@ -9,7 +9,7 @@ describe 'detect_ci_environment' do
|
|
9
9
|
subject { JSON.parse(ci_environment.to_json) }
|
10
10
|
|
11
11
|
def mock_reader(path)
|
12
|
-
return '{"
|
12
|
+
return '{"after": "2436f28fad432a895bfc595bce16e907144b0dc3"}' if path.end_with?('_github_workflow/event.json')
|
13
13
|
IO.read(path)
|
14
14
|
end
|
15
15
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
describe 'GitHub' do
|
2
|
+
if (ENV['GITHUB_EVENT_NAME'] == 'pull_request')
|
3
|
+
it 'detects the correct revision for pull requests' do
|
4
|
+
ci_environment = Cucumber::CiEnvironment.detect_ci_environment(ENV)
|
5
|
+
expect(ci_environment).to be_truthy
|
6
|
+
puts ("Manually verify that the revision is correct");
|
7
|
+
p ci_environment
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-ci-environment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.
|
4
|
+
version: 9.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Prêtre
|
@@ -63,6 +63,7 @@ files:
|
|
63
63
|
- spec/capture_warnings.rb
|
64
64
|
- spec/cucumber/ci_environment/ci_environment_spec.rb
|
65
65
|
- spec/cucumber/ci_environment/evaluate_variable_expression_spec.rb
|
66
|
+
- spec/cucumber/ci_environment/github_pull_request_integration_spec.rb
|
66
67
|
- spec/cucumber/ci_environment/remove_userinfo_from_url_spec.rb
|
67
68
|
homepage: https://github.com/cucumber/ci-environment
|
68
69
|
licenses:
|
@@ -92,9 +93,10 @@ requirements: []
|
|
92
93
|
rubygems_version: 3.2.32
|
93
94
|
signing_key:
|
94
95
|
specification_version: 4
|
95
|
-
summary: cucumber-ci-environment-9.0.
|
96
|
+
summary: cucumber-ci-environment-9.0.2
|
96
97
|
test_files:
|
97
98
|
- spec/capture_warnings.rb
|
98
99
|
- spec/cucumber/ci_environment/ci_environment_spec.rb
|
99
100
|
- spec/cucumber/ci_environment/evaluate_variable_expression_spec.rb
|
101
|
+
- spec/cucumber/ci_environment/github_pull_request_integration_spec.rb
|
100
102
|
- spec/cucumber/ci_environment/remove_userinfo_from_url_spec.rb
|