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 CHANGED
@@ -1,4 +1,11 @@
1
- = 1.2.7 (backports release) / Not Yet Released
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
@@ -40,7 +40,7 @@ if RUBY_VERSION > '1.8.6'
40
40
  gem 'nokogiri'
41
41
  end
42
42
  gem 'coffee-script', '>= 2.0', :group => 'coffee-script'
43
- gem 'rdoc', :group => 'rdoc'
43
+ gem 'rdoc', '< 3.10', :group => 'rdoc'
44
44
  end
45
45
 
46
46
  platforms :ruby do
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')} &&
@@ -7,7 +7,7 @@ require 'sinatra/showexceptions'
7
7
  require 'tilt'
8
8
 
9
9
  module Sinatra
10
- VERSION = '1.2.7'
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
- layout_was = @default_layout
572
- @default_layout = false
573
- template = compile_template(engine, data, options, views)
574
- output = template.render(scope, locals, &block)
575
- @default_layout = layout_was
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
@@ -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.7'
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"
@@ -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
 
@@ -36,7 +36,6 @@ class StaticTest < Test::Unit::TestCase
36
36
  head "/#{File.basename(__FILE__)}"
37
37
  assert ok?
38
38
  assert_equal '', body
39
- assert_equal File.size(__FILE__).to_s, response['Content-Length']
40
39
  assert response.headers.include?('Last-Modified')
41
40
  end
42
41
 
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.7
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-10-01 00:00:00.000000000Z
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: &2157377220 !ruby/object:Gem::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: *2157377220
27
+ version_requirements: *2152939680
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: tilt
30
- requirement: &2157376740 !ruby/object:Gem::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: *2157376740
41
+ version_requirements: *2152938920
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: shotgun
44
- requirement: &2157376020 !ruby/object:Gem::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: *2157376020
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: 134946586241568196
190
+ hash: -1174004778160710546
191
191
  required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  none: false
193
193
  requirements: