capistrano-demonz 0.0.17 → 0.0.18

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.md CHANGED
@@ -1,6 +1,9 @@
1
- **Current version:** 0.0.17
1
+ **Current version:** 0.0.18
2
2
 
3
3
  ## Changes ##
4
+ ### 0.0.18 ###
5
+ * Changed database name pattern to match new AWS server database pattern.
6
+
4
7
  ### 0.0.17 ###
5
8
  * Fixed newline issue when writing out release_history.
6
9
 
data/lib/demonz/common.rb CHANGED
@@ -62,9 +62,12 @@ end
62
62
 
63
63
  # Get the database name given an application and release name
64
64
  def get_db_name(application, release)
65
- db_name = "#{application}__#{release}"
66
- # Remove characters that may cause MySQL issues
67
- db_name.downcase.gsub(/([\.\-\/])/, '_')
65
+ # Match possible db username (max 16 chars) and,
66
+ # remove characters that may cause MySQL issues
67
+ clean_application_name = application.downcase.gsub(/([\.\-\/])/, '').slice(0, 16)
68
+ clean_release_name = release.downcase.gsub(/([\.\-\/])/, '_')
69
+
70
+ db_name = "#{clean_application_name}__#{clean_release_name}"
68
71
  end
69
72
 
70
73
  # Get the regex pattern to extract details from the mysql connection string
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Demonz
3
- VERSION = "0.0.17"
3
+ VERSION = "0.0.18"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-demonz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
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: 2013-02-13 00:00:00.000000000 Z
12
+ date: 2013-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railsless-deploy