fulmar 1.8.3 → 1.8.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4f20366087c90f95047cb1e17e871b4f2ecf409
4
- data.tar.gz: cb7610ab18209e6e8741a39ef097611130514984
3
+ metadata.gz: dc4cc373aea2ffc80bfcbfbe4d075ed0108e9517
4
+ data.tar.gz: dea8526955ab7a526e1d63ab8554149f15c6eacb
5
5
  SHA512:
6
- metadata.gz: 832601dd36f99561cdd3a39c8edb5bfc786e8a99440c3eefce1928970f88acc8203780c15d4affd844c89c92f0a917131cbd718229a6a1474bfdf7d2c4ecdfb5
7
- data.tar.gz: 0a0ba145501773e38736d4e6aeb2ebfc6171f5415baf74eca65a13d719e3c2f10f66bb0ec5f6a9d771a61d8f3a403673819bd2c2bc949efd78820f0609b3fe02
6
+ metadata.gz: 2b0b1e454ce75b5896b4f360bf79847fa1745c45a9e64b2310232f452a75f9b02d5f5f1ae6bf185b5f90f4e6b788f1edbc0db01b166b4b2ec8e8b7aa30e72c3e
7
+ data.tar.gz: e1023d96a106b7d6cc0aa072f9f31537d8a564da52c3d7b10d0907cd503be928cc94638bb7a28503403a116b72cfe87978982d484a90aace767d399c3ba050c1
@@ -17,7 +17,8 @@ module Fulmar
17
17
  port: 3306,
18
18
  user: 'root',
19
19
  password: '',
20
- encoding: 'utf8'
20
+ encoding: 'utf8',
21
+ ignore_tables: []
21
22
  }
22
23
  }
23
24
 
@@ -75,10 +76,8 @@ module Fulmar
75
76
  def dump(filename = backup_filename)
76
77
  filename = "#{@config[:remote_path]}/#{filename}" unless filename[0, 1] == '/'
77
78
 
78
- diffable = @config[:maria][:diffable_dump] ? '--skip-comments --skip-extended-insert ' : ''
79
-
80
79
  @shell.run "mysqldump -h #{@config[:maria][:host]} -u #{@config[:maria][:user]} --password='#{@config[:maria][:password]}' " \
81
- "#{@config[:maria][:database]} --single-transaction #{diffable}-r \"#{filename}\""
80
+ "#{@config[:maria][:database]} --single-transaction #{diffable} #{ignore_tables} -r \"#{filename}\""
82
81
 
83
82
  filename
84
83
  end
@@ -128,6 +127,19 @@ module Fulmar
128
127
  raise e.message if i == 3
129
128
  end
130
129
 
130
+ # Return mysql command line options to ignore specific tables
131
+ def ignore_tables
132
+ @config[:maria][:ignore_tables] = [*@config[:maria][:ignore_tables]]
133
+ @config[:maria][:ignore_tables].map do |table|
134
+ "--ignore-table=#{@config[:maria][:database]}.#{table}"
135
+ end.join(' ')
136
+ end
137
+
138
+ # Return the mysql configuration options to make a dump diffable
139
+ def diffable
140
+ @config[:maria][:diffable_dump] ? '--skip-comments --skip-extended-insert ' : ''
141
+ end
142
+
131
143
  # Test configuration
132
144
  def config_test
133
145
  fail 'Configuration option "database" missing.' unless @config[:maria][:database]
@@ -1,4 +1,4 @@
1
1
  # Provides a global version number
2
2
  module Fulmar
3
- VERSION = '1.8.3'
3
+ VERSION = '1.8.4'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fulmar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Siegl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-06 00:00:00.000000000 Z
12
+ date: 2015-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -209,3 +209,4 @@ test_files:
209
209
  - spec/lib/fulmar/service/helper_service_spec.rb
210
210
  - spec/spec_helper.rb
211
211
  - test/rsync_with_versions.rb
212
+ has_rdoc: