faastruby 0.5.27 → 0.5.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/faastruby/cli.rb +17 -1
- data/lib/faastruby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98e377126aebecb329bde2e7db6d6eb1193741c2b50295521850f61f915b9bed
|
4
|
+
data.tar.gz: a2bf78e9c25df66bbd9bf41061edaab53ffee84515c45df0a0df968fd4957b84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e64ef9487f827beda2414b6606f7c833f9d16979aed5118008aa8e1b57e8baeacab6ea3cec312f76bc42a8105cf0376a6065f314bcffffd2f4dc7f4a327c0ed
|
7
|
+
data.tar.gz: ddde97246ff56c0ac8b3770d3fb80a087a81683989af87eb5c01739e05a8bab80fce299e1746fc0b0f5b0254824eb506266772b215a8c396db986f770fd07fff
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/faastruby/cli.rb
CHANGED
@@ -78,7 +78,23 @@ module FaaStRuby
|
|
78
78
|
server_dir = "#{Gem::Specification.find_by_name("faastruby").gem_dir}/lib/faastruby/server"
|
79
79
|
config_ru = "#{server_dir}/config.ru"
|
80
80
|
puma_config = "#{server_dir}/puma.rb"
|
81
|
-
|
81
|
+
puma_executable = which("puma")
|
82
|
+
error("FATAL: Could not find 'puma' executable.") unless puma_executable
|
83
|
+
exec "#{parsed.join(' ')} #{puma_executable} -C #{puma_config} -p #{server_port} #{args.join(' ')} #{config_ru}"
|
84
|
+
end
|
85
|
+
|
86
|
+
# Cross-platform way of finding an executable in the $PATH.
|
87
|
+
#
|
88
|
+
# which('ruby') #=> /usr/bin/ruby
|
89
|
+
def self.which(cmd)
|
90
|
+
exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
|
91
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
|
92
|
+
exts.each { |ext|
|
93
|
+
exe = File.join(path, "#{cmd}#{ext}")
|
94
|
+
return exe if File.executable?(exe) && !File.directory?(exe)
|
95
|
+
}
|
96
|
+
end
|
97
|
+
return nil
|
82
98
|
end
|
83
99
|
end
|
84
100
|
end
|
data/lib/faastruby/version.rb
CHANGED