tidus 1.2.0 → 1.2.1

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
  SHA256:
3
- metadata.gz: 62b8c871bbd75711aca64395864415fb42a7454bf587176b0d3111f33c061ea9
4
- data.tar.gz: 0bdffee537d00c3398d1dea768161966cc1e14e81cc68de8cacec9f0122581f1
3
+ metadata.gz: c0788d5eac4c060fa79f55b57512f970ebc1919994532fba9d5fcd0857db0bcd
4
+ data.tar.gz: a30b93c68023dda2caaef0c71ca0ea52c521a2bc2c39ca15f98b9a1e66e5300c
5
5
  SHA512:
6
- metadata.gz: 78e338096cdd10d70ee40c6057d2d64b37e3d6513d40a8159e935faa1b9f84331f662c28ba83f497d7d7d26bed2578ec9d2ff7fd6a11cd85a8b152894f9accf5
7
- data.tar.gz: 25554fc47f442421dd58df44694ded03143051e0a5ecadc30451693225ee1cb06ad03861a7d876daa274e1bdeae1b8589afa83ce36ef3f47193313054ab774b8
6
+ metadata.gz: 06a983ac2815a1178f8b53dcdb4a219fa0322f8e2de32d8af2071f57dffac1c292534de65f74f231e9705c3b3eaca12aeff69f2c642d9261c0beff74c640993f
7
+ data.tar.gz: 612b24c8414c4721af928321f9f057e5d933b2dc629a6fd16c73fa7c7544bf72ff16acc664cb0683eef2afd681e73e6d17a8960dc375bdad094918e845b9a647
data/lib/tidus/query.rb CHANGED
@@ -2,8 +2,19 @@
2
2
 
3
3
  module Tidus
4
4
  module Query
5
+ def create_view_query_part
6
+ case connection.instance_values['config'][:adapter].to_s.downcase
7
+ when 'postgresql'
8
+ return 'CREATE OR REPLACE VIEW'
9
+ when 'sqlite3'
10
+ return 'CREATE VIEW IF NOT EXISTS'
11
+ else
12
+ return 'CREATE VIEW'
13
+ end
14
+ end
15
+
5
16
  def create_query
6
- "CREATE VIEW #{view_name} AS " +
17
+ "#{create_view_query_part} #{view_name} AS " +
7
18
  "SELECT #{view_columns.join(', ')} " +
8
19
  "FROM #{table_name}"
9
20
  end
data/lib/tidus/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tidus
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
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.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Schoknecht
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-20 00:00:00.000000000 Z
11
+ date: 2021-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: '3.2'
69
69
  description: Creates views which allow anonymization of database tables.
70
70
  email:
71
- - tobias.schoknecht@gmail.com
71
+ - tobias.schoknecht@viafintech.com
72
72
  executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
@@ -101,7 +101,7 @@ homepage: ''
101
101
  licenses:
102
102
  - MIT
103
103
  metadata: {}
104
- post_install_message:
104
+ post_install_message:
105
105
  rdoc_options: []
106
106
  require_paths:
107
107
  - lib
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubygems_version: 3.0.6
120
- signing_key:
120
+ signing_key:
121
121
  specification_version: 4
122
122
  summary: Gem for creating anonymization views.
123
123
  test_files: []