table_saw 1.2.0 → 1.3.0
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/Gemfile.lock +1 -3
- data/exe/table-saw +0 -1
- data/lib/table_saw/configuration.rb +1 -5
- data/lib/table_saw/connection.rb +3 -6
- data/lib/table_saw/version.rb +1 -1
- data/table_saw.gemspec +0 -1
- metadata +1 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce0e71ab653f2467be613e32219a81dbd1c8544b0ffe54dcd300075ef9d85d5f
|
|
4
|
+
data.tar.gz: 6758d8eb4b87c61e99425abc727d2e311c84d809ab1ab365cc3ec1c1d44dddfb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 82c0db05a5e5d2cfcbd6141e78652e84380f65d960ab130b427ebe1da3caefc8f90b5b9f45621620d2d4a204f8b1fded43bc10978bbbec2f551442fddb5f0f4a
|
|
7
|
+
data.tar.gz: 748b769670ad9b24abe6a84b402cbbb2e1325e030d180ae9461b299b78af2b1b23611fa06d1a281b4a9cfac43f9842685ff1276d458941200204f47c5107b1cf
|
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
table_saw (1.
|
|
5
|
-
connection_pool
|
|
4
|
+
table_saw (1.3.0)
|
|
6
5
|
pg
|
|
7
6
|
thor
|
|
8
7
|
|
|
@@ -42,7 +41,6 @@ GEM
|
|
|
42
41
|
railties (>= 3.0.0)
|
|
43
42
|
thor (>= 0.14.6)
|
|
44
43
|
concurrent-ruby (1.1.5)
|
|
45
|
-
connection_pool (2.2.2)
|
|
46
44
|
crass (1.0.4)
|
|
47
45
|
database_cleaner (1.7.0)
|
|
48
46
|
diff-lcs (1.3)
|
data/exe/table-saw
CHANGED
|
@@ -24,7 +24,6 @@ class CLI < Thor
|
|
|
24
24
|
method_option :password, default: ENV['PGPASSWORD']
|
|
25
25
|
method_option :manifest, aliases: '-m', required: true
|
|
26
26
|
method_option :output, aliases: '-o', default: 'output.dump'
|
|
27
|
-
method_option :pool
|
|
28
27
|
def dump
|
|
29
28
|
TableSaw.configure(options.to_hash)
|
|
30
29
|
records = TableSaw::DependencyGraph::Build.new(TableSaw::Manifest.instance).call
|
|
@@ -2,16 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module TableSaw
|
|
4
4
|
class Configuration
|
|
5
|
-
attr_accessor :dbname, :host, :port, :user, :password, :manifest, :output
|
|
5
|
+
attr_accessor :dbname, :host, :port, :user, :password, :manifest, :output
|
|
6
6
|
|
|
7
7
|
def connection
|
|
8
8
|
{ dbname: dbname, host: host, port: port, user: user, password: password }
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
def pool_size
|
|
12
|
-
(pool || 2).to_i
|
|
13
|
-
end
|
|
14
|
-
|
|
15
11
|
def url=(value)
|
|
16
12
|
URI.parse(value).tap do |uri|
|
|
17
13
|
self.dbname = uri.path[1..-1]
|
data/lib/table_saw/connection.rb
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'pg'
|
|
4
|
-
require 'connection_pool'
|
|
5
4
|
|
|
6
5
|
module TableSaw
|
|
7
6
|
module Connection
|
|
8
7
|
def self.with
|
|
9
8
|
raise ArgumentError, 'requires a block' unless block_given?
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
yield raw
|
|
12
11
|
end
|
|
13
12
|
|
|
14
|
-
def self.
|
|
15
|
-
@
|
|
16
|
-
PG::Connection.new(TableSaw.configuration.connection)
|
|
17
|
-
end
|
|
13
|
+
def self.raw
|
|
14
|
+
@raw ||= PG::Connection.new(TableSaw.configuration.connection)
|
|
18
15
|
end
|
|
19
16
|
|
|
20
17
|
def self.exec(sql)
|
data/lib/table_saw/version.rb
CHANGED
data/table_saw.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: table_saw
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hamed Asghari
|
|
@@ -10,20 +10,6 @@ bindir: exe
|
|
|
10
10
|
cert_chain: []
|
|
11
11
|
date: 2019-08-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: connection_pool
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - ">="
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
20
|
-
type: :runtime
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - ">="
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
27
13
|
- !ruby/object:Gem::Dependency
|
|
28
14
|
name: pg
|
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|