sinatra 1.2.7 → 1.2.8
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.
- data/CHANGES +8 -1
- data/Gemfile +1 -1
- data/Rakefile +4 -0
- data/lib/sinatra/base.rb +9 -6
- data/sinatra.gemspec +1 -1
- data/test/coffee_test.rb +2 -2
- data/test/static_test.rb +0 -1
- metadata +9 -9
data/CHANGES
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
= 1.2.
|
1
|
+
= 1.2.8 (backports release) / 2011-12-30
|
2
|
+
|
3
|
+
Backported from 1.3.2:
|
4
|
+
|
5
|
+
* Fix bug where rendering a second template in the same request after the
|
6
|
+
first one raised an exception skipped the default layout (Nathan Baum)
|
7
|
+
|
8
|
+
= 1.2.7 (backports release) / 2011-09-30
|
2
9
|
|
3
10
|
Custom changes:
|
4
11
|
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -185,6 +185,10 @@ if defined?(Gem)
|
|
185
185
|
end
|
186
186
|
|
187
187
|
task 'release' => ['test', package('.gem')] do
|
188
|
+
if File.read("CHANGES") =~ /= \d\.\d\.\d . not yet released$/i
|
189
|
+
fail 'please update changes first'
|
190
|
+
end
|
191
|
+
|
188
192
|
sh <<-SH
|
189
193
|
gem install #{package('.gem')} --local &&
|
190
194
|
gem push #{package('.gem')} &&
|
data/lib/sinatra/base.rb
CHANGED
@@ -7,7 +7,7 @@ require 'sinatra/showexceptions'
|
|
7
7
|
require 'tilt'
|
8
8
|
|
9
9
|
module Sinatra
|
10
|
-
VERSION = '1.2.
|
10
|
+
VERSION = '1.2.8'
|
11
11
|
|
12
12
|
# The request object. See Rack::Request for more info:
|
13
13
|
# http://rack.rubyforge.org/doc/classes/Rack/Request.html
|
@@ -568,11 +568,14 @@ module Sinatra
|
|
568
568
|
scope = options.delete(:scope) || self
|
569
569
|
|
570
570
|
# compile and render template
|
571
|
-
|
572
|
-
@default_layout
|
573
|
-
|
574
|
-
|
575
|
-
|
571
|
+
begin
|
572
|
+
layout_was = @default_layout
|
573
|
+
@default_layout = false
|
574
|
+
template = compile_template(engine, data, options, views)
|
575
|
+
output = template.render(scope, locals, &block)
|
576
|
+
ensure
|
577
|
+
@default_layout = layout_was
|
578
|
+
end
|
576
579
|
|
577
580
|
# render layout
|
578
581
|
if layout
|
data/sinatra.gemspec
CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
|
|
3
3
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
4
4
|
|
5
5
|
s.name = 'sinatra'
|
6
|
-
s.version = '1.2.
|
6
|
+
s.version = '1.2.8'
|
7
7
|
|
8
8
|
s.description = "Classy web-development dressed in a DSL"
|
9
9
|
s.summary = "Classy web-development dressed in a DSL"
|
data/test/coffee_test.rb
CHANGED
@@ -71,7 +71,7 @@ class CoffeeTest < Test::Unit::TestCase
|
|
71
71
|
it "passes coffee options to the coffee engine" do
|
72
72
|
coffee_app { coffee "alert 'Aye!'\n", :no_wrap => true }
|
73
73
|
assert ok?
|
74
|
-
assert_equal "alert('Aye!');", body
|
74
|
+
assert_equal "alert('Aye!');", body.gsub(/\s/, '')
|
75
75
|
end
|
76
76
|
|
77
77
|
it "passes default coffee options to the coffee engine" do
|
@@ -83,7 +83,7 @@ class CoffeeTest < Test::Unit::TestCase
|
|
83
83
|
end
|
84
84
|
get '/'
|
85
85
|
assert ok?
|
86
|
-
assert_equal "alert('Aye!');", body
|
86
|
+
assert_equal "alert('Aye!');", body.gsub(/\s/, '')
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
data/test/static_test.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: 1.2.
|
4
|
+
version: 1.2.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,11 +12,11 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2011-
|
15
|
+
date: 2011-12-30 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rack
|
19
|
-
requirement: &
|
19
|
+
requirement: &2152939680 !ruby/object:Gem::Requirement
|
20
20
|
none: false
|
21
21
|
requirements:
|
22
22
|
- - ~>
|
@@ -24,10 +24,10 @@ dependencies:
|
|
24
24
|
version: '1.1'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
|
-
version_requirements: *
|
27
|
+
version_requirements: *2152939680
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: tilt
|
30
|
-
requirement: &
|
30
|
+
requirement: &2152938920 !ruby/object:Gem::Requirement
|
31
31
|
none: false
|
32
32
|
requirements:
|
33
33
|
- - ! '>='
|
@@ -38,10 +38,10 @@ dependencies:
|
|
38
38
|
version: '2.0'
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
|
-
version_requirements: *
|
41
|
+
version_requirements: *2152938920
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: shotgun
|
44
|
-
requirement: &
|
44
|
+
requirement: &2152937800 !ruby/object:Gem::Requirement
|
45
45
|
none: false
|
46
46
|
requirements:
|
47
47
|
- - ~>
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '0.6'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
|
-
version_requirements: *
|
52
|
+
version_requirements: *2152937800
|
53
53
|
description: Classy web-development dressed in a DSL
|
54
54
|
email: sinatrarb@googlegroups.com
|
55
55
|
executables: []
|
@@ -187,7 +187,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
187
|
version: '0'
|
188
188
|
segments:
|
189
189
|
- 0
|
190
|
-
hash:
|
190
|
+
hash: -1174004778160710546
|
191
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
192
192
|
none: false
|
193
193
|
requirements:
|