ruby_raider 0.2.7 → 0.2.8

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: f59b4879be57ac168976bd048a25790172908958edd481b89891d289dd5e5d81
4
- data.tar.gz: 48c04479863346b3260fb4abca19ea284d6012efeeeb4378e41cffa3a6089d4b
3
+ metadata.gz: e2b456b6b2d262b4d8f5a0667a0bcbb53f46803f00e5f01f7439422d074fafc3
4
+ data.tar.gz: 87c94fd901ea5ef4d89f3364e0f2d0cfdcacb60319114df1ee0feb1731130fc1
5
5
  SHA512:
6
- metadata.gz: 0005474f0f60f02e67370647af856bf021af60080101282e1210a2940be6430cb55a210dc642ca1676a2cd23fab593ba0233926f29ad2e8a4e16514e3864f648
7
- data.tar.gz: db8d66dc70517b1600e1c60dc824580a954ba57af2df6b789e968d0ebbc43f6a5c9be59463c0fe68a94536d3a1e946dcca9c4230e068f17e639cbf218beb2909
6
+ metadata.gz: deccd21387b863799b45987a96d72da3958181cbaf165fc3fdef651b151a74ca23d2cf2e286331649aca646dad8212f34b932258085219a08f13024411d9ee07
7
+ data.tar.gz: '084c6a8df157afa64bf1f197781d121b822cf5e2eca1e0204c13899118a5af8ac51b87a8b6dfd17f54e9545fd75bd98c07d0c6f8767a312e2a95173db36a9751'
@@ -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: browser_opts)
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.7'
5
+ s.version = '0.2.8'
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.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agustin Pequeno