fake_pipe 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/fake_pipe/mutator.rb +20 -0
- data/lib/fake_pipe/postgres/comment_block.rb +1 -1
- data/lib/fake_pipe/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d299409b4f7129cf21cf74e3a11fbd8d8ff7476
|
4
|
+
data.tar.gz: 4faab5763c2a7f18f8024fa2d41d9f95d3516aa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e079996af7cdb1fcb27b7e20d50ea6bc78eef9041a3b6a24deb6450806e384f3e0d340b98dc15435c6a5578e018eee212b3ec58e7117cadd3defb58ff41f340c
|
7
|
+
data.tar.gz: fb570f0a39b3ef0ec7aa84b2b577970fcb5abf5b6833ccf74be8d1b6065e2139cabc66e65905908e2f77c135d4628632d3f1a7d363859d31b99353f78384ba30
|
data/README.md
CHANGED
@@ -50,6 +50,7 @@ anon: address_line_1 # Faker::Address.street_address
|
|
50
50
|
anon: address_line_2 # Faker::Address.secondary_address
|
51
51
|
anon: address_postcode # Faker::Address.postcode
|
52
52
|
anon: address_state # Faker::Address.state
|
53
|
+
anon: bank_name # Faker::Bank.name
|
53
54
|
anon: bcrypt_password # bcrypt password as 'password'
|
54
55
|
anon: bcrypt_salt # bcrypt salt used to generate password
|
55
56
|
anon: clean_phone_number # Faker::PhoneNumber 10-digits only
|
@@ -63,6 +64,8 @@ anon: first_name # Faker::Name.first_name
|
|
63
64
|
anon: full_name # Faker::Name.full_name
|
64
65
|
anon: guid # UUID
|
65
66
|
anon: last_name # Faker::Name.last_name
|
67
|
+
anon: latitude # Faker::Address.latitude
|
68
|
+
anon: longitude # Faker::Address.longitude
|
66
69
|
anon: lorem_paragraph # Faker::Lorem.paragraph
|
67
70
|
anon: lorem_sentence # Faker::Lorem.sentence
|
68
71
|
anon: lorem_word # Faker::Lorem.word
|
@@ -73,6 +76,7 @@ anon: ugcid # Six random uppercase letters followed by four rand
|
|
73
76
|
anon: url # Faker::Internet.url
|
74
77
|
anon: user_name # Faker::Internet.user_name
|
75
78
|
anon: uuid # UUID
|
79
|
+
anon: zip_code # Faker::Address.zip_code
|
76
80
|
```
|
77
81
|
|
78
82
|
# Decisions
|
@@ -118,6 +122,10 @@ git commits and tags, and push the `.gem` file to
|
|
118
122
|
Bug reports and pull requests are welcome on GitHub at
|
119
123
|
https://github.com/ddrscott/fake_pipe.
|
120
124
|
|
125
|
+
### Contributors
|
126
|
+
Thanks to the following contributors:
|
127
|
+
- [biozid-0208](https://github.com/biozid-0208)
|
128
|
+
- [luxflux](https://github.com/luxflux)
|
121
129
|
|
122
130
|
## License
|
123
131
|
|
data/lib/fake_pipe/mutator.rb
CHANGED
@@ -94,6 +94,16 @@ module FakePipe
|
|
94
94
|
Faker::Address.postcode
|
95
95
|
end
|
96
96
|
|
97
|
+
# Faker::Address.latitude
|
98
|
+
def mutate_latitude(_)
|
99
|
+
Faker::Address.latitude
|
100
|
+
end
|
101
|
+
|
102
|
+
# Faker::Address.longitude
|
103
|
+
def mutate_longitude(_)
|
104
|
+
Faker::Address.longitude
|
105
|
+
end
|
106
|
+
|
97
107
|
# Faker::Company.name
|
98
108
|
def mutate_company_name(_)
|
99
109
|
Faker::Company.name
|
@@ -176,6 +186,16 @@ module FakePipe
|
|
176
186
|
SecureRandom.uuid
|
177
187
|
end
|
178
188
|
|
189
|
+
# Faker::Bank.name
|
190
|
+
def mutate_bank_name(_)
|
191
|
+
Faker::Bank.name
|
192
|
+
end
|
193
|
+
|
194
|
+
# Faker::Address.zip_code
|
195
|
+
def mutate_zip_code(_)
|
196
|
+
Faker::Address.zip_code
|
197
|
+
end
|
198
|
+
|
179
199
|
# Reopen class to define aliases on module_function
|
180
200
|
class << self
|
181
201
|
alias mutate_guid mutate_uuid
|
@@ -5,7 +5,7 @@ module FakePipe
|
|
5
5
|
# Finds Postgres comment DML.
|
6
6
|
class CommentBlock < TextBlock
|
7
7
|
|
8
|
-
self.start_pattern = /^COMMENT ON COLUMN (?<table
|
8
|
+
self.start_pattern = /^COMMENT ON COLUMN (?<table>.+)\.(?<column>\S+) IS '(?<comment>.*)';/
|
9
9
|
self.end_pattern = /^$/
|
10
10
|
|
11
11
|
def on_start_text(match, line)
|
data/lib/fake_pipe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fake_pipe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Pierce
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.6.
|
133
|
+
rubygems_version: 2.6.14
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Anonymize a database SQL dump file by adding schema comments and piping through
|