mysql_manager 1.0.1 → 1.0.2

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.
@@ -147,7 +147,7 @@ module MysqlManager
147
147
 
148
148
  @options[:db][:username] = 'root'
149
149
  opts.on( '--db:username USERNAME', "Username corresponding to DSN (default: #{@options[:db][:username]})" ) do|username|
150
- @options[:username] = username
150
+ @options[:db][:username] = username
151
151
  end
152
152
 
153
153
  @options[:db][:password] = ""
@@ -210,6 +210,9 @@ module MysqlManager
210
210
  @utilities = Utilities.new(@options[:db])
211
211
  @utilities.log = @log
212
212
  @utilities.dry_run = @options[:dry_run]
213
+ rescue DBI::DatabaseError => e
214
+ @log.fatal(e.message)
215
+ exit(1)
213
216
  rescue MissingArgumentException => e
214
217
  puts e.message
215
218
  puts @optparse
@@ -232,12 +235,18 @@ module MysqlManager
232
235
  @log.debug("about to call reload_my_cnf")
233
236
  @utilities.reload_my_cnf(options)
234
237
  end
238
+ rescue DBI::DatabaseError => e
239
+ @log.fatal(e.message)
240
+ exit(1)
235
241
  rescue FileNotFoundException => e
236
242
  @log.fatal(e.message)
237
- rescue Interupt
243
+ exit(1)
244
+ rescue Interrupt
238
245
  @log.info("Exiting")
246
+ exit
239
247
  rescue Exception => e
240
248
  @log.fatal(e.message + e.backtrace.join("\n"))
249
+ exit(1)
241
250
  end
242
251
  end
243
252
  end
@@ -18,5 +18,5 @@
18
18
  # along with MySQL Manager. If not, see <http://www.gnu.org/licenses/>.
19
19
  #
20
20
  module MysqlManager
21
- VERSION = "1.0.1"
21
+ VERSION = "1.0.2"
22
22
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 1
9
- version: 1.0.1
8
+ - 2
9
+ version: 1.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Erik Osterman
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-07-20 00:00:00 -07:00
17
+ date: 2012-08-03 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency