bootstripe 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,8 @@ class Array
9
9
  end
10
10
 
11
11
  def compakt
12
- self.reject do |i|
12
+ self.reject do |i|
13
+ i.nil? ||
13
14
  (i.respond_to?(:length) && i.length == 0) ||
14
15
  (i.respond_to?(:match) && i.match(/^\s+$/))
15
16
  end
@@ -1,3 +1,3 @@
1
1
  module Bootstripe
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
3
3
  end
@@ -4,6 +4,7 @@ describe Array do
4
4
 
5
5
  it 'should compact blank objects and leave non-blank objects in place' do
6
6
  [0, 1, 2, 3].compakt.should == [0, 1, 2, 3]
7
+ [0, nil, 'awesome sauce'].compakt.should == [0, 'awesome sauce']
7
8
  [0, '', :symbol].compakt.should == [0, :symbol]
8
9
  [[], [1, 2]].compakt.should == [[1, 2]]
9
10
  [{ :stuff => :junk }, {}, 'stuff'].compakt.should == [{ :stuff => :junk }, 'stuff']
@@ -15,7 +16,6 @@ describe Array do
15
16
  arr = (1..20).to_a
16
17
  sections = arr.sections(3, 5)
17
18
  sections[0..-2].map{ |s| s.size }.each{ |l| (3..5).should include(l) }
18
- p sections
19
19
  sections.flatten.size.should == arr.size
20
20
  end
21
21
 
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.9
4
+ version: 0.2.10
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-21 00:00:00.000000000 Z
12
+ date: 2012-04-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70213196783860 !ruby/object:Gem::Requirement
16
+ requirement: &70169918865840 !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: *70213196783860
24
+ version_requirements: *70169918865840
25
25
  description: A handful of useful additions for Ruby
26
26
  email:
27
27
  - mike@bytebin.com