ruby_raider 1.0.7 → 1.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4393e905f2a6b15c054654eda7c939033c12880502b5ba07b311b0e3c0d94a8
4
- data.tar.gz: 21cf8d0ffdf595858bd99bb563e24a30c597120a4aa3a0b0b30bee0c62d060b3
3
+ metadata.gz: 3acd258222ef7b2ae647e9708216913fabebde2820d71717167b4a8c40da5472
4
+ data.tar.gz: ca45d8a57867340927629b0bd29f1b2ea97db5eb08e32ebb6b2952b78baf6c1c
5
5
  SHA512:
6
- metadata.gz: 9a554f59b635bc5c64ceaf14d07458118a61dc58a7f41a523ada89e75de250dc767e781b98b356029ed6132438d1418cd48bb9ee9accc0c918e3e098f49cb08c
7
- data.tar.gz: 730310b849ad820687ca41478fd6b9609cd05cf5c2d87cbb7f4922660bba34883e6e3a0bbfa6c1b53f9a72c7a331cd4a1c33dfcfbe9f78ce470d3c34a3184b55
6
+ metadata.gz: 155e037d264f6a231464843d4c2c2c6f25d5b38cff9cb902c38f2a6e9c6a480db04600c4a21428cf16fea436197ffe20cfa62d66131c92fa804caa9e77d80690
7
+ data.tar.gz: 217de15a9d15b5e895339ab17799912866d5a7858bfa673e2d09e8f9a0ab39af84bcf32cb84d20168dc485998d3338b7322fa51fa38d36f2dabcd5ca843c0120
data/README.md CHANGED
@@ -82,17 +82,15 @@ Select the ones you will like to work with.
82
82
  If you already know which frameworks you want to use, you can do:
83
83
 
84
84
  ```ruby
85
- raider new [name_of_project] p framework : [framework] automation : [automation_type]
85
+ raider new [name_of_project] -p framework:[framework] automation:[automation_type]
86
86
  ```
87
87
 
88
88
  An example of the command above would be:
89
89
 
90
90
  ```ruby
91
- raider new test_project p framework : rspec automation: selenium
91
+ raider new test_project -p framework:rspec automation:selenium
92
92
  ```
93
93
 
94
- Where [frameworks] is a comma separated list of the frameworks you want to use.
95
-
96
94
  ### Ruby raider provides the following list of basic commands
97
95
 
98
96
  ###### Anything between square brackets([...]) is where your imput goes
@@ -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: app: <%= ENV['APP_URL'] %>
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: app: <%= ENV['APP_URL'] %>
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: <%= ENV['APP_URL'] %>
15
+ browserstack.user: <%= ENV['BROWSERSTACK_USER'] %>
16
+ browserstack.key: <%= ENV['BROWSERSTACK_KEY'] %>
17
+ project: 'MyDemoAppRN'
18
+ name: 'MyDemoAppRN-IOS'
@@ -6,10 +6,10 @@ gem 'appium_lib'
6
6
  gem 'appium_console'
7
7
  <% end %>
8
8
  <%- if cucumber? -%>
9
- gem 'allure-cucumber', '~> 2.24.0'
9
+ gem 'allure-cucumber', '2.23.0'
10
10
  <%- else -%>
11
- gem 'allure-rspec', '~> 2.24.0'
12
- gem 'allure-ruby-commons', '~> 2.24.0'
11
+ gem 'allure-rspec', '2.23.0'
12
+ gem 'allure-ruby-commons', '2.23.0'
13
13
  <%- end -%>
14
14
  <%- if axe? -%>
15
15
  gem 'axe-core-rspec'
@@ -3,20 +3,20 @@
3
3
  <!-- PROJECT LOGO -->
4
4
  <br />
5
5
  <div align="center">
6
- <a href="https://github.com/RubyRaider/ruby_raider">
7
- <img src="https://ruby-raider.com/wp-content/uploads/2022/05/logo-160x160.png?w=890" alt="Logo" style="width:600px;">
8
- </a>
9
- <p align="center">
10
- <a href="https://github.com/RubyRaider/ruby_raider#getting-started"><strong>Explore the docs »</strong></a>
11
- <br />
12
- <br />
13
- <a href="https://rubygems.org/gems/ruby_raider">Rubygems</a>
14
- ·
15
- <a href="https://github.com/RubyRaider/ruby_raider/issues">Report Bug</a>
16
- ·
17
- <a href="https://github.com/RubyRaider/ruby_raider/issues">Request Feature</a>
18
- </p>
19
- <p align="center"> For more information and updates on releases, see <a href="https://ruby-raider.com">https://ruby-raider.com</a></p>
6
+ <a href="https://github.com/RubyRaider/ruby_raider">
7
+ <img src="https://ruby-raider.com/wp-content/uploads/2022/05/logo-160x160.png?w=890" alt="Logo" style="width:600px;">
8
+ </a>
9
+ <p align="center">
10
+ <a href="https://github.com/RubyRaider/ruby_raider#getting-started"><strong>Explore the docs »</strong></a>
11
+ <br />
12
+ <br />
13
+ <a href="https://rubygems.org/gems/ruby_raider">Rubygems</a>
14
+ ·
15
+ <a href="https://github.com/RubyRaider/ruby_raider/issues">Report Bug</a>
16
+ ·
17
+ <a href="https://github.com/RubyRaider/ruby_raider/issues">Request Feature</a>
18
+ </p>
19
+ <p align="center"> For more information and updates on releases, see <a href="https://ruby-raider.com">https://ruby-raider.com</a></p>
20
20
  </div>
21
21
 
22
22
  ## What is Ruby Raider?
@@ -40,7 +40,7 @@ the commands below:***
40
40
 
41
41
  ```ruby
42
42
  raider u start_appium
43
- appium --base - path /wd/ hub
43
+ appium --base /wd/hub
44
44
  ```
45
45
 
46
46
  ***In order to run the visual tests with applitools, you need to create an account and get your api key, you can read
@@ -76,17 +76,15 @@ Select the ones you will like to work with.
76
76
  If you already know which frameworks you want to use, you can do:
77
77
 
78
78
  ```ruby
79
- raider new [name_of_project] p framework : [framework] automation : [automation_type]
79
+ raider new [name_of_project] -p framework:[framework] automation:[automation_type]
80
80
  ```
81
81
 
82
82
  An example of the command above would be:
83
83
 
84
84
  ```ruby
85
- raider new test_project p framework : rspec automation: selenium
85
+ raider new test_project -p framework:rspec automation:selenium
86
86
  ```
87
87
 
88
- Where [frameworks] is a comma separated list of the frameworks you want to use.
89
-
90
88
  ### Ruby raider provides the following list of basic commands
91
89
 
92
90
  ###### Anything between square brackets([...]) is where your imput goes
@@ -137,3 +135,7 @@ To initialise Appium server run this command:
137
135
  ```ruby
138
136
  raider u start_appium
139
137
  ```
138
+
139
+ ### Sponsors
140
+
141
+ This project is tested with BrowserStack.
@@ -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,2 +1 @@
1
- 1.0.7
2
-
1
+ 1.0.9
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.7
4
+ version: 1.0.9
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-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake