rails_pwnerer 0.6.75 → 0.6.76
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/lib/rails_pwnerer/app/main.rb +5 -1
- data/rails_pwnerer.gemspec +1 -1
- metadata +3 -3
data/CHANGELOG
CHANGED
@@ -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
|
data/rails_pwnerer.gemspec
CHANGED
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:
|
4
|
+
hash: 159
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 76
|
10
|
+
version: 0.6.76
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Victor Costan
|