tidus 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tidus/strategies/base_selector.rb +1 -1
- data/lib/tidus/strategies/cond_anonymizer.rb +1 -1
- data/lib/tidus/strategies/email_anonymizer.rb +0 -2
- data/lib/tidus/strategies/null_anonymizer.rb +1 -1
- data/lib/tidus/strategies/overlay_anonymizer.rb +1 -1
- data/lib/tidus/strategies/postgresql/regex_replace_anonymizer.rb +13 -0
- data/lib/tidus/strategies/regex_replace_anonymizer.rb +6 -0
- data/lib/tidus/strategies/static_anonymizer.rb +0 -2
- data/lib/tidus/strategies/text_anonymizer.rb +1 -1
- data/lib/tidus/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59f9d32224486d0fc6a815ddc9ae6e31c25f58d1
|
4
|
+
data.tar.gz: b287241e13828b69d339b283527cfe5e6562151c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08f3f471739d1069f5756c26468adbcd347374e89c2c0e23f2c44130fde9acd821e9d7617ef9247ac2e37ea4adc36642f5eddf4a6563c29b2d0069db42eee694
|
7
|
+
data.tar.gz: 898a91d59d9298718afda852eef4a81b91b540b6b78323338119f229700241087bccc630a9b5312e502958d0cf949b7e9da3ad8a5a5b7f552f945715764d1cc7
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Tidus
|
2
|
+
module Postgresql
|
3
|
+
class RegexReplaceAnonymizer
|
4
|
+
def self.anonymize(table_name, column_name, options = {})
|
5
|
+
name = "#{table_name}.#{column_name}"
|
6
|
+
|
7
|
+
raise "Missing option :pattern for RegexReplaceAnonymizer on #{name}" if options[:pattern].blank?
|
8
|
+
|
9
|
+
return "REGEXP_REPLACE(#{name}, '#{options[:pattern]}', '#{options[:replacement]}')"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/tidus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tidus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schoknecht
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -86,7 +86,9 @@ files:
|
|
86
86
|
- lib/tidus/strategies/postgresql/email_anonymizer.rb
|
87
87
|
- lib/tidus/strategies/postgresql/null_anonymizer.rb
|
88
88
|
- lib/tidus/strategies/postgresql/overlay_anonymizer.rb
|
89
|
+
- lib/tidus/strategies/postgresql/regex_replace_anonymizer.rb
|
89
90
|
- lib/tidus/strategies/postgresql/text_anonymizer.rb
|
91
|
+
- lib/tidus/strategies/regex_replace_anonymizer.rb
|
90
92
|
- lib/tidus/strategies/sqlite3/null_anonymizer.rb
|
91
93
|
- lib/tidus/strategies/static_anonymizer.rb
|
92
94
|
- lib/tidus/strategies/text_anonymizer.rb
|
@@ -111,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
113
|
version: '0'
|
112
114
|
requirements: []
|
113
115
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.
|
116
|
+
rubygems_version: 2.4.6
|
115
117
|
signing_key:
|
116
118
|
specification_version: 4
|
117
119
|
summary: Gem for creating anonymization views.
|