haml-flatrack 0.0.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitmodules +3 -0
- data/.rspec +3 -0
- data/.rubocop.yml +6 -0
- data/.ruby-version +1 -0
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/Guardfile +11 -0
- data/README.md +7 -5
- data/Rakefile +8 -1
- data/haml-flatrack.gemspec +14 -3
- data/lib/haml/flatrack.rb +10 -2
- data/lib/haml/flatrack/template_additions.rb +18 -0
- data/lib/haml/flatrack/version.rb +1 -1
- data/lib/haml/flatrack/view_additions.rb +29 -0
- data/lib/haml/flatrack/view_additions/capture_helper.rb +26 -0
- data/lib/haml/flatrack/view_additions/render_helper.rb +30 -0
- data/lib/haml/flatrack/view_additions/tag_helper.rb +28 -0
- data/spec/fixtures/assets/sample.css.scss +2 -0
- data/spec/fixtures/assets/sample.js.coffee +2 -0
- data/spec/fixtures/templates/html_tag.html +5 -0
- data/spec/fixtures/templates/html_tag.html.erb +9 -0
- data/spec/fixtures/templates/html_tag.html.haml +7 -0
- data/spec/fixtures/templates/image_tag.html +2 -0
- data/spec/fixtures/templates/image_tag.html.haml +2 -0
- data/spec/fixtures/templates/javascript_tag.html +2 -0
- data/spec/fixtures/templates/javascript_tag.html.haml +2 -0
- data/spec/fixtures/templates/link_to.html +9 -0
- data/spec/fixtures/templates/link_to.html.haml +8 -0
- data/spec/fixtures/templates/preserved_tag.html +3 -0
- data/spec/fixtures/templates/preserved_tag.html.haml +2 -0
- data/spec/fixtures/templates/stylesheet_tag.html +2 -0
- data/spec/fixtures/templates/stylesheet_tag.html.haml +2 -0
- data/spec/lib/haml/flatrack/view_additions/link_helper_spec.rb +17 -0
- data/spec/lib/haml/flatrack/view_additions/tag_helper_spec.rb +68 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/support/fixture_helper.rb +30 -0
- metadata +204 -9
- data/lib/haml/flatrack/renderer.rb +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff3a1f940103fc4ecbc10eab659bc8e02e69050f
|
4
|
+
data.tar.gz: bef2c78cc8289b73fce900fbda8b6ed3f085a49d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4464f6253f67a9b4af6a2e4eea2e54b3e1a40ceaad8678841b32bddd8f8d98949e94eb48ccf890bffeed05528a13d4e743af99d42357008b0a748f3deb19f96
|
7
|
+
data.tar.gz: 8bef00e7af888f666ba8dbe7b4315b413db7d66eaa6074bd1a3d453ceb523354de2fd56472b7b04b066bad8b3bd300a7edd66060074677a7602c0aa78eb796ba
|
data/.gitmodules
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1.1
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/Guardfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
guard :bundler do
|
2
|
+
watch('Gemfile')
|
3
|
+
watch(/^.+\.gemspec/)
|
4
|
+
end
|
5
|
+
|
6
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
7
|
+
watch(%r{^spec/.+_spec\.rb$})
|
8
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
9
|
+
watch(%r{^renderers/(.+)\.rb$}) { |m| "spec/renderers/#{m[1]}_spec.rb" }
|
10
|
+
watch('spec/spec_helper.rb') { "spec" }
|
11
|
+
end
|
data/README.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Haml::Flatrack
|
2
|
+
--
|
3
|
+
Haml for Flatrack
|
2
4
|
|
3
|
-
|
5
|
+
[![Version](http://allthebadges.io/jwaldrip/haml-flatrack/badge_fury.png)](http://allthebadges.io/jwaldrip/haml-flatrack/badge_fury)
|
6
|
+
[![Dependencies](http://allthebadges.io/jwaldrip/haml-flatrack/gemnasium.png)](http://allthebadges.io/jwaldrip/haml-flatrack/gemnasium)
|
7
|
+
[![Build Status](http://allthebadges.io/jwaldrip/haml-flatrack/travis.png)](http://allthebadges.io/jwaldrip/haml-flatrack/travis)
|
8
|
+
[![Coverage](http://allthebadges.io/jwaldrip/haml-flatrack/coveralls.png)](http://allthebadges.io/jwaldrip/haml-flatrack/coveralls)
|
9
|
+
[![Code Climate](http://allthebadges.io/jwaldrip/haml-flatrack/code_climate.png)](http://allthebadges.io/jwaldrip/haml-flatrack/code_climate)
|
4
10
|
|
5
11
|
## Installation
|
6
12
|
|
@@ -16,10 +22,6 @@ Or install it yourself as:
|
|
16
22
|
|
17
23
|
$ gem install haml-flatrack
|
18
24
|
|
19
|
-
## Usage
|
20
|
-
|
21
|
-
TODO: Write usage instructions here
|
22
|
-
|
23
25
|
## Contributing
|
24
26
|
|
25
27
|
1. Fork it ( http://github.com/<my-github-username>/haml-flatrack/fork )
|
data/Rakefile
CHANGED
data/haml-flatrack.gemspec
CHANGED
@@ -17,8 +17,19 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.
|
20
|
+
spec.add_runtime_dependency 'haml'
|
21
21
|
|
22
|
-
|
23
|
-
spec.add_development_dependency
|
22
|
+
# Dev Dependencies
|
23
|
+
spec.add_development_dependency 'flatrack', '~> 1.2'
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 2.14'
|
26
|
+
spec.add_development_dependency 'guard', '~> 2.5'
|
27
|
+
spec.add_development_dependency 'guard-rspec', '~> 4.2'
|
28
|
+
spec.add_development_dependency 'guard-bundler', '~> 2.0'
|
29
|
+
spec.add_development_dependency 'pry', '~> 0.9'
|
30
|
+
spec.add_development_dependency 'coveralls', '~> 0.7'
|
31
|
+
spec.add_development_dependency 'simplecov', '~> 0.8'
|
32
|
+
spec.add_development_dependency 'rubocop', '~> 0.18.1'
|
33
|
+
spec.add_development_dependency 'inch', '~> 0.3.2'
|
34
|
+
spec.add_development_dependency 'rake', ['> 0.8.7', '< 10.2']
|
24
35
|
end
|
data/lib/haml/flatrack.rb
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
require 'haml/flatrack/version'
|
2
|
+
require 'active_support/all'
|
3
|
+
require 'flatrack'
|
4
|
+
require 'haml'
|
5
|
+
|
6
|
+
Haml::Options.defaults[:format] = :html5
|
2
7
|
|
3
8
|
module Haml
|
4
9
|
module Flatrack
|
5
|
-
|
10
|
+
extend ActiveSupport::Autoload
|
11
|
+
autoload :ViewAdditions
|
12
|
+
autoload :TemplateAdditions
|
6
13
|
|
7
|
-
|
14
|
+
::Flatrack::View.class_eval { include ViewAdditions }
|
15
|
+
::Flatrack::Template.class_eval { extend TemplateAdditions }
|
8
16
|
end
|
9
17
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'haml/helpers/xss_mods'
|
2
|
+
|
3
|
+
module Haml
|
4
|
+
module Flatrack
|
5
|
+
module TemplateAdditions
|
6
|
+
|
7
|
+
PRESERVED_TAGS = %w{pre code textarea}
|
8
|
+
|
9
|
+
def options
|
10
|
+
local_options = { escape_html: false, preserve: PRESERVED_TAGS }
|
11
|
+
super.merge local_options
|
12
|
+
rescue NoMethodError
|
13
|
+
local_options
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'haml/helpers/xss_mods'
|
2
|
+
|
3
|
+
module Haml
|
4
|
+
module Flatrack
|
5
|
+
module ViewAdditions
|
6
|
+
extend ActiveSupport::Autoload
|
7
|
+
extend ActiveSupport::Concern
|
8
|
+
|
9
|
+
dir, base = File.dirname(__FILE__), File.basename(__FILE__, '.rb')
|
10
|
+
|
11
|
+
# Loadup constants based on filename and include them
|
12
|
+
consts = Dir[File.join dir, base, '*'].map do |f|
|
13
|
+
File.basename(f, '.rb').camelize.to_sym
|
14
|
+
end
|
15
|
+
consts.each { |c| autoload c }
|
16
|
+
haml_base = self
|
17
|
+
included do
|
18
|
+
consts.each { |c| include haml_base.const_get(c) }
|
19
|
+
include Haml::Helpers
|
20
|
+
include Haml::Helpers::XssMods
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize(response)
|
24
|
+
@haml_buffer = nil
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Haml
|
2
|
+
module Flatrack
|
3
|
+
module ViewAdditions
|
4
|
+
module CaptureHelper
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
|
9
|
+
def capture_with_haml(*args, &block)
|
10
|
+
if block_is_haml?(block)
|
11
|
+
# double assignment is to avoid warnings
|
12
|
+
_hamlout = _hamlout = eval('_hamlout', block.binding) # Necessary since capture_haml checks _hamlout
|
13
|
+
|
14
|
+
capture_haml(*args, &block)
|
15
|
+
else
|
16
|
+
capture_without_haml(*args, &block)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
alias_method_chain :capture, :haml
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Haml
|
2
|
+
module Flatrack
|
3
|
+
module ViewAdditions
|
4
|
+
module RenderHelper
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
|
9
|
+
def output_buffer_with_haml
|
10
|
+
return haml_buffer.buffer if is_haml?
|
11
|
+
output_buffer_without_haml
|
12
|
+
end
|
13
|
+
|
14
|
+
alias_method_chain :output_buffer, :haml
|
15
|
+
|
16
|
+
def output_buffer_with_haml=(new_buffer)
|
17
|
+
if is_haml?
|
18
|
+
haml_buffer.buffer = new_buffer
|
19
|
+
else
|
20
|
+
self.output_buffer_without_haml= new_buffer
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
alias_method_chain :output_buffer=, :haml
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Haml
|
2
|
+
module Flatrack
|
3
|
+
module ViewAdditions
|
4
|
+
module TagHelper
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
|
9
|
+
def html_tag_with_haml(name, *args, &block)
|
10
|
+
return html_tag_without_haml(name, *args, &block) unless is_haml?
|
11
|
+
|
12
|
+
preserve = haml_buffer.options[:preserve].include?(name.to_s)
|
13
|
+
|
14
|
+
if block_given? && block_is_haml?(block) && preserve
|
15
|
+
return html_tag_without_haml(name, *args) { preserve(&block) }
|
16
|
+
end
|
17
|
+
|
18
|
+
content = html_tag_without_haml(name, *args, &block)
|
19
|
+
content = preserve(content) if preserve && content
|
20
|
+
content
|
21
|
+
end
|
22
|
+
|
23
|
+
alias_method_chain :html_tag, :haml
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%== html_tag :div, 'something amazing' %>
|
2
|
+
<%= html_tag :div, 'something amazing', data: { enabled: true } %>
|
3
|
+
<%= html_tag :div, 'something amazing', default: true %>
|
4
|
+
<%= html_tag(:div) do %>
|
5
|
+
Hello World
|
6
|
+
<% end %>
|
7
|
+
<%== html_tag(:div) do %>
|
8
|
+
Goodbye Humanity
|
9
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<a href="http://example1.org">example</a>
|
2
|
+
<a href="http://example2.org">http://example2.org</a>
|
3
|
+
<a href="http://example3.org">Hello World</a>
|
4
|
+
<a href="http://example4.org">
|
5
|
+
<img src="http://example.org/sample.jpg"/>
|
6
|
+
</a>
|
7
|
+
<a href="http://example5.org">
|
8
|
+
<img src="/assets/sample.jpg"/>
|
9
|
+
</a>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
= link_to('example', 'http://example1.org')
|
2
|
+
= link_to('http://example2.org')
|
3
|
+
= link_to('http://example3.org') do
|
4
|
+
Hello World
|
5
|
+
= link_to('http://example4.org') do
|
6
|
+
= image_tag('http://example.org/sample.jpg').html_safe
|
7
|
+
= link_to('http://example5.org') do
|
8
|
+
= image_tag('sample.jpg').html_safe
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Flatrack::View::LinkHelper do
|
4
|
+
include Flatrack::FixtureHelper
|
5
|
+
|
6
|
+
describe '#link_to' do
|
7
|
+
|
8
|
+
context 'using haml' do
|
9
|
+
it 'should properly render' do
|
10
|
+
template_content = render_template 'link_to.html.haml'
|
11
|
+
expected_content = render_template 'link_to.html'
|
12
|
+
expect(template_content).to eq expected_content
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Flatrack::View::TagHelper do
|
4
|
+
include Flatrack::FixtureHelper
|
5
|
+
|
6
|
+
describe '#html_tag' do
|
7
|
+
let(:expected){ render_template 'html_tag.html' }
|
8
|
+
|
9
|
+
context 'using haml' do
|
10
|
+
it 'should properly render' do
|
11
|
+
template_content = render_template 'html_tag.html.haml'
|
12
|
+
expect(template_content).to eq expected
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
context 'using erb' do
|
17
|
+
it 'should properly render' do
|
18
|
+
template_content = render_template 'html_tag.html.erb'
|
19
|
+
expect(template_content).to eq expected
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'with a preserved tag' do
|
24
|
+
let(:expected){ render_template 'preserved_tag.html' }
|
25
|
+
it 'should properly render' do
|
26
|
+
template_content = render_template 'preserved_tag.html.haml'
|
27
|
+
expect(template_content).to eq expected
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '#image_tag' do
|
34
|
+
let(:expected){ render_template 'image_tag.html' }
|
35
|
+
|
36
|
+
context 'using haml' do
|
37
|
+
it 'should properly render' do
|
38
|
+
template_content = render_template 'image_tag.html.haml'
|
39
|
+
expect(template_content).to eq expected
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
describe '#javascript_tag' do
|
46
|
+
let(:expected){ render_template 'javascript_tag.html' }
|
47
|
+
|
48
|
+
context 'using haml' do
|
49
|
+
it 'should properly render' do
|
50
|
+
template_content = render_template 'javascript_tag.html.haml'
|
51
|
+
expect(template_content).to eq expected
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
describe '#stylesheet_tag' do
|
58
|
+
let(:expected){ render_template 'stylesheet_tag.html' }
|
59
|
+
|
60
|
+
context 'using haml' do
|
61
|
+
it 'should properly render' do
|
62
|
+
template_content = render_template 'stylesheet_tag.html.haml'
|
63
|
+
expect(template_content).to eq expected
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path File.dirname(__FILE__)
|
2
|
+
|
3
|
+
require 'simplecov'
|
4
|
+
require 'coveralls'
|
5
|
+
require 'pry'
|
6
|
+
|
7
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
8
|
+
SimpleCov::Formatter::HTMLFormatter,
|
9
|
+
Coveralls::SimpleCov::Formatter
|
10
|
+
]
|
11
|
+
SimpleCov.start do
|
12
|
+
add_filter 'spec'
|
13
|
+
end
|
14
|
+
|
15
|
+
require 'haml/flatrack'
|
16
|
+
Dir["./spec/support/**/*.rb"].sort.each {|f| require f}
|
17
|
+
|
18
|
+
RSpec.configure do |config|
|
19
|
+
config.run_all_when_everything_filtered = true
|
20
|
+
config.filter_run focus: true
|
21
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
class Flatrack
|
2
|
+
module FixtureHelper
|
3
|
+
extend FileUtils
|
4
|
+
include FileUtils
|
5
|
+
|
6
|
+
def render_template(fixture)
|
7
|
+
path = File.join File.dirname(__FILE__), '../fixtures/templates', fixture
|
8
|
+
view.render(path).lines.map(&:strip).join
|
9
|
+
end
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def response
|
14
|
+
Flatrack::Response.new request
|
15
|
+
end
|
16
|
+
|
17
|
+
def request
|
18
|
+
Flatrack::Request.new env
|
19
|
+
end
|
20
|
+
|
21
|
+
def view
|
22
|
+
Flatrack::View.new response
|
23
|
+
end
|
24
|
+
|
25
|
+
def env
|
26
|
+
Rack::MockRequest.env_for 'http://example.org/index.html'
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: haml-flatrack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Waldrip
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: flatrack
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.2'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.2'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,20 +52,152 @@ dependencies:
|
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '1.5'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.14'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.14'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.5'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.5'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '4.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '4.2'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: guard-bundler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.9'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.9'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: coveralls
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.7'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.7'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: simplecov
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.8'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.8'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.18.1
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.18.1
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: inch
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.3.2
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 0.3.2
|
41
181
|
- !ruby/object:Gem::Dependency
|
42
182
|
name: rake
|
43
183
|
requirement: !ruby/object:Gem::Requirement
|
44
184
|
requirements:
|
45
|
-
- - "
|
185
|
+
- - ">"
|
46
186
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
187
|
+
version: 0.8.7
|
188
|
+
- - "<"
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
version: '10.2'
|
48
191
|
type: :development
|
49
192
|
prerelease: false
|
50
193
|
version_requirements: !ruby/object:Gem::Requirement
|
51
194
|
requirements:
|
52
|
-
- - "
|
195
|
+
- - ">"
|
53
196
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
197
|
+
version: 0.8.7
|
198
|
+
- - "<"
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '10.2'
|
55
201
|
description:
|
56
202
|
email:
|
57
203
|
- jason@waldrip.net
|
@@ -60,14 +206,43 @@ extensions: []
|
|
60
206
|
extra_rdoc_files: []
|
61
207
|
files:
|
62
208
|
- ".gitignore"
|
209
|
+
- ".gitmodules"
|
210
|
+
- ".rspec"
|
211
|
+
- ".rubocop.yml"
|
212
|
+
- ".ruby-version"
|
213
|
+
- ".travis.yml"
|
63
214
|
- Gemfile
|
215
|
+
- Guardfile
|
64
216
|
- LICENSE.txt
|
65
217
|
- README.md
|
66
218
|
- Rakefile
|
67
219
|
- haml-flatrack.gemspec
|
68
220
|
- lib/haml/flatrack.rb
|
69
|
-
- lib/haml/flatrack/
|
221
|
+
- lib/haml/flatrack/template_additions.rb
|
70
222
|
- lib/haml/flatrack/version.rb
|
223
|
+
- lib/haml/flatrack/view_additions.rb
|
224
|
+
- lib/haml/flatrack/view_additions/capture_helper.rb
|
225
|
+
- lib/haml/flatrack/view_additions/render_helper.rb
|
226
|
+
- lib/haml/flatrack/view_additions/tag_helper.rb
|
227
|
+
- spec/fixtures/assets/sample.css.scss
|
228
|
+
- spec/fixtures/assets/sample.js.coffee
|
229
|
+
- spec/fixtures/templates/html_tag.html
|
230
|
+
- spec/fixtures/templates/html_tag.html.erb
|
231
|
+
- spec/fixtures/templates/html_tag.html.haml
|
232
|
+
- spec/fixtures/templates/image_tag.html
|
233
|
+
- spec/fixtures/templates/image_tag.html.haml
|
234
|
+
- spec/fixtures/templates/javascript_tag.html
|
235
|
+
- spec/fixtures/templates/javascript_tag.html.haml
|
236
|
+
- spec/fixtures/templates/link_to.html
|
237
|
+
- spec/fixtures/templates/link_to.html.haml
|
238
|
+
- spec/fixtures/templates/preserved_tag.html
|
239
|
+
- spec/fixtures/templates/preserved_tag.html.haml
|
240
|
+
- spec/fixtures/templates/stylesheet_tag.html
|
241
|
+
- spec/fixtures/templates/stylesheet_tag.html.haml
|
242
|
+
- spec/lib/haml/flatrack/view_additions/link_helper_spec.rb
|
243
|
+
- spec/lib/haml/flatrack/view_additions/tag_helper_spec.rb
|
244
|
+
- spec/spec_helper.rb
|
245
|
+
- spec/support/fixture_helper.rb
|
71
246
|
homepage: ''
|
72
247
|
licenses:
|
73
248
|
- MIT
|
@@ -88,8 +263,28 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
263
|
version: '0'
|
89
264
|
requirements: []
|
90
265
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.2.
|
266
|
+
rubygems_version: 2.2.2
|
92
267
|
signing_key:
|
93
268
|
specification_version: 4
|
94
269
|
summary: Haml for flatrack
|
95
|
-
test_files:
|
270
|
+
test_files:
|
271
|
+
- spec/fixtures/assets/sample.css.scss
|
272
|
+
- spec/fixtures/assets/sample.js.coffee
|
273
|
+
- spec/fixtures/templates/html_tag.html
|
274
|
+
- spec/fixtures/templates/html_tag.html.erb
|
275
|
+
- spec/fixtures/templates/html_tag.html.haml
|
276
|
+
- spec/fixtures/templates/image_tag.html
|
277
|
+
- spec/fixtures/templates/image_tag.html.haml
|
278
|
+
- spec/fixtures/templates/javascript_tag.html
|
279
|
+
- spec/fixtures/templates/javascript_tag.html.haml
|
280
|
+
- spec/fixtures/templates/link_to.html
|
281
|
+
- spec/fixtures/templates/link_to.html.haml
|
282
|
+
- spec/fixtures/templates/preserved_tag.html
|
283
|
+
- spec/fixtures/templates/preserved_tag.html.haml
|
284
|
+
- spec/fixtures/templates/stylesheet_tag.html
|
285
|
+
- spec/fixtures/templates/stylesheet_tag.html.haml
|
286
|
+
- spec/lib/haml/flatrack/view_additions/link_helper_spec.rb
|
287
|
+
- spec/lib/haml/flatrack/view_additions/tag_helper_spec.rb
|
288
|
+
- spec/spec_helper.rb
|
289
|
+
- spec/support/fixture_helper.rb
|
290
|
+
has_rdoc:
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'haml'
|
2
|
-
require 'flatrack/renderer/base'
|
3
|
-
|
4
|
-
module Haml
|
5
|
-
module Flatrack
|
6
|
-
class Renderer < ::Flatrack::Renderer::Base
|
7
|
-
|
8
|
-
renders :haml
|
9
|
-
|
10
|
-
def render(context = binding, &block)
|
11
|
-
::Haml::Engine.new(contents).render(context, &block)
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|