nestive 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0200b183fbe76ab5e0dcae655f1dee938ca6a48c
4
- data.tar.gz: 8375f916b82d46b4a5ba28ab250ce28ec20231ff
3
+ metadata.gz: 4064d02e51a535beb2cbefc6216888d1df24eb36
4
+ data.tar.gz: 03a374d63e0110f8d70a4f207ef30280153186fe
5
5
  SHA512:
6
- metadata.gz: f98ff228461f357decf5e00e6a299b3512ccef32eb18a8e007a2b35286ae2c6c2c439148c8af0d792a72d9e427a3d6af4b5cc630379f06cfaad1764dacca785f
7
- data.tar.gz: dd241f42e8cdbab0bbbbc922a864ab125a4854dda9bfbd69dc554d2d4191a57715e858ac4b36d93052cc381b6fd2055c9100c3284682d8f3281afdc4203f9d23
6
+ metadata.gz: be516002355aca6eeff0c28b4374c43f9eae327ccea98d58985c3c6c622f5cf6d5fc73a8058a430267ea0d65d8e40a8ab089e8dd8b75e5f6a9f72e3521387499
7
+ data.tar.gz: 9df4561d1a5d0531376f1c0a072611737cf847cefc0b4307699eaa68ff74d3d6e14939c02590cd6794c7a090f8d52086241a91135fd96153fdb2592694e50f64
data/README.md CHANGED
@@ -2,10 +2,18 @@
2
2
  ## A Nested Inheritable Layouts Helpers for Rails
3
3
 
4
4
 
