ruby_raider 0.7.6 → 0.7.8

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: a3c7392870379f23c003129b0c892eeb60cfd87fe7d0479e42670cfd9b20fc13
4
- data.tar.gz: b09e4169504207c2af34d0a0a0f5846ab370c9df62cd1e350daf747c4980e1c9
3
+ metadata.gz: d790461636733d2acae878ca6201cad8759018559340708f33921939f36fbcf7
4
+ data.tar.gz: 9dbe3b8fd22ac6e27c32ff25ca1f9f4e6b63cec9dc4c4c2a575d4be88b741a4b
5
5
  SHA512:
6
- metadata.gz: fc2e7a690f3ba2c6f23d2344ad7e634e4046bdfb7da082f4522f0a3736650f32767ac5ad8484649c26df8499624ba522e8f8b2f58122f42debcd54dae87c90bf
7
- data.tar.gz: 2e12ed98a785fcee9f22310d4ead6b8de730eea67c092d319c183c5a1051c1317345186b14669e0f417cbe0ab4827390b2e49729704b779e1cb7e04e16305a3a
6
+ metadata.gz: 405dc47ab5b2c395e491da7877b06a3838822a6bd72fddcedc5c525c3097a75d18947e6e169855d8e48187fb1394a3bb678e26364c4bdc1c9550bf23a90e1036
7
+ data.tar.gz: 5a7fcdccc72bb01f47e06226c93a29f3dbb3e1cee1f0f069ff56de94549d80e77b1397228e73debb706c6564692f79e6466a2c20dc48e95d376e28a361d9ff46
data/README.md CHANGED
@@ -56,6 +56,10 @@ Ruby Raider is a generator and scaffolding gem to make UI test automation easier
56
56
 
57
57
  * Generating a visual testing framework with Cucumber, Applitools and Selenium
