evil-seed 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/lib/evil_seed/anonymizer.rb +1 -1
- data/lib/evil_seed/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2a4c8714fe895573999dae43b0e441852c8baccba4657f49aa9330db61e020d
|
4
|
+
data.tar.gz: 175c040d61f8152437c15db6f4a38fa0941239f7615cf27aa1d752c57ffdbb5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 427ec05a9b68db21101fdf293093dff447635e9b326dfd400e3d7ba69afe3a3344bfa4c97778a8c56f2158529460df9f2e1cbc62a5b9ad86e7d659498e9da37d
|
7
|
+
data.tar.gz: 2288cfb2559bc3b6eefeb28f066cb06e6ed2e0c624e5287755314e41e67a611341d90c4c9d08f97d7a724882b294bdc3dbb53ebfbe4ac431f06a078ed1ea76fc
|
data/README.md
CHANGED
@@ -72,10 +72,12 @@ EvilSeed.configure do |config|
|
|
72
72
|
end
|
73
73
|
|
74
74
|
# Transformations allows you to change dumped data e. g. to hide sensitive information
|
75
|
-
config.customize("User") do |
|
75
|
+
config.customize("User") do |u|
|
76
76
|
# Reset password for all users to the same for ease of debugging on developer's machine
|
77
77
|
u["encrypted_password"] = encrypt("qwerty")
|
78
|
-
|
78
|
+
# Reset or mutate other attributes at your convenience
|
79
|
+
u["metadata"].merge!("foo" => "bar")
|
80
|
+
u["created_at"] = Time.current
|
79
81
|
# Please note that there you have only hash of record attributes, not the record itself!
|
80
82
|
end
|
81
83
|
|
@@ -84,6 +86,7 @@ EvilSeed.configure do |config|
|
|
84
86
|
config.anonymize("User")
|
85
87
|
name { Faker::Name.name }
|
86
88
|
email { Faker::Internet.email }
|
89
|
+
login { |login| "#{login}-test" }
|
87
90
|
end
|
88
91
|
```
|
89
92
|
|
data/lib/evil_seed/anonymizer.rb
CHANGED
data/lib/evil_seed/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evil-seed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Novikov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-03-
|
12
|
+
date: 2022-03-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|