mysql_dumper 0.0.1 → 0.0.3

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: 2f9f14de100bde7364e2ccf399e9bf84338dba40
4
- data.tar.gz: 5238aa528a8f86ba2bf5b8f0a1986bb63558e01c
3
+ metadata.gz: ff7f4c5fce4e69279f3bab79a8bda483c20015df
4
+ data.tar.gz: 49e1c0cb28af7050cb1764ba2f17e792dcca9611
5
5
  SHA512:
6
- metadata.gz: 2b710df22ed383236b7f599744bf88d9c291667cbf577d83e8a90f6280fead5e6e6bc8f1b094c3f61fdf7191407ca5015f2aab3e4529470801c03e5daa1f8d84
7
- data.tar.gz: 437a8c5437bb08e442090aec0dd300218020cb0a809c61ba1f12ce28058ce7e102bfab74b85173eedd8a45cc9a0546787797f99a6e1efd9dd5694dc2b2f425b7
6
+ metadata.gz: 83009ac62c591788f7df93a7cbc3373e72c81e939b0b22a5a7826d46c15ff121589a40b6c86c952a31563b0fefd630ac815963c3de5156a8277aebdb151d70b2
7
+ data.tar.gz: 08dfd3b6631ef7e2bab9177069773954e6215151f9c5dfe70edbee709883be4ecd67621017fdcec20702d7730090ee77bad6fe16c03577e5d7844677201cf7b6
data/lib/mysql_dumper.rb CHANGED
@@ -14,7 +14,7 @@ class MysqlDumper
14
14
  preserved_tables = options[:preserve] || []
15
15
  table_string = preserved_tables.join(" ")
16
16
 
17
- system "mysqldump -u #{@username} -p#{@password} -R -d --skip-comments #{@database} > #{path}"
17
+ system "mysqldump -u #{@username} -p#{@password} -R -d --skip-comments #{@database} | sed 's/ AUTO_INCREMENT=[0-9]*\\b//' > #{path}"
18
18
  if ! table_string.strip.empty?
19
19
  system "mysqldump -u #{@username} -p#{@password} --skip-comments #{@database} #{table_string} >> #{path}"
20
20
  end
@@ -1,3 +1,3 @@
1
1
  class MysqlDumper
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -41,7 +41,7 @@ describe MysqlDumper do
41
41
  executed = false
42
42
  @dumper.stub(:system) do |command|
43
43
  sql = <<-SQL
44
- mysqldump -u #{username} -p#{password} -R -d --skip-comments #{database} > #{file_path}
44
+ mysqldump -u #{username} -p#{password} -R -d --skip-comments #{database} | sed 's/ AUTO_INCREMENT=[0-9]*\\b//' > #{file_path}
45
45
  SQL
46
46
  command.should == sql.strip
47
47
  executed = true
@@ -55,7 +55,7 @@ describe MysqlDumper do
55
55
  table1 = "table1"
56
56
  table2 = "table2"
57
57
  sql_schema_only =
58
- "mysqldump -u #{username} -p#{password} -R -d --skip-comments #{database} > #{file_path}"
58
+ "mysqldump -u #{username} -p#{password} -R -d --skip-comments #{database} | sed 's/ AUTO_INCREMENT=[0-9]*\\b//' > #{file_path}"
59
59
  sql_with_tables =
60
60
  "mysqldump -u #{username} -p#{password} --skip-comments #{database} #{table1} #{table2} >> #{file_path}"
61
61
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql_dumper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yang-Hsing Lin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-20 00:00:00.000000000 Z
11
+ date: 2013-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.0.7
94
+ rubygems_version: 2.0.3
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: provides both command line and ruby interface