rest-terminal 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rest/terminal/commands.rb +6 -5
- data/lib/rest/version.rb +1 -1
- metadata +1 -1
@@ -14,18 +14,18 @@ module Rest
|
|
14
14
|
|
15
15
|
def _init
|
16
16
|
require 'fileutils'
|
17
|
-
|
17
|
+
src = "#{File.dirname(__FILE__)}/.."
|
18
18
|
FileUtils.mkdir_p ".rest-terminal"
|
19
|
-
`cp #{
|
19
|
+
`cp #{src}/terminal/persistent_rc.rb .rest-terminal`
|
20
20
|
require './.rest-terminal/persistent_rc'
|
21
21
|
load_vars
|
22
22
|
FileUtils.mkdir_p "services"
|
23
|
-
`cp #{
|
23
|
+
`cp #{src}/service.rb services`
|
24
24
|
@spaces.each do |path|
|
25
25
|
# `mkdir -p services#{path}`
|
26
26
|
FileUtils.mkdir_p "services#{path}"
|
27
27
|
#`cp ./service.rb services#{path}`
|
28
|
-
`cp #{
|
28
|
+
`cp #{src}/service.rb services#{path}`
|
29
29
|
end
|
30
30
|
@hist = ['init']
|
31
31
|
@pwd = '/'
|
@@ -38,8 +38,9 @@ module Rest
|
|
38
38
|
if File.directory?("services#{fp}")
|
39
39
|
fp = "Service already exists! #{fp}".red
|
40
40
|
else
|
41
|
+
src = "#{File.dirname(__FILE__)}/.."
|
41
42
|
FileUtils.mkdir_p("services#{fp}")
|
42
|
-
`cp
|
43
|
+
`cp #{src}/service.rb services#{fp}`
|
43
44
|
end
|
44
45
|
end
|
45
46
|
@_status = "#{@prm.length} service created!"
|
data/lib/rest/version.rb
CHANGED