iron-extensions 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.1.2 / 2012-03-30
2
+
3
+ * Rename Enumerable#to_hash to #convert_to_hash to resolve ActiveRecord conflict
4
+
1
5
  == 1.1.1 / 2012-03-13
2
6
 
3
7
  * Added DslBuilder base class for additional DSL-building goodness, is basically a better blank-slate starter class than BasicObject for working with our DslProxy class
data/Version.txt CHANGED
@@ -1 +1 @@
1
- 1.1.1
1
+ 1.1.2
@@ -2,7 +2,7 @@ module Enumerable
2
2
 
3
3
  # Converts an enumerable into a hash, by accepting an initial value
4
4
  # or a block to compute the value for a given key.
5
- def to_hash(init_val = nil)
5
+ def convert_to_hash(init_val = nil)
6
6
  hash = {}
7
7
  self.each do |key|
8
8
  hash[key] = block_given? ? yield(key) : init_val
@@ -28,8 +28,4 @@ class Numeric
28
28
  res
29
29
  end
30
30
 
31
- #def to_currency
32
- # Currency::parse(self)
33
- #end
34
-
35
31
  end
@@ -2,11 +2,11 @@
2
2
  describe Enumerable do
3
3
 
4
4
  it 'should convert to a hash' do
5
- [1,2,3].to_hash.should == {1 => nil, 2 => nil, 3 => nil}
5
+ [1,2,3].convert_to_hash.should == {1 => nil, 2 => nil, 3 => nil}
6
6
  end
7
7
 
8
8
  it 'should accept a block to set hash values' do
9
- [:a, :b, :c].to_hash {|k| k.to_s.upcase}.should == {:a => 'A', :b => 'B', :c => 'C'}
9
+ [:a, :b, :c].convert_to_hash {|k| k.to_s.upcase}.should == {:a => 'A', :b => 'B', :c => 'C'}
10
10
  end
11
11
 
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-13 00:00:00.000000000Z
12
+ date: 2012-04-02 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &2164378800 !ruby/object:Gem::Requirement
16
+ requirement: &2168582060 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '2.6'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2164378800
24
+ version_requirements: *2168582060
25
25
  description: Adds common extensions to core Ruby classes
26
26
  email:
27
27
  - rob@irongaze.com