mongo_masker 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +3 -3
- data/lib/mongo_masker.rb +1 -1
- data/mongo_masker.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b1d6c69d8ef209fc6615ea5ff3a97bc2c6d31a75
|
4
|
+
data.tar.gz: 51ddcc25aa69eb7b38926817b8765284e6251b3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 881ec59a58a8c4f27f4676945f2bc508287211cfbf0b77f2fbffe58b676ac4229002a4d6bcd3125d2a8de44fbd5c47b290e2e442fd7aeac79dc259298f132cce
|
7
|
+
data.tar.gz: 3de9474492ac8a6b152858194076ca6a047f74d1e9e1102fe042f0889f42d654730318ad6080c33a4fbc1b3844014641c559a376285cde8859d99f8a7f77f52e
|
data/README.md
CHANGED
@@ -3,8 +3,8 @@ Masking your data in mongodb
|
|
3
3
|
|
4
4
|
# Usage
|
5
5
|
```
|
6
|
-
|
7
|
-
|
6
|
+
gem install mongo_masker
|
7
|
+
mongo_masker mask mask.yml
|
8
8
|
```
|
9
9
|
|
10
10
|
# Example mask.yml
|
@@ -17,7 +17,7 @@ models:
|
|
17
17
|
email:
|
18
18
|
"$not": !ruby/regexp '/@basicinc\.jp$/'
|
19
19
|
fields:
|
20
|
-
email: FFaker::Internet.safe_email
|
20
|
+
email: FFaker::Internet.unique.safe_email
|
21
21
|
- name: users
|
22
22
|
fields:
|
23
23
|
reset_password_token: String.new
|
data/lib/mongo_masker.rb
CHANGED
@@ -87,7 +87,7 @@ module MongoMasker
|
|
87
87
|
end
|
88
88
|
|
89
89
|
def parse_condition condition
|
90
|
-
if condition.is_a?(String) && condition.match
|
90
|
+
if condition.is_a?(String) && condition.match(/^BSON::ObjectId\('[A-Za-z0-9]+'\)$/)
|
91
91
|
return eval(condition)
|
92
92
|
end
|
93
93
|
|
data/mongo_masker.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongo_masker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clicia Scarlet
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
version: '0'
|
133
133
|
requirements: []
|
134
134
|
rubyforge_project:
|
135
|
-
rubygems_version: 2.
|
135
|
+
rubygems_version: 2.5.2
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: Mongo masker
|