table_saw 2.4.2 → 2.4.3

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: c9dd7caac5cdcdcd6b09cc1c2060e3fd1ff5d7085e779c5a1b7d09f08cdaba99
4
- data.tar.gz: e6511dfdc4f111128e35a97be16178e4e318ada45a48768c175f71cb238668d0
3
+ metadata.gz: 67ef82a827e7b74d82d18a1ca59c5cea9d4d8fb4bc7f518c2dbc81ddd8880c11
4
+ data.tar.gz: 46291dd57476c4a73635921ebb6587aef1d58ba17656b1a11289543da9b90ed0
5
5
  SHA512:
6
- metadata.gz: 15e46ec794a5dbd83d1c584e10ff2d958ff5744fa1dc099b984b63ff7a9329f29208852ae22bdb7ee656289e532a07afacf918fb57fea03ccc290c75f1c908ea
7
- data.tar.gz: eab1eb31c08c30eae78a49b27333e76582d7795886dbe3f98ee6f8ccde736f038536197cb36a354600dbb83a8cf5764ba2b4e77d75ddc221c7b57be8e5a7efcc
6
+ metadata.gz: 7ba5ee90c773bb5bf2e9631e87d4a7e7448a3506e94743cbc52eefb16e41cd25b309201249475b0a490262025259974086125dec00786306fa8c688fd82bea21
7
+ data.tar.gz: 8b5073d3e40c6b64e92618ba911368f8cc5b938bac6704c63e77dce90667776981146920bc0c6d9dd7b2662ae667b82d408056e20e667057d1021dad9191ba2b
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.2
1
+ 2.6.5
data/.travis.yml CHANGED
@@ -7,7 +7,8 @@ language: ruby
7
7
  cache: bundler
8
8
  rvm:
9
9
  - 2.5.5
10
- - 2.6.3
10
+ - 2.6.5
11
+ - 2.7.0
11
12
  before_install: gem install bundler -v 2.0.1
12
13
  before_script:
13
14
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- table_saw (2.4.2)
4
+ table_saw (2.4.3)
5
5
  activerecord (>= 5.2)
6
6
  pg
7
7
  thor
@@ -9,44 +9,44 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (6.0.1)
13
- actionview (= 6.0.1)
14
- activesupport (= 6.0.1)
15
- rack (~> 2.0)
12
+ actionpack (6.0.2.1)
13
+ actionview (= 6.0.2.1)
14
+ activesupport (= 6.0.2.1)
15
+ rack (~> 2.0, >= 2.0.8)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.0.1)
20
- activesupport (= 6.0.1)
19
+ actionview (6.0.2.1)
20
+ activesupport (= 6.0.2.1)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activemodel (6.0.1)
26
- activesupport (= 6.0.1)
27
- activerecord (6.0.1)
28
- activemodel (= 6.0.1)
29
- activesupport (= 6.0.1)
30
- activesupport (6.0.1)
25
+ activemodel (6.0.2.1)
26
+ activesupport (= 6.0.2.1)
27
+ activerecord (6.0.2.1)
28
+ activemodel (= 6.0.2.1)
29
+ activesupport (= 6.0.2.1)
30
+ activesupport (6.0.2.1)
31
31
  concurrent-ruby (~> 1.0, >= 1.0.2)
32
32
  i18n (>= 0.7, < 2)
33
33
  minitest (~> 5.1)
34
34
  tzinfo (~> 1.1)
35
35
  zeitwerk (~> 2.2)
36
36
  ast (2.4.0)
37
- builder (3.2.3)
37
+ builder (3.2.4)
38
38
  coderay (1.1.2)
39
39
  combustion (1.1.2)
40
40
  activesupport (>= 3.0.0)
41
41
  railties (>= 3.0.0)
42
42
  thor (>= 0.14.6)
43
43
  concurrent-ruby (1.1.5)
44
- crass (1.0.5)
44
+ crass (1.0.6)
45
45
  database_cleaner (1.7.0)
46
46
  diff-lcs (1.3)