58
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
+
59
63
  ***In order to run the Appium tests, download the example [app](https://github.com/saucelabs/my-demo-app-rn).***
60
64
  ***Remember to use the full path of the app that you download in the capabilities file***
61
65
 
data/Rakefile CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative 'lib/ruby_raider'
4
4
  require_relative 'lib/commands/scaffolding_commands'
5
+ require_relative 'lib/utilities/logger'
5
6
 
6
7
  desc 'Creates a new test project'
7
8
  task :new, [:name] do |_t, args|
@@ -27,3 +28,8 @@ desc 'Download mobile builds'
27
28
  task :builds, [:type] do |_t, args|
28
29
  ScaffoldingCommands.new.invoke(:download_builds, nil, %W[#{args.type}])
29
30
  end
31
+
32
+ desc 'Logs a warning'
33
+ task :log, [:message] do |_t, args|
34
+ RubyRaider::Logger.warn(args.message)
35
+ end
@@ -1,4 +1,5 @@
1
1
  <%- if automation == 'sparkling_ios' -%>
2
+ require_relative '../../helpers/allure_helper'
2
3
  require_relative '../../helpers/driver_helper'
3
4
 
4
5
  include DriverHelper
@@ -14,6 +15,7 @@ After do |scenario|
14
15
  app.close
15
16
  end
16
17
  <%- else -%>
18
+ require_relative '../../helpers/allure_helper'
17
19
  require_relative '../../helpers/driver_helper'
18
20
 
19
21
  include DriverHelper
@@ -17,11 +17,7 @@ class MenuGenerator
17
17
 
18
18
  def generate_choice_menu
19
19
  prompt.select('Please select your automation framework') do |menu|
20
- menu.choice :Appium, -> { choose_test_framework('appium') }
21
- menu.choice :Selenium, -> { choose_test_framework('selenium') }
22
- menu.choice 'Sparkling Watir', -> { choose_test_framework('sparkling') }
23
- menu.choice :Watir, -> { choose_test_framework('watir') }
24
- menu.choice :Quit, -> { exit }
20
+ select_automation_framework(menu)
25
21
  end
26
22
  end
27
23
 
@@ -95,4 +91,12 @@ class MenuGenerator
95
91
  Quit: -> { exit }
96
92
  }
97
93
  end
94
+
95
+ def select_automation_framework(menu)
96
+ menu.choice :Appium, -> { choose_test_framework('appium') }
97
+ menu.choice :Selenium, -> { choose_test_framework('selenium') }
98
+ menu.choice 'Sparkling Watir', -> { choose_test_framework('sparkling') }
99
+ menu.choice :Watir, -> { choose_test_framework('watir') }
100
+ menu.choice :Quit, -> { exit }
101
+ end
98
102
  end
@@ -52,6 +52,10 @@ Ruby Raider is a generator and scaffolding gem to make UI test automation easier
52
52
 
53
53
  * Generating a visual testing framework with Cucumber, Applitools and Selenium
54
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
+
55
59
  ***In order to run the Appium tests, download the example [app](https://github.com/saucelabs/my-demo-app-rn).***
56
60
  ***Remember to use the full path of the app that you download in the capabilities file***
57
61
 
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.7.4, Happy testing!'
22
+ puts 'The Ruby Raider version is 0.7.8, Happy testing!'
23
23
  end
24
24
 
25
25
  map 'v' => 'version'
@@ -0,0 +1,26 @@
1
+ require 'forwardable'
2
+ require 'logger'
3
+
4
+ module RubyRaider
5
+ module Logger
6
+ #
7
+ # @example Use logger manually
8
+ # RubyRaider::Logger.debug('This is info message')
9
+ # RubyRaider::Logger.warn('This is warning message')
10
+ #
11
+ class << self
12
+ extend Forwardable
13
+ def_delegators :logger, :fatal, :error, :warn, :info, :debug, :level, :level=, :formatter, :formatter=
14
+
15
+ def logger
16
+ @logger ||= begin
17
+ logger = ::Logger.new($stdout)
18
+ logger.progname = 'ruby_raider'
19
+ logger.level = ::Logger::WARN
20
+ logger.formatter = proc { |_severity, _datetime, _progname, msg| "#{msg}\n" }
21
+ logger
22
+ end
23
+ end
24
+ end
25
+ end
26
+ 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.7.6'
5
+ s.version = '0.7.8'
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', '~> 1.2.0'
24
+ s.add_runtime_dependency 'faraday', '~> 2.7', '>= 2.7.10'
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'
@@ -24,12 +24,6 @@ describe CommonGenerator do
24
24
  end
25
25
  end
26
26
 
27
- shared_examples 'creates a config file' do |name|
28
- it 'creates a config file' do
29
- expect(File).to exist("#{name}/config/config.yml")
30
- end
31
- end
32
-
33
27
  shared_examples "doesn't create a config file" do |name|
34
28
  it "doesn't create a config file" do
35
29
  expect(File).not_to exist("#{name}/config/config.yml")
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.7.6
4
+ version: 0.7.8
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-07-15 00:00:00.000000000 Z
11
+ date: 2023-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -114,14 +114,20 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 1.2.0
117
+ version: '2.7'
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: 2.7.10
118
121
  type: :runtime
119
122
  prerelease: false
120
123
  version_requirements: !ruby/object:Gem::Requirement
121
124
  requirements:
122
125
  - - "~>"
123
126
  - !ruby/object:Gem::Version
124
- version: 1.2.0
127
+ version: '2.7'
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: 2.7.10
125
131
  - !ruby/object:Gem::Dependency
126
132
  name: ruby-openai
127
133
  requirement: !ruby/object:Gem::Requirement
@@ -265,6 +271,7 @@ files:
265
271
  - lib/scaffolding/templates/helper.tt
266
272
  - lib/scaffolding/templates/page_object.tt
267
273
  - lib/scaffolding/templates/spec.tt
274
+ - lib/utilities/logger.rb
268
275
  - lib/utilities/utilities.rb
269
276
  - ruby_raider.gemspec
270
277
  - spec/automation_generator_spec.rb