pancake 0.1.10 → 0.1.12
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.
- data/Rakefile +5 -1
- data/lib/pancake/bootloaders.rb +27 -27
- data/lib/pancake/defaults/configuration.rb +2 -1
- data/lib/pancake/errors.rb +8 -7
- data/lib/pancake/generators/templates/short/%stack_name%/lib/%stack_name%.rb.tt +1 -0
- data/lib/pancake/generators/templates/short/%stack_name%/spec/%stack_name%_spec.rb.tt +4 -0
- data/lib/pancake/generators/templates/short/%stack_name%/spec/spec_helper.rb.tt +5 -1
- data/lib/pancake/generators/templates/stack/%stack_name%/lib/%stack_name%.rb.tt +1 -0
- data/lib/pancake/generators/templates/stack/%stack_name%/spec/%stack_name%_spec.rb.tt +4 -0
- data/lib/pancake/generators/templates/stack/%stack_name%/spec/spec_helper.rb.tt +5 -1
- data/lib/pancake/mixins/render/render.rb +10 -4
- data/lib/pancake/mixins/render.rb +37 -7
- data/lib/pancake/mixins/request_helper.rb +25 -0
- data/lib/pancake/mixins/response_helper.rb +6 -0
- data/lib/pancake/router.rb +81 -7
- data/lib/pancake/stack/bootloader.rb +40 -10
- data/lib/pancake/stack/router.rb +10 -2
- data/lib/pancake/stack/stack.rb +34 -1
- data/lib/pancake/stacks/short/bootloaders.rb +2 -2
- data/lib/pancake/stacks/short/controller.rb +17 -4
- data/lib/pancake/test/matchers.rb +39 -0
- data/lib/pancake.rb +5 -0
- data/spec/pancake/bootloaders_spec.rb +29 -28
- data/spec/pancake/defaults/configuration_spec.rb +1 -1
- data/spec/pancake/fixtures/render_templates/view_context/_basic.haml +3 -0
- data/spec/pancake/fixtures/render_templates/view_context/_basic.html.haml +4 -0
- data/spec/pancake/fixtures/render_templates/view_context/_foo_as_name.haml +1 -0
- data/spec/pancake/fixtures/render_templates/view_context/_local_as_name.haml +1 -0
- data/spec/pancake/fixtures/render_templates/view_context/_with_locals.haml +2 -0
- data/spec/pancake/fixtures/render_templates/view_context/collection_with_partial_name.haml +1 -0
- data/spec/pancake/fixtures/render_templates/view_context/contains_partial.haml +5 -0
- data/spec/pancake/middleware_spec.rb +5 -5
- data/spec/pancake/mixins/render/view_context_spec.rb +60 -0
- data/spec/pancake/stack/router_spec.rb +52 -13
- data/spec/pancake/stacks/short/controller_spec.rb +35 -0
- data/spec/pancake/stacks/short/router_spec.rb +4 -2
- data/spec/pancake/stacks/short/stack_spec.rb +4 -3
- metadata +51 -3
@@ -5,6 +5,7 @@ describe Pancake::Stacks::Short do
|
|
5
5
|
before do
|
6
6
|
$captures = []
|
7
7
|
class ::ShortMiddle
|
8
|
+
attr_accessor :app
|
8
9
|
def initialize(app)
|
9
10
|
@app = app
|
10
11
|
end
|
@@ -34,7 +35,7 @@ describe Pancake::Stacks::Short do
|
|
34
35
|
end
|
35
36
|
|
36
37
|
after do
|
37
|
-
clear_constants :ShortFoo, :ShortMiddle, :OtherFoo
|
38
|
+
clear_constants :ShortFoo, :ShortMiddle, :OtherFoo, "ShortFoo::Router"
|
38
39
|
end
|
39
40
|
|
40
41
|
def app
|
@@ -49,14 +50,14 @@ describe Pancake::Stacks::Short do
|
|
49
50
|
describe "inheritance" do
|
50
51
|
before do
|
51
52
|
class ::OtherFoo < ShortFoo; end
|
52
|
-
ShortFoo.router.mount(OtherFoo
|
53
|
+
ShortFoo.router.mount(OtherFoo, "/other")
|
53
54
|
end
|
54
55
|
|
55
56
|
it "should render the same template in the child as it does in the parent" do
|
56
57
|
get "/"
|
57
58
|
$captures.pop.should == ShortFoo::Controller
|
58
59
|
last_response.should match(/inherited from base/)
|
59
|
-
get "/other/"
|
60
|
+
result = get "/other/"
|
60
61
|
$captures.pop.should == OtherFoo::Controller
|
61
62
|
last_response.should match(/inherited from base/)
|
62
63
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pancake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Neighman
|
@@ -9,7 +9,7 @@ autorequire: pancake
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-30 00:00:00 +11:00
|
13
13
|
default_executable: pancake-gen
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,47 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.5.
|
33
|
+
version: 0.5.10
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: extlib
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: "0"
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: thor
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "0"
|
54
|
+
version:
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rack
|
57
|
+
type: :runtime
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: "0"
|
64
|
+
version:
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: tilt
|
67
|
+
type: :runtime
|
68
|
+
version_requirement:
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: "0.3"
|
34
74
|
version:
|
35
75
|
- !ruby/object:Gem::Dependency
|
36
76
|
name: mynyml-rack-accept-media-types
|
@@ -143,6 +183,7 @@ files:
|
|
143
183
|
- lib/pancake/stacks/short/controller.rb
|
144
184
|
- lib/pancake/stacks/short/default/views/base.html.haml
|
145
185
|
- lib/pancake/stacks/short/stack.rb
|
186
|
+
- lib/pancake/test/matchers.rb
|
146
187
|
- spec/helpers/helpers.rb
|
147
188
|
- spec/helpers/matchers.rb
|
148
189
|
- spec/pancake/bootloaders_spec.rb
|
@@ -171,10 +212,17 @@ files:
|
|
171
212
|
- spec/pancake/fixtures/render_templates/haml_template.html.haml
|
172
213
|
- spec/pancake/fixtures/render_templates/haml_template.xml.haml
|
173
214
|
- spec/pancake/fixtures/render_templates/templates/context.erb
|
215
|
+
- spec/pancake/fixtures/render_templates/view_context/_basic.haml
|
216
|
+
- spec/pancake/fixtures/render_templates/view_context/_basic.html.haml
|
217
|
+
- spec/pancake/fixtures/render_templates/view_context/_foo_as_name.haml
|
218
|
+
- spec/pancake/fixtures/render_templates/view_context/_local_as_name.haml
|
219
|
+
- spec/pancake/fixtures/render_templates/view_context/_with_locals.haml
|
174
220
|
- spec/pancake/fixtures/render_templates/view_context/capture_erb.erb
|
175
221
|
- spec/pancake/fixtures/render_templates/view_context/capture_haml.haml
|
222
|
+
- spec/pancake/fixtures/render_templates/view_context/collection_with_partial_name.haml
|
176
223
|
- spec/pancake/fixtures/render_templates/view_context/concat_erb.erb
|
177
224
|
- spec/pancake/fixtures/render_templates/view_context/concat_haml.haml
|
225
|
+
- spec/pancake/fixtures/render_templates/view_context/contains_partial.haml
|
178
226
|
- spec/pancake/fixtures/render_templates/view_context/context.erb
|
179
227
|
- spec/pancake/fixtures/render_templates/view_context/context2.erb
|
180
228
|
- spec/pancake/fixtures/render_templates/view_context/helper_methods.erb
|