tidus 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/tasks/views.rake +10 -2
- data/lib/tidus.rb +2 -2
- data/lib/tidus/version.rb +1 -1
- metadata +9 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 62b8c871bbd75711aca64395864415fb42a7454bf587176b0d3111f33c061ea9
|
4
|
+
data.tar.gz: 0bdffee537d00c3398d1dea768161966cc1e14e81cc68de8cacec9f0122581f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78e338096cdd10d70ee40c6057d2d64b37e3d6513d40a8159e935faa1b9f84331f662c28ba83f497d7d7d26bed2578ec9d2ff7fd6a11cd85a8b152894f9accf5
|
7
|
+
data.tar.gz: 25554fc47f442421dd58df44694ded03143051e0a5ecadc30451693225ee1cb06ad03861a7d876daa274e1bdeae1b8589afa83ce36ef3f47193313054ab774b8
|
data/lib/tasks/views.rake
CHANGED
@@ -1,9 +1,16 @@
|
|
1
|
+
skip_tables = [
|
2
|
+
'schema_migrations',
|
3
|
+
'ar_internal_metadata',
|
4
|
+
]
|
5
|
+
|
1
6
|
namespace :db do
|
2
7
|
desc "Clears all the views which are currently existing"
|
3
8
|
task :clear_views do
|
4
9
|
Rails.application.eager_load! if defined?(Rails)
|
10
|
+
|
5
11
|
ActiveRecord::Base.descendants.each do |c|
|
6
|
-
next if c.table_name
|
12
|
+
next if skip_tables.include?(c.table_name)
|
13
|
+
|
7
14
|
puts "Clearing view '#{c.view_name}' for table '#{c.table_name}'"
|
8
15
|
|
9
16
|
c.clear_view
|
@@ -13,8 +20,9 @@ namespace :db do
|
|
13
20
|
desc "Generates all the views for the models"
|
14
21
|
task :generate_views do
|
15
22
|
Rails.application.eager_load! if defined?(Rails)
|
23
|
+
|
16
24
|
ActiveRecord::Base.descendants.each do |c|
|
17
|
-
next if c.table_name
|
25
|
+
next if skip_tables.include?(c.table_name) || c.skip_anonymization?
|
18
26
|
|
19
27
|
if ActiveRecord::Base.connection.table_exists? c.table_name
|
20
28
|
puts "Generating view '#{c.view_name}' for table '#{c.table_name}'"
|
data/lib/tidus.rb
CHANGED
@@ -9,5 +9,5 @@ require "tidus/anonymization"
|
|
9
9
|
require "tidus/strategies/base_selector"
|
10
10
|
Dir["#{File.dirname(__FILE__)}/tidus/strategies/**/*.rb"].each { |f| require f }
|
11
11
|
|
12
|
-
load "active_record/railties/databases.rake"
|
13
|
-
load "tasks/views.rake"
|
12
|
+
load "active_record/railties/databases.rake" if defined?(Rails)
|
13
|
+
load "tasks/views.rake"
|
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.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Schoknecht
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -16,42 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '13.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '13.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '3.9'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '3.9'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sqlite3
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: '1.4'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: '1.4'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activerecord
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,8 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
|
-
|
120
|
-
rubygems_version: 2.4.8
|
119
|
+
rubygems_version: 3.0.6
|
121
120
|
signing_key:
|
122
121
|
specification_version: 4
|
123
122
|
summary: Gem for creating anonymization views.
|