rack_direct 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rack_direct/service.rb +7 -5
- data/lib/rack_direct/version.rb +1 -1
- metadata +3 -3
data/lib/rack_direct/service.rb
CHANGED
@@ -23,11 +23,11 @@ module RackDirect
|
|
23
23
|
tmppath = generate_rackup_file options[:env]
|
24
24
|
|
25
25
|
# TODO: check path to make sure a Rails app exists there
|
26
|
-
print "rack-direct: starting service #{name}..."
|
26
|
+
print "rack-direct: starting service #{name}..." if self.verbose_logging
|
27
27
|
cmd = "cd #{path} && rake db:test:prepare && rackup --server #{RACK_DIRECT_ALIAS} #{tmppath} 2>&1"
|
28
28
|
# puts cmd
|
29
29
|
@@services[name] = IO.popen cmd, "w+"
|
30
|
-
puts "done."
|
30
|
+
puts "done." if self.verbose_logging
|
31
31
|
|
32
32
|
at_exit do
|
33
33
|
RackDirect::Service.stop name
|
@@ -61,7 +61,7 @@ module RackDirect
|
|
61
61
|
puts "#{name}> #{line.strip}" if self.verbose_logging
|
62
62
|
end
|
63
63
|
end
|
64
|
-
|
64
|
+
puts "Final response: #{response}" if self.verbose_logging
|
65
65
|
response
|
66
66
|
end
|
67
67
|
|
@@ -69,12 +69,12 @@ module RackDirect
|
|
69
69
|
|
70
70
|
def self.stop name
|
71
71
|
if @@services[name]
|
72
|
-
print "rack-direct: stopping service #{name}..."
|
72
|
+
print "rack-direct: stopping service #{name}..." if self.verbose_logging
|
73
73
|
@@services[name].puts "EXIT"
|
74
74
|
@@services[name].puts ""
|
75
75
|
@@services[name] = nil
|
76
76
|
Process.waitall
|
77
|
-
puts "done."
|
77
|
+
puts "done." if self.verbose_logging
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
@@ -106,6 +106,8 @@ EOF
|
|
106
106
|
tmpfile.write rackup_file_contents
|
107
107
|
tmpfile.close
|
108
108
|
|
109
|
+
puts "rack_direct: Created rackup file #{tmppath}" if self.verbose_logging
|
110
|
+
|
109
111
|
tmppath
|
110
112
|
end
|
111
113
|
|
data/lib/rack_direct/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack_direct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 10
|
10
|
+
version: 0.1.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Sharon
|