forklift_etl 1.0.18 → 1.0.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODAyMzhiNTM4ZGRhYTE3Y2NmOTg4N2RmODZiMTU2MWFhNjhkYTE0Mg==
4
+ OTg3Mzg3YTI0MDg0YTMyMDZiNWZjYWNiNTllNmYwZWZjMGYzZTQxOA==
5
5
  data.tar.gz: !binary |-
6
- YTEzODdjNjc3YzFhMWVmZmU1YjU3YTRlYTM2NzdmZGRkZGFiNDdkZA==
6
+ YzI1NWNkZWE0MzRlMTQ2NDQ5ZDc0MGYxMTUyYWQ1ZWRmMGRkYmEzYQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzFiYzNjMjNlYzdiY2Q2NzcyNjBjYjMwN2M4MDdiMjI0NWE0MTU3N2RlMGYw
10
- NjIxNGY4MTVmNjQxNjMzMjdjZTg2MTFlYmMxNWJhYjRjMDZkMGE1NTkyNjcy
11
- OGU4MzhkMTA5YTcyMjZlMzJjZmRiYTc0Yzc2NDIxOWExOWUzZjQ=
9
+ MzI0NWNhOWFiNjViODEzNDQzOWRjNTFhZmUwMDdhYWIyMzIxNzE2MWM5ZDdm
10
+ ZTJlMTBjMjY1MjY4NDUzNjg5YjAxNGI4ODQ3MDYzMjNjOWU2NjFjN2Y1NzFi
11
+ NDBjYmUzODA0YmNlNmY4OTk3YWIzMmNhNzcwYmM3ZjUwYzFkM2Q=
12
12
  data.tar.gz: !binary |-
13
- OTIyZWFmMjMzYmIxZDQ5MzJlMzgzYzdiYmNlMzA1ZjVjY2MyZGI1ZTBkZDc1
14
- NzNjNDNiOGU4ZmNlZWViNThlZjdkNTc1Njg1NjlmNWQyOWNlNTU0M2JmYmE0
15
- NTk0YmMwNGU0ZTllMThjODIxNTI0NTU0NjZkNWUyN2MyZjYzYTQ=
13
+ MjM1NWZkZWI2MDJhYmNmZmQ2ZGJhZDk3Y2M3YzNmODBhYjhjY2JiNzU3MTgy
14
+ ZThmM2Y5OWExNjZjYjU0YWNiYWZhZDdhYWE3YjE1MDgzODhkM2MxODk4ZWI0
15
+ OTA4ZGEzOWI4ZDdmMTdlNjA4OGIzZDQ2YmVkYzY1NzFjOWM5ZjY=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- forklift_etl (1.0.18)
4
+ forklift_etl (1.0.19)
5
5
  activesupport (~> 4.0, >= 4.0.0)
6
6
  elasticsearch (~> 1.0, >= 1.0.0)
7
7
  lumberjack (~> 1.0, >= 1.0.0)
@@ -11,7 +11,7 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activesupport (4.1.0)
14
+ activesupport (4.1.1)
15
15
  i18n (~> 0.6, >= 0.6.9)
16
16
  json (~> 1.7, >= 1.7.7)
17
17
  minitest (~> 5.1)
@@ -42,10 +42,10 @@ GEM
42
42
  mime-types (~> 1.16)
43
43
  treetop (~> 1.4.8)
44
44
  mime-types (1.25.1)
45
- minitest (5.3.3)
46
- multi_json (1.9.2)
45
+ minitest (5.3.4)
46
+ multi_json (1.10.0)
47
47
  multipart-post (2.0.0)
48
- mysql2 (0.3.15)
48
+ mysql2 (0.3.16)
49
49
  polyglot (0.3.4)
50
50
  pony (1.8)
51
51
  mail (>= 2.0)
@@ -1,4 +1,5 @@
1
1
  require 'mysql2'
2
+ require 'open3'
2
3
 
3
4
  module Forklift
4
5
  module Connection
@@ -182,8 +183,15 @@ module Forklift
182
183
  cmd << " | gzip > #{file}"
183
184
  forklift.logger.log "Dumping #{config['database']} to #{file}"
184
185
  forklift.logger.debug cmd
185
- `#{cmd}`
186
- forklift.logger.log " > Dump complete"
186
+
187
+ stdin, stdout, stderr = Open3.popen3(cmd)
188
+ stdout = stdout.readlines
189
+ stderr = stderr.readlines
190
+ if stderr.length > 0
191
+ raise " > Dump error: #{stderr.join(" ")}"
192
+ else
193
+ forklift.logger.log " > Dump complete"
194
+ end
187
195
  end
188
196
 
189
197
  def exec_script(path)
@@ -1,3 +1,3 @@
1
1
  module Forklift
2
- VERSION = "1.0.18"
2
+ VERSION = "1.0.19"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forklift_etl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.18
4
+ version: 1.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Tahler