Skip to content

Commit

Permalink
Merge branch 'master' into prune-bundle-extra-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
daveallie committed Feb 23, 2017
2 parents 85c1ad9 + dd51c3b commit 1348b8b
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 3 deletions.
6 changes: 6 additions & 0 deletions History.md
@@ -1,3 +1,9 @@
## 3.7.1 / 2017-02-20

* 2 bugfixes:
* Fix typo which blew up MiniSSL (#1182)
* Stop overriding command-line options with the config file (#1203)

## 3.7.0 / 2017-01-04

* 6 minor features:
Expand Down
3 changes: 3 additions & 0 deletions Manifest.txt
@@ -1,10 +1,12 @@
.github/issue_template.md
DEPLOYMENT.md
Gemfile
History.md
LICENSE
Manifest.txt
README.md
Rakefile
Release.md
bin/puma
bin/puma-wild
bin/pumactl
Expand All @@ -25,6 +27,7 @@ ext/puma_http11/org/jruby/puma/Http11.java
ext/puma_http11/org/jruby/puma/Http11Parser.java
ext/puma_http11/org/jruby/puma/MiniSSL.java
ext/puma_http11/puma_http11.c
gemfiles/2.1-Gemfile
lib/puma.rb
lib/puma/accept_nonblock.rb
lib/puma/app/status.rb
Expand Down
9 changes: 9 additions & 0 deletions Release.md
@@ -0,0 +1,9 @@
# Release process

Using "3.7.1" as a version string example.

1. `be rake release_sanity VERSION=3.7.1`
2. `be rake release VERSION=3.7.1`
3. Switch to latest JRuby version
4. `rake java gem`
5. `gem push pkg/puma-3.7.1-java.gem`
2 changes: 1 addition & 1 deletion lib/puma/binder.rb
Expand Up @@ -299,7 +299,7 @@ def add_ssl_listener(host, port, ctx,

if host == "localhost"
localhost_addresses.each do |addr|
add_ssl_listener addr, port, optimize_for_latency, backlog
add_ssl_listener addr, port, ctx, optimize_for_latency, backlog
end
return
end
Expand Down
8 changes: 7 additions & 1 deletion lib/puma/configuration.rb
Expand Up @@ -30,6 +30,11 @@ def shift
@set << @cur
end

def reverse_shift
@cur = {}
@set.unshift(@cur)
end

def [](key)
@set.reverse_each do |o|
if o.key? key
Expand Down Expand Up @@ -201,10 +206,11 @@ def load
end

files.each do |f|
@options.shift
@options.reverse_shift

DSL.load @options, self, f
end
@options.shift
end

# Call once all configuration (included from rackup files)
Expand Down
2 changes: 1 addition & 1 deletion lib/puma/const.rb
Expand Up @@ -95,7 +95,7 @@ class UnsupportedOption < RuntimeError
# too taxing on performance.
module Const

PUMA_VERSION = VERSION = "3.7.0".freeze
PUMA_VERSION = VERSION = "3.7.1".freeze
CODE_NAME = "Snowy Sagebrush".freeze
PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze

Expand Down
2 changes: 2 additions & 0 deletions test/config/settings.rb
@@ -0,0 +1,2 @@
port 3000
threads 3, 5
11 changes: 11 additions & 0 deletions test/test_config.rb
Expand Up @@ -67,6 +67,17 @@ def test_overwrite_options
assert_equal conf.options[:workers], 4
end

def test_parameters_overwrite_files
conf = Puma::Configuration.new(config_files: ['test/config/settings.rb']) do |c|
c.port 3030
end
conf.load

assert_match(/:3030$/, conf.options[:binds].first)
assert_equal 3, conf.options[:min_threads]
assert_equal 5, conf.options[:max_threads]
end

private

def with_env(env = {})
Expand Down
4 changes: 4 additions & 0 deletions tools/jungle/init.d/run-puma
Expand Up @@ -8,6 +8,10 @@ if [ -d "$HOME/.rbenv/bin" ]; then
elif [ -d "/usr/local/rbenv/bin" ]; then
PATH="/usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH"
eval "$(rbenv init -)"
elif [ -f /usr/local/rvm/scripts/rvm ]; then
source /etc/profile.d/rvm.sh
elif [ -f "$HOME/.rvm/scripts/rvm" ]; then
source "$HOME/.rvm/scripts/rvm"
fi

app=$1; config=$2; log=$3;
Expand Down

0 comments on commit 1348b8b

Please sign in to comment.