slab 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,11 +1,7 @@
1
1
  module Enumerable
2
2
 
3
3
  def any_not?(&block)
4
- not all? { |e| yield(e) }
5
- end
6
-
7
- def none?(&block)
8
- not any? { |e| yield(e) }
4
+ not all?(&block)
9
5
  end
10
6
 
11
7
  def hmap(&block)
@@ -31,4 +27,4 @@ module Enumerable
31
27
  inject(initial) { |memo, obj| result = yield(memo, obj, index); index += 1; result }
32
28
  end
33
29
 
34
- end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module Slab
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -105,9 +105,12 @@ class SlabTest < ActiveSupport::TestCase
105
105
  array = (1..5).map { |n| klass.new(n) }
106
106
  assert_equal true, array.any_not? { |obj| obj.value < 3 }
107
107
  assert_equal [true, true, true, false, false], array.map(&:touched?)
108
+ assert_equal true, [1, 3, nil].any_not?
109
+ assert_equal false, [1, 3, 4].any_not?
110
+ assert_equal false, [].any_not?
108
111
  end
109
112
 
110
- test 'enumerable extension: none?' do
113
+ test 'no longer enumerable extension: none?' do
111
114
  klass = callable_class
112
115
  array = (1..5).map { |n| klass.new(n) }
113
116
  assert_equal false, array.none? { |obj| obj.value > 3 }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.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-07-05 00:00:00.000000000 Z
12
+ date: 2012-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &2151918800 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: 3.2.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2151918800
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.2.3
25
30
  description: Extensions for Ruby base classes
26
31
  email:
27
32
  - mtgrosser@gmx.net
@@ -29,18 +34,18 @@ executables: []
29
34
  extensions: []
30
35
  extra_rdoc_files: []
31
36
  files:
32
- - lib/slab/all.rb
33
- - lib/slab/big_decimal.rb
34
- - lib/slab/date.rb
37
+ - lib/slab/returning.rb
38
+ - lib/slab/numeric.rb
35
39
  - lib/slab/enumerable.rb
40
+ - lib/slab/version.rb
36
41
  - lib/slab/hash.rb
37
- - lib/slab/metaclass.rb
38
42
  - lib/slab/methodphitamine.rb
39
- - lib/slab/module.rb
40
- - lib/slab/numeric.rb
41
- - lib/slab/returning.rb
43
+ - lib/slab/metaclass.rb
44
+ - lib/slab/big_decimal.rb
45
+ - lib/slab/date.rb
42
46
  - lib/slab/string.rb
43
- - lib/slab/version.rb
47
+ - lib/slab/module.rb
48
+ - lib/slab/all.rb
44
49
  - lib/slab.rb
45
50
  - MIT-LICENSE
46
51
  - README.md
@@ -57,7 +62,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
62
  requirements:
58
63
  - - ! '>='
59
64
  - !ruby/object:Gem::Version
60
- version: '0'
65
+ version: 1.9.3
61
66
  required_rubygems_version: !ruby/object:Gem::Requirement
62
67
  none: false
63
68
  requirements:
@@ -66,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
71
  version: '0'
67
72
  requirements: []
68
73
  rubyforge_project:
69
- rubygems_version: 1.8.11
74
+ rubygems_version: 1.8.23
70
75
  signing_key:
71
76
  specification_version: 3
72
77
  summary: Core extensions to build Rails upon