ruby_raider 0.7.6 → 0.7.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/Rakefile +6 -0
- data/lib/generators/menu_generator.rb +9 -5
- data/lib/generators/templates/common/read_me.tt +4 -0
- data/lib/ruby_raider.rb +1 -1
- data/lib/utilities/logger.rb +26 -0
- data/ruby_raider.gemspec +2 -2
- data/spec/common_generator_spec.rb +0 -6
- metadata +11 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9cb054a366c6659aceb3252fbea25a07333f71224091584f2bd4c681b6c1203
|
4
|
+
data.tar.gz: d96e5fac73ec95f61b37f6b0de18905558b2060a02a7891fbb1052fcf1202122
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17535a8af0e11cae31a6e2ff1e3edcafc252eb96fff79163918cefd259cc7d22c15cda67888ea558a437abadf3ba7c0febb37f4c10d77838b5265f2e647f3764
|
7
|
+
data.tar.gz: 8600c2438a466de652cfa93e1eede49967ac3422261d0e712677468bed91969d7746684d196b611a0076d44501ccbbe2aa007a05d588d95af5c831ee9c5b0b1b
|
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
|
@@ -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
|
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.
|
22
|
+
puts 'The Ruby Raider version is 0.7.7, 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.
|
5
|
+
s.version = '0.7.7'
|
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', '~>
|
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.
|
4
|
+
version: 0.7.7
|
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-
|
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:
|
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:
|
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
|