5
- Nestive adds powerful layout and view helpers to your Rails app. It's similar to the nested layout technique [already documented in the Rails guides](http://guides.rubyonrails.org/layouts_and_rendering.html#using-nested-layouts) and found in many other nested layout plugins (a technique using `content_for` and rendering the parent layout at the end of the child layout). There's a bunch of problems with this technique, including:
6
-
7
- * you can only *append* content to the content buffer with `content_for` (you can't prepend to content, you can't replace it)
8
- * when combined with this nested layout technique, `content_for` actually *prepends* new content to the buffer, because each parent layout is rendered *after* it's child
5
+ Nestive adds powerful layout and view helpers to your Rails app. It's similar
6
+ to the nested layout technique [already documented in the Rails
7
+ guides](http://guides.rubyonrails.org/layouts_and_rendering.html#using-nested-layouts)
8
+ and found in many other nested layout plugins (a technique using `content_for`
9
+ and rendering the parent layout at the end of the child layout). There's a
10
+ bunch of problems with this technique, including:
11
+
12
+ * you can only *append* content to the content buffer with `content_for` (you
13
+ can't prepend to content, you can't replace it)
14
+ * when combined with this nested layout technique, `content_for` actually
15
+ *prepends* new content to the buffer, because each parent layout is rendered
16
+ *after* it's child
9
17
 
10
18
  Nestive is *better* because it addresses these problems.
11
19
 
@@ -13,15 +21,17 @@ Nestive is *better* because it addresses these problems.
13
21
 
14
22
  ### Declaring an area of content with `area`:
15
23
 
16
- The `area` helper is a lot like Rails' own `<%= yield :foo %>`, and is used in layouts to define and render a chunk of content in your layout:
24
+ The `area` helper is a lot like Rails' own `<%= yield :foo %>`, and is used in
25
+ layouts to define and render a chunk of content in your layout:
17
26
 
18
- ``` erb
27
+ ```erb
19
28
  <%= area :sidebar %>
20
29
  ```
21
30
 
22
- Unlike `yield`, `area` will allow your parent layouts to add content to the area at the same time using either a String or a block:
31
+ Unlike `yield`, `area` will allow your parent layouts to add content to the
32
+ area at the same time using either a String or a block:
23
33
 
24
- ``` erb
34
+ ```erb
25
35
  <%= area :sidebar, "Some Content Here" %>
26
36
 
27
37
  <%= area :sidebar do %>
@@ -29,13 +39,17 @@ Unlike `yield`, `area` will allow your parent layouts to add content to the area
29
39
  <% end %>
30
40
  ```
31
41
 
32
- It's important to note that this isn't *default* content, it *is* the content (unless a child changes it).
42
+ It's important to note that this isn't *default* content, it *is* the content
43
+ (unless a child changes it).
33
44
 
34
45
  ### Appending content to an area with `append`:
35
46
 
36
- The implementation details are quite different, but the `append` helper works much like Rails' built-in `content_for`. It will work with either a String or block, adding the new content onto the end of any content previously provided by parent layouts:
47
+ The implementation details are quite different, but the `append` helper works
48
+ much like Rails' built-in `content_for`. It will work with either a String or
49
+ block, adding the new content onto the end of any content previously provided
50
+ by parent layouts:
37
51
 
38
- ``` erb
52
+ ```erb
39
53
  <%= extends :application do %>
40
54
  <% append :sidebar, "More content." %>
41
55
  <% append :sidebar do %>
@@ -46,7 +60,8 @@ The implementation details are quite different, but the `append` helper works mu
46
60
 
47
61
  ### Prepending content to an area with `prepend`:
48
62
 
49
- Exactly what you think it is. The reverse of `append` (duh), adding the new content at the start of any content previously provided by parent layouts:
63
+ Exactly what you think it is. The reverse of `append` (duh), adding the new
64
+ content at the start of any content previously provided by parent layouts:
50
65
 
51
66
  ``` erb
52
67
  <%= extends :application do %>
@@ -72,10 +87,11 @@ You can also replace any content provided by parent layouts:
72
87
 
73
88
  ### Removing content with `purge`
74
89
 
75
- You can remove the content of the area:
90
+ You can remove the content in the single or in multiple areas
76
91
 
77
92
  ``` erb
78
93
  <% purge :sidebar %>
94
+ <% purge :sidebar, :banner %>
79
95
  ```
80
96
 
81
97
  ... which is equal to:
@@ -86,7 +102,9 @@ You can remove the content of the area:
86
102
 
87
103
  ### Extending a layout in a child layout (or view) with `extends`
88
104
 
89
- Any layout (or view) can declare that it wants to inherit from and extend a parent layout, in this case we're extending `app/views/layouts/application.html.erb`:
105
+ Any layout (or view) can declare that it wants to inherit from and extend a
106
+ parent layout, in this case we're extending
107
+ `app/views/layouts/application.html.erb`:
90
108
 
91
109
  ``` erb
92
110
  <%= extends :application do %>
@@ -174,7 +192,8 @@ Set-up a global layout defining some content areas.
174
192
  </html>
175
193
  ```
176
194
 
177
- Next, we set-up a `blog` layout that extends `application`, replacing, appending & prepending content to the areas we defined earlier.
195
+ Next, we set-up a `blog` layout that extends `application`, replacing,
196
+ appending & prepending content to the areas we defined earlier.
178
197
 
179
198
  `app/views/layouts/blog.html.erb`:
180
199
 
@@ -187,7 +206,8 @@ Next, we set-up a `blog` layout that extends `application`, replacing, appending
187
206
  <% end %>
188
207
  ```
189
208
 
190
- Now in our blog index view we can use `blog` layout and fill in the areas with content specific to the index action.
209
+ Now in our blog index view we can use `blog` layout and fill in the areas with
210
+ content specific to the index action.
191
211
 
192
212
 
193
213
  `app/views/posts/index.html.erb`:
@@ -214,6 +234,12 @@ class PostsController < ApplicationController
214
234
  end
215
235
  ```
216
236
 
237
+ ## Caching
238
+ Nestive works the same way `content_for` does and has the same caching
239
+ drawbacks. That means that nestive helpers are completely ignored when called
240
+ from within cached block. You probably don't want to use fragment caching
241
+ around dynamic nestive areas and have to be extra careful what and how you
242
+ cache to avoid unpleasant surprises.
217
243
 
218
244
  ## Installation
219
245
 
@@ -222,8 +248,8 @@ end
222
248
 
223
249
  ## Compatibility
224
250
 
225
- Nestive should work properly with any Rails 3 and 4.
226
- Since version 0.5 only Ruby 1.9.3 and newer are supported. For 1.8 compatibility use version 0.4.
251
+ Nestive should work properly with any Rails 3 and 4. Since version 0.5 only
252
+ Ruby 1.9.3 and newer are supported. For 1.8 compatibility use version 0.4.
227
253
 
228
254
 
229
255
  *Nestive doesn't monkey patch or fiddle with any default behaviors in Rails.* Use it when you want to, don't when you don't.
@@ -198,10 +198,10 @@ module Nestive
198
198
  # @example Purge content
199
199
  # <% purge :sidebar %>
200
200
  #
201
- # @param [Symbol] name
202
- # A name to identify the area of content you wish to purge
203
- def purge(name)
204
- replace name, nil
201
+ # @param names
202
+ # A list of area names to purge
203
+ def purge(*names)
204
+ names.each{ |name| replace(name, nil)}
205
205
  end
206
206
 
207
207
  private
@@ -233,12 +233,10 @@ module Nestive
233
233
  #
234
234
  # These instructions are reversed and replayed when we render the block (rather than as they
235
235
  # happen) due to the way they are gathered by the layout extension process (in reverse).
236
- #
237
- # @todo is `html_safe` "safe" here?
238
236
  def render_area(name)
239
237
  [].tap do |output|
240
- @_area_for.fetch(name, []).reverse_each do |i|
241
- output.send i.first, i.last
238
+ @_area_for.fetch(name, []).reverse_each do |method_name, content|
239
+ output.public_send method_name, content
242
240
  end
243
241
  end.join.html_safe
244
242
  end
@@ -1,3 +1,3 @@
1
1
  module Nestive
2
- VERSION = '0.5.0'
2
+ VERSION = '0.6.0'
3
3
  end
@@ -57,10 +57,16 @@ describe NestiveController do
57
57
  end
58
58
 
59
59
  context '#purge' do
60
- it 'purge area content' do
61
- get :purge
60
+ it 'purge single area content' do
61
+ get :purge_single
62
62
  assert_select 'title'
63
63
  end
64
+
65
+ it 'purge few areas content' do
66
+ get :purge_multiple
67
+ assert_select 'title'
68
+ assert_select '#some-area'
69
+ end
64
70
  end
65
71
 
66
72
  context '#extends' do
@@ -84,4 +90,4 @@ describe NestiveController do
84
90
  end
85
91
  end
86
92
 
87
- end
93
+ end
@@ -0,0 +1,3 @@
1
+ <h1>multiple purge area</h1>
2
+
3
+ <% purge :title, :some_area %>
@@ -0,0 +1,3 @@
1
+ <h1>single purge area</h1>
2
+
3
+ <% purge :title %>
@@ -1,6 +1,6 @@
1
1
  Processing by NestiveController#index as HTML
2
- Rendered nestive/index.html.erb within layouts/nestive (0.8ms)
3
- Completed 200 OK in 5ms (Views: 4.6ms)
2
+ Rendered nestive/index.html.erb within layouts/nestive (1.3ms)
3
+ Completed 200 OK in 7ms (Views: 7.1ms)
4
4
  Processing by NestiveController#index as HTML
5
5
  Completed 200 OK in 0ms (Views: 0.4ms)
6
6
  Processing by NestiveController#index as HTML
@@ -8,26 +8,26 @@ Completed 200 OK in 0ms (Views: 0.3ms)
8
8
  Processing by NestiveController#append as HTML
9
9
  Completed 200 OK in 1ms (Views: 1.0ms)
10
10
  Processing by NestiveController#append as HTML
11
- Completed 200 OK in 0ms (Views: 0.3ms)
11
+ Completed 200 OK in 0ms (Views: 0.4ms)
12
12
  Processing by NestiveController#prepend as HTML
13
- Completed 200 OK in 1ms (Views: 0.9ms)
13
+ Completed 200 OK in 1ms (Views: 1.0ms)
14
14
  Processing by NestiveController#prepend as HTML
15
- Completed 200 OK in 0ms (Views: 0.3ms)
15
+ Completed 200 OK in 0ms (Views: 0.4ms)
16
16
  Processing by NestiveController#replace as HTML
17
17
  Completed 200 OK in 1ms (Views: 1.0ms)
18
18
  Processing by NestiveController#replace as HTML
19
- Completed 200 OK in 0ms (Views: 0.3ms)
19
+ Completed 200 OK in 0ms (Views: 0.4ms)
20
20
  Processing by NestiveController#purge as HTML
21
21
  Completed 200 OK in 1ms (Views: 0.9ms)
22
22
  Processing by NestiveController#extended_one as HTML
23
- Completed 200 OK in 2ms (Views: 1.8ms)
23
+ Completed 200 OK in 2ms (Views: 1.9ms)
24
24
  Processing by NestiveController#extended_two as HTML
25
- Completed 200 OK in 2ms (Views: 1.7ms)
25
+ Completed 200 OK in 2ms (Views: 1.9ms)
26
26
  Processing by NestiveController#extended_three as HTML
27
- Completed 200 OK in 1ms (Views: 1.1ms)
27
+ Completed 200 OK in 2ms (Views: 1.5ms)
28
28
  Processing by NestiveController#index as HTML
29
- Rendered nestive/index.html.erb within layouts/nestive (1.2ms)
30
- Completed 200 OK in 7ms (Views: 7.3ms)
29
+ Rendered nestive/index.html.erb within layouts/nestive (0.8ms)
30
+ Completed 200 OK in 5ms (Views: 4.6ms)
31
31
  Processing by NestiveController#index as HTML
32
32
  Completed 200 OK in 0ms (Views: 0.4ms)
33
33
  Processing by NestiveController#index as HTML
@@ -35,26 +35,26 @@ Completed 200 OK in 0ms (Views: 0.3ms)
35
35
  Processing by NestiveController#append as HTML
36
36
  Completed 200 OK in 1ms (Views: 1.0ms)
37
37
  Processing by NestiveController#append as HTML
38
- Completed 200 OK in 1ms (Views: 0.9ms)
38
+ Completed 200 OK in 0ms (Views: 0.4ms)
39
39
  Processing by NestiveController#prepend as HTML
40
40
  Completed 200 OK in 1ms (Views: 1.0ms)
41
41
  Processing by NestiveController#prepend as HTML
42
- Completed 200 OK in 0ms (Views: 0.3ms)
42
+ Completed 200 OK in 0ms (Views: 0.4ms)
43
43
  Processing by NestiveController#replace as HTML
44
44
  Completed 200 OK in 1ms (Views: 1.0ms)
45
45
  Processing by NestiveController#replace as HTML
46
46
  Completed 200 OK in 0ms (Views: 0.4ms)
47
47
  Processing by NestiveController#purge as HTML
48
- Completed 200 OK in 1ms (Views: 1.0ms)
48
+ Completed 200 OK in 1ms (Views: 0.9ms)
49
49
  Processing by NestiveController#extended_one as HTML
50
- Completed 200 OK in 2ms (Views: 1.8ms)
50
+ Completed 200 OK in 2ms (Views: 2.0ms)
51
51
  Processing by NestiveController#extended_two as HTML
52
52
  Completed 200 OK in 2ms (Views: 1.9ms)
53
53
  Processing by NestiveController#extended_three as HTML
54
- Completed 200 OK in 1ms (Views: 1.2ms)
54
+ Completed 200 OK in 1ms (Views: 1.1ms)
55
55
  Processing by NestiveController#index as HTML
56
56
  Rendered nestive/index.html.erb within layouts/nestive (0.8ms)
57
- Completed 200 OK in 5ms (Views: 5.1ms)
57
+ Completed 200 OK in 5ms (Views: 5.0ms)
58
58
  Processing by NestiveController#index as HTML
59
59
  Completed 200 OK in 0ms (Views: 0.4ms)
60
60
  Processing by NestiveController#index as HTML
@@ -62,36 +62,36 @@ Completed 200 OK in 0ms (Views: 0.3ms)
62
62
  Processing by NestiveController#append as HTML
63
63
  Completed 200 OK in 1ms (Views: 1.0ms)
64
64
  Processing by NestiveController#append as HTML
65
- Completed 200 OK in 0ms (Views: 0.4ms)
65
+ Completed 200 OK in 0ms (Views: 0.3ms)
66
66
  Processing by NestiveController#prepend as HTML
67
67
  Completed 200 OK in 1ms (Views: 1.0ms)
68
68
  Processing by NestiveController#prepend as HTML
69
- Completed 200 OK in 0ms (Views: 0.4ms)
69
+ Completed 200 OK in 0ms (Views: 0.3ms)
70
70
  Processing by NestiveController#replace as HTML
71
71
  Completed 200 OK in 1ms (Views: 1.0ms)
72
72
  Processing by NestiveController#replace as HTML
73
- Completed 200 OK in 0ms (Views: 0.4ms)
73
+ Completed 200 OK in 0ms (Views: 0.3ms)
74
74
  Processing by NestiveController#purge as HTML
75
- Completed 200 OK in 2ms (Views: 1.6ms)
75
+ Completed 200 OK in 1ms (Views: 0.9ms)
76
76
  Processing by NestiveController#extended_one as HTML
77
- Completed 200 OK in 2ms (Views: 2.3ms)
77
+ Completed 200 OK in 2ms (Views: 2.0ms)
78
78
  Processing by NestiveController#extended_two as HTML
79
- Completed 200 OK in 2ms (Views: 1.9ms)
79
+ Completed 200 OK in 2ms (Views: 2.0ms)
80
80
  Processing by NestiveController#extended_three as HTML
81
- Completed 200 OK in 2ms (Views: 1.5ms)
81
+ Completed 200 OK in 1ms (Views: 1.1ms)
82
82
  Processing by NestiveController#index as HTML
83
83
  Rendered nestive/index.html.erb within layouts/nestive (0.8ms)
84
- Completed 200 OK in 5ms (Views: 4.7ms)
85
- Processing by NestiveController#index as HTML
86
- Completed 200 OK in 1ms (Views: 0.5ms)
84
+ Completed 200 OK in 5ms (Views: 4.9ms)
87
85
  Processing by NestiveController#index as HTML
88
86
  Completed 200 OK in 0ms (Views: 0.4ms)
87
+ Processing by NestiveController#index as HTML
88
+ Completed 200 OK in 0ms (Views: 0.3ms)
89
89
  Processing by NestiveController#append as HTML
90
- Completed 200 OK in 1ms (Views: 0.9ms)
90
+ Completed 200 OK in 1ms (Views: 1.0ms)
91
91
  Processing by NestiveController#append as HTML
92
92
  Completed 200 OK in 0ms (Views: 0.3ms)
93
93
  Processing by NestiveController#prepend as HTML
94
- Completed 200 OK in 1ms (Views: 0.9ms)
94
+ Completed 200 OK in 1ms (Views: 1.0ms)
95
95
  Processing by NestiveController#prepend as HTML
96
96
  Completed 200 OK in 0ms (Views: 0.3ms)
97
97
  Processing by NestiveController#replace as HTML
@@ -99,16 +99,16 @@ Completed 200 OK in 1ms (Views: 1.0ms)
99
99
  Processing by NestiveController#replace as HTML
100
100
  Completed 200 OK in 0ms (Views: 0.3ms)
101
101
  Processing by NestiveController#purge as HTML
102
- Completed 200 OK in 1ms (Views: 1.2ms)
102
+ Completed 200 OK in 1ms (Views: 0.9ms)
103
103
  Processing by NestiveController#extended_one as HTML
104
104
  Completed 200 OK in 2ms (Views: 1.7ms)
105
105
  Processing by NestiveController#extended_two as HTML
106
- Completed 200 OK in 2ms (Views: 2.0ms)
106
+ Completed 200 OK in 2ms (Views: 1.9ms)
107
107
  Processing by NestiveController#extended_three as HTML
108
108
  Completed 200 OK in 1ms (Views: 1.1ms)
109
109
  Processing by NestiveController#index as HTML
110
- Rendered nestive/index.html.erb within layouts/nestive (0.8ms)
111
- Completed 200 OK in 5ms (Views: 4.8ms)
110
+ Rendered nestive/index.html.erb within layouts/nestive (0.9ms)
111
+ Completed 200 OK in 5ms (Views: 5.1ms)
112
112
  Processing by NestiveController#index as HTML
113
113
  Completed 200 OK in 0ms (Views: 0.4ms)
114
114
  Processing by NestiveController#index as HTML
@@ -118,24 +118,80 @@ Completed 200 OK in 1ms (Views: 1.0ms)
118
118
  Processing by NestiveController#append as HTML
119
119
  Completed 200 OK in 0ms (Views: 0.3ms)
120
120
  Processing by NestiveController#prepend as HTML
121
+ Completed 200 OK in 1ms (Views: 1.0ms)
122
+ Processing by NestiveController#prepend as HTML
123
+ Completed 200 OK in 0ms (Views: 0.3ms)
124
+ Processing by NestiveController#replace as HTML
121
125
  Completed 200 OK in 1ms (Views: 0.9ms)
126
+ Processing by NestiveController#replace as HTML
127
+ Completed 200 OK in 0ms (Views: 0.3ms)
128
+ Processing by NestiveController#purge as HTML
129
+ Completed 200 OK in 1ms (Views: 0.9ms)
130
+ Processing by NestiveController#extended_one as HTML
131
+ Completed 200 OK in 2ms (Views: 1.6ms)
132
+ Processing by NestiveController#extended_two as HTML
133
+ Completed 200 OK in 2ms (Views: 1.7ms)
134
+ Processing by NestiveController#extended_three as HTML
135
+ Completed 200 OK in 1ms (Views: 1.2ms)
136
+ Processing by NestiveController#index as HTML
137
+ Rendered nestive/index.html.erb within layouts/nestive (0.9ms)
138
+ Completed 200 OK in 5ms (Views: 5.3ms)
139
+ Processing by NestiveController#index as HTML
140
+ Completed 200 OK in 0ms (Views: 0.4ms)
141
+ Processing by NestiveController#index as HTML
142
+ Completed 200 OK in 0ms (Views: 0.3ms)
143
+ Processing by NestiveController#append as HTML
144
+ Completed 200 OK in 1ms (Views: 1.0ms)
145
+ Processing by NestiveController#append as HTML
146
+ Completed 200 OK in 0ms (Views: 0.3ms)
147
+ Processing by NestiveController#prepend as HTML
148
+ Completed 200 OK in 1ms (Views: 1.1ms)
122
149
  Processing by NestiveController#prepend as HTML
123
150
  Completed 200 OK in 0ms (Views: 0.3ms)
124
151
  Processing by NestiveController#replace as HTML
125
152
  Completed 200 OK in 1ms (Views: 1.0ms)
126
153
  Processing by NestiveController#replace as HTML
127
- Completed 200 OK in 0ms (Views: 0.4ms)
154
+ Completed 200 OK in 0ms (Views: 0.3ms)
128
155
  Processing by NestiveController#purge as HTML
129
156
  Completed 200 OK in 1ms (Views: 0.9ms)
130
157
  Processing by NestiveController#extended_one as HTML
158
+ Completed 200 OK in 2ms (Views: 2.4ms)
159
+ Processing by NestiveController#extended_two as HTML
160
+ Completed 200 OK in 3ms (Views: 2.5ms)
161
+ Processing by NestiveController#extended_three as HTML
162
+ Completed 200 OK in 1ms (Views: 1.1ms)
163
+ Processing by NestiveController#index as HTML
164
+ Rendered nestive/index.html.erb within layouts/nestive (1.2ms)
165
+ Completed 200 OK in 7ms (Views: 6.9ms)
166
+ Processing by NestiveController#index as HTML
167
+ Completed 200 OK in 1ms (Views: 0.6ms)
168
+ Processing by NestiveController#index as HTML
169
+ Completed 200 OK in 0ms (Views: 0.2ms)
170
+ Processing by NestiveController#append as HTML
171
+ Completed 200 OK in 1ms (Views: 1.0ms)
172
+ Processing by NestiveController#append as HTML
173
+ Completed 200 OK in 0ms (Views: 0.3ms)
174
+ Processing by NestiveController#prepend as HTML
175
+ Completed 200 OK in 1ms (Views: 0.9ms)
176
+ Processing by NestiveController#prepend as HTML
177
+ Completed 200 OK in 0ms (Views: 0.3ms)
178
+ Processing by NestiveController#replace as HTML
179
+ Completed 200 OK in 1ms (Views: 1.0ms)
180
+ Processing by NestiveController#replace as HTML
181
+ Completed 200 OK in 0ms (Views: 0.3ms)
182
+ Processing by NestiveController#purge_single as HTML
183
+ Completed 200 OK in 1ms (Views: 0.9ms)
184
+ Processing by NestiveController#purge_multiple as HTML
185
+ Completed 200 OK in 1ms (Views: 1.0ms)
186
+ Processing by NestiveController#extended_one as HTML
131
187
  Completed 200 OK in 2ms (Views: 1.8ms)
132
188
  Processing by NestiveController#extended_two as HTML
133
- Completed 200 OK in 2ms (Views: 1.7ms)
189
+ Completed 200 OK in 2ms (Views: 1.8ms)
134
190
  Processing by NestiveController#extended_three as HTML
135
191
  Completed 200 OK in 1ms (Views: 1.1ms)
136
192
  Processing by NestiveController#index as HTML
137
193
  Rendered nestive/index.html.erb within layouts/nestive (0.8ms)
138
- Completed 200 OK in 5ms (Views: 4.6ms)
194
+ Completed 200 OK in 5ms (Views: 4.9ms)
139
195
  Processing by NestiveController#index as HTML
140
196
  Completed 200 OK in 0ms (Views: 0.4ms)
141
197
  Processing by NestiveController#index as HTML
@@ -143,20 +199,22 @@ Completed 200 OK in 0ms (Views: 0.3ms)
143
199
  Processing by NestiveController#append as HTML
144
200
  Completed 200 OK in 1ms (Views: 1.0ms)
145
201
  Processing by NestiveController#append as HTML
146
- Completed 200 OK in 0ms (Views: 0.4ms)
202
+ Completed 200 OK in 0ms (Views: 0.3ms)
147
203
  Processing by NestiveController#prepend as HTML
148
204
  Completed 200 OK in 1ms (Views: 0.9ms)
149
205
  Processing by NestiveController#prepend as HTML
150
206
  Completed 200 OK in 0ms (Views: 0.3ms)
151
207
  Processing by NestiveController#replace as HTML
152
- Completed 200 OK in 1ms (Views: 1.0ms)
208
+ Completed 200 OK in 1ms (Views: 0.9ms)
153
209
  Processing by NestiveController#replace as HTML
154
- Completed 200 OK in 0ms (Views: 0.4ms)
155
- Processing by NestiveController#purge as HTML
156
- Completed 200 OK in 1ms (Views: 1.0ms)
210
+ Completed 200 OK in 0ms (Views: 0.3ms)
211
+ Processing by NestiveController#purge_single as HTML
212
+ Completed 200 OK in 1ms (Views: 0.9ms)
213
+ Processing by NestiveController#purge_multiple as HTML
214
+ Completed 200 OK in 1ms (Views: 0.9ms)
157
215
  Processing by NestiveController#extended_one as HTML
158
216
  Completed 200 OK in 2ms (Views: 1.9ms)
159
217
  Processing by NestiveController#extended_two as HTML
160
- Completed 200 OK in 2ms (Views: 2.4ms)
218
+ Completed 200 OK in 2ms (Views: 1.9ms)
161
219
  Processing by NestiveController#extended_three as HTML
162
- Completed 200 OK in 1ms (Views: 1.2ms)
220
+ Completed 200 OK in 1ms (Views: 1.0ms)
@@ -1,8 +1,15 @@
1
+ require 'bundler'
2
+
3
+ Bundler.setup
4
+
1
5
  require 'rails'
2
6
  require 'combustion'
3
-
4
7
  require 'nestive'
5
8
 
6
9
  Combustion.initialize! :action_controller
7
10
 
8
11
  require 'rspec/rails'
12
+
13
+ RSpec.configure do |config|
14
+ config.infer_spec_type_from_file_location!
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nestive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin French
@@ -9,20 +9,20 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-28 00:00:00.000000000 Z
12
+ date: 2014-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 3.0.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 3.0.0
28
28
  description: A Rails plugin/gem for awesome nested templates and layouts
@@ -33,12 +33,12 @@ executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
- - README.md
37
36
  - MIT-LICENSE
37
+ - README.md
38
+ - lib/nestive.rb
38
39
  - lib/nestive/layout_helper.rb
39
40
  - lib/nestive/railtie.rb
40
41
  - lib/nestive/version.rb
41
- - lib/nestive.rb
42
42
  - spec/controllers/nestive_spec.rb
43
43
  - spec/internal/app/controllers/application_controller.rb
44
44
  - spec/internal/app/controllers/nestive_controller.rb
@@ -51,7 +51,8 @@ files:
51
51
  - spec/internal/app/views/nestive/extended_two.html.erb
52
52
  - spec/internal/app/views/nestive/index.html.erb
53
53
  - spec/internal/app/views/nestive/prepend.html.erb
54
- - spec/internal/app/views/nestive/purge.html.erb
54
+ - spec/internal/app/views/nestive/purge_multiple.html.erb
55
+ - spec/internal/app/views/nestive/purge_single.html.erb
55
56
  - spec/internal/app/views/nestive/replace.html.erb
56
57
  - spec/internal/config/routes.rb
57
58
  - spec/internal/log/test.log
@@ -66,17 +67,17 @@ require_paths:
66
67
  - lib
67
68
  required_ruby_version: !ruby/object:Gem::Requirement
68
69
  requirements:
69
- - - '>='
70
+ - - ">="
70
71
  - !ruby/object:Gem::Version
71
72
  version: 1.9.3
72
73
  required_rubygems_version: !ruby/object:Gem::Requirement
73
74
  requirements:
74
- - - '>='
75
+ - - ">="
75
76
  - !ruby/object:Gem::Version
76
77
  version: '0'
77
78
  requirements: []
78
79
  rubyforge_project:
79
- rubygems_version: 2.1.0
80
+ rubygems_version: 2.4.1
80
81
  signing_key:
81
82
  specification_version: 4
82
83
  summary: A Rails gem for awesome nested templates and layouts
@@ -93,9 +94,9 @@ test_files:
93
94
  - spec/internal/app/views/nestive/extended_two.html.erb
94
95
  - spec/internal/app/views/nestive/index.html.erb
95
96
  - spec/internal/app/views/nestive/prepend.html.erb
96
- - spec/internal/app/views/nestive/purge.html.erb
97
+ - spec/internal/app/views/nestive/purge_multiple.html.erb
98
+ - spec/internal/app/views/nestive/purge_single.html.erb
97
99
  - spec/internal/app/views/nestive/replace.html.erb
98
100
  - spec/internal/config/routes.rb
99
101
  - spec/internal/log/test.log
100
102
  - spec/spec_helper.rb
101
- has_rdoc:
@@ -1,3 +0,0 @@
1
- <h1>purge area</h1>
2
-
3
- <% purge :title %>