ruby_raider 0.8.3 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/integration.yml +25 -0
  3. data/.github/workflows/{rspec.yml → system.yml} +9 -7
  4. data/README.md +29 -53
  5. data/Rakefile +19 -0
  6. data/lib/commands/open_ai_commands.rb +24 -0
  7. data/lib/commands/utility_commands.rb +5 -0
  8. data/lib/generators/cucumber/templates/partials/mobile_steps.tt +5 -2
  9. data/lib/generators/rspec/templates/spec.tt +3 -0
  10. data/lib/generators/templates/common/read_me.tt +30 -51
  11. data/lib/generators/templates/helpers/spec_helper.tt +1 -1
  12. data/lib/open_ai/open_ai.rb +2 -2
  13. data/lib/ruby_raider.rb +6 -1
  14. data/ruby_raider.gemspec +2 -2
  15. data/spec/{open_ai_commands_spec.rb → integration/commands/open_ai_commands_spec.rb} +4 -4
  16. data/spec/{scaffolding_commands_spec.rb → integration/commands/scaffolding_commands_spec.rb} +4 -4
  17. data/spec/{utility_commands_spec.rb → integration/commands/utility_commands_spec.rb} +4 -4
  18. data/spec/{actions_generator_spec.rb → integration/generators/actions_generator_spec.rb} +2 -2
  19. data/spec/{automation_generator_spec.rb → integration/generators/automation_generator_spec.rb} +2 -2
  20. data/spec/{common_generator_spec.rb → integration/generators/common_generator_spec.rb} +2 -2
  21. data/spec/{cucumber_generator_spec.rb → integration/generators/cucumber_generator_spec.rb} +2 -2
  22. data/spec/{helpers_generator_spec.rb → integration/generators/helpers_generator_spec.rb} +2 -2
  23. data/spec/{rspec_generator_spec.rb → integration/generators/rspec_generator_spec.rb} +2 -2
  24. data/spec/{ruby_raider_spec.rb → system/ruby_raider_spec.rb} +6 -6
  25. metadata +16 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed1c1f61d9c3a4eaeb21508c43dc140afff1c17ac9314b8b1c7cea6632ea954d
4
- data.tar.gz: 4106d65568c8ed549f94cb08413aaf8c335942609ba0d7d1eaa876a56727f831
3
+ metadata.gz: 7bd92fae06515596d875be2a1c9d05b2335574839da3269de1c598d4287e9fd9
4
+ data.tar.gz: 8cc4c5922b36406b33d5e5df4c897ab0ce3a0d3a7036395293e634eeccbb27a2
5
5
  SHA512:
