sections_rails 0.6.12 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,8 +3,8 @@ module SectionsRails
3
3
  require "sections_rails/section"
4
4
  require "sections_rails/railtie" if defined?(Rails)
5
5
 
6
- def section name, options = {}
7
- SectionsRails::Section.new(name, self, options).render
6
+ def section name, options = {}, &block
7
+ SectionsRails::Section.new(name, self, options, block).render
8
8
  end
9
9
  end
10
10
 
@@ -4,9 +4,13 @@ module SectionsRails
4
4
 
5
5
  class Section
6
6
 
7
- def initialize section_name, view = nil, options = {}
7
+ def initialize section_name, view = nil, options = {}, block = nil
8
8
  @section_name = section_name.to_s
9
9
  @options = options
10
+ if block
11
+ @options[:locals] ||= {}
12
+ @options[:locals][:block] = block
13
+ end
10
14
 
11
15
  # This is necessary for running view helper methods.
12
16
  @view = view
@@ -1,3 +1,3 @@
1
1
  module SectionsRails
2
- VERSION = "0.6.12"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -26,7 +26,7 @@ describe PartialsController do
26
26
  end
27
27
  end
28
28
 
29
- context 'providing a custom partial name' do
29
+ describe 'providing a custom partial name' do
30
30
  before :each do
31
31
  get :custom_partial
32
32
  end
@@ -40,7 +40,7 @@ describe PartialsController do
40
40
  end
41
41
  end
42
42
 
43
- context 'disabling partials for a section' do
43
+ describe 'disabling partials for a section' do
44
44
  before :each do
45
45
  get :disabled
46
46
  end
@@ -54,7 +54,7 @@ describe PartialsController do
54
54
  end
55
55
  end
56
56
 
57
- context 'production mode' do
57
+ describe 'production mode' do
58
58
 
59
59
  before :each do
60
60
  Rails.env = 'production'
@@ -69,6 +69,13 @@ describe PartialsController do
69
69
  response.body.strip.should include 'partial content'
70
70
  end
71
71
  end
72
+
73
+ describe 'partial with block' do
74
+ it 'allows to render the block inside the partial' do
75
+ get :partial_with_block
76
+ response.body.strip.should == "partial line 1.\nblock content.\npartial line 2."
77
+ end
78
+ end
72
79
  end
73
80
 
74
81
 
@@ -17,4 +17,7 @@ class PartialsController < ApplicationController
17
17
 
18
18
  def production_mode
19
19
  end
20
+
21
+ def partial_with_block
22
+ end
20
23
  end
@@ -0,0 +1,2 @@
1
+ = section 'partials/partial_with_block' do
2
+ block content.
@@ -17036,3 +17036,508 @@ Completed 200 OK in 3ms (Views: 2.4ms)
17036
17036
  Processing by ViewTypesController#haml as HTML
17037
17037
  Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.0ms)
17038
17038
  Completed 200 OK in 2ms (Views: 2.3ms)
