dumptruck 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 02ff36e085d700745fc06ef42e4ccb44f2ce618b
4
- data.tar.gz: d405b3b38062c5af154db52dd834aead4e92b75d
3
+ metadata.gz: 5c152431950545209d9a24789fb8f0096a926fa3
4
+ data.tar.gz: baa7689e37b7c330168237230acd684add5a9661
5
5
  SHA512:
6
- metadata.gz: 9ac4fd7b1f3380e2b70a8ddbe87900ad8e581d1d885d71033e9e83eb558abc9409ced7a87d7eb62ce4b8f4ad23a3beaf09502cd7afdcdb7d7c365efb9cc72c6c
7
- data.tar.gz: 8575be71aebdc5275b91270aa0f9d8569326cd606ce2ea3bf390d8d64cdf5e6574a18f6a5dd7ebd96826fda29fe6d66033b543fd742e8c98cbfc3431ead51e47
6
+ metadata.gz: 9f6b52a466258411ab1c062b8cb670489e735ffc909a55c419a52a3e04a130dd22a633ca08f3a4e1fd61f1bd8bf0912a8772cf746087f6dcb4e97360414cc9c9
7
+ data.tar.gz: 29043aa8d05f9cff96d14f430024818bd85110b3e312145af98761c21abf9b79544f69115e966f4baad3f707eb9b1d66805c4156cbe2073d464700c3e6c65cd7
data/README.md CHANGED
@@ -30,11 +30,11 @@ The purpose of this gem is make `mysqldump` be as simple as possible. The `mysql
30
30
  truck = Dumptruck::Truck.new({
31
31
  username: "username",
32
32
  password: "password",
33
- host: "127.0.0.1", #localhost is default
34
- port: 3306, #default
35
- output_dir: "/tmp", #where the dump files go
36
- filename: "output", #default, can be changed
37
- mysqldump_bin: "/path/to/bin/",
33
+ host: "127.0.0.1", #localhost is default
34
+ port: 3306, #default
35
+ output_dir: "/tmp", #where the dump files go
36
+ filename: "output", #default, can be changed
37
+ mysqldump_bin: "/path/to/bin/"
38
38
  })
39
39
  ```
40
40
 
@@ -54,9 +54,9 @@ Or you can create the load object independently and pass it to the `truck.load`
54
54
 
55
55
  ```ruby
56
56
  load = Dumptruck::Load.new({
57
- database: 'db', #required for now, raises an error if not set
57
+ database: 'db',
58
58
  ignored_tables: ['table1','table2','table3'], # optional
59
- options: ['--single-transaction', '--quick'], # default values
59
+ options: ['--single-transaction', '--quick'] # default values
60
60
  })
61
61
 
62
62
  truck.load(load)
@@ -64,7 +64,10 @@ truck.load(load)
64
64
 
65
65
  You can add as many loads as needed in order to get the output file you want. When you have everything set just call `truck.dump` and it will run the `mysqldump` command and create a single gzipped output file. The `truck.dump` method returns a hash of the time (in seconds) it took to run and the output files location.
66
66
 
67
- { time: 8.0992, file: /tmp/output_01-01-02-1534.sql.gz }
67
+ {
68
+ time: 8.0992,
69
+ file: #<File:/Users/drew.delianides/Desktop/output_01-01-02-1534.sql.gz>
70
+ }
68
71
 
69
72
  Contribution
70
73
  ------------
@@ -9,7 +9,6 @@ module Dumptruck
9
9
  }.merge!(params)
10
10
 
11
11
  @options = defaults[:options]
12
-
13
12
  @database = params[:database] || '--all-databases'
14
13
 
15
14
  unless params[:options].nil?
@@ -103,7 +103,8 @@ module Dumptruck
103
103
  end
104
104
  end
105
105
  end
106
- {time: time, file: "#{File.expand_path(filename)}"}
106
+ file = File.open(filename)
107
+ {time: time, file: file}
107
108
  end
108
109
  end
109
110
  end
@@ -1,3 +1,3 @@
1
1
  module Dumptruck
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dumptruck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - delianides
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-05 00:00:00.000000000 Z
11
+ date: 2014-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocaine
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  version: '0'
181
181
  requirements: []
182
182
  rubyforge_project:
183
- rubygems_version: 2.2.2
183
+ rubygems_version: 2.3.0
184
184
  signing_key:
185
185
  specification_version: 4
186
186
  summary: Ruby Wrapper for the mysqldump command