table_saw 1.2.0 → 1.3.0

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: 119c0e1c6d21c1469f5435050f41016c4a1941b620e449f41eee3efa9343e80b
4
- data.tar.gz: 73cb265c0056f59c1b37954d8a02a8ea3b5c547ba09848ff1774c041d5d7cb3b
3
+ metadata.gz: ce0e71ab653f2467be613e32219a81dbd1c8544b0ffe54dcd300075ef9d85d5f
4
+ data.tar.gz: 6758d8eb4b87c61e99425abc727d2e311c84d809ab1ab365cc3ec1c1d44dddfb
5
5
  SHA512:
6
- metadata.gz: 58e97f00198b0b28b4ae19169f419bed764b82e6d82458f29686b24b270bce5f168b6b5cb5753279d57d1e1373c5254b1eb02b86df96eca7db4adc1567558d9b
7
- data.tar.gz: c4c55b312df315ccf8937aed578711140d468f899019616571131e948cddf5791ac4e473ca95828fa3be906306f16150a696226b877e1ded6281a93aee47ec27
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.2.0)
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, :pool
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]
@@ -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
- pool.with { |conn| yield conn }
10
+ yield raw
12
11
  end
13
12
 
14
- def self.pool
15
- @pool ||= ConnectionPool.new(size: TableSaw.configuration.pool_size) do
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TableSaw
4
- VERSION = '1.2.0'
4
+ VERSION = '1.3.0'
5
5
  end
data/table_saw.gemspec CHANGED
@@ -23,7 +23,6 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = ['table-saw']
24
24
  spec.require_paths = ['lib']
25
25
 
26
- spec.add_dependency 'connection_pool'
27
26
  spec.add_dependency 'pg'
28
27
  spec.add_dependency 'thor'
29
28
 
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.2.0
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