17039
+ Processing by ErrorsController#missing_section as HTML
17040
+ Rendered errors/missing_section.html.erb within layouts/application (0.8ms)
17041
+ Completed 500 Internal Server Error in 10ms
17042
+ Processing by PartialsController#erb_section as HTML
17043
+ Rendered /Users/kevin/sections_rails/app/sections/partials/erb_section/_erb_section.html.erb (0.3ms)
17044
+ Completed 200 OK in 7ms (Views: 6.9ms)
17045
+ Processing by PartialsController#haml_section as HTML
17046
+ Rendered /Users/kevin/sections_rails/app/sections/partials/haml_section/_haml_section.html.haml (0.6ms)
17047
+ Completed 200 OK in 4ms (Views: 4.0ms)
17048
+ Processing by PartialsController#no_options as HTML
17049
+ Rendered /Users/kevin/sections_rails/app/sections/partials/no_options/_no_options.html.erb (0.2ms)
17050
+ Completed 200 OK in 4ms (Views: 3.3ms)
17051
+ Processing by PartialsController#custom_partial as HTML
17052
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.2ms)
17053
+ Completed 200 OK in 4ms (Views: 3.6ms)
17054
+ Processing by PartialsController#custom_partial as HTML
17055
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.0ms)
17056
+ Completed 200 OK in 2ms (Views: 1.7ms)
17057
+ Processing by PartialsController#disabled as HTML
17058
+ Completed 200 OK in 2ms (Views: 1.9ms)
17059
+ Processing by PartialsController#disabled as HTML
17060
+ Completed 200 OK in 1ms (Views: 1.2ms)
17061
+ Processing by PartialsController#production_mode as HTML
17062
+ Rendered /Users/kevin/sections_rails/app/sections/partials/production_mode/_production_mode.html.erb (0.2ms)
17063
+ Completed 200 OK in 4ms (Views: 3.4ms)
17064
+ Processing by ScriptAssetsController#javascript as HTML
17065
+ Completed 200 OK in 5ms (Views: 4.4ms)
17066
+ Processing by ScriptAssetsController#coffeescript as HTML
17067
+ Completed 200 OK in 4ms (Views: 4.1ms)
17068
+ Processing by ScriptAssetsController#custom_script as HTML
17069
+ Completed 200 OK in 5ms (Views: 4.4ms)
17070
+ Processing by ScriptAssetsController#custom_script as HTML
17071
+ Completed 200 OK in 3ms (Views: 3.1ms)
17072
+ Processing by ScriptAssetsController#no_script as HTML
17073
+ Completed 200 OK in 2ms (Views: 2.1ms)
17074
+ Processing by ScriptAssetsController#production_mode as HTML
17075
+ Completed 200 OK in 2ms (Views: 2.0ms)
17076
+ Processing by StyleAssetsController#css as HTML
17077
+ Completed 200 OK in 5ms (Views: 4.4ms)
17078
+ Processing by StyleAssetsController#sass as HTML
17079
+ Completed 200 OK in 5ms (Views: 4.3ms)
17080
+ Processing by StyleAssetsController#css_sass as HTML
17081
+ Completed 200 OK in 5ms (Views: 4.5ms)
17082
+ Processing by StyleAssetsController#scss as HTML
17083
+ Completed 200 OK in 5ms (Views: 4.4ms)
17084
+ Processing by StyleAssetsController#css_scss as HTML
17085
+ Completed 200 OK in 4ms (Views: 4.2ms)
17086
+ Processing by StyleAssetsController#custom_style as HTML
17087
+ Completed 200 OK in 4ms (Views: 4.3ms)
17088
+ Processing by StyleAssetsController#custom_style as HTML
17089
+ Completed 200 OK in 3ms (Views: 3.3ms)
17090
+ Processing by StyleAssetsController#no_style as HTML
17091
+ Completed 200 OK in 2ms (Views: 2.3ms)
17092
+ Processing by StyleAssetsController#production_mode as HTML
17093
+ Completed 200 OK in 2ms (Views: 2.3ms)
17094
+ Processing by ViewTypesController#erb as HTML
17095
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.3ms)
17096
+ Completed 200 OK in 4ms (Views: 4.1ms)
17097
+ Processing by ViewTypesController#haml as HTML
17098
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.0ms)
17099
+ Completed 200 OK in 3ms (Views: 3.1ms)
17100
+ Processing by ErrorsController#missing_section as HTML
17101
+ Rendered errors/missing_section.html.erb within layouts/application (0.9ms)
17102
+ Completed 500 Internal Server Error in 8ms
17103
+ Processing by PartialsController#erb_section as HTML
17104
+ Rendered /Users/kevin/sections_rails/app/sections/partials/erb_section/_erb_section.html.erb (0.2ms)
17105
+ Completed 200 OK in 6ms (Views: 6.1ms)
17106
+ Processing by PartialsController#haml_section as HTML
17107
+ Rendered /Users/kevin/sections_rails/app/sections/partials/haml_section/_haml_section.html.haml (0.6ms)
17108
+ Completed 200 OK in 4ms (Views: 3.6ms)
17109
+ Processing by PartialsController#no_options as HTML
17110
+ Rendered /Users/kevin/sections_rails/app/sections/partials/no_options/_no_options.html.erb (0.2ms)
17111
+ Completed 200 OK in 3ms (Views: 2.7ms)
17112
+ Processing by PartialsController#custom_partial as HTML
17113
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.3ms)
17114
+ Completed 200 OK in 7ms (Views: 7.2ms)
17115
+ Processing by PartialsController#custom_partial as HTML
17116
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.0ms)
17117
+ Completed 200 OK in 2ms (Views: 1.9ms)
17118
+ Processing by PartialsController#disabled as HTML
17119
+ Completed 200 OK in 2ms (Views: 1.4ms)
17120
+ Processing by PartialsController#disabled as HTML
17121
+ Completed 200 OK in 1ms (Views: 1.2ms)
17122
+ Processing by PartialsController#production_mode as HTML
17123
+ Rendered /Users/kevin/sections_rails/app/sections/partials/production_mode/_production_mode.html.erb (0.2ms)
17124
+ Completed 200 OK in 4ms (Views: 4.3ms)
17125
+ Processing by ScriptAssetsController#javascript as HTML
17126
+ Completed 200 OK in 5ms (Views: 5.2ms)
17127
+ Processing by ScriptAssetsController#coffeescript as HTML
17128
+ Completed 200 OK in 5ms (Views: 4.5ms)
17129
+ Processing by ScriptAssetsController#custom_script as HTML
17130
+ Completed 200 OK in 4ms (Views: 3.5ms)
17131
+ Processing by ScriptAssetsController#custom_script as HTML
17132
+ Completed 200 OK in 3ms (Views: 3.0ms)
17133
+ Processing by ScriptAssetsController#no_script as HTML
17134
+ Completed 200 OK in 2ms (Views: 2.2ms)
17135
+ Processing by ScriptAssetsController#production_mode as HTML
17136
+ Completed 200 OK in 2ms (Views: 2.0ms)
17137
+ Processing by StyleAssetsController#css as HTML
17138
+ Completed 200 OK in 5ms (Views: 4.5ms)
17139
+ Processing by StyleAssetsController#sass as HTML
17140
+ Completed 200 OK in 5ms (Views: 4.3ms)
17141
+ Processing by StyleAssetsController#css_sass as HTML
17142
+ Completed 200 OK in 24ms (Views: 24.0ms)
17143
+ Processing by StyleAssetsController#scss as HTML
17144
+ Completed 200 OK in 5ms (Views: 4.3ms)
17145
+ Processing by StyleAssetsController#css_scss as HTML
17146
+ Completed 200 OK in 4ms (Views: 4.2ms)
17147
+ Processing by StyleAssetsController#custom_style as HTML
17148
+ Completed 200 OK in 4ms (Views: 3.5ms)
17149
+ Processing by StyleAssetsController#custom_style as HTML
17150
+ Completed 200 OK in 3ms (Views: 3.2ms)
17151
+ Processing by StyleAssetsController#no_style as HTML
17152
+ Completed 200 OK in 2ms (Views: 2.3ms)
17153
+ Processing by StyleAssetsController#production_mode as HTML
17154
+ Completed 200 OK in 2ms (Views: 2.2ms)
17155
+ Processing by ViewTypesController#erb as HTML
17156
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.2ms)
17157
+ Completed 200 OK in 4ms (Views: 3.7ms)
17158
+ Processing by ViewTypesController#haml as HTML
17159
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.0ms)
17160
+ Completed 200 OK in 3ms (Views: 3.0ms)
17161
+ Processing by ErrorsController#missing_section as HTML
17162
+ Rendered errors/missing_section.html.erb within layouts/application (0.7ms)
17163
+ Completed 500 Internal Server Error in 6ms
17164
+ Processing by PartialsController#erb_section as HTML
17165
+ Rendered /Users/kevin/sections_rails/app/sections/partials/erb_section/_erb_section.html.erb (0.2ms)
17166
+ Completed 200 OK in 5ms (Views: 4.4ms)
17167
+ Processing by PartialsController#haml_section as HTML
17168
+ Rendered /Users/kevin/sections_rails/app/sections/partials/haml_section/_haml_section.html.haml (0.6ms)
17169
+ Completed 200 OK in 3ms (Views: 2.6ms)
17170
+ Processing by PartialsController#no_options as HTML
17171
+ Rendered /Users/kevin/sections_rails/app/sections/partials/no_options/_no_options.html.erb (0.2ms)
17172
+ Completed 200 OK in 2ms (Views: 2.0ms)
17173
+ Processing by PartialsController#custom_partial as HTML
17174
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.2ms)
17175
+ Completed 200 OK in 2ms (Views: 2.3ms)
17176
+ Processing by PartialsController#custom_partial as HTML
17177
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.0ms)
17178
+ Completed 200 OK in 2ms (Views: 1.7ms)
17179
+ Processing by PartialsController#disabled as HTML
17180
+ Completed 200 OK in 2ms (Views: 1.4ms)
17181
+ Processing by PartialsController#disabled as HTML
17182
+ Completed 200 OK in 1ms (Views: 1.1ms)
17183
+ Processing by PartialsController#production_mode as HTML
17184
+ Rendered /Users/kevin/sections_rails/app/sections/partials/production_mode/_production_mode.html.erb (0.2ms)
17185
+ Completed 200 OK in 2ms (Views: 2.2ms)
17186
+ Processing by PartialsController#partial_with_block as HTML
17187
+ Completed 500 Internal Server Error in 1ms
17188
+ Processing by ScriptAssetsController#javascript as HTML
17189
+ Completed 200 OK in 4ms (Views: 3.9ms)
17190
+ Processing by ScriptAssetsController#coffeescript as HTML
17191
+ Completed 200 OK in 4ms (Views: 3.4ms)
17192
+ Processing by ScriptAssetsController#custom_script as HTML
17193
+ Completed 200 OK in 4ms (Views: 3.4ms)
17194
+ Processing by ScriptAssetsController#custom_script as HTML
17195
+ Completed 200 OK in 4ms (Views: 3.5ms)
17196
+ Processing by ScriptAssetsController#no_script as HTML
17197
+ Completed 200 OK in 2ms (Views: 1.5ms)
17198
+ Processing by ScriptAssetsController#production_mode as HTML
17199
+ Completed 200 OK in 2ms (Views: 1.5ms)
17200
+ Processing by StyleAssetsController#css as HTML
17201
+ Completed 200 OK in 4ms (Views: 3.8ms)
17202
+ Processing by StyleAssetsController#sass as HTML
17203
+ Completed 200 OK in 4ms (Views: 3.8ms)
17204
+ Processing by StyleAssetsController#css_sass as HTML
17205
+ Completed 200 OK in 23ms (Views: 3.9ms)
17206
+ Processing by StyleAssetsController#scss as HTML
17207
+ Completed 200 OK in 4ms (Views: 3.6ms)
17208
+ Processing by StyleAssetsController#css_scss as HTML
17209
+ Completed 200 OK in 3ms (Views: 3.2ms)
17210
+ Processing by StyleAssetsController#custom_style as HTML
17211
+ Completed 200 OK in 3ms (Views: 3.3ms)
17212
+ Processing by StyleAssetsController#custom_style as HTML
17213
+ Completed 200 OK in 3ms (Views: 3.1ms)
17214
+ Processing by StyleAssetsController#no_style as HTML
17215
+ Completed 200 OK in 2ms (Views: 1.5ms)
17216
+ Processing by StyleAssetsController#production_mode as HTML
17217
+ Completed 200 OK in 1ms (Views: 1.3ms)
17218
+ Processing by ViewTypesController#erb as HTML
17219
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.2ms)
17220
+ Completed 200 OK in 2ms (Views: 2.3ms)
17221
+ Processing by ViewTypesController#haml as HTML
17222
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.0ms)
17223
+ Completed 200 OK in 3ms (Views: 2.5ms)
17224
+ Processing by ErrorsController#missing_section as HTML
17225
+ Rendered errors/missing_section.html.erb within layouts/application (0.7ms)
17226
+ Completed 500 Internal Server Error in 6ms
17227
+ Processing by PartialsController#erb_section as HTML
17228
+ Rendered /Users/kevin/sections_rails/app/sections/partials/erb_section/_erb_section.html.erb (0.2ms)
17229
+ Completed 200 OK in 4ms (Views: 4.2ms)
17230
+ Processing by PartialsController#haml_section as HTML
17231
+ Rendered /Users/kevin/sections_rails/app/sections/partials/haml_section/_haml_section.html.haml (0.6ms)
17232
+ Completed 200 OK in 3ms (Views: 2.6ms)
17233
+ Processing by PartialsController#no_options as HTML
17234
+ Rendered /Users/kevin/sections_rails/app/sections/partials/no_options/_no_options.html.erb (0.2ms)
17235
+ Completed 200 OK in 2ms (Views: 2.1ms)
17236
+ Processing by PartialsController#custom_partial as HTML
17237
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.2ms)
17238
+ Completed 200 OK in 2ms (Views: 2.3ms)
17239
+ Processing by PartialsController#custom_partial as HTML
17240
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.0ms)
17241
+ Completed 200 OK in 2ms (Views: 1.6ms)
17242
+ Processing by PartialsController#disabled as HTML
17243
+ Completed 200 OK in 2ms (Views: 1.4ms)
17244
+ Processing by PartialsController#disabled as HTML
17245
+ Completed 200 OK in 1ms (Views: 1.1ms)
17246
+ Processing by PartialsController#production_mode as HTML
17247
+ Rendered /Users/kevin/sections_rails/app/sections/partials/production_mode/_production_mode.html.erb (0.2ms)
17248
+ Completed 200 OK in 2ms (Views: 2.3ms)
17249
+ Processing by PartialsController#partial_with_block as HTML
17250
+ Rendered /Users/kevin/sections_rails/app/sections/partials/partial_with_block/_partial_with_block.html.haml (0.7ms)
17251
+ Completed 200 OK in 3ms (Views: 3.2ms)
17252
+ Processing by ScriptAssetsController#javascript as HTML
17253
+ Completed 200 OK in 4ms (Views: 3.7ms)
17254
+ Processing by ScriptAssetsController#coffeescript as HTML
17255
+ Completed 200 OK in 4ms (Views: 3.7ms)
17256
+ Processing by ScriptAssetsController#custom_script as HTML
17257
+ Completed 200 OK in 4ms (Views: 3.5ms)
17258
+ Processing by ScriptAssetsController#custom_script as HTML
17259
+ Completed 200 OK in 3ms (Views: 3.2ms)
17260
+ Processing by ScriptAssetsController#no_script as HTML
17261
+ Completed 200 OK in 2ms (Views: 1.5ms)
17262
+ Processing by ScriptAssetsController#production_mode as HTML
17263
+ Completed 200 OK in 2ms (Views: 1.5ms)
17264
+ Processing by StyleAssetsController#css as HTML
17265
+ Completed 200 OK in 4ms (Views: 3.6ms)
17266
+ Processing by StyleAssetsController#sass as HTML
17267
+ Completed 200 OK in 4ms (Views: 3.5ms)
17268
+ Processing by StyleAssetsController#css_sass as HTML
17269
+ Completed 200 OK in 4ms (Views: 3.9ms)
17270
+ Processing by StyleAssetsController#scss as HTML
17271
+ Completed 200 OK in 3ms (Views: 3.2ms)
17272
+ Processing by StyleAssetsController#css_scss as HTML
17273
+ Completed 200 OK in 4ms (Views: 3.5ms)
17274
+ Processing by StyleAssetsController#custom_style as HTML
17275
+ Completed 200 OK in 4ms (Views: 3.6ms)
17276
+ Processing by StyleAssetsController#custom_style as HTML
17277
+ Completed 200 OK in 3ms (Views: 3.1ms)
17278
+ Processing by StyleAssetsController#no_style as HTML
17279
+ Completed 200 OK in 2ms (Views: 1.4ms)
17280
+ Processing by StyleAssetsController#production_mode as HTML
17281
+ Completed 200 OK in 1ms (Views: 1.3ms)
17282
+ Processing by ViewTypesController#erb as HTML
17283
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.2ms)
17284
+ Completed 200 OK in 2ms (Views: 2.2ms)
17285
+ Processing by ViewTypesController#haml as HTML
17286
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.0ms)
17287
+ Completed 200 OK in 3ms (Views: 2.4ms)
17288
+ Processing by ErrorsController#missing_section as HTML
17289
+ Rendered errors/missing_section.html.erb within layouts/application (0.7ms)
17290
+ Completed 500 Internal Server Error in 6ms
17291
+ Processing by PartialsController#erb_section as HTML
17292
+ Rendered /Users/kevin/sections_rails/app/sections/partials/erb_section/_erb_section.html.erb (0.2ms)
17293
+ Completed 200 OK in 4ms (Views: 4.1ms)
17294
+ Processing by PartialsController#haml_section as HTML
17295
+ Rendered /Users/kevin/sections_rails/app/sections/partials/haml_section/_haml_section.html.haml (0.6ms)
17296
+ Completed 200 OK in 3ms (Views: 2.6ms)
17297
+ Processing by PartialsController#no_options as HTML
17298
+ Rendered /Users/kevin/sections_rails/app/sections/partials/no_options/_no_options.html.erb (0.2ms)
17299
+ Completed 200 OK in 2ms (Views: 2.0ms)
17300
+ Processing by PartialsController#custom_partial as HTML
17301
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.2ms)
17302
+ Completed 200 OK in 2ms (Views: 2.2ms)
17303
+ Processing by PartialsController#custom_partial as HTML
17304
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.0ms)
17305
+ Completed 200 OK in 2ms (Views: 1.8ms)
17306
+ Processing by PartialsController#disabled as HTML
17307
+ Completed 200 OK in 2ms (Views: 1.4ms)
17308
+ Processing by PartialsController#disabled as HTML
17309
+ Completed 200 OK in 1ms (Views: 1.1ms)
17310
+ Processing by PartialsController#production_mode as HTML
17311
+ Rendered /Users/kevin/sections_rails/app/sections/partials/production_mode/_production_mode.html.erb (0.2ms)
17312
+ Completed 200 OK in 2ms (Views: 2.1ms)
17313
+ Processing by PartialsController#partial_with_block as HTML
17314
+ Rendered /Users/kevin/sections_rails/app/sections/partials/partial_with_block/_partial_with_block.html.haml (0.7ms)
17315
+ Completed 200 OK in 3ms (Views: 3.1ms)
17316
+ Processing by ScriptAssetsController#javascript as HTML
17317
+ Completed 200 OK in 4ms (Views: 4.2ms)
17318
+ Processing by ScriptAssetsController#coffeescript as HTML
17319
+ Completed 200 OK in 4ms (Views: 3.4ms)
17320
+ Processing by ScriptAssetsController#custom_script as HTML
17321
+ Completed 200 OK in 4ms (Views: 3.5ms)
17322
+ Processing by ScriptAssetsController#custom_script as HTML
17323
+ Completed 200 OK in 3ms (Views: 3.4ms)
17324
+ Processing by ScriptAssetsController#no_script as HTML
17325
+ Completed 200 OK in 2ms (Views: 1.5ms)
17326
+ Processing by ScriptAssetsController#production_mode as HTML
17327
+ Completed 200 OK in 2ms (Views: 1.4ms)
17328
+ Processing by StyleAssetsController#css as HTML
17329
+ Completed 200 OK in 4ms (Views: 3.9ms)
17330
+ Processing by StyleAssetsController#sass as HTML
17331
+ Completed 200 OK in 4ms (Views: 3.5ms)
17332
+ Processing by StyleAssetsController#css_sass as HTML
17333
+ Completed 200 OK in 4ms (Views: 3.7ms)
17334
+ Processing by StyleAssetsController#scss as HTML
17335
+ Completed 200 OK in 4ms (Views: 3.7ms)
17336
+ Processing by StyleAssetsController#css_scss as HTML
17337
+ Completed 200 OK in 3ms (Views: 3.3ms)
17338
+ Processing by StyleAssetsController#custom_style as HTML
17339
+ Completed 200 OK in 3ms (Views: 3.3ms)
17340
+ Processing by StyleAssetsController#custom_style as HTML
17341
+ Completed 200 OK in 3ms (Views: 3.4ms)
17342
+ Processing by StyleAssetsController#no_style as HTML
17343
+ Completed 200 OK in 2ms (Views: 1.6ms)
17344
+ Processing by StyleAssetsController#production_mode as HTML
17345
+ Completed 200 OK in 2ms (Views: 1.4ms)
17346
+ Processing by ViewTypesController#erb as HTML
17347
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.2ms)
17348
+ Completed 200 OK in 2ms (Views: 2.3ms)
17349
+ Processing by ViewTypesController#haml as HTML
17350
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.0ms)
17351
+ Completed 200 OK in 2ms (Views: 2.3ms)
17352
+ Processing by ErrorsController#missing_section as HTML
17353
+ Rendered errors/missing_section.html.erb within layouts/application (0.8ms)
17354
+ Completed 500 Internal Server Error in 6ms
17355
+ Processing by PartialsController#erb_section as HTML
17356
+ Rendered /Users/kevin/sections_rails/app/sections/partials/erb_section/_erb_section.html.erb (0.2ms)
17357
+ Completed 200 OK in 4ms (Views: 3.9ms)
17358
+ Processing by PartialsController#haml_section as HTML
17359
+ Rendered /Users/kevin/sections_rails/app/sections/partials/haml_section/_haml_section.html.haml (0.6ms)
17360
+ Completed 200 OK in 3ms (Views: 2.8ms)
17361
+ Processing by PartialsController#no_options as HTML
17362
+ Rendered /Users/kevin/sections_rails/app/sections/partials/no_options/_no_options.html.erb (0.2ms)
17363
+ Completed 200 OK in 2ms (Views: 2.3ms)
17364
+ Processing by PartialsController#custom_partial as HTML
17365
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.2ms)
17366
+ Completed 200 OK in 2ms (Views: 2.3ms)
17367
+ Processing by PartialsController#custom_partial as HTML
17368
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.0ms)
17369
+ Completed 200 OK in 2ms (Views: 1.6ms)
17370
+ Processing by PartialsController#disabled as HTML
17371
+ Completed 200 OK in 2ms (Views: 1.4ms)
17372
+ Processing by PartialsController#disabled as HTML
17373
+ Completed 200 OK in 1ms (Views: 1.1ms)
17374
+ Processing by PartialsController#production_mode as HTML
17375
+ Rendered /Users/kevin/sections_rails/app/sections/partials/production_mode/_production_mode.html.erb (0.2ms)
17376
+ Completed 200 OK in 2ms (Views: 2.2ms)
17377
+ Processing by PartialsController#partial_with_block as HTML
17378
+ Rendered /Users/kevin/sections_rails/app/sections/partials/partial_with_block/_partial_with_block.html.haml (0.7ms)
17379
+ Completed 200 OK in 3ms (Views: 3.1ms)
17380
+ Processing by ScriptAssetsController#javascript as HTML
17381
+ Completed 200 OK in 4ms (Views: 4.0ms)
17382
+ Processing by ScriptAssetsController#coffeescript as HTML
17383
+ Completed 200 OK in 4ms (Views: 3.6ms)
17384
+ Processing by ScriptAssetsController#custom_script as HTML
17385
+ Completed 200 OK in 4ms (Views: 3.6ms)
17386
+ Processing by ScriptAssetsController#custom_script as HTML
17387
+ Completed 200 OK in 3ms (Views: 3.4ms)
17388
+ Processing by ScriptAssetsController#no_script as HTML
17389
+ Completed 200 OK in 2ms (Views: 1.6ms)
17390
+ Processing by ScriptAssetsController#production_mode as HTML
17391
+ Completed 200 OK in 1ms (Views: 1.3ms)
17392
+ Processing by StyleAssetsController#css as HTML
17393
+ Completed 200 OK in 4ms (Views: 3.8ms)
17394
+ Processing by StyleAssetsController#sass as HTML
17395
+ Completed 200 OK in 4ms (Views: 3.3ms)
17396
+ Processing by StyleAssetsController#css_sass as HTML
17397
+ Completed 200 OK in 4ms (Views: 3.9ms)
17398
+ Processing by StyleAssetsController#scss as HTML
17399
+ Completed 200 OK in 4ms (Views: 3.4ms)
17400
+ Processing by StyleAssetsController#css_scss as HTML
17401
+ Completed 200 OK in 4ms (Views: 3.6ms)
17402
+ Processing by StyleAssetsController#custom_style as HTML
17403
+ Completed 200 OK in 4ms (Views: 3.4ms)
17404
+ Processing by StyleAssetsController#custom_style as HTML
17405
+ Completed 200 OK in 3ms (Views: 2.9ms)
17406
+ Processing by StyleAssetsController#no_style as HTML
17407
+ Completed 200 OK in 2ms (Views: 1.5ms)
17408
+ Processing by StyleAssetsController#production_mode as HTML
17409
+ Completed 200 OK in 2ms (Views: 1.4ms)
17410
+ Processing by ViewTypesController#erb as HTML
17411
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.2ms)
17412
+ Completed 200 OK in 2ms (Views: 2.3ms)
17413
+ Processing by ViewTypesController#haml as HTML
17414
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.0ms)
17415
+ Completed 200 OK in 2ms (Views: 2.4ms)
17416
+ Processing by ErrorsController#missing_section as HTML
17417
+ Rendered errors/missing_section.html.erb within layouts/application (0.7ms)
17418
+ Completed 500 Internal Server Error in 6ms
17419
+ Processing by PartialsController#erb_section as HTML
17420
+ Rendered /Users/kevin/sections_rails/app/sections/partials/erb_section/_erb_section.html.erb (0.2ms)
17421
+ Completed 200 OK in 4ms (Views: 4.3ms)
17422
+ Processing by PartialsController#haml_section as HTML
17423
+ Rendered /Users/kevin/sections_rails/app/sections/partials/haml_section/_haml_section.html.haml (0.5ms)
17424
+ Completed 200 OK in 3ms (Views: 2.6ms)
17425
+ Processing by PartialsController#no_options as HTML
17426
+ Rendered /Users/kevin/sections_rails/app/sections/partials/no_options/_no_options.html.erb (0.2ms)
17427
+ Completed 200 OK in 2ms (Views: 2.0ms)
17428
+ Processing by PartialsController#custom_partial as HTML
17429
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.2ms)
17430
+ Completed 200 OK in 3ms (Views: 2.4ms)
17431
+ Processing by PartialsController#custom_partial as HTML
17432
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.0ms)
17433
+ Completed 200 OK in 2ms (Views: 1.6ms)
17434
+ Processing by PartialsController#disabled as HTML
17435
+ Completed 200 OK in 2ms (Views: 1.4ms)
17436
+ Processing by PartialsController#disabled as HTML
17437
+ Completed 200 OK in 1ms (Views: 1.3ms)
17438
+ Processing by PartialsController#production_mode as HTML
17439
+ Rendered /Users/kevin/sections_rails/app/sections/partials/production_mode/_production_mode.html.erb (0.2ms)
17440
+ Completed 200 OK in 2ms (Views: 2.2ms)
17441
+ Processing by PartialsController#partial_with_block as HTML
17442
+ Rendered /Users/kevin/sections_rails/app/sections/partials/partial_with_block/_partial_with_block.html.haml (0.7ms)
17443
+ Completed 200 OK in 3ms (Views: 3.2ms)
17444
+ Processing by ScriptAssetsController#javascript as HTML
17445
+ Completed 200 OK in 4ms (Views: 4.1ms)
17446
+ Processing by ScriptAssetsController#coffeescript as HTML
17447
+ Completed 200 OK in 4ms (Views: 3.6ms)
17448
+ Processing by ScriptAssetsController#custom_script as HTML
17449
+ Completed 200 OK in 4ms (Views: 3.4ms)
17450
+ Processing by ScriptAssetsController#custom_script as HTML
17451
+ Completed 200 OK in 3ms (Views: 3.1ms)
17452
+ Processing by ScriptAssetsController#no_script as HTML
17453
+ Completed 200 OK in 2ms (Views: 1.6ms)
17454
+ Processing by ScriptAssetsController#production_mode as HTML
17455
+ Completed 200 OK in 2ms (Views: 1.5ms)
17456
+ Processing by StyleAssetsController#css as HTML
17457
+ Completed 200 OK in 4ms (Views: 3.6ms)
17458
+ Processing by StyleAssetsController#sass as HTML
17459
+ Completed 200 OK in 4ms (Views: 3.6ms)
17460
+ Processing by StyleAssetsController#css_sass as HTML
17461
+ Completed 200 OK in 4ms (Views: 3.7ms)
17462
+ Processing by StyleAssetsController#scss as HTML
17463
+ Completed 200 OK in 4ms (Views: 3.5ms)
17464
+ Processing by StyleAssetsController#css_scss as HTML
17465
+ Completed 200 OK in 3ms (Views: 3.3ms)
17466
+ Processing by StyleAssetsController#custom_style as HTML
17467
+ Completed 200 OK in 4ms (Views: 3.4ms)
17468
+ Processing by StyleAssetsController#custom_style as HTML
17469
+ Completed 200 OK in 3ms (Views: 3.1ms)
17470
+ Processing by StyleAssetsController#no_style as HTML
17471
+ Completed 200 OK in 2ms (Views: 1.4ms)
17472
+ Processing by StyleAssetsController#production_mode as HTML
17473
+ Completed 200 OK in 1ms (Views: 1.3ms)
17474
+ Processing by ViewTypesController#erb as HTML
17475
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.2ms)
17476
+ Completed 200 OK in 2ms (Views: 2.3ms)
17477
+ Processing by ViewTypesController#haml as HTML
17478
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.0ms)
17479
+ Completed 200 OK in 2ms (Views: 2.3ms)
17480
+ Processing by ErrorsController#missing_section as HTML
17481
+ Rendered errors/missing_section.html.erb within layouts/application (0.7ms)
17482
+ Completed 500 Internal Server Error in 7ms
17483
+ Processing by PartialsController#erb_section as HTML
17484
+ Rendered /Users/kevin/sections_rails/app/sections/partials/erb_section/_erb_section.html.erb (15.6ms)
17485
+ Completed 200 OK in 20ms (Views: 19.6ms)
17486
+ Processing by PartialsController#haml_section as HTML
17487
+ Rendered /Users/kevin/sections_rails/app/sections/partials/haml_section/_haml_section.html.haml (0.6ms)
17488
+ Completed 200 OK in 3ms (Views: 2.7ms)
17489
+ Processing by PartialsController#no_options as HTML
17490
+ Rendered /Users/kevin/sections_rails/app/sections/partials/no_options/_no_options.html.erb (0.2ms)
17491
+ Completed 200 OK in 2ms (Views: 2.3ms)
17492
+ Processing by PartialsController#custom_partial as HTML
17493
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.2ms)
17494
+ Completed 200 OK in 2ms (Views: 2.3ms)
17495
+ Processing by PartialsController#custom_partial as HTML
17496
+ Rendered /Users/kevin/sections_rails/app/sections/partials/custom_partial/_different_name.html.erb (0.0ms)
17497
+ Completed 200 OK in 2ms (Views: 1.8ms)
17498
+ Processing by PartialsController#disabled as HTML
17499
+ Completed 200 OK in 2ms (Views: 1.3ms)
17500
+ Processing by PartialsController#disabled as HTML
17501
+ Completed 200 OK in 1ms (Views: 1.2ms)
17502
+ Processing by PartialsController#production_mode as HTML
17503
+ Rendered /Users/kevin/sections_rails/app/sections/partials/production_mode/_production_mode.html.erb (0.2ms)
17504
+ Completed 200 OK in 2ms (Views: 2.1ms)
17505
+ Processing by PartialsController#partial_with_block as HTML
17506
+ Rendered /Users/kevin/sections_rails/app/sections/partials/partial_with_block/_partial_with_block.html.haml (0.7ms)
17507
+ Completed 200 OK in 3ms (Views: 3.2ms)
17508
+ Processing by ScriptAssetsController#javascript as HTML
17509
+ Completed 200 OK in 4ms (Views: 4.1ms)
17510
+ Processing by ScriptAssetsController#coffeescript as HTML
17511
+ Completed 200 OK in 4ms (Views: 3.6ms)
17512
+ Processing by ScriptAssetsController#custom_script as HTML
17513
+ Completed 200 OK in 4ms (Views: 3.7ms)
17514
+ Processing by ScriptAssetsController#custom_script as HTML
17515
+ Completed 200 OK in 3ms (Views: 3.4ms)
17516
+ Processing by ScriptAssetsController#no_script as HTML
17517
+ Completed 200 OK in 2ms (Views: 1.5ms)
17518
+ Processing by ScriptAssetsController#production_mode as HTML
17519
+ Completed 200 OK in 2ms (Views: 1.4ms)
17520
+ Processing by StyleAssetsController#css as HTML
17521
+ Completed 200 OK in 4ms (Views: 3.8ms)
17522
+ Processing by StyleAssetsController#sass as HTML
17523
+ Completed 200 OK in 24ms (Views: 23.4ms)
17524
+ Processing by StyleAssetsController#css_sass as HTML
17525
+ Completed 200 OK in 4ms (Views: 3.6ms)
17526
+ Processing by StyleAssetsController#scss as HTML
17527
+ Completed 200 OK in 3ms (Views: 3.3ms)
17528
+ Processing by StyleAssetsController#css_scss as HTML
17529
+ Completed 200 OK in 4ms (Views: 3.4ms)
17530
+ Processing by StyleAssetsController#custom_style as HTML
17531
+ Completed 200 OK in 4ms (Views: 3.4ms)
17532
+ Processing by StyleAssetsController#custom_style as HTML
17533
+ Completed 200 OK in 3ms (Views: 3.2ms)
17534
+ Processing by StyleAssetsController#no_style as HTML
17535
+ Completed 200 OK in 2ms (Views: 1.6ms)
17536
+ Processing by StyleAssetsController#production_mode as HTML
17537
+ Completed 200 OK in 2ms (Views: 1.4ms)
17538
+ Processing by ViewTypesController#erb as HTML
17539
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.2ms)
17540
+ Completed 200 OK in 2ms (Views: 2.3ms)
17541
+ Processing by ViewTypesController#haml as HTML
17542
+ Rendered /Users/kevin/sections_rails/app/sections/view_types/foo/_foo.html.erb (0.0ms)
17543
+ Completed 200 OK in 3ms (Views: 2.5ms)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sections_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.12
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-28 00:00:00.000000000 Z
12
+ date: 2012-07-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70195575617860 !ruby/object:Gem::Requirement
16
+ requirement: &70129737667180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70195575617860
24
+ version_requirements: *70129737667180
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: haml
27
- requirement: &70195575617440 !ruby/object:Gem::Requirement
27
+ requirement: &70129737666760 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70195575617440
35
+ version_requirements: *70129737666760
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec-rails
38
- requirement: &70195575616980 !ruby/object:Gem::Requirement
38
+ requirement: &70129737666300 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70195575616980
46
+ version_requirements: *70129737666300
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: guard-rspec
49
- requirement: &70195575616560 !ruby/object:Gem::Requirement
49
+ requirement: &70129737665880 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70195575616560
57
+ version_requirements: *70129737665880
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rb-fsevent
60
- requirement: &70195575616140 !ruby/object:Gem::Requirement
60
+ requirement: &70129737665460 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70195575616140
68
+ version_requirements: *70129737665460
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sqlite3
71
- requirement: &70195575615720 !ruby/object:Gem::Requirement
71
+ requirement: &70129737665040 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70195575615720
79
+ version_requirements: *70129737665040
80
80
  description: Sections_rails adds infrastructure to the view layer of Ruby on Rails.
