vgh 0.1.1 → 0.1.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.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.1.2
2
+ [Bugs]
3
+ - Fix snapshot creation process (remove memoization)
4
+ - Check credentials when checking for MySQL
5
+
1
6
  === 0.1.1
2
7
  [Bugs]
3
8
  - Fix snapshot creation process
@@ -32,7 +32,7 @@ class Snapshot
32
32
  # @param [String] volume_tag The tag of the volume to snapshot
33
33
  # @return [Object] The newly created snapshot object
34
34
  def create_snapshot(volume_id, volume_tag)
35
- @snapshot ||= ec2.volumes[volume_id].
35
+ @snapshot = ec2.volumes[volume_id].
36
36
  create_snapshot("Backup for #{volume_id}(#{volume_tag})")
37
37
  end
38
38
 
@@ -23,12 +23,16 @@ class MySQL
23
23
  @password = cfg[:mysql_pwd]
24
24
  end
25
25
 
26
- # Check if server is running and we have access to the credentials file
26
+ # Check if server is running and we have the right credentials
27
27
  # @return [Boolean]
28
28
  def mysql_exists?
29
29
  mysql_exists = false
30
30
  if File.exists?(@mysqladmin)
31
31
  mysql_exists = system "#{@mysqladmin} -s ping"
32
+ if ! @user and ! @password
33
+ message.warning 'WARNING: MySQL exists but no credentials were found!'
34
+ mysql_exists = false
35
+ end
32
36
  end
33
37
  return mysql_exists
34
38
  end
data/lib/vgh/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module VGH
2
2
  # Version number
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
 
5
5
  # Returns the version number
6
6
  def version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vgh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-20 00:00:00.000000000 Z
12
+ date: 2012-11-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk