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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 95fdee0ddfdaa7219f3f4d452dccfc797b511aa5fa74f51ee62cdfaf2a311efe
4
- data.tar.gz: f99370f645d33f85c07f202a68ad56a8a6822927e084fc9a9d32016fbd8b61da
3
+ metadata.gz: d4e8de01bf4c996539070ba126783554845768b3c92428813e36b572330b0105
4
+ data.tar.gz: b5cea6545616d1296290fdbe88357619ff827ce16f6da7b0310a80bac86c657e
5
5
  SHA512:
6
- metadata.gz: 9205d789339fdd6a3948dc5e393b3272a389098510ed0c60c845492307ed41958b536a1196c9f2a18d9347836e487cc98571ce63e45110628aa93392c763a6d2
7
- data.tar.gz: 6b292ddcdac3b8d6948896451c78bb8c93303dea8c0b9a43be959ba0183230f634caedab15605074336f5fd9eb564047f89f1e4c41fcdae0b5a68e8cf0fe1324
6
+ metadata.gz: c197220fab61cfcfc1f4f2a5d4484a9ade9f3daac32f1baf29a0ce3e0104691b723d96149c792b4e5f14e2365cc1136b89b88e7eb0161383467d018349f55f59
7
+ data.tar.gz: 24187702ce48a9f18566665a457646a163694685c41ac1a1e898525c9a2a38a139c5420eb56ab2cc28cef1baaf55eac2c1c3f8b30e74c0f5accd8a40f60d781c
@@ -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.6
1
+ 2.0.7
@@ -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
- }.parse!(ARGV.dup)
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
- ParamsConfig.each { |k, v| set k, v } if run? && ARGV.any?
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)
@@ -1,3 +1,3 @@
1
1
  module Sinatra
2
- VERSION = '2.0.6'
2
+ VERSION = '2.0.7'
3
3
  end
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.6
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-21 00:00:00.000000000 Z
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.6
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.6
57
+ version: 2.0.7
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: mustermann
60
60
  requirement: !ruby/object:Gem::Requirement