sane 0.22.0 → 0.23.0
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/VERSION +1 -1
- data/lib/sane/float.rb +9 -1
- data/lib/sane.rb +1 -1
- data/spec/spec.sane.rb +18 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.23.0
|
data/lib/sane/float.rb
CHANGED
data/lib/sane.rb
CHANGED
data/spec/spec.sane.rb
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
$:.unshift File.expand_path('../lib')
|
2
2
|
require 'rubygems'
|
3
3
|
require File.dirname(__FILE__) + '/../lib/sane'
|
4
|
-
|
4
|
+
begin
|
5
|
+
require 'spec/autorun'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rspec'
|
8
|
+
end
|
9
|
+
require 'fileutils'
|
10
|
+
|
5
11
|
|
6
12
|
class Object
|
7
13
|
alias :yes :should # a.yes == [3]
|
@@ -81,7 +87,10 @@ describe Sane do
|
|
81
87
|
# end
|
82
88
|
|
83
89
|
it "should have verbose looking float#inspect" do
|
84
|
-
|
90
|
+
(1.1 - 0.9).inspect.should include('0.2000000') # 0.20000000000000006661 or something close to it
|
91
|
+
1.1.inspect.should == "1.1"
|
92
|
+
1.0.inspect.should == "1.0"
|
93
|
+
|
85
94
|
end
|
86
95
|
|
87
96
|
it "should return false if you call File.executable? non_existent_file" do
|
@@ -164,5 +173,12 @@ describe Sane do
|
|
164
173
|
a = Thread.new { sleep 1 }
|
165
174
|
assert Benchmark.realtime{Thread.join_all_others} > 0.5
|
166
175
|
end
|
176
|
+
|
177
|
+
it "should have an insert commas operator on numbers" do
|
178
|
+
1_000_000.comma_format.should == '1,000,000'
|
179
|
+
1_000_000.0.comma_format.should == '1,000,000.0'
|
180
|
+
1_000_000.0.comma_format.should == '1,000,000.0'
|
181
|
+
end
|
182
|
+
|
167
183
|
|
168
184
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 67
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 23
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.23.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Roger Pack
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-21 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|