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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjU4NGUyNzU1ODFlNDYxZWY1YWI4MWMzYzAzODY5Yzc2ZDkxNjJhNQ==
4
+ MTQ3NTNjYjgyMWVmMTA2ZmMyZDc0OGFmYTg4ZGFiYjAxODJkOGYyOA==
5
5
  data.tar.gz: !binary |-
6
- ZmUyNjc5YzMyZGNiNjBiZDM2YzhkODZmNmQwMjY1OThjNDBhZGMzZg==
6
+ MTM4YzZkNGI5OTllNGU4ZjNlZTczYjFjNDcxOWZhYzlhNTYxNDc5MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTU1YWZmMzUwNDBkMjVmMGI2OWIzYTk4NTIyNzE4OWE0NjlhYThjN2IxZWI1
10
- YzdhZDQ3ZWFkZTMxMTFiM2EwY2MxOWYyZTc2YzExNmExYzJhNGFhNjJjNjFj
11
- YTY3ZGFiZmZkYTk0YmY2ZDNmYTQ0OTBmYmQ2N2NkNjQzMmViZDc=
9
+ M2I5ZGExZTUwMGNkMGYwMjllNTMyN2MxMWQyZWM1ZmU0NzQ3OGE2YTE5MTE3
10
+ NmZjYmE3NDQ2N2VhZjBhNDBlMWRjZDc1MGRiYmM4ZjU1NDcxNjEyMWE3NGRh
11
+ MjM5NDljZWE1ZDkwNzNiN2ZhNTBjYjlmNmI0ZGM5ODQzMzgzODA=
12
12
  data.tar.gz: !binary |-
13
- ZDljNmZiNzRiNWVjYjgzYzE2ZWQzNDg2YzljZTEyNjQyNDI2MWEwZjY0NmQ3
14
- OGRmNGViNGMwMGZmYjg3YzY3NmZhZDhkOGQ5NzMzNjU1MWE0ZDYwM2I5OTRm
15
- YjhkODFlNjU3YzllOWFlODIyNWRkNDlhNzNiMmU1ODdmNDk0MTc=
13
+ NTFiYzM2MTA4ZDRjMDU5NzUyZmMwYzU4MTBkZTljZjE0MTZhYjNmY2U5ZmU4
14
+ ZjA3OGVmZTBkNjhhNzE3ZjEyNzNkOTg2Y2RmY2NlMDUwOGJkODQ3M2U3ZWRl
15
+ NTBjNTcxNzMwOTRlMjliZGQ5YjJjMzk1NGRjY2RiYzUxMzg3MTc=
data/alongslide.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'alongslide'
3
- gem.version = '0.9.6'
3
+ gem.version = '0.9.7'
4
4
 
5
5
  gem.summary = "Create dynamic web layouts with an extended Markdown syntax"
6
6
  gem.description = "Create dynamic web layouts with an extended Markdown syntax"
@@ -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
@@ -75,6 +75,8 @@ module Alongslide
75
75
  error_line = markdown.split("\n")[parser.failure_line-1]
76
76
  raise SyntaxError.new "Alongslide syntax error around: \"#{error_line}\""
77
77
  end
78
+ rescue
79
+ raise SyntaxError.new "Unknown Alongslide syntax error"
78
80
  end
79
81
 
80
82
  end
@@ -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
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alongslide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Florin