tidus 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tasks/views.rake +1 -1
- data/lib/tidus/anonymization.rb +9 -1
- data/lib/tidus/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ab60caab05fd3272ef551a3ef6268a98dcc5858
|
4
|
+
data.tar.gz: d0086aa189be407f46628569cd9dd7dc46b57d89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e3377bd211a50ada2550c3d0aa27e020fb38b62f029e04aa0a99ec9e8c217550956c076142505d1628945a4a2eb30929c564d4e1a8a1796af7376e2246c5957
|
7
|
+
data.tar.gz: 1050fd7c7e127e3ea01c73dbeba0ae2a5be207c78510dc9d27a0ea4506e1e574b11a9e86b7816794b50396d05cc08012084cb339f283a47f27ecc8e7cb5eba14
|
data/lib/tasks/views.rake
CHANGED
@@ -14,7 +14,7 @@ namespace :db do
|
|
14
14
|
task :generate_views do
|
15
15
|
Rails.application.eager_load! if defined?(Rails)
|
16
16
|
ActiveRecord::Base.descendants.each do |c|
|
17
|
-
next if c.table_name == "schema_migrations"
|
17
|
+
next if c.table_name == "schema_migrations" || c.skip_anonymization?
|
18
18
|
|
19
19
|
if ActiveRecord::Base.connection.table_exists? c.table_name
|
20
20
|
puts "Generating view '#{c.view_name}' for table '#{c.table_name}'"
|
data/lib/tidus/anonymization.rb
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
module Tidus
|
4
|
-
|
4
|
+
module Anonymization
|
5
5
|
include Tidus::Query
|
6
6
|
|
7
|
+
def skip_anonymization
|
8
|
+
@skip_anonymization = true
|
9
|
+
end
|
10
|
+
|
11
|
+
def skip_anonymization?
|
12
|
+
@skip_anonymization
|
13
|
+
end
|
14
|
+
|
7
15
|
def view_postfix
|
8
16
|
@view_postfix || "anonymized"
|
9
17
|
end
|
data/lib/tidus/version.rb
CHANGED