6
- metadata.gz: d1813f00173a8daf5974fbb47fa41368f53f748aa328f97f5c01f08975b363ccf403a5bf7a99ac76a4bb3546bd45ed9342a275fb4b9eab43d66a17add8742f67
7
- data.tar.gz: f401808ed737b8150509af8347930d6d35013a0d29a3bb3c16e141d39ece0b0321f18025f3f31282001f76cd8dd5b611b21598f4adb9bc8025247aaa87b086f3
6
+ metadata.gz: c521e8d445f0490f04349ede87a4fd56552dd13ac1261735792b82a5ab3c064202120fc1bd4fb64c18d05f7575d5dd5b94dde68d186c3cb7b27e54ceeb095390
7
+ data.tar.gz: 2d4f842b0214f55d11a6711353dd059d21085ee636cd1d6c81bd2d143b2fcee92d236f27906f1a8caa3bbc9b44dcb9a6151c2dd29f7720228a873480f9922742
@@ -0,0 +1,25 @@
1
+ name: Integration tests
2
+
3
+ on: [pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ name: Integration pipeline
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - name: Set up Ruby
12
+ uses: ruby/setup-ruby@f20f1eae726df008313d2e0d78c5e602562a1bcf
13
+ with:
14
+ ruby-version: head
15
+
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v3
18
+
19
+ - name: Install gems
20
+ run: bundle install
21
+
22
+ - name: Build and run integration tests
23
+ env:
24
+ OPENAI_ACCESS_TOKEN: ${{ secrets.OPENAI_ACCESS_TOKEN }}
25
+ run: rake integration
@@ -1,14 +1,16 @@
1
- name: Rspec Tests
1
+ env:
2
+ NAME: 'CI'
3
+
4
+ name: System tests
2
5
 
3
6
  on:
4
7
  push:
5
- branches: [ "*" ]
6
- pull_request:
7
- branches: [ "*" ]
8
+ branches:
9
+ - master
8
10
 
9
11
  jobs:
10
12
  build:
11
- name: CI
13
+ name: System pipeline
12
14
  runs-on: ubuntu-latest
13
15
 
14
16
  steps:
@@ -23,7 +25,7 @@ jobs:
23
25
  - name: Install gems
24
26
  run: bundle install
25
27
 
26
- - name: Build and test with rspec
28
+ - name: Build and run system tests
27
29
  env:
28
30
  OPENAI_ACCESS_TOKEN: ${{ secrets.OPENAI_ACCESS_TOKEN }}
29
- run: bundle exec rspec spec
31
+ run: rake system
data/README.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # Ruby Raider
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/ruby_raider.svg)](https://badge.fury.io/rb/ruby_raider)
4
- [![Rubocop](https://github.com/RubyRaider/ruby_raider/actions/workflows/rspec.yml/badge.svg)](https://github.com/RubyRaider/ruby_raider/actions/workflows/rspec.yml)
4
+ [![Tests](https://github.com/RubyRaider/ruby_raider/actions/workflows/integration.yml/badge.svg)](https://github.com/RubyRaider/ruby_raider/actions/workflows/integration.yml)
5
+ [![Reek](https://github.com/RubyRaider/ruby_raider/actions/workflows/reek.yml/badge.svg)](https://github.com/RubyRaider/ruby_raider/actions/workflows/reek.yml)
6
+ [![Rubocop](https://github.com/RubyRaider/ruby_raider/actions/workflows/rubocop.yml/badge.svg)](https://github.com/RubyRaider/ruby_raider/actions/workflows/rubocop.yml)
5
7
  [![Gitter](https://badges.gitter.im/RubyRaider/community.svg)](https://gitter.im/RubyRaider/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
6
8
 
7
9
  <!-- PROJECT LOGO -->
@@ -26,43 +28,30 @@
26
28
  <p align="center"> For more information and updates on releases, see <a href="https://ruby-raider.com">https://ruby-raider.com</a></p>
27
29
  </div>
28
30
 
29
- ## What is ruby raider?
31
+ ## What is Ruby Raider?
30
32
 
31
33
  Ruby Raider is a generator and scaffolding gem to make UI test automation easier
32
34
 
33
- ### At the moment Ruby raider supports
35
+ ### At the moment Ruby Raider supports generating the following frameworks:
36
+ | Web Testing Framework | Visual Testing Framework | Mobile Testing Framework |
37
+ |----------------------------|---------------------------------------------|-------------------------------------------|
38
+ | Cucumber and Selenium | Cucumber, Applitools and Selenium | Cucumber and Appium for IOS |
39
+ | Rspec and Selenium | Rspec, Applitools and Selenium | Rspec and Appium for IOS |
40
+ | Cucumber and Watir | | Cucumber and Appium for Android |
41
+ | Rspec and Watir | | Rspec and Appium for Android |
42
+ | | | Cucumber and Appium Cross-platform |
43
+ | | | Rspec and Appium Cross-platform |
44
+ | | | Cucumber and Sparkling Watir for IOS |
45
+ | | | Rspec and Sparkling Watir for IOS |
34
46
 
35
- * Generating a framework with Cucumber and Selenium
36
47
 
37
- * Generating a framework with Rspec and Selenium
38
-
39
- * Generating a framework with Cucumber and Watir
40
-
41
- * Generating a framework with Rspec and Watir
42
-
43
- * Generating a framework with Rspec and Appium for IOS
44
-
45
- * Generating a framework with Cucumber and Appium for IOS
46
-
47
- * Generating a framework with Rspec and Appium for Android
48
-
49
- * Generating a framework with Cucumber and Appium for Android
50
-
51
- * Generating a framework with Rspec and Appium cross platform
52
-
53
- * Generating a framework with Cucumber and Appium cross platform
54
-
55
- * Generating a visual testing framework with Rspec, Applitools and Selenium
56
-
57
- * Generating a visual testing framework with Cucumber, Applitools and Selenium
58
-
59
- * Generating a mobile testing framework with Rspec and Sparkling Watir for IOS
60
-
61
- * Generating a mobile testing framework with Cucumber and Sparkling Watir for IOS
62
48
 
63
49
  ***In order to run the Appium tests, download the example [app](https://github.com/saucelabs/my-demo-app-rn).***
64
- ***Remember to use the full path of the app that you download in the capabilities file***
65
-
50
+ ***Remember to use the full path of the app that you download in the capabilities file and start the server using one of the commands below:***
51
+ ```ruby
52
+ raider u start_appium
53
+ appium --base-path /wd/hub
54
+ ```
66
55
  ***In order to run the visual tests with applitools, you need to create an account and get your api key, you can read
67
56
  more [here](https://applitools.com/docs/topics/overview/obtain-api-key.html#:~:text=If%20you%20already%20have%20an,Your%20key%20will%20be%20displayed.)
68
57
  .***
@@ -98,13 +87,13 @@ Select the ones you will like to work with.
98
87
  ###### Anything between square brackets([...]) is where your imput goes
99
88
 
100
89
  ```ruby
101
- Commands :
90
+ Commands:
102
91
  raider generate # Provides access to all the generators commands
103
- raider help [COMMAND] # Describe available commands or one specific command
104
- raider new [PROJECT_NAME] # Creates a new framework based on settings picked
105
- raider open_ai # Provides access to all the open ai commands
106
- raider utility # Provides access to all the utility commands
107
- raider version # It shows the version of Ruby Raider you are currently using
92
+ raider help [COMMAND] # Describe available commands or one specific command
93
+ raider new [PROJECT_NAME] # Creates a new framework based on settings picked
94
+ raider open_ai # Provides access to all the open ai commands
95
+ raider utility # Provides access to all the utility commands
96
+ raider version # It shows the version of Ruby Raider you are currently using
108
97
  ```
109
98
 
110
99
  All the basic commands have their corresponding shortcut:
@@ -115,25 +104,12 @@ All the basic commands have their corresponding shortcut:
115
104
  * u for utility
116
105
  * v for version
117
106
 
118
- Ruby raider also supports scaffolding:
119
-
120
- * To create a new page object you do: ```raider g page [PAGE_NAME]```
121
- * To create a new spec you do: ```raider g spec [SPEC_NAME]```
122
- * To create a new feature you do: ```raider g feature [FEATURE_NAME]```
123
-
124
- It's possible to add the option --path or -p if you want to specify where to create your features, pages, helpers and
125
- specs.
126
-
127
- If you want to set the default path for the creation of your features, helpers and specs:
128
-
107
+ ### Appium Server Command
108
+ To initialise Appium server run this command:
129
109
  ```ruby
130
- raider u path [PATH_NAME] - -feature or -f
131
- raider u path [PATH_NAME] - -spec or -s
132
- raider u path [PATH_NAME] - -helper or -h
110
+ raider u start_appium
133
111
  ```
134
112
 
135
- If you don't specify an option, path will assume you want to change the default path for pages.
136
-
137
113
  ### Open AI Commands
138
114
 
139
115
  ```ruby
data/Rakefile CHANGED
@@ -33,3 +33,22 @@ desc 'Logs a warning'
33
33
  task :log, [:message] do |_t, args|
34
34
  RubyRaider::Logger.warn(args.message)
35
35
  end
36
+
37
+ desc 'Runs integration tests'
38
+ task :integration, [:type, :name] do |_t, args|
39
+ path = args.type ? "spec/integration/#{args.type}" : 'spec/integration'
40
+ full_path = if args.type == 'generators' && args.name
41
+ "#{path}/#{args.name.downcase}_generator_spec.rb"
42
+ elsif args.type == 'commands' && args.name
43
+ "#{path}/#{args.name.downcase}_commands_spec.rb"
44
+ else
45
+ path
46
+ end
47
+
48
+ system "rspec #{full_path}"
49
+ end
50
+
51
+ desc 'Runs system tests'
52
+ task :system do |_t|
53
+ system 'rspec spec/system'
54
+ end
@@ -1,4 +1,5 @@
1
1
  require 'thor'
2
+ require 'faraday'
2
3
  require_relative '../open_ai/open_ai'
3
4
 
4
5
  class OpenAiCommands < Thor
@@ -58,4 +59,27 @@ class OpenAiCommands < Thor
58
59
  make(options[:open_ai], "#{path}/#{name}_steps.rb")
59
60
  end
60
61
  end
62
+
63
+ desc 'test', 'Uses open AI to create a file or generate output'
64
+ def test
65
+ conn = Faraday.new(url: 'https://api.openai.com') do |faraday|
66
+ faraday.headers['Content-Type'] = 'application/json'
67
+ faraday.headers['Authorization'] = "Bearer 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"
68
+ faraday.headers['OpenAI-Beta'] = 'assistants=v1'
69
+ end
70
+
71
+ # Data payload for the POST request
72
+ payload = {
73
+ instructions: "You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
74
+ name: "Math Tutor",
75
+ tools: [{ type: "code_interpreter" }],
76
+ model: "gpt-4-1106-preview"
77
+ }
78
+
79
+ # Perform the POST request
80
+ response = conn.post('/v1/assistants', payload.to_json)
81
+
82
+ # Output the response body
83
+ puts response.body
84
+ end
61
85
  end
@@ -87,4 +87,9 @@ class UtilityCommands < Thor
87
87
  Utilities.download_android_build
88
88
  Utilities.download_ios_build
89
89
  end
90
+
91
+ desc 'start_appium', 'It starts the appium server'
92
+ def start_appium
93
+ system 'appium --base-path /wd/hub'
94
+ end
90
95
  end
@@ -19,8 +19,11 @@ end
19
19
  <%- else -%>
20
20
  # frozen_string_literal: true
21
21
 
22
- require_relative '../../page_objects/pages/home_page'
23
- require_relative '../../page_objects/pages/pdp_page'
22
+ <% if automation == 'cross_platform' -%>
23
+ require_relative '../../helpers/appium_helper'
24
+ <%- end -%>
25
+ require_relative '../../page_objects/pages/home'
26
+ require_relative '../../page_objects/pages/pdp'
24
27
 
25
28
  Given("I'm an anonymous user on the home page") do
26
29
  @home_page = Home.new(driver)
@@ -60,6 +60,9 @@ class PdpSpec
60
60
  end
61
61
  end
62
62
  <%- else -%>
63
+ <% if automation == 'cross_platform' -%>
64
+ require_relative '../helpers/appium_helper'
65
+ <%- end -%>
63
66
  require_relative '../helpers/spec_helper'
64
67
  require_relative '../page_objects/pages/home'
65
68
  require_relative '../page_objects/pages/pdp'
@@ -1,5 +1,9 @@
1
1
  # Ruby Raider
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/ruby_raider.svg)](https://badge.fury.io/rb/ruby_raider)
4
+ [![Rubocop](https://github.com/RubyRaider/ruby_raider/actions/workflows/rspec.yml/badge.svg)](https://github.com/RubyRaider/ruby_raider/actions/workflows/rspec.yml)
5
+ [![Gitter](https://badges.gitter.im/RubyRaider/community.svg)](https://gitter.im/RubyRaider/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
6
+
3
7
  <!-- PROJECT LOGO -->
4
8
  <br />
5
9
  <div align="center">
@@ -22,43 +26,30 @@
22
26
  <p align="center"> For more information and updates on releases, see <a href="https://ruby-raider.com">https://ruby-raider.com</a></p>
23
27
  </div>
24
28
 
25
- ## What is ruby raider?
29
+ ## What is Ruby Raider?
26
30
 
27
31
  Ruby Raider is a generator and scaffolding gem to make UI test automation easier
28
32
 
29
- ### At the moment Ruby raider supports
30
-
31
- * Generating a framework with Cucumber and Selenium
32
-
33
- * Generating a framework with Rspec and Selenium
34
-
35
- * Generating a framework with Cucumber and Watir
36
-
37
- * Generating a framework with Rspec and Watir
38
-
39
- * Generating a framework with Rspec and Appium for IOS
40
-
41
- * Generating a framework with Cucumber and Appium for IOS
42
-
43
- * Generating a framework with Rspec and Appium for Android
44
-
45
- * Generating a framework with Cucumber and Appium for Android
46
-
47
- * Generating a framework with Rspec and Appium cross platform
33
+ ### At the moment Ruby Raider supports generating the following frameworks:
34
+ | Web Testing Framework | Visual Testing Framework | Mobile Testing Framework |
35
+ |----------------------------|---------------------------------------------|-------------------------------------------|
36
+ | Cucumber and Selenium | Cucumber, Applitools and Selenium | Cucumber and Appium for IOS |
37
+ | Rspec and Selenium | Rspec, Applitools and Selenium | Rspec and Appium for IOS |
38
+ | Cucumber and Watir | | Cucumber and Appium for Android |
39
+ | Rspec and Watir | | Rspec and Appium for Android |
40
+ | | | Cucumber and Appium Cross-platform |
41
+ | | | Rspec and Appium Cross-platform |
42
+ | | | Cucumber and Sparkling Watir for IOS |
43
+ | | | Rspec and Sparkling Watir for IOS |
48
44
 
49
- * Generating a framework with Cucumber and Appium cross platform
50
45
 
51
- * Generating a visual testing framework with Rspec, Applitools and Selenium
52
-
53
- * Generating a visual testing framework with Cucumber, Applitools and Selenium
54
-
55
- * Generating a mobile testing framework with Rspec and Sparkling Watir for IOS
56
-
57
- * Generating a mobile testing framework with Cucumber and Sparkling Watir for IOS
58
46
 
59
47
  ***In order to run the Appium tests, download the example [app](https://github.com/saucelabs/my-demo-app-rn).***
60
- ***Remember to use the full path of the app that you download in the capabilities file***
61
-
48
+ ***Remember to use the full path of the app that you download in the capabilities file and start the server using one of the commands below:***
49
+ ```ruby
50
+ raider u start_appium
51
+ appium --base-path /wd/hub
52
+ ```
62
53
  ***In order to run the visual tests with applitools, you need to create an account and get your api key, you can read
63
54
  more [here](https://applitools.com/docs/topics/overview/obtain-api-key.html#:~:text=If%20you%20already%20have%20an,Your%20key%20will%20be%20displayed.)
64
55
  .***
@@ -94,13 +85,13 @@ Select the ones you will like to work with.
94
85
  ###### Anything between square brackets([...]) is where your imput goes
95
86
 
96
87
  ```ruby
97
- Commands :
88
+ Commands:
98
89
  raider generate # Provides access to all the generators commands
99
- raider help [COMMAND] # Describe available commands or one specific command
100
- raider new [PROJECT_NAME] # Creates a new framework based on settings picked
101
- raider open_ai # Provides access to all the open ai commands
102
- raider utility # Provides access to all the utility commands
103
- raider version # It shows the version of Ruby Raider you are currently using
90
+ raider help [COMMAND] # Describe available commands or one specific command
91
+ raider new [PROJECT_NAME] # Creates a new framework based on settings picked
92
+ raider open_ai # Provides access to all the open ai commands
93
+ raider utility # Provides access to all the utility commands
94
+ raider version # It shows the version of Ruby Raider you are currently using
104
95
  ```
105
96
 
106
97
  All the basic commands have their corresponding shortcut:
@@ -111,25 +102,13 @@ All the basic commands have their corresponding shortcut:
111
102
  * u for utility
112
103
  * v for version
113
104
 
114
- Ruby raider also supports scaffolding:
115
-
116
- * To create a new page object you do: ```raider g page [PAGE_NAME]```
117
- * To create a new spec you do: ```raider g spec [SPEC_NAME]```
118
- * To create a new feature you do: ```raider g feature [FEATURE_NAME]```
119
-
120
- It's possible to add the option --path or -p if you want to specify where to create your features, pages, helpers and
121
- specs.
122
-
123
- If you want to set the default path for the creation of your features, helpers and specs:
124
105
 
106
+ ### Appium Server Command
107
+ To initialise Appium server run this command:
125
108
  ```ruby
126
- raider u path [PATH_NAME] - -feature or -f
127
- raider u path [PATH_NAME] - -spec or -s
128
- raider u path [PATH_NAME] - -helper or -h
109
+ raider u start_appium
129
110
  ```
130
111
 
131
- If you don't specify an option, path will assume you want to change the default path for pages.
132
-
133
112
  ### Open AI Commands
134
113
 
135
114
  ```ruby
@@ -20,7 +20,7 @@ module SpecHelper
20
20
  config.after(:each) do |example|
21
21
  example_name = example.description
22
22
  Dir.mktmpdir do |temp_folder|
23
- app.screenshot.save("#{temp_folder}/#{example_name}.png")
23
+ screenshot = app.screenshot.save("#{temp_folder}/#{example_name}.png")
24
24
  AllureHelper.add_screenshot(example_name, screenshot)
25
25
  end
26
26
  app.close
@@ -14,12 +14,12 @@ module OpenAi
14
14
 
15
15
  def configure_client
16
16
  OpenAI.configure do |config|
17
- config.access_token = ENV.fetch('OPENAI_ACCESS_TOKEN')
17
+ config.access_token = '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'
18
18
  config.organization_id = ENV.fetch('OPENAI_ORGANIZATION_ID', nil)
19
19
  end
20
20
  end
21
21
 
22
- def input(request, model = 'gpt-3.5-turbo', temperature = 0.7)
22
+ def input(request, model = 'gpt-4', temperature = 0.7)
23
23
  client.chat(
24
24
  parameters: {
25
25
  model: model,
data/lib/ruby_raider.rb CHANGED
@@ -19,7 +19,7 @@ module RubyRaider
19
19
  desc 'version', 'It shows the version of Ruby Raider you are currently using'
20
20
 
21
21
  def version
22
- puts 'The Ruby Raider version is 0.8.3, Happy testing!'
22
+ puts "The version is #{parsed_version}, happy testing!"
23
23
  end
24
24
 
25
25
  map 'v' => 'version'
@@ -35,5 +35,10 @@ module RubyRaider
35
35
  desc 'utility', 'Provides access to all the utility commands'
36
36
  subcommand 'utility', UtilityCommands
37
37
  map 'u' => 'utility'
38
+
39
+ no_commands do
40
+ def gemspec = Gem::Specification.load('ruby_raider.gemspec')
41
+ def parsed_version = Gem::Version.new(gemspec.version)
42
+ end
38
43
  end
39
44
  end
data/ruby_raider.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'ruby_raider'
5
- s.version = '0.8.3'
5
+ s.version = '0.8.6'
6
6
  s.summary = 'A gem to make setup and start of UI automation projects easier'
7
7
  s.description = 'This gem has everything you need to start working with test automation'
8
8
  s.authors = ['Agustin Pequeno']
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_development_dependency 'rubocop-performance', '~> 1.15.0'
22
22
  s.add_development_dependency 'rubocop-rspec', '~> 2.9.0'
23
23
 
24
- s.add_runtime_dependency 'faraday', '~> 2.7', '>= 2.7.10'
24
+ s.add_runtime_dependency 'faraday', '~> 1.10.0'
25
25
  s.add_runtime_dependency 'ruby-openai', '~> 3.5'
26
26
  s.add_runtime_dependency 'thor', '~> 1.2.1'
27
27
  s.add_runtime_dependency 'tty-prompt', '~> 0.23.1'
@@ -2,10 +2,10 @@
2
2
  # require 'fileutils'
3
3
  # require 'pathname'
4
4
  # require 'yaml'
5
- # require_relative '../lib/generators/common_generator'
6
- # require_relative '../lib/commands/open_ai_commands'
7
- # require_relative '../lib/scaffolding/scaffolding'
8
- # require_relative 'spec_helper'
5
+ # require_relative '../../../lib/generators/common_generator'
6
+ # require_relative '../../../lib/integration.commands/open_ai_commands'
7
+ # require_relative '../../../lib/scaffolding/scaffolding'
8
+ # require_relative '../../spec_helper'
9
9
  #
10
10
  # describe OpenAiCommands do
11
11
  # let(:open_ai) { described_class }
@@ -1,10 +1,10 @@
1
1
  require 'dotenv'
2
2
  require 'pathname'
3
3
  require 'yaml'
4
- require_relative '../lib/generators/common_generator'
5
- require_relative '../lib/commands/scaffolding_commands'
6
- require_relative '../lib/scaffolding/scaffolding'
7
- require_relative 'spec_helper'
4
+ require_relative '../../../lib/generators/common_generator'
5
+ require_relative '../../../lib/commands/scaffolding_commands'
6
+ require_relative '../../../lib/scaffolding/scaffolding'
7
+ require_relative '../../spec_helper'
8
8
 
9
9
  describe ScaffoldingCommands do
10
10
  let(:scaffold) { described_class }
@@ -2,10 +2,10 @@ require 'dotenv'
2
2
  require 'fileutils'
3
3
  require 'pathname'
4
4
  require 'yaml'
5
- require_relative '../lib/generators/common_generator'
6
- require_relative '../lib/commands/utility_commands'
7
- require_relative '../lib/scaffolding/scaffolding'
8
- require_relative 'spec_helper'
5
+ require_relative '../../../lib/generators/common_generator'
6
+ require_relative '../../../lib/commands/utility_commands'
7
+ require_relative '../../../lib/scaffolding/scaffolding'
8
+ require_relative '../../spec_helper'
9
9
 
10
10
  describe UtilityCommands do
11
11
  let(:utility) { described_class }
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../lib/generators/actions/actions_generator'
4
- require_relative 'spec_helper'
3
+ require_relative '../../../lib/generators/actions/actions_generator'
4
+ require_relative '../../spec_helper'
5
5
 
6
6
  describe ActionsGenerator do
7
7
  shared_examples 'creates web automation framework' do |name|
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../lib/generators/automation/automation_generator'
4
- require_relative 'spec_helper'
3
+ require_relative '../../../lib/generators/automation/automation_generator'
4
+ require_relative '../../spec_helper'
5
5
 
6
6
  describe AutomationGenerator do
7
7
  shared_examples 'creates web automation framework' do |name|
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../lib/generators/common_generator'
4
- require_relative 'spec_helper'
3
+ require_relative '../../../lib/generators/common_generator'
4
+ require_relative '../../spec_helper'
5
5
 
6
6
  describe CommonGenerator do
7
7
  shared_examples 'creates common files' do |name|
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../lib/generators/cucumber/cucumber_generator'
4
- require_relative 'spec_helper'
3
+ require_relative '../../../lib/generators/cucumber/cucumber_generator'
4
+ require_relative '../../spec_helper'
5
5
 
6
6
  describe CucumberGenerator do
7
7
  shared_examples 'creates cucumber files' do |project_name, file_name|
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../lib/generators/helper_generator'
4
- require_relative 'spec_helper'
3
+ require_relative '../../../lib/generators/helper_generator'
4
+ require_relative '../../spec_helper'
5
5
 
6
6
  describe HelpersGenerator do
7
7
  shared_examples 'creates common helpers' do |name|
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../lib/generators/rspec/rspec_generator'
4
- require_relative 'spec_helper'
3
+ require_relative '../../../lib/generators/rspec/rspec_generator'
4
+ require_relative '../../spec_helper'
5
5
 
6
6
  describe RspecGenerator do
7
7
  shared_examples 'creates factory files' do |project_name|
@@ -1,14 +1,14 @@
1
1
  require 'fileutils'
2
- require_relative 'spec_helper'
3
- require_relative '../lib/ruby_raider'
2
+ require_relative '../spec_helper'
3
+ require_relative '../../lib/ruby_raider'
4
4
 
5
5
  describe RubyRaider do
6
6
  shared_examples 'execute web frameworks' do |name|
7
7
  it 'runs the tests' do
8
- Bundler.with_unbundled_env do
9
- Dir.chdir(name) do
10
- `bundle exec raider u raid`
11
- end
8
+ if ENV['CI']
9
+ Dir.chdir(name) { system('gem install bundler && bundle install && raider u raid') }
10
+ else
11
+ Bundler.with_unbundled_env { Dir.chdir(name) { system('bundle exec raider u raid') } }
12
12
  end
13
13
  end
14
14
  end
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: 0.8.3
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustin Pequeno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-20 00:00:00.000000000 Z
11
+ date: 2024-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -114,20 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '2.7'
118
- - - ">="
119
- - !ruby/object:Gem::Version
120
- version: 2.7.10
117
+ version: 1.10.0
121
118
  type: :runtime
122
119
  prerelease: false
123
120
  version_requirements: !ruby/object:Gem::Requirement
124
121
  requirements:
125
122
  - - "~>"
126
123
  - !ruby/object:Gem::Version
127
- version: '2.7'
128
- - - ">="
129
- - !ruby/object:Gem::Version
130
- version: 2.7.10
124
+ version: 1.10.0
131
125
  - !ruby/object:Gem::Dependency
132
126
  name: ruby-openai
133
127
  requirement: !ruby/object:Gem::Requirement
@@ -181,9 +175,10 @@ files:
181
175
  - ".github/ISSUE_TEMPLATE/bug_report.md"
182
176
  - ".github/ISSUE_TEMPLATE/feature_request.md"
183
177
  - ".github/auto_assign-issues.yml"
178
+ - ".github/workflows/integration.yml"
184
179
  - ".github/workflows/reek.yml"
185
- - ".github/workflows/rspec.yml"
186
180
  - ".github/workflows/rubocop.yml"
181
+ - ".github/workflows/system.yml"
187
182
  - ".gitignore"
188
183
  - ".reek.yml"
189
184
  - ".rubocop.yml"
@@ -277,18 +272,18 @@ files:
277
272
  - lib/utilities/logger.rb
278
273
  - lib/utilities/utilities.rb
279
274
  - ruby_raider.gemspec
280
- - spec/actions_generator_spec.rb
281
- - spec/automation_generator_spec.rb
282
- - spec/common_generator_spec.rb
283
- - spec/cucumber_generator_spec.rb
284
- - spec/helpers_generator_spec.rb
285
- - spec/open_ai_commands_spec.rb
286
- - spec/rspec_generator_spec.rb
287
- - spec/ruby_raider_spec.rb
288
- - spec/scaffolding_commands_spec.rb
275
+ - spec/integration/commands/open_ai_commands_spec.rb
276
+ - spec/integration/commands/scaffolding_commands_spec.rb
277
+ - spec/integration/commands/utility_commands_spec.rb
278
+ - spec/integration/generators/actions_generator_spec.rb
279
+ - spec/integration/generators/automation_generator_spec.rb
280
+ - spec/integration/generators/common_generator_spec.rb
281
+ - spec/integration/generators/cucumber_generator_spec.rb
282
+ - spec/integration/generators/helpers_generator_spec.rb
283
+ - spec/integration/generators/rspec_generator_spec.rb
289
284
  - spec/spec_helper.rb
290
285
  - spec/support/settings_helper.rb
291
- - spec/utility_commands_spec.rb
286
+ - spec/system/ruby_raider_spec.rb
292
287
  homepage: https://github.com/RubyRaider/ruby_raider
293
288
  licenses:
294
289
  - MIT