faastruby 0.5.27 → 0.5.28

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f0f9dbc0598da103f758c699a7e5b9048331beae943923d5f23940549f177bb
4
- data.tar.gz: 98622e6d11cde9d7ae34923ac5215dd2f09c3d7f48a735215b6a401cb7ac95c0
3
+ metadata.gz: 98e377126aebecb329bde2e7db6d6eb1193741c2b50295521850f61f915b9bed
4
+ data.tar.gz: a2bf78e9c25df66bbd9bf41061edaab53ffee84515c45df0a0df968fd4957b84
5
5
  SHA512:
6
- metadata.gz: 55f3fc6b69bc7311e541128031d80941b43bafb0e52c4c0fdebf5b663045faf26eeab34f7ac717e352405ac3fa45113d5f42bb3b6638f072abe8811d3c0124fc
7
- data.tar.gz: 1514b7641fa20819f0f390e81a0d171c916e56b03c833f4f2695c7096fc9daaf7650af1c54203acbcc4a0dda271c541eb0f3eed5a64e15350193e3dd66af6156
6
+ metadata.gz: 5e64ef9487f827beda2414b6606f7c833f9d16979aed5118008aa8e1b57e8baeacab6ea3cec312f76bc42a8105cf0376a6065f314bcffffd2f4dc7f4a327c0ed
7
+ data.tar.gz: ddde97246ff56c0ac8b3770d3fb80a087a81683989af87eb5c01739e05a8bab80fce299e1746fc0b0f5b0254824eb506266772b215a8c396db986f770fd07fff
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.28 - May 21 2019
4
+ - `faastruby local` will try to find the 'puma' executable
5
+
3
6
  ## 0.5.27 - May 21 2019
4
7
  - Remove tmuxinator dependency
5
8
  - Fixed: Tests for functions that use `render_template` fail
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- faastruby (0.5.27)
4
+ faastruby (0.5.28)
5
5
  colorize (~> 0.8)
6
6
  faastruby-rpc (~> 0.2.7)
7
7
  listen (~> 3.1)
@@ -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
- exec "#{parsed.join(' ')} puma -C #{puma_config} -p #{server_port} #{args.join(' ')} #{config_ru}"
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
@@ -1,3 +1,3 @@
1
1
  module FaaStRuby
2
- VERSION = '0.5.27'
2
+ VERSION = '0.5.28'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faastruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.27
4
+ version: 0.5.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Arruda