sinatra 2.0.6 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sinatra might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/lib/sinatra/main.rb +12 -3
- data/lib/sinatra/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4e8de01bf4c996539070ba126783554845768b3c92428813e36b572330b0105
|
4
|
+
data.tar.gz: b5cea6545616d1296290fdbe88357619ff827ce16f6da7b0310a80bac86c657e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c197220fab61cfcfc1f4f2a5d4484a9ade9f3daac32f1baf29a0ce3e0104691b723d96149c792b4e5f14e2365cc1136b89b88e7eb0161383467d018349f55f59
|
7
|
+
data.tar.gz: 24187702ce48a9f18566665a457646a163694685c41ac1a1e898525c9a2a38a139c5420eb56ab2cc28cef1baaf55eac2c1c3f8b30e74c0f5accd8a40f60d781c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 2.0.7 / 2019-08-22
|
2
|
+
|
3
|
+
* Fix a regression [#1560](https://github.com/sinatra/sinatra/pull/1560) by Kunpei Sakai
|
4
|
+
|
1
5
|
## 2.0.6 / 2019-08-21
|
2
6
|
|
3
7
|
* Fix an issue setting environment from command line option [#1547](https://github.com/sinatra/sinatra/pull/1547), [#1554](https://github.com/sinatra/sinatra/pull/1554) by Jordan Owens, Kunpei Sakai
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.7
|
data/lib/sinatra/main.rb
CHANGED
@@ -3,7 +3,7 @@ module Sinatra
|
|
3
3
|
|
4
4
|
if ARGV.any?
|
5
5
|
require 'optparse'
|
6
|
-
OptionParser.new { |op|
|
6
|
+
parser = OptionParser.new { |op|
|
7
7
|
op.on('-p port', 'set the port (default is 4567)') { |val| ParamsConfig[:port] = Integer(val) }
|
8
8
|
op.on('-s server', 'specify rack server/handler (default is thin)') { |val| ParamsConfig[:server] = val }
|
9
9
|
op.on('-q', 'turn on quiet mode (default is off)') { ParamsConfig[:quiet] = true }
|
@@ -15,7 +15,12 @@ module Sinatra
|
|
15
15
|
op.on('-o addr', "set the host (default is (env == 'development' ? 'localhost' : '0.0.0.0'))") do |val|
|
16
16
|
ParamsConfig[:bind] = val
|
17
17
|
end
|
18
|
-
}
|
18
|
+
}
|
19
|
+
begin
|
20
|
+
parser.parse!(ARGV.dup)
|
21
|
+
rescue => evar
|
22
|
+
ParamsConfig[:optparse_error] = evar
|
23
|
+
end
|
19
24
|
end
|
20
25
|
|
21
26
|
require 'sinatra/base'
|
@@ -29,7 +34,11 @@ module Sinatra
|
|
29
34
|
|
30
35
|
set :run, Proc.new { File.expand_path($0) == File.expand_path(app_file) }
|
31
36
|
|
32
|
-
|
37
|
+
if run? && ARGV.any?
|
38
|
+
error = ParamsConfig.delete(:optparse_error)
|
39
|
+
raise error if error
|
40
|
+
ParamsConfig.each { |k, v| set k, v }
|
41
|
+
end
|
33
42
|
end
|
34
43
|
|
35
44
|
remove_const(:ParamsConfig)
|
data/lib/sinatra/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Mizerany
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-08-
|
14
|
+
date: 2019-08-22 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rack
|
@@ -47,14 +47,14 @@ dependencies:
|
|
47
47
|
requirements:
|
48
48
|
- - '='
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 2.0.
|
50
|
+
version: 2.0.7
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - '='
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 2.0.
|
57
|
+
version: 2.0.7
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: mustermann
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|