my_scripts 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +4 -0
- data/VERSION +1 -1
- data/lib/my_scripts/scripts/rabbit.rb +14 -6
- metadata +4 -4
data/HISTORY
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.12
|
@@ -1,7 +1,11 @@
|
|
1
1
|
module MyScripts
|
2
2
|
# Starts and controls rabbitmq server
|
3
3
|
class Rabbit < Script
|
4
|
-
VERSION = '0.1.
|
4
|
+
VERSION = '0.1.1'
|
5
|
+
USAGE = ["start [args] - starts rabbitmq node",
|
6
|
+
"stop [args] - stops running rabbitmq node",
|
7
|
+
"reset - resets rabbit hard, killing all data",
|
8
|
+
"ctl [args] - controls rabbitmq node"]
|
5
9
|
|
6
10
|
def run
|
7
11
|
if RUBY_PLATFORM =~ /windows|mingw32/
|
@@ -12,12 +16,13 @@ module MyScripts
|
|
12
16
|
when /start/
|
13
17
|
system "#{rabbit_hole}/rabbitmq-server.bat #{@argv.join(' ')}"
|
14
18
|
when /stop/
|
15
|
-
system "#{rabbit_hole}/rabbitmqctl.bat
|
19
|
+
system "#{rabbit_hole}/rabbitmqctl.bat stop_app"
|
20
|
+
system "#{rabbit_hole}/rabbitmqctl.bat force_reset"
|
21
|
+
system "#{rabbit_hole}/rabbitmqctl.bat start_app"
|
16
22
|
when /ctl/
|
17
23
|
system "#{rabbit_hole}/rabbitmqctl.bat #{@argv.join(' ')}"
|
18
24
|
else
|
19
|
-
usage
|
20
|
-
"ctl [args] - controls rabbitmq node"]
|
25
|
+
usage USAGE
|
21
26
|
end
|
22
27
|
else
|
23
28
|
|
@@ -27,11 +32,14 @@ module MyScripts
|
|
27
32
|
system "sudo #{rabbit_hole}/rabbitmq-server #{@argv.join(' ')}"
|
28
33
|
when /stop/
|
29
34
|
system "sudo #{rabbit_hole}/rabbitmqctl stop #{@argv.join(' ')}"
|
35
|
+
when /reset/
|
36
|
+
system "sudo #{rabbit_hole}/rabbitmqctl stop_app"
|
37
|
+
system "sudo #{rabbit_hole}/rabbitmqctl force_reset"
|
38
|
+
system "sudo #{rabbit_hole}/rabbitmqctl start_app"
|
30
39
|
when /ctl/
|
31
40
|
system "sudo #{rabbit_hole}/rabbitmqctl #{@argv.join(' ')}"
|
32
41
|
else
|
33
|
-
usage
|
34
|
-
"ctl [args] - controls rabbitmq node"]
|
42
|
+
usage USAGE
|
35
43
|
end
|
36
44
|
end
|
37
45
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_scripts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 12
|
10
|
+
version: 0.1.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- arvicco
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-10-15 00:00:00 +04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|