47
47
  docile (1.3.1)
48
48
  erubi (1.9.0)
49
- i18n (1.7.0)
49
+ i18n (1.8.2)
50
50
  concurrent-ruby (~> 1.0)
51
51
  jaro_winkler (1.5.2)
52
52
  json (2.2.0)
@@ -55,17 +55,17 @@ GEM
55
55
  nokogiri (>= 1.5.9)
56
56
  method_source (0.9.2)
57
57
  mini_portile2 (2.4.0)
58
- minitest (5.13.0)
58
+ minitest (5.14.0)
59
59
  nokogiri (1.10.7)
60
60
  mini_portile2 (~> 2.4.0)
61
61
  parallel (1.17.0)
62
62
  parser (2.6.3.0)
63
63
  ast (~> 2.4.0)
64
- pg (1.1.4)
64
+ pg (1.2.2)
65
65
  pry (0.12.2)
66
66
  coderay (~> 1.1.0)
67
67
  method_source (~> 0.9.0)
68
- rack (2.0.8)
68
+ rack (2.1.1)
69
69
  rack-test (1.1.0)
70
70
  rack (>= 1.0, < 3)
71
71
  rails-dom-testing (2.0.3)
@@ -73,9 +73,9 @@ GEM
73
73
  nokogiri (>= 1.6)
74
74
  rails-html-sanitizer (1.3.0)
75
75
  loofah (~> 2.3)
76
- railties (6.0.1)
77
- actionpack (= 6.0.1)
78
- activesupport (= 6.0.1)
76
+ railties (6.0.2.1)
77
+ actionpack (= 6.0.2.1)
78
+ activesupport (= 6.0.2.1)
79
79
  method_source
80
80
  rake (>= 0.8.7)
81
81
  thor (>= 0.20.3, < 2.0)
@@ -112,9 +112,9 @@ GEM
112
112
  json (>= 1.8, < 3)
113
113
  simplecov-html (~> 0.10.0)
114
114
  simplecov-html (0.10.2)
115
- thor (0.20.3)
115
+ thor (1.0.1)
116
116
  thread_safe (0.3.6)
117
- tzinfo (1.2.5)
117
+ tzinfo (1.2.6)
118
118
  thread_safe (~> 0.1)
119
119
  unicode-display_width (1.6.0)
120
120
  zeitwerk (2.2.2)
@@ -135,4 +135,4 @@ DEPENDENCIES
135
135
  table_saw!
136
136
 
137
137
  BUNDLED WITH
138
- 2.0.1
138
+ 2.1.4
@@ -30,13 +30,17 @@ module TableSaw
30
30
  TableSaw.schema_cache.columns(table_name).map(&:sql_type_metadata).map(&:sql_type).join(', ')
31
31
  end
32
32
 
33
+ def column_names
34
+ TableSaw.schema_cache.columns(table_name).map(&:name).join(', ')
35
+ end
36
+
33
37
  def values_clause
34
38
  1.upto(TableSaw.schema_cache.columns(table_name).size).map { |i| "$#{i}" }.join(', ')
35
39
  end
36
40
 
37
41
  def prepare_statement
38
42
  <<~SQL.squish
39
- PREPARE #{name} (#{column_types}) AS INSERT INTO #{table_name} VALUES (#{values_clause})
43
+ PREPARE #{name} (#{column_types}) AS INSERT INTO #{table_name} (#{column_names}) VALUES (#{values_clause})
40
44
  SQL
41
45
  end
42
46
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TableSaw
4
- VERSION = '2.4.2'
4
+ VERSION = '2.4.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_saw
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hamed Asghari
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-10 00:00:00.000000000 Z
11
+ date: 2020-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
245
245
  - !ruby/object:Gem::Version
246
246
  version: '0'
247
247
  requirements: []
248
- rubygems_version: 3.0.3
248
+ rubygems_version: 3.0.6
249
249
  signing_key:
250
250
  specification_version: 4
251
251
  summary: Create a postgres dump file from a subset of tables