test-factory 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- test-factory (0.2.6)
4
+ test-factory (0.2.7)
5
5
  watir-webdriver (>= 0.6.2)
6
6
 
7
7
  GEM
@@ -91,4 +91,19 @@ module Enumerable
91
91
  end
92
92
  end
93
93
 
94
- end # Enumerable
94
+ end # Enumerable
95
+
96
+
97
+ class Numeric
98
+
99
+ # Converts a number object to a string containing commas every 3rd digit. Adds
100
+ # trailing zeroes if necessary to match round currency amounts.
101
+ def commas
102
+ self.to_s =~ /([^\.]*)(\..*)?/
103
+ int, dec = $1.reverse, $2 ? ('%.2f' % $2).to_s[/.\d+$/] : ".00"
104
+ while int.gsub!(/(,|\.|^)(\d{3})(\d)/, '\1\2,\3')
105
+ end
106
+ int.reverse + dec
107
+ end
108
+
109
+ end # Numeric
data/test-factory.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'test-factory'
3
- s.version = '0.2.6'
3
+ s.version = '0.2.7'
4
4
  s.summary = %q{rSmart's framework for creating automated testing scripts}
5
5
  s.description = %q{This gem provides a set of modules and methods to help quickly and DRYly create a test automation framework using Ruby and Watir (or watir-webdriver).}
6
6
  s.files = Dir.glob("**/**/**")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-factory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-10 00:00:00.000000000 Z
12
+ date: 2013-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: watir-webdriver