alongslide 0.9.6 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/alongslide.gemspec +1 -1
- data/lib/alongslide/templates.rb +4 -2
- data/lib/alongslide.rb +2 -0
- data/spec/alongslide_spec.rb +6 -0
- data/spec/treetop/parser_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTQ3NTNjYjgyMWVmMTA2ZmMyZDc0OGFmYTg4ZGFiYjAxODJkOGYyOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTM4YzZkNGI5OTllNGU4ZjNlZTczYjFjNDcxOWZhYzlhNTYxNDc5MA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
M2I5ZGExZTUwMGNkMGYwMjllNTMyN2MxMWQyZWM1ZmU0NzQ3OGE2YTE5MTE3
|
10
|
+
NmZjYmE3NDQ2N2VhZjBhNDBlMWRjZDc1MGRiYmM4ZjU1NDcxNjEyMWE3NGRh
|
11
|
+
MjM5NDljZWE1ZDkwNzNiN2ZhNTBjYjlmNmI0ZGM5ODQzMzgzODA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTFiYzM2MTA4ZDRjMDU5NzUyZmMwYzU4MTBkZTljZjE0MTZhYjNmY2U5ZmU4
|
14
|
+
ZjA3OGVmZTBkNjhhNzE3ZjEyNzNkOTg2Y2RmY2NlMDUwOGJkODQ3M2U3ZWRl
|
15
|
+
NTBjNTcxNzMwOTRlMjliZGQ5YjJjMzk1NGRjY2RiYzUxMzg3MTc=
|
data/alongslide.gemspec
CHANGED
data/lib/alongslide/templates.rb
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
# Copyright 2013 Canopy Canopy Canopy, Inc.
|
6
6
|
# Author Adam Florin
|
7
7
|
#
|
8
|
+
require 'action_view'
|
9
|
+
require 'haml/template'
|
8
10
|
|
9
11
|
module Alongslide
|
10
12
|
module Templates
|
@@ -108,8 +110,8 @@ module Alongslide
|
|
108
110
|
def renderer
|
109
111
|
action_view = ActionView::Base.new(Rails.configuration.paths["app/views"])
|
110
112
|
action_view.class_eval do
|
111
|
-
include Rails.application.routes.url_helpers
|
112
|
-
include ApplicationHelper
|
113
|
+
include Rails.application.routes.url_helpers if defined? Rails.application.routes
|
114
|
+
include ApplicationHelper if defined? ApplicationHelper
|
113
115
|
|
114
116
|
def protect_against_forgery?
|
115
117
|
false
|
data/lib/alongslide.rb
CHANGED
data/spec/alongslide_spec.rb
CHANGED
@@ -2,6 +2,12 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Alongslide do
|
4
4
|
|
5
|
+
before :each do
|
6
|
+
Rails.stub :configuration do
|
7
|
+
double(paths: {"app/views" => nil})
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
5
11
|
describe "rendering" do
|
6
12
|
it "should render a whole document" do
|
7
13
|
html = Alongslide::render <<-MARKDOWN.strip_heredoc
|
data/spec/treetop/parser_spec.rb
CHANGED
@@ -12,6 +12,12 @@ describe Alongslide::Grammar::RootParser do
|
|
12
12
|
@section_name = "SomeSection"
|
13
13
|
end
|
14
14
|
|
15
|
+
before :each do
|
16
|
+
Rails.stub :configuration do
|
17
|
+
double(paths: {"app/views" => nil})
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
15
21
|
describe "panels" do
|
16
22
|
it "should show and unpin" do
|
17
23
|
parsed = @parser.parse <<-MARKDOWN.strip_heredoc
|