rwebspec-webdriver 0.2 → 0.2.1

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.
data/CHANGELOG CHANGED
@@ -1,6 +1,9 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ == 0.2.1
5
+ * add sum_of, average_of to overidding Array methods
6
+
4
7
  == 0.2
5
8
  * Deprecate try method, use try_until instead
6
9
 
data/Rakefile CHANGED
@@ -69,7 +69,7 @@ end
69
69
  spec = Gem::Specification.new do |s|
70
70
  s.platform= Gem::Platform::RUBY
71
71
  s.name = "rwebspec-webdriver"
72
- s.version = "0.2"
72
+ s.version = "0.2.1"
73
73
  s.summary = "Executable functional specification for web applications in RSpec syntax and Selenium-WebDriver"
74
74
  # s.description = ""
75
75
 
@@ -3,19 +3,6 @@
3
3
  #* Distributed open-source, see full license in MIT-LICENSE
4
4
  #***********************************************************
5
5
 
6
- class Array
7
-
8
- def average
9
- inject(0.0) { |sum, e| sum + e } / length
10
- end
11
-
12
- # NOTE might cause issues
13
- # why it is removed total
14
- def sum
15
- inject(0.0) { |sum, e| sum + e }
16
- end
17
- end
18
-
19
6
  # useful hekoer methods for testing
20
7
  #
21
8
  module RWebSpec
@@ -214,6 +201,18 @@ module RWebSpec
214
201
  return :au
215
202
  end
216
203
 
204
+
205
+ def average_of(array)
206
+ array.inject(0.0) { |sum, e| sum + e } / array.length
207
+ end
208
+
209
+ # NOTE might cause issues
210
+ # why it is removed total
211
+ def sum_of(array)
212
+ array.inject(0.0) { |sum, e| sum + e }
213
+ end
214
+
215
+
217
216
  end
218
217
  end
219
218
  end
@@ -1,5 +1,5 @@
1
1
  #***********************************************************
2
- #* Copyright (c) 2006 - 2009, Zhimin Zhan.
2
+ #* Copyright (c) 2010-2012, Zhimin Zhan.
3
3
  #* Distributed open-source, see full license in MIT-LICENSE
4
4
  #***********************************************************
5
5
 
@@ -16,8 +16,8 @@ require 'active_support/core_ext'
16
16
  require 'spec'
17
17
  require 'selenium-webdriver'
18
18
 
19
- unless defined? RWEBSPEC_VERSION
20
- RWEBSPEC_VERSION = "0.2"
19
+ unless defined? RWEBSPEC_WEBDRIVER_VERSION
20
+ RWEBSPEC_WEBDRIVER_VERSION = "0.2.1"
21
21
  end
22
22
 
23
23
 
metadata CHANGED
@@ -5,7 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- version: "0.2"
8
+ - 1
9
+ version: 0.2.1
9
10
  platform: ruby
10
11
  authors:
11
12
  - Zhimin Zhan
@@ -13,7 +14,7 @@ autorequire: rwebspec-webdriver
13
14
  bindir: bin
14
15
  cert_chain: []
15
16
 
16
- date: 2011-12-18 00:00:00 +10:00
17
+ date: 2011-12-29 00:00:00 +10:00
17
18
  default_executable:
18
19
  dependencies:
19
20
  - !ruby/object:Gem::Dependency