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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14268f77085f7261cd9820cbf5526fb2da267967
4
- data.tar.gz: 7434fcb6c525510c65f3c7549d2ec860a3d9a6fb
3
+ metadata.gz: 59f9d32224486d0fc6a815ddc9ae6e31c25f58d1
4
+ data.tar.gz: b287241e13828b69d339b283527cfe5e6562151c
5
5
  SHA512:
6
- metadata.gz: 4d0097e6b43425c5bd30d889f8556157a13c761c596af00e7c27881109c01f69d37dd49cdf0afc2d5297eb328157cca2be833d3157a50676d47e0a1971af25a5
7
- data.tar.gz: 2d8bda55a6d81281c7de09cdf186b7a264109243f0b4b98053cad2426e0582f8d7041e00e3ff1cde334dac0aead7f26d93d2500e70e3c22d42e78b263b54de77
6
+ metadata.gz: 08f3f471739d1069f5756c26468adbcd347374e89c2c0e23f2c44130fde9acd821e9d7617ef9247ac2e37ea4adc36642f5eddf4a6563c29b2d0069db42eee694
7
+ data.tar.gz: 898a91d59d9298718afda852eef4a81b91b540b6b78323338119f229700241087bccc630a9b5312e502958d0cf949b7e9da3ad8a5a5b7f552f945715764d1cc7
@@ -14,4 +14,4 @@ module Tidus
14
14
 
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -3,4 +3,4 @@
3
3
  module Tidus
4
4
  class CondAnonymizer < Tidus::BaseSelector
5
5
  end
6
- end
6
+ end
@@ -4,5 +4,3 @@ module Tidus
4
4
  class EmailAnonymizer < Tidus::BaseSelector
5
5
  end
6
6
  end
7
-
8
-
@@ -3,4 +3,4 @@
3
3
  module Tidus
4
4
  class NullAnonymizer < Tidus::BaseSelector
5
5
  end
6
- end
6
+ end
@@ -3,4 +3,4 @@
3
3
  module Tidus
4
4
  class OverlayAnonymizer < Tidus::BaseSelector
5
5
  end
6
- end
6
+ end
@@ -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
@@ -0,0 +1,6 @@
1
+ # encoding: utf-8
2
+
3
+ module Tidus
4
+ class RegexReplaceAnonymizer < Tidus::BaseSelector
5
+ end
6
+ end
@@ -10,5 +10,3 @@ module Tidus
10
10
  end
11
11
  end
12
12
  end
13
-
14
-
@@ -3,4 +3,4 @@
3
3
  module Tidus
4
4
  class TextAnonymizer < Tidus::BaseSelector
5
5
  end
6
- end
6
+ end
data/lib/tidus/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tidus
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
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.5
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-05-18 00:00:00.000000000 Z
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.2.2
116
+ rubygems_version: 2.4.6
115
117
  signing_key:
116
118
  specification_version: 4
117
119
  summary: Gem for creating anonymization views.