sane 0.24.0 → 0.24.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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.24.0
1
+ 0.24.1
@@ -0,0 +1,6 @@
1
+
2
+ class Numeric
3
+ def group_digits(sep=",")
4
+ self.to_s.reverse.scan(/(?:\d*\.)?\d{1,3}-?/).join(sep).reverse
5
+ end
6
+ end
@@ -0,0 +1,9 @@
1
+ class String
2
+ alias :blank? :empty?
3
+
4
+ def replace_with! this_string
5
+ gsub!(/^.*$/, this_string)
6
+ end
7
+
8
+ end
9
+
@@ -181,4 +181,8 @@ describe Sane do
181
181
  1_000_000.03555.group_digits.should == '1,000,000.03555'
182
182
  end
183
183
 
184
+ it "should have a string replace method" do
185
+ "abc".replace_with!("def").should == "def"
186
+ end
187
+
184
188
  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: 127
4
+ hash: 125
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 24
9
- - 0
10
- version: 0.24.0
9
+ - 1
10
+ version: 0.24.1
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: 2011-07-05 00:00:00 Z
18
+ date: 2011-08-12 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: os
@@ -78,11 +78,12 @@ files:
78
78
  - lib/sane/hash_minus_hash.rb
79
79
  - lib/sane/irb_startup_options.rb
80
80
  - lib/sane/map_by.rb
81
+ - lib/sane/numeric.rb
81
82
  - lib/sane/pp.rb
82
83
  - lib/sane/pps.rb
83
84
  - lib/sane/require_relative.rb
84
85
  - lib/sane/sane_random.rb
85
- - lib/sane/string_blank.rb
86
+ - lib/sane/string.rb
86
87
  - lib/sane/test.rb
87
88
  - lib/sane/test/assertions.rb
88
89
  - lib/sane/thread.rb
@@ -125,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
126
  requirements: []
126
127
 
127
128
  rubyforge_project:
128
- rubygems_version: 1.8.5
129
+ rubygems_version: 1.7.2
129
130
  signing_key:
130
131
  specification_version: 3
131
132
  summary: Helpers for ruby core to make it easier to work with--things that are missing from core but should arguably be there
@@ -1,3 +0,0 @@
1
- class String
2
- alias :blank? :empty?
3
- end