reactive_support 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/extensions/array_extensions.rb +3 -3
- data/lib/extensions/reactive_extensions.rb +1 -0
- data/spec/spec_helper.rb +2 -2
- data/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b34a0217ad847fe5d5904f094303a063f70d868d
|
4
|
+
data.tar.gz: 6d1872d384e00d87ddd797340d66e34e0c2799d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cd4ada9664a714e7562dff2cb8fb4983c4dbc2bad53a6f272ec4860a768a2fb0f03340a6c9d292d1cec0e7e4edfaa7f48a1791aa940ca10b2da57fb75e4934b
|
7
|
+
data.tar.gz: 0158bdf720e3915257d37f86f1348f44ad2c3fa3fb249083645a301a15e5f6b3f039a4e9710f8439d21010090d962d15e285f74d29e9d29b874af2fa046ace0a
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class Array
|
2
2
|
|
3
3
|
# The +#scope+ method is called on an array of hashes. It returns a sub-array
|
4
|
-
# including only hashes for which the value at a given +key+
|
4
|
+
# including only hashes for which the value at a given +key+ is among the given +values+.
|
5
5
|
# The +#scope+ method is non-destructive; the original array will remain intact
|
6
6
|
# after it is called. The +#scope+ method is known to work for string or symbol
|
7
7
|
# keys. It should work for other data type keys as well.
|
@@ -25,8 +25,8 @@ class Array
|
|
25
25
|
end
|
26
26
|
|
27
27
|
# The +#where_not+ method is called on an array of hashes. It returns a sub-array
|
28
|
-
# including only hashes for which the value at a given +key+
|
29
|
-
# given
|
28
|
+
# including only hashes for which the value at a given +key+ is not among the
|
29
|
+
# given +values+. It is the inverse of the +#scope+ method. The +#where_not+ method
|
30
30
|
# is non-destructive; the original array will remain intact after it is called. The
|
31
31
|
# +#where_not+ method is known to work for string or symbol keys. It should work for
|
32
32
|
# other data types as well.
|
@@ -9,6 +9,7 @@ require 'reactive_support'
|
|
9
9
|
# requires for ReactiveSupport as it will raise a SystemStackError.
|
10
10
|
|
11
11
|
module ReactiveExtensions
|
12
|
+
Dir['./**/*.rb'].each {|f| require f }
|
12
13
|
|
13
14
|
# The +#try_rescue+ method extends ReactiveSupport's +#try+ method so it
|
14
15
|
# rescues NoMethodErrors and TypeErrors as well as returning +nil+ when
|
data/spec/spec_helper.rb
CHANGED
@@ -9,8 +9,8 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
9
9
|
SimpleCov.start if ENV["COVERAGE"]
|
10
10
|
Coveralls.wear!
|
11
11
|
|
12
|
-
|
13
|
-
|
12
|
+
# ReactiveExtensions requires ReactiveSupport, but not vice versa
|
13
|
+
require File.expand_path('../../lib/extensions/reactive_extensions', __FILE__)
|
14
14
|
|
15
15
|
RSpec.configure do |c|
|
16
16
|
c.order = 'random'
|
data/version.rb
CHANGED