allowable 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +4 -0
- data/lib/allowable/allow.rb +1 -1
- data/lib/allowable/forbid.rb +1 -1
- data/lib/allowable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a158170af78796338bf4cf75bf5e4e2ec58c52d
|
4
|
+
data.tar.gz: 61fed37bc38d0175c977c7e18054a45fb3ad671f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 932e5d6d255a5cadab770b07c1a9500316ce9ad75ee55386fe96c62de631c15ce5d2611c1ff3a0f50850355bd3f029b25483cc98cd7555e5e3aa2243081ff9ea
|
7
|
+
data.tar.gz: 279294123d8af70b000b5be1576a5e2f710d278f6b82cf779574fb69a9d8f66ca75efbae42469bf0664a3dcdc654afbbe2358b718bf58af51ab513729c800415
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
# Changelog
|
2
|
+
1.0.2
|
3
|
+
-----
|
4
|
+
* Match array values e.g. `{ key: ['val_one', 'val_two'] }.forbid(key: ['val_one', 'val_two']) # => {}` TODO: Slows down benchmarked performance of `#allow`, need to figure out why
|
5
|
+
|
2
6
|
1.0.1
|
3
7
|
-----
|
4
8
|
* Relax Ruby version restriction. Core module should work with any Ruby. Rails < 4.2.0 may experience issues initializing the plugin.
|
data/README.md
CHANGED
@@ -41,6 +41,10 @@ hash.allow!(one: 'two') # => { two: 'two' }
|
|
41
41
|
hash.forbid!(two: 'two') # => {}
|
42
42
|
|
43
43
|
hash # => {}
|
44
|
+
|
45
|
+
hash.merge(one: ['one', 1]) # => { one: ["one", 1], two: "two" }
|
46
|
+
|
47
|
+
hash.merge(one: ['one', 1]).forbid(one: ['one', 1]) # => { two: "two" }
|
44
48
|
```
|
45
49
|
|
46
50
|
#### Type sensitive for `Hash`
|
data/lib/allowable/allow.rb
CHANGED
data/lib/allowable/forbid.rb
CHANGED
data/lib/allowable/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allowable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. Simon Borg
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|