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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: caf3a73a4f73a939e96d27ecd75c682cb0c102d2
4
- data.tar.gz: 1533be77323ba2b9b9acbaed18f0645320f0ee0a
3
+ metadata.gz: 8379bdb0d5f4798293f48485cb0a6f89808fb0a1
4
+ data.tar.gz: 2264aa219ba7d50a60b2797aef55e8a335260928
5
5
  SHA512:
6
- metadata.gz: 72681a57612c06a773b8bf7fef5eb53dde36f660905c06107ebb0e21feac0edfe2ef09ee21c0193dc2b5ab5cb70af7f0ef8c61b489b7e6b2165b9f01d7dee602
7
- data.tar.gz: 256c71e89cffa61cd77be9c465a94beef74408ec263bd1bf9c774665b5426040beaf2a73f3f5f1c4fdcec66dcb18cd042fe8f69dba87bf8f9828d2e341997ea0
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
- - Support on JRuby, MRI, and RBX for pulling, validating, parsing and loading
10
+ * Support on JRuby, MRI, and RBX for pulling, validating, parsing and loading
5
11
  CSV/TSV and SQL data (ETL)
6
- - See README.md for full feature description
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[:host]
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[:password]
240
+ opts[:database_password]
255
241
  end
256
242
 
257
243
  def database_port
258
- opts[:port]
244
+ opts[:database_port]
259
245
  end
260
246
 
261
247
  def database_username
262
- opts[:username]
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
@@ -1,3 +1,3 @@
1
1
  module Purview
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
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.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-28 00:00:00.000000000 Z
11
+ date: 2015-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler