sinatra 1.4.0.d → 1.4.0

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.

@@ -78,7 +78,7 @@ class SlimTest < Test::Unit::TestCase
78
78
  assert_body '<x foo="bar"></x>'
79
79
  end
80
80
 
81
- it "can rendere truly nested layouts by accepting a layout and a block with the contents" do
81
+ it "can render truly nested layouts by accepting a layout and a block with the contents" do
82
82
  mock_app do
83
83
  template(:main_outer_layout) { "h1 Title\n== yield" }
84
84
  template(:an_inner_layout) { "h2 Subtitle\n== yield" }
@@ -3,7 +3,7 @@ require File.expand_path('../helper', __FILE__)
3
3
  class StreamingTest < Test::Unit::TestCase
4
4
  Stream = Sinatra::Helpers::Stream
5
5
 
6
- it 'returns the concatinated body' do
6
+ it 'returns the concatenated body' do
7
7
  mock_app do
8
8
  get('/') do
9
9
  stream do |out|
@@ -41,18 +41,18 @@ class StreamingTest < Test::Unit::TestCase
41
41
  it 'calls the callback after it is done' do
42
42
  step = 0
43
43
  final = 0
44
- stream = Stream.new { |o| 10.times { step += 1 }}
44
+ stream = Stream.new { |_| 10.times { step += 1 }}
45
45
  stream.callback { final = step }
46
- stream.each { |str| }
46
+ stream.each {|_|}
47
47
  assert_equal 10, final
48
48
  end
49
49
 
50
50
  it 'does not trigger the callback if close is set to :keep_open' do
51
51
  step = 0
52
52
  final = 0
53
- stream = Stream.new(Stream, :keep_open) { |o| 10.times { step += 1 } }
53
+ stream = Stream.new(Stream, :keep_open) { |_| 10.times { step += 1 } }
54
54
  stream.callback { final = step }
55
- stream.each { |str| }
55
+ stream.each {|_|}
56
56
  assert_equal 0, final
57
57
  end
58
58
 
@@ -61,7 +61,7 @@ class StreamingTest < Test::Unit::TestCase
61
61
  stream = Stream.new { }
62
62
  stream.callback { a = true }
63
63
  stream.callback { b = true }
64
- stream.each { |str| }
64
+ stream.each {|_| }
65
65
  assert a, 'should trigger first callback'
66
66
  assert b, 'should trigger second callback'
67
67
  end
@@ -110,7 +110,7 @@ class StreamingTest < Test::Unit::TestCase
110
110
 
111
111
  it 'does not trigger an infinite loop if you call close in a callback' do
112
112
  stream = Stream.new { |out| out.callback { out.close }}
113
- stream.each { |str| }
113
+ stream.each { |_| }
114
114
  end
115
115
 
116
116
  it 'gives access to route specific params' do
@@ -223,16 +223,13 @@ class TemplatesTest < Test::Unit::TestCase
223
223
  end
224
224
 
225
225
  it 'sets layout-only options via layout_options' do
226
- mock_app do
227
- get '/' do
228
- render(:str, :in_a,
229
- :views => settings.views + '/a',
230
- :layout_options => { :views => settings.views },
231
- :layout => :layout2)
232
- end
226
+ render_app do
227
+ render(:str, :in_a,
228
+ :views => settings.views + '/a',
229
+ :layout_options => { :views => settings.views },
230
+ :layout => :layout2)
233
231
  end
234
232
 
235
- get '/'
236
233
  assert ok?
237
234
  assert_equal "<h1>String Layout!</h1>\nGimme an A!\n", body
238
235
  end
@@ -284,7 +281,7 @@ class TemplatesTest < Test::Unit::TestCase
284
281
  assert_equal 'template in subclass', body
285
282
  end
286
283
 
287
- it "is possible to use a different engine for the layout than for the template itself explicitely" do
284
+ it "is possible to use a different engine for the layout than for the template itself explicitly" do
288
285
  render_app do
289
286
  settings.template(:layout) { 'Hello <%= yield %>!' }
290
287
  render :str, "<%= 'World' %>", :layout_engine => :erb
@@ -63,7 +63,7 @@ class WLangTest < Test::Unit::TestCase
63
63
  assert_body "WLang Layout!\nHello World"
64
64
  end
65
65
 
66
- it "can rendere truly nested layouts by accepting a layout and a block with the contents" do
66
+ it "can rendered truly nested layouts by accepting a layout and a block with the contents" do
67
67
  mock_app do
68
68
  template(:main_outer_layout) { "<h1>Title</h1>\n>{ yield }" }
69
69
  template(:an_inner_layout) { "<h2>Subtitle</h2>\n>{ yield }" }
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.d
5
- prerelease: 6
4
+ version: 1.4.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Blake Mizerany
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-03-09 00:00:00.000000000 Z
15
+ date: 2013-03-15 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rack
@@ -236,13 +236,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
236
236
  version: '0'
237
237
  segments:
238
238
  - 0
239
- hash: -2481345757706038995
239
+ hash: -99514115148589374
240
240
  required_rubygems_version: !ruby/object:Gem::Requirement
241
241
  none: false
242
242
  requirements:
243
- - - ! '>'
243
+ - - ! '>='
244
244
  - !ruby/object:Gem::Version
245
- version: 1.3.1
245
+ version: '0'
246
+ segments:
247
+ - 0
248
+ hash: -99514115148589374
246
249
  requirements: []
247
250
  rubyforge_project:
248
251
  rubygems_version: 1.8.23