ruby_raider 1.0.6 → 1.0.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: 37514d703c782feaf55aabcc935effc30d17dee25ab486cc04fdaf97ab864bd8
4
- data.tar.gz: 2576a6852e503e1b635064f0e4681da7cabffed52ef9c3c5ed8acab795a88781
3
+ metadata.gz: 03e16c261b9124a0b9a33227e4e60734cd9c8fd53891a5c2857427d11d6073e5
4
+ data.tar.gz: 410e1198dae7af2d0a3a7a94f512b5105a591b2e2b580360265d3aa7e06812fa
5
5
  SHA512:
6
- metadata.gz: 0405d1ae1549297808c678ab4825a016f72ef711701933d93eb6e831abf4c07c4353315d8d91bdb7f4b0bd18aade2478bbed70eed568bd96a6d1cb7cddf44e33
7
- data.tar.gz: ba6cb7a42c435f72052dd8db761a78e0bc56da8f47bc962f36d4ba1bc7146e53c0f159b4b4bd03bec34e998587a64935b19a9eaa02fd36743991540afedfa8b2
6
+ metadata.gz: c3bf4f0c02db69267c4d58b1caa74e9c755aa2ba791207a0671ef496c550a7cef3033e06f5f7088ca53453b4030c4f4806592fc7c248dc8df7d85d3b0f7182ca
7
+ data.tar.gz: 001e01e21e63625abba1ad2e88f92e588f30555ae2bacd2b7a86d6b6434abea6470167402bc918dc7cbfa419dcde08ebb69937c8f5c83d3a813d2924960c2f7e
@@ -4,4 +4,14 @@ appium:options:
4
4
  platformVersion: '12'
5
5
  automationName: UiAutomator2
6
6
  deviceName: Pixel 3 API 32
7
- app: Android-MyDemoAppRN.1.3.0.build-244.apk
7
+ app: Android-MyDemoAppRN.1.3.0.build-244.apk
8
+
9
+ browserstack:
10
+ platformName: Android
11
+ os_version: '9.0'
12
+ deviceName: Google Pixel 3
13
+ app: bs://044a22528dfcf4ceaa1b0b31fb574d5010aabb91
14
+ browserstack.user: <%= ENV['BROWSERSTACK_USER'] %>
15
+ browserstack.key: <%= ENV['BROWSERSTACK_KEY'] %>
16
+ project: 'MyDemoAppRN'
17
+ name: 'MyDemoAppRN-Android'
@@ -13,3 +13,13 @@ ios:
13
13
  automationName: XCUITest
14
14
  app: MyRNDemoApp.app
15
15
  autoDismissAlerts: true
16
+
17
+ browserstack:
18
+ platformName: Android
19
+ os_version: '9.0'
20
+ deviceName: Google Pixel 3
21
+ app: bs://044a22528dfcf4ceaa1b0b31fb574d5010aabb91
22
+ browserstack.user: <%= ENV['BROWSERSTACK_USER'] %>
23
+ browserstack.key: <%= ENV['BROWSERSTACK_KEY'] %>
24
+ project: 'MyDemoAppRN'
25
+ name: 'MyDemoAppRN-Android'
@@ -5,4 +5,14 @@ appium:options:
5
5
  deviceName: iPhone 15
6
6
  automationName: XCUITest
7
7
  app: MyRNDemoApp.app
8
- autoDismissAlerts: true
8
+ autoDismissAlerts: true
9
+
10
+ browserstack:
11
+ platformName: iOS
12
+ os_version: '17.5.1'
13
+ deviceName: iPhone 15
14
+ app: bs://044a22528dfcf4ceaa1b0b31fb574d5010aabb91
15
+ browserstack.user: <%= ENV['BROWSERSTACK_USER'] %>
16
+ browserstack.key: <%= ENV['BROWSERSTACK_KEY'] %>
17
+ project: 'MyDemoAppRN'
18
+ name: 'MyDemoAppRN-IOS'
@@ -1,6 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'activesupport'
4
+ <% if mobile? %>
5
+ gem 'appium_lib'
6
+ gem 'appium_console'
7
+ <% end %>
4
8
  <%- if cucumber? -%>
5
9
  gem 'allure-cucumber', '~> 2.24.0'
6
10
  <%- else -%>
@@ -30,4 +34,9 @@ gem 'rubocop'
30
34
  gem 'rubocop-rspec'
31
35
  <%- end -%>
32
36
  gem 'ruby_raider', '~> 1.0.0'
33
- <%= ERB.new(File.read(File.expand_path('./partials/automation_gems.tt', __dir__))).result(binding).strip! %>
37
+ <%- if selenium_based? %>
38
+ gem 'selenium-webdriver'
39
+ <%- end -%>
40
+ <%- if watir? -%>
41
+ gem 'watir'
42
+ <%- end -%>
@@ -12,6 +12,7 @@ browser_arguments:
12
12
  - no-sandbox
