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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16d22e9b2bf400af04c3c38e0d230a19134edf46
4
- data.tar.gz: c8c0389b398d87c9b440efc68eb2586263137241
3
+ metadata.gz: 7ab60caab05fd3272ef551a3ef6268a98dcc5858
4
+ data.tar.gz: d0086aa189be407f46628569cd9dd7dc46b57d89
5
5
  SHA512:
6
- metadata.gz: 2633f5e90d829abb8e8a598302f54f5dc22def128e1b74d48b94300992fb3e80f85008f456d1906b40c36edef3e5400bb13035eeffca2c6e873854745d59eb48
7
- data.tar.gz: 11cdfd7de96c1d7ad031d452b8c5c9f100e6dfbaeba35a5524bc709f86b083a6e9c7720f04b70ff931fc22f7ff87f2c5950d260e95d581a735689f062b8fe242
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}'"
@@ -1,9 +1,17 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Tidus
4
- module Anonymization
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
@@ -1,3 +1,3 @@
1
1
  module Tidus
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tidus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Schoknecht