datapipe2 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fns/mssql_to_pgsql.rb +6 -6
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7994c281f90be832c80263ab8691c6eed7c870f
4
- data.tar.gz: 8f8a7b2011195b5158f75fb150d05e3c665a926c
3
+ metadata.gz: 34805539a0453fa87d4388b6f0e555e8c269b383
4
+ data.tar.gz: 1b6f0108e659fcdc3b5e3aa4db6c02f3b8123c10
5
5
  SHA512:
6
- metadata.gz: 4d62048b6cdeb752db72bb2d6c357151444e5044c7570201c65eaa068dec1e8952ed11382c31e943fce5cbd0209fe6e6776bada78772f0e89c0a65f6b5e7a70f
7
- data.tar.gz: 4f6b3cc6789fc9f11c18aebe780e4dede215a5eaa4ca89ca3ddc1c5e0d27dbe8fdece19956dbb8ebc6b1d1123190d1e265c3ba9385c0436e72455b7beb71f342
6
+ metadata.gz: 1e186210ab40da293c3ff14b692a84120cb61afcc9fddee17d6299369e902760885eddb767c42f211f69d30d16ebebdb4b2f235b4cfe401124562531ff1ddcb9
7
+ data.tar.gz: b8c22a890d4c0d8a18c404b94cfb43a79fbaca29aac238bf4ac07dddb4d6add93bc42c09f7665a7e39d1ee387261015d944e01855e6c8c6aa62ea46ff4806ed0
@@ -1,11 +1,11 @@
1
1
 
2
- def mssql_to_pgsql(mssql, pgsql, select_sql, tableName, columns)
3
- s = FluidDb::Db(ENV[mssql]) # source
4
- d = FluidDb::Db(ENV[pgsql]) # destination
2
+ def mssql_to_pgsql(select_sql, table_name, columns)
3
+ s = FluidDb::Db(ENV['MSSQL']) # source
4
+ d = FluidDb::Db(ENV['PGSQL']) # destination
5
5
 
6
- d.connection.exec("TRUNCATE TABLE #{tableName}")
6
+ d.connection.exec("TRUNCATE TABLE #{table_name}")
7
7
  copy_cmd = %{
8
- COPY #{tableName} (#{columns.join(',')})
8
+ COPY #{table_name} (#{columns})
9
9
  FROM STDIN
10
10
  WITH DELIMITER AS '|'
11
11
  CSV;"
@@ -21,5 +21,5 @@ def mssql_to_pgsql(mssql, pgsql, select_sql, tableName, columns)
21
21
  end
22
22
  d.connection.put_copy_end
23
23
 
24
- DataPipe2.log "#{tableName}: #{count}"
24
+ DataPipe2.log "#{table_name}: #{count}"
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datapipe2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guy Irvine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-02 00:00:00.000000000 Z
11
+ date: 2016-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -71,7 +71,8 @@ files:
71
71
  - LICENSE
72
72
  - README.md
73
73
  homepage: http://rubygems.org/gems/datapipe2
74
- licenses: []
74
+ licenses:
75
+ - LGPL-3.0
75
76
  metadata: {}
76
77
  post_install_message:
77
78
  rdoc_options: []