13
13
  - disable-dev-shm-usage
14
14
  - ignore-certificate-errors
15
+ - search-engine-choice-country
15
16
  :firefox:
16
17
  - acceptInsecureCerts
17
18
  - no-sandbox
@@ -31,7 +31,7 @@
31
31
  end
32
32
  <% elsif cross_platform? -%>
33
33
  def create_driver
34
- @driver = Appium::Driver.new({ caps: parsed_caps })
34
+ @driver = configure_driver
35
35
  end
36
36
 
37
37
  def platform
@@ -51,19 +51,65 @@
51
51
  def parse_app_path(path)
52
52
  File.expand_path(path, Dir.pwd)
53
53
  end
54
- <% else -%>
55
- def create_driver
56
- @driver = Appium::Driver.new({ caps: parsed_caps })
54
+
55
+ def browserstack?
56
+ ENV['TEST_ENV'] == 'browserstack'
57
57
  end
58
58
 
59
- # :reek:UtilityFunction
60
- def parsed_caps
61
- caps = YAML.load_file('config/capabilities.yml')
62
- caps['appium:options']['app'] = app_path(caps['appium:options']['app'])
63
- caps
59
+ def browserstack_caps
60
+ @browserstack_caps ||= YAML.load_file('config/capabilities.yml')['browserstack']
64
61
  end
65
62
 
66
- def app_path(path)
67
- File.expand_path(path, Dir.pwd)
63
+ def configure_driver
64
+ if browserstack?
65
+ Appium::Driver.new({ caps: browserstack_caps,
66
+ 'appium_lib': { server_url: parsed_browserstack_url}}, true)
67
+ else
68
+ Appium::Driver.new({ caps: parsed_caps })
69
+ end
70
+ end
71
+
72
+ def parsed_browserstack_url
73
+ username = ENV['BROWSERSTACK_USER']
74
+ access_key = ENV['BROWSERSTACK_KEY']
75
+ "https://#{username}:#{access_key}@hub-cloud.browserstack.com/wd/hub"
68
76
  end
77
+ <% else -%>
78
+ def create_driver
79
+ @driver = configure_driver
80
+ end
81
+
82
+ # :reek:UtilityFunction
83
+ def parsed_caps
84
+ caps = YAML.load_file('config/capabilities.yml')
85
+ caps['appium:options']['app'] = app_path(caps['appium:options']['app'])
86
+ caps
87
+ end
88
+
89
+ def app_path(path)
90
+ File.expand_path(path, Dir.pwd)
91
+ end
92
+
93
+ def browserstack?
94
+ ENV['TEST_ENV'] == 'browserstack'
95
+ end
96
+
97
+ def browserstack_caps
98
+ @browserstack_caps ||= YAML.load_file('config/capabilities.yml')['browserstack']
99
+ end
100
+
101
+ def configure_driver
102
+ if browserstack?
103
+ Appium::Driver.new({ caps: browserstack_caps,
104
+ 'appium_lib': { server_url: parsed_browserstack_url}}, true)
105
+ else
106
+ Appium::Driver.new({ caps: parsed_caps })
107
+ end
108
+ end
109
+
110
+ def parsed_browserstack_url
111
+ username = ENV['BROWSERSTACK_USER']
112
+ access_key = ENV['BROWSERSTACK_KEY']
113
+ "https://#{username}:#{access_key}@hub-cloud.browserstack.com/wd/hub"
114
+ end
69
115
  <% end -%>
data/lib/version CHANGED
@@ -1 +1 @@
1
- 1.0.6
1
+ 1.0.8
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.0.6
4
+ version: 1.0.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: 2024-09-12 00:00:00.000000000 Z
11
+ date: 2024-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -205,7 +205,6 @@ files:
205
205
  - lib/generators/templates/common/config.tt
206
206
  - lib/generators/templates/common/gemfile.tt
207
207
  - lib/generators/templates/common/git_ignore.tt
208
- - lib/generators/templates/common/partials/automation_gems.tt
209
208
  - lib/generators/templates/common/partials/mobile_config.tt
210
209
  - lib/generators/templates/common/partials/web_config.tt
211
210
  - lib/generators/templates/common/rakefile.tt
@@ -269,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
268
  - !ruby/object:Gem::Version
270
269
  version: '0'
271
270
  requirements: []
272
- rubygems_version: 3.5.15
271
+ rubygems_version: 3.3.26
273
272
  signing_key:
274
273
  specification_version: 4
275
274
  summary: A gem to make setup and start of UI automation projects easier
@@ -1,10 +0,0 @@
1
- <% case automation
2
- when 'watir' %>
3
- gem 'selenium-webdriver'
4
- gem 'watir'
5
- <% when selenium_based? %>
6
- gem 'selenium-webdriver'
7
- <% when mobile? %>
8
- gem 'appium_lib'
9
- gem 'appium_console'
10
- <% end %>