bootstripe 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ module Enumerable
2
+ def dups
3
+ inject({}) {|h,v| h[v]=h[v].to_i+1; h}.reject{|k,v| v==1}.keys
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Bootstripe
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
data/lib/bootstripe.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'bootstripe/version'
2
2
 
3
3
  # Additions
4
+ require 'bootstripe/enumerable_additions'
4
5
  require 'bootstripe/array_additions'
5
6
  require 'bootstripe/hash_additions'
6
7
  require 'bootstripe/date_additions'
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe Enumerable do
4
+
5
+ it 'should find duplicates' do
6
+ [0, 1, 2, 3].dups.should == []
7
+ [0, 3, 3, 2, 2].dups.should =~ [2, 3]
8
+ %w{one two three two one one three four five}.dups.should =~ %w{one two three}
9
+ end
10
+
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
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-01-15 00:00:00.000000000Z
12
+ date: 2012-01-20 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70185416102000 !ruby/object:Gem::Requirement
16
+ requirement: &70251405947740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70185416102000
24
+ version_requirements: *70251405947740
25
25
  description: A handful of useful additions for Ruby
26
26
  email:
27
27
  - mike@bytebin.com
@@ -36,12 +36,14 @@ files:
36
36
  - lib/bootstripe.rb
37
37
  - lib/bootstripe/array_additions.rb
38
38
  - lib/bootstripe/date_additions.rb
39
+ - lib/bootstripe/enumerable_additions.rb
39
40
  - lib/bootstripe/hash_additions.rb
40
41
  - lib/bootstripe/number_additions.rb
41
42
  - lib/bootstripe/string_additions.rb
42
43
  - lib/bootstripe/version.rb
43
44
  - lib/bootstripe/www_middleware.rb
44
45
  - spec/array_additions_spec.rb
46
+ - spec/enumberable_additions_spec.rb
45
47
  - spec/hash_additions_spec.rb
46
48
  - spec/number_additions_spec.rb
47
49
  - spec/spec_helper.rb
@@ -72,6 +74,7 @@ specification_version: 3
72
74
  summary: A handful of useful additions for Ruby
73
75
  test_files:
74
76
  - spec/array_additions_spec.rb
77
+ - spec/enumberable_additions_spec.rb
75
78
  - spec/hash_additions_spec.rb
76
79
  - spec/number_additions_spec.rb
77
80
  - spec/spec_helper.rb