ruby_raider 0.2.6 → 0.2.9

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: 5ae28c89e9e9716c7a75d97bbe0bc31bae51c3f18b85734492b5a4c5b7913a69
4
- data.tar.gz: 3f6a53f7b30227c3cde2a965a9fe19547afd804484bbee5e3757f9cd65bfa6e8
3
+ metadata.gz: d575add5f8d018b9cab6a72968c22e2bf00808982e7ddde0e325ec7b7c0a909c
4
+ data.tar.gz: b6536a04863e704a8e5a99220f956d43ab68ee3a459b184b0358756f834b6a58
5
5
  SHA512:
6
- metadata.gz: 866912f5d5c4a809dbf721d6629c03f26a5df60d3c5581c6af3b1cfc0884fd629b68af8543d4c630d0d7c736f6aff701aeb577d86538210d129221b42680771c
7
- data.tar.gz: 153726f43cfed928c93457498b964b0f067b82f008ab8a8377828151dd12f4a01052cd7b1e3df5f2c3c89ca941af4d2fafc1c3972ac1ac22ad2fc73c30d06367
6
+ metadata.gz: fe3f887d46ccba5928977aedca472b3c530d60b4fce6a9dc11ec89f1f313a433cb44a32161acf1dd9f809ad86b8e3a9ee01cc957da01604e9b2e8a3ef13cfa9e
7
+ data.tar.gz: 1fdf3654fcf68315a99b67b70814d3bfbc2766747e20f0b0f86d6052b200a9b092edf6c4f4cd45505a6ca69c51fe3b7882a49f2de0436cf4f4f456a254cf7af8
@@ -12,8 +12,8 @@ gem 'rake'
12
12
  gem '<%= framework %>'
13
13
  <% if framework == 'cucumber' -%>
14
14
  gem 'rspec'
15
- gem 'ruby_raider'
16
15
  <% end -%>
16
+ gem 'ruby_raider'
17
17
  <%= ERB.new(File.read(File.expand_path('./partials/automation_gems.tt', __dir__))).result(binding).strip! %>
18
18
  <% if %w[selenium watir].include? automation -%>
19
19
  gem 'webdrivers'
@@ -11,8 +11,8 @@ module Raider
11
11
  attr_reader :browser
12
12
 
13
13
  def new_browser(options = {})
14
- config = YAML.load_file('config/config.yml')
15
- @browser = Watir::Browser.new(config['browser'], options: browser_opts)
14
+ browser = YAML.load_file('config/config.yml')['browser'].to_sym
15
+ @browser = Watir::Browser.new(browser, options: options)
16
16
  end
17
17
  end
18
18
  end
@@ -1,6 +1,7 @@
1
1
  <% if automation == 'selenium' %>
2
2
  def new_driver(caps = {})
3
- @driver = Selenium::WebDriver.for(YAML.load_file('config/config.yml')['browser'], desired_capabilities: caps)
3
+ browser = YAML.load_file('config/config.yml')['browser'].to_sym
4
+ @driver = Selenium::WebDriver.for(browser, desired_capabilities: caps)
4
5
  end
5
6
  <% else %>
6
7
  def new_driver
data/lib/ruby_raider.rb CHANGED
@@ -40,6 +40,11 @@ class RubyRaider < Thor
40
40
  Utilities.new.browser = default_browser
41
41
  end
42
42
 
43
+ desc "raid", "It runs all the tests in a project"
44
+ def raid
45
+ Utilities.new.run
46
+ end
47
+
43
48
  no_commands do
44
49
  def load_config_path
45
50
  YAML.load_file('config/config.yml')['path']
@@ -22,6 +22,14 @@ class Utilities
22
22
  overwrite_yaml
23
23
  end
24
24
 
25
+ def run
26
+ if File.directory? 'spec'
27
+ system 'rspec spec/'
28
+ else
29
+ system 'cucumber features'
30
+ end
31
+ end
32
+
25
33
  def overwrite_yaml
26
34
  File.open(@path, 'w') { |file| YAML.dump(@config, file) }
27
35
  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.2.6'
5
+ s.version = '0.2.9'
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']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_raider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustin Pequeno