81
81
  It allows to define and use the HTML, CSS, and JavaScript code of dedicated sections
82
82
  of pages together in one place.
@@ -120,6 +120,7 @@ files:
120
120
  - spec/dummy/app/views/partials/erb_section.html.erb
121
121
  - spec/dummy/app/views/partials/haml_section.html.erb
122
122
  - spec/dummy/app/views/partials/no_options.html.erb
123
+ - spec/dummy/app/views/partials/partial_with_block.html.haml
123
124
  - spec/dummy/app/views/partials/production_mode.html.erb
124
125
  - spec/dummy/app/views/script_assets/coffeescript.html.erb
125
126
  - spec/dummy/app/views/script_assets/custom_script.html.erb
@@ -209,6 +210,7 @@ test_files:
209
210
  - spec/dummy/app/views/partials/erb_section.html.erb
210
211
  - spec/dummy/app/views/partials/haml_section.html.erb
211
212
  - spec/dummy/app/views/partials/no_options.html.erb
213
+ - spec/dummy/app/views/partials/partial_with_block.html.haml
212
214
  - spec/dummy/app/views/partials/production_mode.html.erb
213
215
  - spec/dummy/app/views/script_assets/coffeescript.html.erb
214
216
  - spec/dummy/app/views/script_assets/custom_script.html.erb