middleman 0.9.13 → 0.9.14

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.13
1
+ 0.9.14
@@ -28,7 +28,6 @@ module Middleman
28
28
  disable :minify_css
29
29
  disable :minify_javascript
30
30
  disable :relative_assets
31
- disable :markaby
32
31
  disable :maruku
33
32
  disable :smush_pngs
34
33
 
@@ -8,23 +8,20 @@ module Middleman
8
8
  module Maruku
9
9
  def self.included(base)
10
10
  base.supported_formats << "maruku"
11
+ base.set :maruku, {}
11
12
  end
12
13
 
13
14
  def render_path(path)
14
15
  if template_exists?(path, :maruku)
15
- maruku path.to_sym
16
+ render :maruku, path.to_sym
16
17
  else
17
18
  super
18
19
  end
19
20
  end
20
-
21
- def maruku(template, options={}, locals={})
22
- render :maruku, template, options, locals
23
- end
24
21
 
25
22
  private
26
- def render_maruku(data, options, locals, &block)
27
- maruku_src = render_erb(data, options, locals, &block)
23
+ def render_maruku(template, data, options, locals, &block)
24
+ maruku_src = render_erb(template, data, options, locals, &block)
28
25
  instance = ::Maruku.new(maruku_src, options)
29
26
  if block_given?
30
27
  # render layout
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{middleman}
8
- s.version = "0.9.13"
8
+ s.version = "0.9.14"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Thomas Reynolds"]
@@ -35,7 +35,6 @@ Gem::Specification.new do |s|
35
35
  "lib/middleman/features/content_for.rb",
36
36
  "lib/middleman/features/growl.rb",
37
37
  "lib/middleman/features/haml.rb",
38
- "lib/middleman/features/markaby.rb",
39
38
  "lib/middleman/features/maruku.rb",
40
39
  "lib/middleman/features/minify_css.rb",
41
40
  "lib/middleman/features/minify_javascript.rb",
@@ -62,7 +61,6 @@ Gem::Specification.new do |s|
62
61
  "spec/fixtures/sample/views/index.html.haml",
63
62
  "spec/fixtures/sample/views/inline-js.html.haml",
64
63
  "spec/fixtures/sample/views/layout.haml",
65
- "spec/fixtures/sample/views/markaby.html.mab",
66
64
  "spec/fixtures/sample/views/maruku.html.maruku",
67
65
  "spec/fixtures/sample/views/services/index.html.haml",
68
66
  "spec/fixtures/sample/views/stylesheets/site.css.sass",
@@ -17,18 +17,13 @@ describe "Builder" do
17
17
  after :each do
18
18
  FileUtils.rm_rf(File.join(@root_dir, "build"))
19
19
  end
20
-
21
- xit "should build markaby files" do
22
- File.exists?("#{@root_dir}/build/markaby.html").should be_true
23
- File.read("#{@root_dir}/build/markaby.html").should include("<title>Hi Markaby</title>")
24
- end
25
20
 
26
21
  it "should build haml files" do
27
22
  File.exists?("#{@root_dir}/build/index.html").should be_true
28
23
  File.read("#{@root_dir}/build/index.html").should include("<h1>Welcome</h1>")
29
24
  end
30
25
 
31
- xit "should build maruku files" do
26
+ it "should build maruku files" do
32
27
  File.exists?("#{@root_dir}/build/maruku.html").should be_true
33
28
  File.read("#{@root_dir}/build/maruku.html").should include("<h1 class='header' id='hello_maruku'>Hello Maruku</h1>")
34
29
  end
@@ -1,2 +1 @@
1
- # enable :maruku
2
- # enable :markaby
1
+ enable :maruku
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.13
4
+ version: 0.9.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
@@ -122,7 +122,6 @@ files:
122
122
  - lib/middleman/features/content_for.rb
123
123
  - lib/middleman/features/growl.rb
124
124
  - lib/middleman/features/haml.rb
125
- - lib/middleman/features/markaby.rb
126
125
  - lib/middleman/features/maruku.rb
127
126
  - lib/middleman/features/minify_css.rb
128
127
  - lib/middleman/features/minify_javascript.rb
@@ -149,7 +148,6 @@ files:
149
148
  - spec/fixtures/sample/views/index.html.haml
150
149
  - spec/fixtures/sample/views/inline-js.html.haml
151
150
  - spec/fixtures/sample/views/layout.haml
152
- - spec/fixtures/sample/views/markaby.html.mab
153
151
  - spec/fixtures/sample/views/maruku.html.maruku
154
152
  - spec/fixtures/sample/views/services/index.html.haml
155
153
  - spec/fixtures/sample/views/stylesheets/site.css.sass
@@ -1,43 +0,0 @@
1
- begin
2
- require 'markaby'
3
- rescue LoadError
4
- puts "Markaby not available. Install it with: gem install markaby"
5
- end
6
-
7
- module Middleman
8
- module Markaby
9
- def self.included(base)
10
- base.supported_formats << "mab"
11
- end
12
-
13
- def render_path(path)
14
- if template_exists?(path, :mab)
15
- markaby path.to_sym
16
- else
17
- super
18
- end
19
- end
20
-
21
- def markaby(template=nil, options={}, locals = {}, &block)
22
- options, template = template, nil if template.is_a?(Hash)
23
- template = lambda { block } if template.nil?
24
- render :mab, template, options, locals
25
- end
26
-
27
- protected
28
- def render_mab(template, data, options, locals, &block)
29
- filename = options.delete(:filename) || '<MARKABY>'
30
- line = options.delete(:line) || 1
31
- mab = ::Markaby::Builder.new(locals)
32
- if data.respond_to?(:to_str)
33
- eval(data.to_str, binding, filename, line)
34
- elsif data.kind_of?(Proc)
35
- data.call(mab)
36
- end
37
- end
38
- end
39
-
40
- class Base
41
- include Middleman::Markaby
42
- end
43
- end
@@ -1,5 +0,0 @@
1
- mab.html do
2
- head do
3
- title "Hi Markaby"
4
- end
5
- end