datapipe 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/DataPipe.rb +3 -1
  2. data/lib/SqlServerToPgsql.rb +5 -3
  3. metadata +10 -21
data/lib/DataPipe.rb CHANGED
@@ -1,4 +1,6 @@
1
- #!/usr/bin/env ruby
1
+ #Don't buffer stdout
2
+ $stdout.sync = true
3
+
2
4
  module DataPipe
3
5
 
4
6
  require 'helper_functions'
@@ -1,3 +1,5 @@
1
+ require "FluidDb"
2
+
1
3
 
2
4
  def SqlServerToPgsql( s_s, d_s, sql, tableName, columns )
3
5
  s = FluidDb::Db( ENV[s_s] )
@@ -6,15 +8,15 @@ def SqlServerToPgsql( s_s, d_s, sql, tableName, columns )
6
8
  d.connection.exec( "TRUNCATE TABLE #{tableName}")
7
9
  d.connection.exec( "COPY #{tableName} (#{columns.join( "," )}) FROM STDIN WITH DELIMITER AS '|' CSV;" )
8
10
 
9
- results = @SourceDb.connection.execute( sql )
11
+ results = s.connection.execute( sql )
10
12
 
11
13
  count = 0
12
14
  results.each(:as => :array, :cache_rows => false) do |r|
13
15
  count = count + 1
14
- @Pgsql.connection.put_copy_data "#{r.join( '|' )}\n"
16
+ d.connection.put_copy_data "#{r.join( '|' )}\n"
15
17
  end
16
18
  d.connection.put_copy_end
17
19
 
18
- RServiceBus.log "#{tableName}: #{count}"
20
+ DataPipe.log "#{tableName}: #{count}"
19
21
  end
20
22
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datapipe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-30 00:00:00.000000000 Z
12
+ date: 2014-05-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70157382063460 !ruby/object:Gem::Requirement
16
+ requirement: &70106395416780 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,21 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70157382063460
25
- - !ruby/object:Gem::Dependency
26
- name: beanstalk-client
27
- requirement: &70157382063020 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *70157382063020
24
+ version_requirements: *70106395416780
36
25
  - !ruby/object:Gem::Dependency
37
26
  name: fluiddb
38
- requirement: &70157382062600 !ruby/object:Gem::Requirement
27
+ requirement: &70106395416340 !ruby/object:Gem::Requirement
39
28
  none: false
40
29
  requirements:
41
30
  - - ! '>='
@@ -43,10 +32,10 @@ dependencies:
43
32
  version: '0'
44
33
  type: :runtime
45
34
  prerelease: false
46
- version_requirements: *70157382062600
35
+ version_requirements: *70106395416340
47
36
  - !ruby/object:Gem::Dependency
48
37
  name: parse-cron
49
- requirement: &70157382062180 !ruby/object:Gem::Requirement
38
+ requirement: &70106395415920 !ruby/object:Gem::Requirement
50
39
  none: false
51
40
  requirements:
52
41
  - - ! '>='
@@ -54,7 +43,7 @@ dependencies:
54
43
  version: '0'
55
44
  type: :runtime
56
45
  prerelease: false
57
- version_requirements: *70157382062180
46
+ version_requirements: *70106395415920
58
47
  description: Helping to move data around your system
59
48
  email: guy@guyirvine.com
60
49
  executables:
@@ -73,7 +62,7 @@ files:
73
62
  - bin/datapipe
74
63
  - LICENSE
75
64
  - README.md
76
- homepage: http://rubygems.org/gems/rservicebus
65
+ homepage: http://rubygems.org/gems/datapipe
77
66
  licenses: []
78
67
  post_install_message:
79
68
  rdoc_options: []
@@ -96,6 +85,6 @@ rubyforge_project:
96
85
  rubygems_version: 1.8.11
97
86
  signing_key:
98
87
  specification_version: 3
99
- summary: RServiceBus
88
+ summary: DataPipe
100
89
  test_files: []
101
90
  has_rdoc: