cucumber-create-meta 6.0.2 → 6.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cucumber/create_meta.rb +1 -1
- data/spec/acceptance/create_meta_spec.rb +25 -0
- metadata +9 -8
- data/lib/cucumber/ciDict.json +0 -142
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 683fb4b95e55fbb4f6ff2416f93caf823c8c1ceb64c00025c875ea8b6b935cd7
|
4
|
+
data.tar.gz: 7ee13b6e2bfbd50f40abbb8d2507f042cd2d0bad82653eb7309e8d56f469da01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c05e86d15d9b4e46e791044b64cb8a0f76c4fd7fea563e4448b35b2d9d842e4764e47f15d8c396aa4e9d19c3e77a5ab4515d4b3df0fe552edae34593cb69d3b
|
7
|
+
data.tar.gz: 463c982c9731b39cf1ea15e20d29bcbfbf14187e09505b8f7b6bbb440adca1e47c20401686f2e301d4868a632094f0640d9b316f83e8eda9e1dbb87f808a393a
|
data/lib/cucumber/create_meta.rb
CHANGED
@@ -7,7 +7,7 @@ require 'cucumber/create_meta/variable_expression'
|
|
7
7
|
module Cucumber
|
8
8
|
module CreateMeta
|
9
9
|
extend Cucumber::CreateMeta::VariableExpression
|
10
|
-
CI_DICT = JSON.parse(IO.read(File.join(File.dirname(__FILE__),
|
10
|
+
CI_DICT = JSON.parse(IO.read(File.join(File.dirname(__FILE__), '..', '..', '..', 'ciDict.json')))
|
11
11
|
|
12
12
|
def create_meta(tool_name, tool_version, env = ENV)
|
13
13
|
Cucumber::Messages::Meta.new(
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'cucumber/create_meta'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
TEST_DATA_DIR = '../testdata'
|
7
|
+
|
8
|
+
describe 'CreateMeta' do
|
9
|
+
Dir.each_child(TEST_DATA_DIR) do |test_data_file|
|
10
|
+
next unless File.extname(test_data_file) == '.txt'
|
11
|
+
|
12
|
+
context "with #{File.basename(test_data_file, '.*')}" do
|
13
|
+
subject { JSON.parse(meta.ci.to_json) }
|
14
|
+
|
15
|
+
let(:meta) { Cucumber::CreateMeta.create_meta('cucumber-something', '1.2.3', env) }
|
16
|
+
let(:env) { Hash[entries] }
|
17
|
+
let(:entries) { env_data.split(/\n/).map { |line| line.split(/=/) } }
|
18
|
+
let(:env_data) { IO.read("#{TEST_DATA_DIR}/#{test_data_file}") }
|
19
|
+
|
20
|
+
let(:expected_json) { File.read("#{TEST_DATA_DIR}/#{test_data_file}.json") }
|
21
|
+
|
22
|
+
it { is_expected.to eq JSON.parse(expected_json) }
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cucumber-create-meta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vincent Prêtre
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber-messages
|
@@ -97,9 +97,9 @@ extensions: []
|
|
97
97
|
extra_rdoc_files: []
|
98
98
|
files:
|
99
99
|
- LICENSE
|
100
|
-
- lib/cucumber/ciDict.json
|
101
100
|
- lib/cucumber/create_meta.rb
|
102
101
|
- lib/cucumber/create_meta/variable_expression.rb
|
102
|
+
- spec/acceptance/create_meta_spec.rb
|
103
103
|
- spec/capture_warnings.rb
|
104
104
|
- spec/cucumber/create_meta_spec.rb
|
105
105
|
- spec/cucumber/evaluate_variable_expression_spec.rb
|
@@ -108,11 +108,11 @@ homepage: https://github.com/cucumber/create-meta-ruby
|
|
108
108
|
licenses:
|
109
109
|
- MIT
|
110
110
|
metadata:
|
111
|
-
bug_tracker_uri: https://github.com/cucumber/
|
112
|
-
changelog_uri: https://github.com/cucumber/common/blob/main/
|
111
|
+
bug_tracker_uri: https://github.com/cucumber/common/issues
|
112
|
+
changelog_uri: https://github.com/cucumber/common/blob/main/create-meta/CHANGELOG.md
|
113
113
|
documentation_uri: https://cucumber.io/docs/gherkin/
|
114
114
|
mailing_list_uri: https://groups.google.com/forum/#!forum/cukes
|
115
|
-
source_code_uri: https://github.com/cucumber/common/
|
115
|
+
source_code_uri: https://github.com/cucumber/common/tree/main/create-meta/ruby
|
116
116
|
post_install_message:
|
117
117
|
rdoc_options:
|
118
118
|
- "--charset=UTF-8"
|
@@ -132,9 +132,10 @@ requirements: []
|
|
132
132
|
rubygems_version: 3.1.2
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
|
-
summary: cucumber-create-meta-6.0.
|
135
|
+
summary: cucumber-create-meta-6.0.3
|
136
136
|
test_files:
|
137
|
-
- spec/
|
137
|
+
- spec/acceptance/create_meta_spec.rb
|
138
138
|
- spec/cucumber/remove_userinfo_from_url_spec.rb
|
139
139
|
- spec/cucumber/evaluate_variable_expression_spec.rb
|
140
140
|
- spec/cucumber/create_meta_spec.rb
|
141
|
+
- spec/capture_warnings.rb
|
data/lib/cucumber/ciDict.json
DELETED
@@ -1,142 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"Azure Pipelines": {
|
3
|
-
"url": "${BUILD_BUILDURI}",
|
4
|
-
"buildNumber": "${BUILD_BUILDNUMBER}",
|
5
|
-
"git": {
|
6
|
-
"remote": "${BUILD_REPOSITORY_URI}",
|
7
|
-
"revision": "${BUILD_SOURCEVERSION}",
|
8
|
-
"branch": "${BUILD_SOURCEBRANCH/refs\/heads\/(.*)/\\1}",
|
9
|
-
"tag": "${BUILD_SOURCEBRANCH/refs\/tags\/(.*)/\\1}"
|
10
|
-
}
|
11
|
-
},
|
12
|
-
"Bamboo": {
|
13
|
-
"url": "${bamboo_buildResultsUrl}",
|
14
|
-
"buildNumber": "${bamboo_buildNumber}",
|
15
|
-
"git": {
|
16
|
-
"remote": "${bamboo_planRepository_repositoryUrl}",
|
17
|
-
"revision": "${bamboo_planRepository_revision}",
|
18
|
-
"branch": "${bamboo_planRepository_branch}",
|
19
|
-
"tag": null
|
20
|
-
}
|
21
|
-
},
|
22
|
-
"Buddy": {
|
23
|
-
"url": "${BUDDY_EXECUTION_URL}",
|
24
|
-
"buildNumber": "${BUDDY_EXECUTION_ID}",
|
25
|
-
"git": {
|
26
|
-
"remote": "${BUDDY_SCM_URL}",
|
27
|
-
"revision": "${BUDDY_EXECUTION_REVISION}",
|
28
|
-
"branch": "${BUDDY_EXECUTION_BRANCH}",
|
29
|
-
"tag": "${BUDDY_EXECUTION_TAG}"
|
30
|
-
}
|
31
|
-
},
|
32
|
-
"Bitrise": {
|
33
|
-
"url": "${BITRISE_BUILD_URL}",
|
34
|
-
"buildNumber": "${BITRISE_BUILD_NUMBER}",
|
35
|
-
"git": {
|
36
|
-
"remote": "${GIT_REPOSITORY_URL}",
|
37
|
-
"revision": "${BITRISE_GIT_COMMIT}",
|
38
|
-
"branch": "${BITRISE_GIT_BRANCH}",
|
39
|
-
"tag": "${BITRISE_GIT_TAG}"
|
40
|
-
}
|
41
|
-
},
|
42
|
-
"CircleCI": {
|
43
|
-
"url": "${CIRCLE_BUILD_URL}",
|
44
|
-
"buildNumber": "${CIRCLE_BUILD_NUM}",
|
45
|
-
"git": {
|
46
|
-
"remote": "${CIRCLE_REPOSITORY_URL}",
|
47
|
-
"revision": "${CIRCLE_SHA1}",
|
48
|
-
"branch": "${CIRCLE_BRANCH}",
|
49
|
-
"tag": "${CIRCLE_TAG}"
|
50
|
-
}
|
51
|
-
},
|
52
|
-
"CodeFresh": {
|
53
|
-
"url": "${CF_BUILD_URL}",
|
54
|
-
"buildNumber": "${CF_BUILD_ID}",
|
55
|
-
"git": {
|
56
|
-
"remote": "${CF_COMMIT_URL/(.*)\\/commit.+$/\\1}.git",
|
57
|
-
"revision": "${CF_REVISION}",
|
58
|
-
"branch": "${CF_BRANCH}",
|
59
|
-
"tag": null
|
60
|
-
}
|
61
|
-
},
|
62
|
-
"CodeShip": {
|
63
|
-
"url": "${CI_BUILD_URL}",
|
64
|
-
"buildNumber": "${CI_BUILD_NUMBER}",
|
65
|
-
"git": {
|
66
|
-
"remote": "${CI_PULL_REQUEST/(.*)\\/pull\\/\\d+/\\1.git}",
|
67
|
-
"revision": "${CI_COMMIT_ID}",
|
68
|
-
"branch": "${CI_BRANCH}",
|
69
|
-
"tag": null
|
70
|
-
}
|
71
|
-
},
|
72
|
-
"GitHub Actions": {
|
73
|
-
"url": "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}",
|
74
|
-
"buildNumber": "${GITHUB_RUN_ID}",
|
75
|
-
"git": {
|
76
|
-
"remote": "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git",
|
77
|
-
"revision": "${GITHUB_SHA}",
|
78
|
-
"branch": "${GITHUB_REF/refs\/heads\/(.*)/\\1}",
|
79
|
-
"tag": "${GITHUB_REF/refs\/tags\/(.*)/\\1}"
|
80
|
-
}
|
81
|
-
},
|
82
|
-
"GitLab": {
|
83
|
-
"url": "${CI_JOB_URL}",
|
84
|
-
"buildNumber": "${CI_JOB_ID}",
|
85
|
-
"git": {
|
86
|
-
"remote": "${CI_REPOSITORY_URL}",
|
87
|
-
"revision": "${CI_COMMIT_SHA}",
|
88
|
-
"branch": "${CI_COMMIT_BRANCH}",
|
89
|
-
"tag": "${CI_COMMIT_TAG}"
|
90
|
-
}
|
91
|
-
},
|
92
|
-
"GoCD": {
|
93
|
-
"url": "${GO_SERVER_URL}/pipelines/${GO_PIPELINE_NAME}/${GO_PIPELINE_COUNTER}/${GO_STAGE_NAME}/${GO_STAGE_COUNTER}",
|
94
|
-
"buildNumber": "${GO_PIPELINE_NAME}/${GO_PIPELINE_COUNTER}/${GO_STAGE_NAME}/${GO_STAGE_COUNTER}",
|
95
|
-
"git": {
|
96
|
-
"remote": "${GO_SCM_*_PR_URL/(.*)\\/pull\\/\\d+/\\1.git}",
|
97
|
-
"revision": "${GO_REVISION}",
|
98
|
-
"branch": "${GO_SCM_*_PR_BRANCH/.*:(.*)/\\1}",
|
99
|
-
"tag": null
|
100
|
-
}
|
101
|
-
},
|
102
|
-
"Jenkins": {
|
103
|
-
"url": "${BUILD_URL}",
|
104
|
-
"buildNumber": "${BUILD_NUMBER}",
|
105
|
-
"git": {
|
106
|
-
"remote": "${GIT_URL}",
|
107
|
-
"revision": "${GIT_COMMIT}",
|
108
|
-
"branch": "${GIT_LOCAL_BRANCH}",
|
109
|
-
"tag": null
|
110
|
-
}
|
111
|
-
},
|
112
|
-
"Semaphore": {
|
113
|
-
"url": "${SEMAPHORE_ORGANIZATION_URL}/jobs/${SEMAPHORE_JOB_ID}",
|
114
|
-
"buildNumber": "${SEMAPHORE_JOB_ID}",
|
115
|
-
"git": {
|
116
|
-
"remote": "${SEMAPHORE_GIT_URL}",
|
117
|
-
"revision": "${SEMAPHORE_GIT_SHA}",
|
118
|
-
"branch": "${SEMAPHORE_GIT_BRANCH}",
|
119
|
-
"tag": "${SEMAPHORE_GIT_TAG_NAME}"
|
120
|
-
}
|
121
|
-
},
|
122
|
-
"Travis CI": {
|
123
|
-
"url": "${TRAVIS_BUILD_WEB_URL}",
|
124
|
-
"buildNumber": "${TRAVIS_JOB_NUMBER}",
|
125
|
-
"git": {
|
126
|
-
"remote": "https://github.com/${TRAVIS_REPO_SLUG}.git",
|
127
|
-
"revision": "${TRAVIS_COMMIT}",
|
128
|
-
"branch": "${TRAVIS_BRANCH}",
|
129
|
-
"tag": "${TRAVIS_TAG}"
|
130
|
-
}
|
131
|
-
},
|
132
|
-
"Wercker": {
|
133
|
-
"url": "${WERCKER_RUN_URL}",
|
134
|
-
"buildNumber": "${WERCKER_RUN_URL/.*\\/([^\\/]+)$/\\1}",
|
135
|
-
"git": {
|
136
|
-
"remote": "https://${WERCKER_GIT_DOMAIN}/${WERCKER_GIT_OWNER}/${WERCKER_GIT_REPOSITORY}.git",
|
137
|
-
"revision": "${WERCKER_GIT_COMMIT}",
|
138
|
-
"branch": "${WERCKER_GIT_BRANCH}",
|
139
|
-
"tag": null
|
140
|
-
}
|
141
|
-
}
|
142
|
-
}
|