asmodai 0.1.6 → 0.1.7
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/lib/asmodai/cli.rb +8 -8
- data/lib/asmodai/info.rb +1 -1
- data/lib/asmodai/version.rb +2 -2
- metadata +3 -3
data/lib/asmodai/cli.rb
CHANGED
|
@@ -22,8 +22,6 @@ class Asmodai::CLI < Thor
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
desc "install", "Installs startup scripts to /etc/init.d"
|
|
25
|
-
method_option :force, :type => :boolean,
|
|
26
|
-
:desc => "Overwrite a given init.d-file"
|
|
27
25
|
method_option :autostart,
|
|
28
26
|
:type => :boolean,
|
|
29
27
|
:desc => %{If you provide this, startup-links will be generated for the given runlevel. This is currently only supported on Debian/Ubuntu.}
|
|
@@ -36,17 +34,19 @@ class Asmodai::CLI < Thor
|
|
|
36
34
|
if @info.rvm_environment?
|
|
37
35
|
@asmodai=Pathname.new(@info.rvm_wrapper_path)
|
|
38
36
|
if !@asmodai.exist?
|
|
39
|
-
|
|
37
|
+
system "rvm wrapper #{@info.rvm_ruby_string} bootup asmodai"
|
|
40
38
|
end
|
|
41
39
|
end
|
|
40
|
+
|
|
42
41
|
path = "/etc/init.d/#{@info.daemon_name}"
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
IO.popen "sudo bash -c \"cat > #{path}; chmod a+x #{path}\"", "r+" do |io|
|
|
44
|
+
template_path = File.join(
|
|
45
|
+
File.dirname(__FILE__), "generator/templates/init_d.erb")
|
|
46
|
+
|
|
47
|
+
io.puts ERB.new(File.read(template_path)).result(binding)
|
|
48
|
+
io.close
|
|
46
49
|
end
|
|
47
|
-
|
|
48
|
-
template "templates/init_d.erb", path
|
|
49
|
-
system "chmod a+x #{path}"
|
|
50
50
|
|
|
51
51
|
if options[:autostart]
|
|
52
52
|
if (update_bin=`which update-rc.d`.strip).blank?
|
data/lib/asmodai/info.rb
CHANGED
data/lib/asmodai/version.rb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
module Asmodai
|
|
2
|
-
VERSION = "0.1.
|
|
3
|
-
end
|
|
2
|
+
VERSION = "0.1.7"
|
|
3
|
+
end
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 1
|
|
8
|
-
-
|
|
9
|
-
version: 0.1.
|
|
8
|
+
- 7
|
|
9
|
+
version: 0.1.7
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Sebastian Morawietz
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2011-01-
|
|
17
|
+
date: 2011-01-27 00:00:00 +01:00
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|