purview 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +8 -2
- data/lib/purview/databases/base.rb +4 -18
- data/lib/purview/mixins/connection.rb +10 -0
- data/lib/purview/pullers/base_sql.rb +0 -10
- data/lib/purview/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8379bdb0d5f4798293f48485cb0a6f89808fb0a1
|
|
4
|
+
data.tar.gz: 2264aa219ba7d50a60b2797aef55e8a335260928
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce8958f9eb4556c2d3106d015fb8be223d1911e7cb8e6341e0151be5baede61410da4d098c7671579399ddecf7af6c7678b36f4a47f9d1296084738d4ef100ff
|
|
7
|
+
data.tar.gz: 5dc9a9313f0db29b31cba3b0700b09b86a819eeb4df70e59dc0eadedfd322de046c748930a9315e6ecedba0ea70d69d52327142de2cde64c732b00255d5ea964
|
data/CHANGELOG
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
Release 1.0.1
|
|
2
|
+
-------------
|
|
3
|
+
|
|
4
|
+
* Use consistent naming for database connection-opts (this allowed some DRYing)
|
|
5
|
+
* OPPREF: Only update `table_metadata` when creating/dropping tables
|
|
6
|
+
|
|
1
7
|
Release 1.0.0
|
|
2
8
|
-------------
|
|
3
9
|
|
|
4
|
-
|
|
10
|
+
* Support on JRuby, MRI, and RBX for pulling, validating, parsing and loading
|
|
5
11
|
CSV/TSV and SQL data (ETL)
|
|
6
|
-
|
|
12
|
+
* See README.md for full feature description
|
|
@@ -62,7 +62,6 @@ module Purview
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
def disable_table(table)
|
|
65
|
-
ensure_table_metadata_exists_for_table(table)
|
|
66
65
|
table_name = table_name(table)
|
|
67
66
|
with_context_logging("`disable_table` for: #{table_name}") do
|
|
68
67
|
with_new_connection do |connection|
|
|
@@ -94,7 +93,6 @@ module Purview
|
|
|
94
93
|
end
|
|
95
94
|
|
|
96
95
|
def enable_table(table, timestamp=Time.now.utc)
|
|
97
|
-
ensure_table_metadata_exists_for_table(table)
|
|
98
96
|
table_name = table_name(table)
|
|
99
97
|
with_context_logging("`enable_table` for: #{table_name}") do
|
|
100
98
|
with_new_connection do |connection|
|
|
@@ -108,7 +106,6 @@ module Purview
|
|
|
108
106
|
end
|
|
109
107
|
|
|
110
108
|
def lock_table(table, timestamp=Time.now.utc)
|
|
111
|
-
ensure_table_metadata_exists_for_table(table)
|
|
112
109
|
table_name = table_name(table)
|
|
113
110
|
with_context_logging("`lock_table` for: #{table_name}") do
|
|
114
111
|
with_new_connection do |connection|
|
|
@@ -142,7 +139,6 @@ module Purview
|
|
|
142
139
|
end
|
|
143
140
|
|
|
144
141
|
def unlock_table(table)
|
|
145
|
-
ensure_table_metadata_exists_for_table(table)
|
|
146
142
|
table_name = table_name(table)
|
|
147
143
|
with_context_logging("`unlock_table` for: #{table_name}") do
|
|
148
144
|
with_new_connection do |connection|
|
|
@@ -195,16 +191,6 @@ module Purview
|
|
|
195
191
|
end
|
|
196
192
|
end
|
|
197
193
|
|
|
198
|
-
def connection_opts
|
|
199
|
-
{
|
|
200
|
-
:database => database_name,
|
|
201
|
-
:host => database_host,
|
|
202
|
-
:password => database_password,
|
|
203
|
-
:port => database_port,
|
|
204
|
-
:username => database_username,
|
|
205
|
-
}
|
|
206
|
-
end
|
|
207
|
-
|
|
208
194
|
def connection_type
|
|
209
195
|
raise %{All "#{Base}(s)" must override the "connection_type" method}
|
|
210
196
|
end
|
|
@@ -243,7 +229,7 @@ module Purview
|
|
|
243
229
|
end
|
|
244
230
|
|
|
245
231
|
def database_host
|
|
246
|
-
opts[:
|
|
232
|
+
opts[:database_host]
|
|
247
233
|
end
|
|
248
234
|
|
|
249
235
|
def database_name
|
|
@@ -251,15 +237,15 @@ module Purview
|
|
|
251
237
|
end
|
|
252
238
|
|
|
253
239
|
def database_password
|
|
254
|
-
opts[:
|
|
240
|
+
opts[:database_password]
|
|
255
241
|
end
|
|
256
242
|
|
|
257
243
|
def database_port
|
|
258
|
-
opts[:
|
|
244
|
+
opts[:database_port]
|
|
259
245
|
end
|
|
260
246
|
|
|
261
247
|
def database_username
|
|
262
|
-
opts[:
|
|
248
|
+
opts[:database_username]
|
|
263
249
|
end
|
|
264
250
|
|
|
265
251
|
def default(column)
|
|
@@ -5,6 +5,16 @@ module Purview
|
|
|
5
5
|
connection_type.new(connection_opts)
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
+
def connection_opts
|
|
9
|
+
{
|
|
10
|
+
:database => database_name,
|
|
11
|
+
:host => database_host,
|
|
12
|
+
:password => database_password,
|
|
13
|
+
:port => database_port,
|
|
14
|
+
:username => database_username,
|
|
15
|
+
}
|
|
16
|
+
end
|
|
17
|
+
|
|
8
18
|
def with_new_connection
|
|
9
19
|
connection_type.with_new_connection(connection_opts) { |connection| yield connection }
|
|
10
20
|
end
|
|
@@ -17,16 +17,6 @@ module Purview
|
|
|
17
17
|
table.column_names
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def connection_opts
|
|
21
|
-
{
|
|
22
|
-
:database => database_name,
|
|
23
|
-
:host => database_host,
|
|
24
|
-
:password => database_password,
|
|
25
|
-
:port => database_port,
|
|
26
|
-
:username => database_username,
|
|
27
|
-
}
|
|
28
|
-
end
|
|
29
|
-
|
|
30
20
|
def connection_type
|
|
31
21
|
raise %{All "#{BaseSQL}(s)" must override the "connection_type" method}
|
|
32
22
|
end
|
data/lib/purview/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: purview
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jonathan W. Zaleski
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-05-
|
|
11
|
+
date: 2015-05-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|