grid 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/grid.gemspec +1 -1
  3. data/lib/grid.rb +3 -3
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.6
1
+ 0.3.7
data/grid.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{grid}
8
- s.version = "0.3.6"
8
+ s.version = "0.3.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tim Koopmans"]
data/lib/grid.rb CHANGED
@@ -20,13 +20,12 @@ class Grid
20
20
  log.level = params[:loglevel] || Logger::DEBUG
21
21
  grid = Watir::Grid.new(params)
22
22
  grid.start(:take_all => true)
23
- @webdriver_browser_type = ask('Which type of browser?') { |q| q.default = "firefox" } unless params[:browser]
24
23
  log.debug("Grid size : #{grid.size}")
25
24
  log.debug("Grid rampup : #{rampup(grid.size, params)} secs")
26
25
  threads = []
27
26
  grid.browsers.each_with_index do |browser, index|
28
27
  sleep rampup(grid.size, params)
29
- threads << Thread.new do
28
+ threads << Thread.new(params[:browser]) do |webdriver_browser_type|
30
29
  $stdout.flush
31
30
  start = ::Time.now
32
31
  log.debug("Browser #{index+1}##{Thread.current.object_id} start : #{::Time.now}")
@@ -34,7 +33,8 @@ class Grid
34
33
  log.debug("Browser #{index+1}##{Thread.current.object_id} type : #{browser[:browser_type]}")
35
34
  log.debug("Browser #{index+1}##{Thread.current.object_id} hostname : #{browser[:hostname]}")
36
35
  if browser[:browser_type] =~ /webdriver/
37
- @browser = browser[:object].new_browser(@webdriver_browser_type.to_sym)
36
+ webdriver_browser_type = "firefox" unless webdriver_browser_type
37
+ @browser = browser[:object].new_browser(webdriver_browser_type.to_sym)
38
38
  else
39
39
  @browser = browser[:object].new_browser
40
40
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grid
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 6
10
- version: 0.3.6
9
+ - 7
10
+ version: 0.3.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tim Koopmans