my_obfuscate 0.3.7 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/CHANGES +1 -0
- data/LICENSE +1 -1
- data/README.rdoc +11 -7
- data/lib/my_obfuscate/data/en_50K.txt +50000 -0
- data/lib/my_obfuscate/database_helper_shared.rb +76 -0
- data/lib/my_obfuscate/mysql.rb +5 -73
- data/lib/my_obfuscate/postgres.rb +23 -0
- data/lib/my_obfuscate/sql_server.rb +7 -4
- data/lib/my_obfuscate/version.rb +1 -1
- data/lib/my_obfuscate.rb +47 -14
- data/my_obfuscate.gemspec +4 -3
- data/spec/{mysql_spec.rb → my_obfuscate/database_helper_shared_examples.rb} +2 -17
- data/spec/my_obfuscate/mysql_spec.rb +23 -0
- data/spec/my_obfuscate/postgres_spec.rb +23 -0
- data/spec/{sql_server_spec.rb → my_obfuscate/sql_server_spec.rb} +0 -0
- data/spec/my_obfuscate_spec.rb +28 -6
- metadata +44 -13
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
my_obfuscate
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-1.9.3-p392
|
data/.travis.yml
ADDED
data/CHANGES
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3/4/2013 - Switch to the ffaker gem for speed. Add WalkerMethod and an English language frequency dictionary for generating random texts.
|
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
=
|
1
|
+
= MyObfuscate
|
2
2
|
|
3
|
-
|
3
|
+
You want to develop against real production data, but you don't want to violate your users' privacy. Enter MyObfuscate: standalone Ruby code for the selective rewriting of SQL dumps in order to protect user privacy. It supports MySQL, Postgres, and SQL Server.
|
4
4
|
|
5
5
|
= Install
|
6
6
|
|
@@ -52,8 +52,8 @@ And to get an obfuscated dump:
|
|
52
52
|
|
53
53
|
mysqldump -c --add-drop-table --hex-blob -u user -ppassword database | ruby obfuscator.rb > obfuscated_dump.sql
|
54
54
|
|
55
|
-
Note that the -c option on mysqldump is required to use my_obfuscator. Additionally, the default behavior of mysqldump
|
56
|
-
is to output special characters. This may cause trouble, so you can request hex-encoded blob content with --hex-blob.
|
55
|
+
Note that the -c option on mysqldump is required to use my_obfuscator. Additionally, the default behavior of mysqldump
|
56
|
+
is to output special characters. This may cause trouble, so you can request hex-encoded blob content with --hex-blob.
|
57
57
|
If you get MySQL errors due to very long lines, try some combination of --max_allowed_packet=128M, --single-transaction, --skip-extended-insert, and --quick.
|
58
58
|
|
59
59
|
== Database Server
|
@@ -62,6 +62,7 @@ By default the database type is assumed to be MySQL, but you can use the
|
|
62
62
|
builtin SQL Server support by specifying:
|
63
63
|
|
64
64
|
obfuscator.database_type = :sql_server
|
65
|
+
obfuscator.database_type = :postgres
|
65
66
|
|
66
67
|
== Types
|
67
68
|
|
@@ -70,6 +71,7 @@ zip_code, phone, company, ipv4, ipv6, url, integer, fixed, null, and keep.
|
|
70
71
|
|
71
72
|
== Changes
|
72
73
|
|
74
|
+
* Support for Postgres. Thanks @samuelreh!
|
73
75
|
* Support for SQL Server
|
74
76
|
* :unless and :if now support :nil as a shorthand for a Proc that checks for nil
|
75
77
|
* :name, :lorem, and :address are all now supported types. You can pass :number to :lorem to specify how many sentences to generate. The default is one.
|
@@ -87,8 +89,10 @@ zip_code, phone, company, ipv4, ipv6, url, integer, fixed, null, and keep.
|
|
87
89
|
|
88
90
|
== Thanks
|
89
91
|
|
90
|
-
Thanks to
|
92
|
+
Thanks to Honk for the original gem, Iteration Labs for prior maintenance work, and Pivotal Labs for patches and updates!
|
91
93
|
|
92
|
-
==
|
94
|
+
== LICENSE
|
93
95
|
|
94
|
-
|
96
|
+
This work is provided under the MIT License. See the included LICENSE file.
|
97
|
+
|
98
|
+
The included English word frequency list used for generating random text is provided under the Creative Commons – Attribution / ShareAlike 3.0 license by http://invokeit.wordpress.com/frequency-word-lists/
|