watirsplash 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,9 +1,13 @@
1
+ === Version 2.4.1 / 2011-10-07
2
+
3
+ * JavaScript error checker doesn't raise an error for "undefined"
4
+ * Page::Base#modify method uses now define_method instead of instance_eval
5
+
1
6
  === Version 2.4.0 / 2011-09-25
2
7
 
3
8
  * add WatirSplash::Browser.exist? method
4
9
  * redirect all method invocations on WatirSplash::Browser.current when method doesn't exist in WatirSplash::Browser class itself
5
10
 
6
-
7
11
  === Version 2.3.2 / 2011-09-25
8
12
 
9
13
  * add support for spork-local_process
@@ -6,7 +6,7 @@ module WatirSplash
6
6
  JAVASCRIPT_ERRORS_CHECKER = lambda do |browser|
7
7
  error_message = browser.execute_script "#{browser.respond_to?(:driver) ? "return ": nil}window.__browserErrorMessage"
8
8
 
9
- if error_message && !error_message.empty?
9
+ if error_message && !error_message.empty? && error_message != "undefined"
10
10
  browser.execute_script "window.__browserErrorMessage = undefined"
11
11
  raise JavaScriptError, "JavaScript error: #{error_message}"
12
12
  end
@@ -28,15 +28,13 @@ module WatirSplash
28
28
  def modify element, methodz
29
29
  methodz.each_pair do |meth, return_value|
30
30
  element.instance_eval do
31
- instance_variable_set("@_#{meth}_return_value_proc", return_value)
32
- instance_eval %Q[
33
- self.class.send(:alias_method, :__#{meth}, :#{meth}) if respond_to? :#{meth}
31
+ singleton = class << self; self end
34
32
 
35
- def #{meth}(*args)
36
- self.send(:__#{meth}, *args) if respond_to? :__#{meth}
37
- instance_variable_get("@_#{meth}_return_value_proc").call(*args)
38
- end
39
- ]
33
+ singleton.send :alias_method, "__#{meth}", meth if respond_to? meth
34
+ singleton.send :define_method, meth do |*args|
35
+ self.send("__#{meth}", *args) if respond_to? "__#{meth}"
36
+ return_value.call(*args)
37
+ end
40
38
  end
41
39
  end
42
40
  element
@@ -1,10 +1,10 @@
1
1
  module WatirSplash
2
2
  module Version
3
- WATIRSPLASH = "2.4.0"
3
+ WATIRSPLASH = "2.4.1"
4
4
 
5
5
  # possible runtime dependencies
6
6
  WATIR = "2.0.2"
7
7
  WIN32SCREENSHOT = "~>1.0.5"
8
- WATIR_WEBDRIVER = "~>0.3.4"
8
+ WATIR_WEBDRIVER = "~>0.3.5"
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watirsplash
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 4
9
- - 0
10
- version: 2.4.0
9
+ - 1
10
+ version: 2.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jarmo Pertman
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-25 00:00:00 Z
18
+ date: 2011-10-07 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rake
@@ -173,7 +173,7 @@ rubyforge_project:
173
173
  rubygems_version: 1.8.4
174
174
  signing_key:
175
175
  specification_version: 3
176
- summary: watirsplash 2.4.0
176
+ summary: watirsplash 2.4.1
177
177
  test_files:
178
178
  - spec/browser_spec.rb
179
179
  - spec/page_spec.rb