ruby_raider 0.3.6 → 0.3.7
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/.reek.yml +7 -1
- data/.rubocop.yml +85 -0
- data/lib/generators/menu_generator.rb +24 -33
- data/ruby_raider.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33e1928965aa6bf627bbfcf504be2873c8c21b749e15ba58a25031edc3247e8b
|
4
|
+
data.tar.gz: d0616127c4d73bfe475df99036a49ad3a412b795ac84f5514ba018ad9fa902ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32f18b8f33d9beb299bf130e407bad5ca17814e5fa283b87d2eec193c69191b7e9f00a2dfa201a847c3117fd18612ac195c379fbac3655982e4f1b9803694a24
|
7
|
+
data.tar.gz: f3d61d8d65fd5edde333cd9044a3d16e7d37169d1fdbc204996b843fa1f830aa51b303ddad9a37327cf083ea70da5d8d027105805462690b881ad413d9149c06
|
data/.reek.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -4,5 +4,90 @@ AllCops:
|
|
4
4
|
Exclude:
|
5
5
|
- './spec/*'
|
6
6
|
|
7
|
+
# Layout
|
8
|
+
Layout/CaseIndentation:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Layout/ClosingParenthesisIndentation:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
Layout/LineLength:
|
15
|
+
Max: 999
|
16
|
+
|
17
|
+
Layout/MultilineMethodCallBraceLayout:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Layout/SpaceInsideHashLiteralBraces:
|
21
|
+
StyleGuide: '#spaces-operators'
|
22
|
+
Enabled: false
|
23
|
+
|
24
|
+
# Lint
|
25
|
+
|
26
|
+
# Metrics
|
27
|
+
Metrics/AbcSize:
|
28
|
+
Max: 100
|
29
|
+
|
30
|
+
Metrics/BlockLength:
|
31
|
+
Max: 150
|
32
|
+
|
33
|
+
Metrics/BlockNesting:
|
34
|
+
Max: 4
|
35
|
+
|
36
|
+
Metrics/ClassLength:
|
37
|
+
CountComments: false
|
38
|
+
Max: 500
|
39
|
+
|
40
|
+
Metrics/CyclomaticComplexity:
|
41
|
+
Enabled: false
|
42
|
+
|
43
|
+
Metrics/MethodLength:
|
44
|
+
Max: 150
|
45
|
+
|
46
|
+
Metrics/ModuleLength:
|
47
|
+
Max: 600
|
48
|
+
|
49
|
+
Metrics/ParameterLists:
|
50
|
+
Enabled: false
|
51
|
+
|
52
|
+
Metrics/PerceivedComplexity:
|
53
|
+
Enabled: false
|
54
|
+
|
55
|
+
Naming/AccessorMethodName:
|
56
|
+
Enabled: false
|
57
|
+
|
58
|
+
# Migration
|
59
|
+
|
60
|
+
# Naming
|
61
|
+
Naming/PredicateName:
|
62
|
+
ForbiddenPrefixes:
|
63
|
+
- 'is_'
|
64
|
+
|
65
|
+
# Security
|
66
|
+
|
67
|
+
# Styles
|
68
|
+
|
69
|
+
Style/AsciiComments:
|
70
|
+
Enabled: false
|
71
|
+
|
7
72
|
Style/Documentation:
|
8
73
|
Enabled: false
|
74
|
+
|
75
|
+
Style/FrozenStringLiteralComment:
|
76
|
+
Enabled: false
|
77
|
+
|
78
|
+
Style/HashEachMethods:
|
79
|
+
Enabled: true
|
80
|
+
|
81
|
+
Style/HashTransformKeys:
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
Style/HashTransformValues:
|
85
|
+
Enabled: true
|
86
|
+
|
87
|
+
Style/SafeNavigation:
|
88
|
+
Description: "Use &. instead of checking if an object exists"
|
89
|
+
Enabled: false
|
90
|
+
|
91
|
+
Style/SingleLineBlockParams:
|
92
|
+
Description: 'Enforces the names of some block params.'
|
93
|
+
Enabled: false
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'tty-prompt'
|
4
4
|
require_relative 'automation_generator'
|
5
5
|
require_relative 'common_generator'
|
6
6
|
require_relative 'cucumber_generator'
|
@@ -8,28 +8,26 @@ require_relative 'helper_generator'
|
|
8
8
|
require_relative 'rspec_generator'
|
9
9
|
|
10
10
|
class MenuGenerator
|
11
|
-
attr_reader :
|
11
|
+
attr_reader :prompt, :name, :generators
|
12
12
|
|
13
13
|
def initialize(project_name)
|
14
|
-
@
|
14
|
+
@prompt = TTY::Prompt.new
|
15
15
|
@name = project_name
|
16
16
|
@generators = %w[Automation Common Helpers]
|
17
17
|
end
|
18
18
|
|
19
19
|
def generate_choice_menu
|
20
|
-
|
21
|
-
menu.
|
22
|
-
menu.choice
|
23
|
-
menu.choice
|
24
|
-
menu.choice
|
25
|
-
menu.choice('Quit') { exit }
|
20
|
+
prompt.select('Please select your automation framework') do |menu|
|
21
|
+
menu.choice :Appium, -> { choose_test_framework('appium') }
|
22
|
+
menu.choice :Selenium, -> { choose_test_framework('selenium') }
|
23
|
+
menu.choice :Watir, -> { choose_test_framework('watir') }
|
24
|
+
menu.choice :Quit, -> { exit }
|
26
25
|
end
|
27
26
|
end
|
28
27
|
|
29
28
|
def choose_test_framework(automation)
|
30
|
-
|
31
|
-
|
32
|
-
automation = automation == 'appium' ? choose_mobile_platform : automation
|
29
|
+
return choose_mobile_platform if automation == 'appium'
|
30
|
+
|
33
31
|
select_test_framework(automation)
|
34
32
|
end
|
35
33
|
|
@@ -40,12 +38,11 @@ class MenuGenerator
|
|
40
38
|
end
|
41
39
|
|
42
40
|
def choose_mobile_platform
|
43
|
-
|
44
|
-
menu.
|
45
|
-
menu.choice
|
46
|
-
|
47
|
-
|
48
|
-
menu.choice('Quit') { exit }
|
41
|
+
prompt.select('Please select your mobile platform') do |menu|
|
42
|
+
menu.choice :iOS, -> { choose_test_framework 'appium_ios' }
|
43
|
+
menu.choice :Android, -> { error_handling('Android') }
|
44
|
+
menu.choice :Cross_Platform, -> { error_handling('Cross Platform') }
|
45
|
+
menu.choice :Quit, -> { exit }
|
49
46
|
end
|
50
47
|
end
|
51
48
|
|
@@ -57,26 +54,20 @@ class MenuGenerator
|
|
57
54
|
|
58
55
|
private
|
59
56
|
|
60
|
-
def framework_choice(
|
61
|
-
|
62
|
-
|
63
|
-
@cli.say("You have chosen to use #{framework} with #{automation_type}")
|
64
|
-
end
|
57
|
+
def framework_choice(framework, automation_type)
|
58
|
+
set_framework(automation_type, framework.downcase)
|
59
|
+
prompt.say("You have chosen to use #{framework} with #{automation_type}")
|
65
60
|
end
|
66
61
|
|
67
|
-
def error_handling(
|
68
|
-
|
69
|
-
pp "#{platform} appium is coming soon. Thank you for the interest"
|
70
|
-
exit
|
71
|
-
end
|
62
|
+
def error_handling(platform)
|
63
|
+
pp "#{platform} appium is coming soon. Thank you for the interest"
|
72
64
|
end
|
73
65
|
|
74
66
|
def select_test_framework(automation)
|
75
|
-
|
76
|
-
menu.
|
77
|
-
|
78
|
-
|
79
|
-
menu.choice('Quit') { exit }
|
67
|
+
prompt.select('Please select your test framework') do |menu|
|
68
|
+
menu.choice :Cucumber, -> { framework_choice('Rspec', automation) }
|
69
|
+
menu.choice :Rspec, -> { framework_choice('Cucumber', automation) }
|
70
|
+
menu.choice :Quit, -> { exit }
|
80
71
|
end
|
81
72
|
end
|
82
73
|
|
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.3.
|
5
|
+
s.version = '0.3.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']
|
@@ -19,6 +19,6 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_development_dependency 'rubocop', '~> 1.27'
|
20
20
|
s.add_development_dependency 'rubocop-rspec', '~> 2.9.0'
|
21
21
|
|
22
|
-
s.add_runtime_dependency 'highline', '~> 2.0.3'
|
23
22
|
s.add_runtime_dependency 'thor', '~> 1.2.1'
|
23
|
+
s.add_runtime_dependency 'tty-prompt', '~> 0.23.1'
|
24
24
|
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.3.
|
4
|
+
version: 0.3.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: 2022-
|
11
|
+
date: 2022-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -81,33 +81,33 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 2.9.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: thor
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 2.
|
89
|
+
version: 1.2.1
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 2.
|
96
|
+
version: 1.2.1
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: tty-prompt
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.23.1
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.23.1
|
111
111
|
description: This gem has everything you need to start working with test automation
|
112
112
|
email: agustin.pe94@gmail.com
|
113
113
|
executables:
|