padrino-helpers 0.14.0 → 0.14.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b68d97255577ac8149b6bcb22bbd28d9c3d7e17c
4
- data.tar.gz: 963950d1cabb60cd1df99fa50d3e2a4ceef23479
3
+ metadata.gz: b7a9ae7a5e9911a727eabc62e66ef72b8968cffa
4
+ data.tar.gz: 75398beb2307394c8fdfd6835e79aacd001b635c
5
5
  SHA512:
6
- metadata.gz: 51a22336e7d329069ad6722eba3f853e2230e212105dcedd64b2dc417cb236d4776f9d7bf656ec8b849e9f4186b57af92c0d9eb45b40bc2c6e0456d299ee0fe8
7
- data.tar.gz: 0e020f0a6b89ed5d496b02c595ecee89849a63398cdfc599d738f43a0365f2d85e696b8b6886b1f78921cbb202bb518aaf0bbf34d408a677da3b86916f01beb8
6
+ metadata.gz: 2ba1b632a16819380b4aed481b1aa81531795ccb27e15074fb0a793a5fdd561bbdbd383324be79a573ad40006a805acadbc4ad9272c8d50693f210db865eed3f
7
+ data.tar.gz: 7027a278b5ec597a20547466b9e785c58faabe73c65bf5fd463e8d3682b48a76b842f97de8924d4b511f79e4bf1a8d434163835529117012436e2e43032ea41a
@@ -31,7 +31,7 @@ module Padrino
31
31
  # @note If using this from Sinatra, pass explicit +:engine+ option
32
32
  #
33
33
  def partial(template, options={}, &block)
34
- options = options.dup
34
+ options = { :layout => false }.update(options)
35
35
  explicit_engine = options.delete(:engine)
36
36
 
37
37
  path, _, name = template.to_s.rpartition(File::SEPARATOR)
@@ -107,4 +107,8 @@ class RenderDemo < Padrino::Application
107
107
  @ext = params[:ext]
108
108
  render "dive_outer_#{@ext}"
109
109
  end
110
+
111
+ get '/' do
112
+ render 'index'
113
+ end
110
114
  end
@@ -0,0 +1 @@
1
+ foo
@@ -0,0 +1 @@
1
+ = partial 'foo'
@@ -0,0 +1,5 @@
1
+ !!!
2
+ %html
3
+ %body
4
+ application
5
+ = yield
@@ -264,4 +264,11 @@ describe "RenderHelpers" do
264
264
  assert_equal '_none', Standalone4.new.partial('none')
265
265
  end
266
266
  end
267
+
268
+ describe 'partial in an application with layout' do
269
+ it 'should not render with default layout' do
270
+ get '/'
271
+ assert_response_has_tag 'body', :count => 1
272
+ end
273
+ end
267
274
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Padrino Team
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-03-15 00:00:00.000000000 Z
14
+ date: 2017-03-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: padrino-support
@@ -19,14 +19,14 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.14.0
22
+ version: 0.14.0.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.14.0
29
+ version: 0.14.0.1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: tilt
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -181,6 +181,7 @@ files:
181
181
  - test/fixtures/render_app/views/_deep.erb
182
182
  - test/fixtures/render_app/views/_deep.haml
183
183
  - test/fixtures/render_app/views/_deep.slim
184
+ - test/fixtures/render_app/views/_foo.haml
184
185
  - test/fixtures/render_app/views/_partial_block_erb.erb
185
186
  - test/fixtures/render_app/views/_partial_block_haml.haml
186
187
  - test/fixtures/render_app/views/_partial_block_slim.slim
@@ -202,6 +203,8 @@ files:
202
203
  - test/fixtures/render_app/views/erb/test.erb
203
204
  - test/fixtures/render_app/views/explicit_engine.haml
204
205
  - test/fixtures/render_app/views/haml/test.haml
206
+ - test/fixtures/render_app/views/index.haml
207
+ - test/fixtures/render_app/views/layouts/application.haml
205
208
  - test/fixtures/render_app/views/render_block_erb.erb
206
209
  - test/fixtures/render_app/views/render_block_haml.haml
207
210
  - test/fixtures/render_app/views/render_block_slim.slim