ruby_raider 1.1.3 → 1.1.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/lib/generators/infrastructure/gitlab_generator.rb +11 -0
- data/lib/generators/infrastructure/templates/github.tt +1 -1
- data/lib/generators/infrastructure/templates/gitlab.tt +43 -0
- data/lib/generators/invoke_generators.rb +1 -0
- data/lib/generators/menu_generator.rb +1 -0
- data/lib/version +1 -1
- data/spec/integration/generators/gitlab_generator_spec.rb +38 -0
- data/spec/integration/spec_helper.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce82ad5f7e4ea1636cec8a4cdb0a9baae2b9d5641225322909065d8331eb3561
|
4
|
+
data.tar.gz: 16536dc998d9740e1ebb9bcd76fcf36c5040b633a619803d54a04a1ccee41cf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7a96ace1d43a22b6d7d8823c09017bf89ea56041e7986e341114e0a1e5b71e5640da06d740cc2f96b7d5fe4f184b28b2e93c39412bbff8ab405683bb347a96f
|
7
|
+
data.tar.gz: bb26f17e8b52393e79466d8cc9d5b821da494658f0a5e54ea18bdb806bd03401df3f1a22687bc7c187f6e6d540d2bf76676a60e70df6a82a05543c272b7bed85
|
@@ -0,0 +1,43 @@
|
|
1
|
+
stages:
|
2
|
+
- setup
|
3
|
+
- test
|
4
|
+
- report
|
5
|
+
|
6
|
+
variables:
|
7
|
+
RUBY_VERSION: "3.4.0"
|
8
|
+
|
9
|
+
setup_ruby:
|
10
|
+
stage: setup
|
11
|
+
image: ruby:${RUBY_VERSION}
|
12
|
+
script:
|
13
|
+
- bundle install --jobs $(nproc) --retry 3
|
14
|
+
cache:
|
15
|
+
paths:
|
16
|
+
- vendor/bundle
|
17
|
+
|
18
|
+
run_tests:
|
19
|
+
stage: test
|
20
|
+
image: ruby:${RUBY_VERSION}
|
21
|
+
script:
|
22
|
+
- mkdir -p allure-results
|
23
|
+
- <%- if framework == 'cucumber' -%> cucumber features --format pretty <%- else -%> bundle exec rspec spec --format documentation <%- end%>
|
24
|
+
artifacts:
|
25
|
+
paths:
|
26
|
+
- allure-results/
|
27
|
+
when: always
|
28
|
+
|
29
|
+
pages:
|
30
|
+
stage: report
|
31
|
+
image: alpine/git
|
32
|
+
dependencies:
|
33
|
+
- run_tests
|
34
|
+
script:
|
35
|
+
- apk add --no-cache curl unzip
|
36
|
+
- curl -o allure.zip -L https://github.com/allure-framework/allure2/releases/latest/download/allure-commandline.zip
|
37
|
+
- unzip allure.zip -d /tmp/
|
38
|
+
- /tmp/allure-*/bin/allure generate allure-results --clean -o public
|
39
|
+
artifacts:
|
40
|
+
paths:
|
41
|
+
- public
|
42
|
+
only:
|
43
|
+
- main
|
@@ -101,6 +101,7 @@ class MenuGenerator
|
|
101
101
|
def select_ci_platform(framework, automation)
|
102
102
|
prompt.select('Would you like to configure CI?') do |menu|
|
103
103
|
menu.choice :'Github Actions', -> { create_framework(framework, automation, 'github') }
|
104
|
+
menu.choice :'Gitlab CI/CD', -> { create_framework(framework, automation, 'gitlab') }
|
104
105
|
menu.choice :No, -> { create_framework(framework, automation) }
|
105
106
|
menu.choice :Quit, -> { exit }
|
106
107
|
end
|
data/lib/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.4
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../lib/generators/infrastructure/gitlab_generator'
|
4
|
+
require_relative '../spec_helper'
|
5
|
+
|
6
|
+
describe GitlabGenerator do
|
7
|
+
shared_examples 'selects gitlab as an infrastructure option' do |name|
|
8
|
+
it 'creates a gitlab infrastructure file' do
|
9
|
+
expect(File).to exist("#{name}/gitlab-ci.yml")
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
shared_examples 'does not select any infrastructure option' do |name|
|
14
|
+
it 'does not create a gitlab infrastructure file' do
|
15
|
+
expect(File).not_to exist("#{name}/gitlab-ci.yml")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
context 'with rspec and selenium' do
|
20
|
+
include_examples 'selects gitlab as an infrastructure option', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[2]}_#{CI_PLATFORMS[2]}"
|
21
|
+
include_examples 'does not select any infrastructure option', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[2]}"
|
22
|
+
end
|
23
|
+
|
24
|
+
context 'with rspec and watir' do
|
25
|
+
include_examples 'selects gitlab as an infrastructure option', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[3]}_#{CI_PLATFORMS[2]}"
|
26
|
+
include_examples 'does not select any infrastructure option', "#{FRAMEWORKS.last}_#{AUTOMATION_TYPES[3]}"
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'with cucumber and selenium' do
|
30
|
+
include_examples 'selects gitlab as an infrastructure option', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[2]}_#{CI_PLATFORMS[2]}"
|
31
|
+
include_examples 'does not select any infrastructure option', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[2]}"
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'with cucumber and watir' do
|
35
|
+
include_examples 'selects gitlab as an infrastructure option', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[3]}_#{CI_PLATFORMS[2]}"
|
36
|
+
include_examples 'does not select any infrastructure option', "#{FRAMEWORKS.first}_#{AUTOMATION_TYPES[3]}"
|
37
|
+
end
|
38
|
+
end
|
@@ -7,7 +7,7 @@ require_relative 'settings_helper'
|
|
7
7
|
|
8
8
|
AUTOMATION_TYPES = %w[android ios selenium watir cross_platform axe applitools].freeze
|
9
9
|
FRAMEWORKS = %w[cucumber rspec].freeze
|
10
|
-
CI_PLATFORMS = [nil, 'github'].freeze
|
10
|
+
CI_PLATFORMS = [nil, 'github', 'gitlab'].freeze
|
11
11
|
|
12
12
|
RSpec.configure do |config|
|
13
13
|
config.include(InvokeGenerators)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_raider
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Agustin Pequeno
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -195,7 +195,9 @@ files:
|
|
195
195
|
- lib/generators/generator.rb
|
196
196
|
- lib/generators/helper_generator.rb
|
197
197
|
- lib/generators/infrastructure/github_generator.rb
|
198
|
+
- lib/generators/infrastructure/gitlab_generator.rb
|
198
199
|
- lib/generators/infrastructure/templates/github.tt
|
200
|
+
- lib/generators/infrastructure/templates/gitlab.tt
|
199
201
|
- lib/generators/invoke_generators.rb
|
200
202
|
- lib/generators/menu_generator.rb
|
201
203
|
- lib/generators/rspec/rspec_generator.rb
|
@@ -243,6 +245,7 @@ files:
|
|
243
245
|
- spec/integration/generators/common_generator_spec.rb
|
244
246
|
- spec/integration/generators/cucumber_generator_spec.rb
|
245
247
|
- spec/integration/generators/github_generator_spec.rb
|
248
|
+
- spec/integration/generators/gitlab_generator_spec.rb
|
246
249
|
- spec/integration/generators/helpers_generator_spec.rb
|
247
250
|
- spec/integration/generators/rspec_generator_spec.rb
|
248
251
|
- spec/integration/settings_helper.rb
|