rails_pwnerer 0.6.75 → 0.6.76

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 CHANGED
@@ -1,3 +1,5 @@
1
+ v0.6.76. Remove funky characters from application names.
2
+
1
3
  v0.6.75. mysql2 is the new default gem for databasesm as in Rails3.
2
4
 
3
5
  v0.6.74. Added Gemfile.lock to the list of files to be reset.
@@ -1,6 +1,7 @@
1
1
  module RailsPwnerer::App
2
2
  # internal method implementing magic instance names
3
3
  def self.instance_magic(app_name, instance_name)
4
+ app_name = app_name.gsub /\W/, '' # Remove weird punctuation.
4
5
  case instance_name
5
6
  when '*'
6
7
  RailsPwnerer::Config.all_instances app_name { |i| yield app_name, i }
@@ -16,6 +17,7 @@ module RailsPwnerer::App
16
17
  app_name = File.basename remote_path
17
18
  app_name = app_name[0, app_name.rindex('#')] if app_name.rindex '#'
18
19
  app_name = app_name[0, app_name.rindex('.')] if app_name.rindex '.'
20
+ app_name.gsub! /\W/, '' # Remove weird punctuation.
19
21
  instance_magic(app_name, instance_name) do |app, instance|
20
22
  Config.new.alloc app, instance
21
23
 
@@ -43,7 +45,8 @@ module RailsPwnerer::App
43
45
  end
44
46
 
45
47
  # updates an application (restart servers if necessary)
46
- def self.update(app_name, instance_name)
48
+ def self.update(app_name, instance_name)
49
+ app_name = app_name.gsub /\W/, '' # Remove weird punctuation.
47
50
  instance_magic(app_name, instance_name) do |app, instance|
48
51
  [Git, Perforce, Svn].each do |mod|
49
52
  mod.new.update_prefetch app, instance
@@ -59,6 +62,7 @@ module RailsPwnerer::App
59
62
 
60
63
  # removes an application (and stops its servers)
61
64
  def self.remove(app_name, instance_name)
65
+ app_name = app_name.gsub /\W/, '' # Remove weird punctuation.
62
66
  instance_magic(app_name, instance_name) do |app, instance|
63
67
  Scripts.new.pre_stop app, instance
64
68
  ClusterConfig.new.stop app, instance
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rails_pwnerer}
5
- s.version = "0.6.75"
5
+ s.version = "0.6.76"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Victor Costan"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_pwnerer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 145
4
+ hash: 159
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 75
10
- version: 0.6.75
9
+ - 76
10
+ version: 0.6.76
11
11
  platform: ruby
12
12
  authors:
13
13
  - Victor Costan