cells-haml 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -1
- data/Gemfile +2 -2
- data/lib/cell/haml/rails.rb +20 -0
- data/lib/cell/haml/version.rb +1 -1
- data/lib/cell/haml.rb +4 -24
- data/test/dummy/app/cells/song/with_form_tag_and_content_tag.haml +3 -0
- data/test/haml_test.rb +3 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e329f5d26cb5f6cd564e0b7c9223c44407b04aa
|
4
|
+
data.tar.gz: 104f171e7b76879fb091896e47f0200109693091
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06c1844ab7324bada0a58b7e35e700ba2cdad58c1a4def2c9407aac14131dc55f902ccebb6d07e1e7aaa147a97f5450ee2c9abf8aaddbb5d29caf5997d036401
|
7
|
+
data.tar.gz: f180a268b49f8f9f50ff2bcecf9f200fd0be9c9f672c9439b8bff4ceed5bf4f47f24164e9c2fc41673113c07fa509e7c56f1090408a38b47e317e8ec3ca0d243
|
data/CHANGES.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# 0.0.9
|
2
|
+
|
3
|
+
* Make Rails optional.
|
4
|
+
|
1
5
|
# 0.0.8
|
2
6
|
|
3
7
|
Require >= haml-4.1.0.beta.1 as haml-rails doesn't know about its 5.0 compatibility, yet. You need to use commit , ref: `7c7c169`.
|
@@ -14,4 +18,4 @@ Require >= haml-5.0.0.beta2.
|
|
14
18
|
|
15
19
|
# 0.0.4
|
16
20
|
|
17
|
-
* Added `capture` helper to override Rails escaping.
|
21
|
+
* Added `capture` helper to override Rails escaping.
|
data/Gemfile
CHANGED
@@ -3,8 +3,8 @@ source 'https://rubygems.org'
|
|
3
3
|
# Specify your gem's dependencies in cells-haml.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem 'cells', path: "../cells"#github: 'apotonick/cells'
|
6
|
+
# gem 'cells', path: "../cells"#github: 'apotonick/cells'
|
7
7
|
gem 'railties'
|
8
8
|
gem 'actionpack'
|
9
9
|
gem 'actionview'
|
10
|
-
gem "haml", github:"haml/haml" #"4.1.0.beta1" #github: "haml/haml" # we need 4.1.
|
10
|
+
gem "haml", github:"haml/haml", ref: "7c7c169" #"4.1.0.beta1" #github: "haml/haml" # we need 4.1.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Cell
|
2
|
+
module Haml::Rails
|
3
|
+
def self.included(includer)
|
4
|
+
includer.send :include, ActionView::Helpers::FormHelper
|
5
|
+
includer.send :include, Helpers
|
6
|
+
end
|
7
|
+
|
8
|
+
module Helpers
|
9
|
+
# From FormTagHelper. why do they escape every possible string? why?
|
10
|
+
def form_tag_in_block(html_options, &block)
|
11
|
+
content = capture(&block)
|
12
|
+
form_tag_with_body(html_options, content)
|
13
|
+
end
|
14
|
+
|
15
|
+
def form_tag_with_body(html_options, content)
|
16
|
+
"#{form_tag_html(html_options)}" << content.to_s << "</form>"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/cell/haml/version.rb
CHANGED
data/lib/cell/haml.rb
CHANGED
@@ -13,29 +13,9 @@ module Cell
|
|
13
13
|
|
14
14
|
attr_writer :output_buffer
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
def form_tag_in_block(html_options, &block)
|
20
|
-
content = capture(&block)
|
21
|
-
form_tag_with_body(html_options, content)
|
22
|
-
end
|
23
|
-
|
24
|
-
def form_tag_with_body(html_options, content)
|
25
|
-
"#{form_tag_html(html_options)}" << content.to_s << "</form>"
|
16
|
+
if Object.const_defined?(:ActionView)
|
17
|
+
require "cell/haml/rails"
|
18
|
+
include Cell::Haml::Rails
|
26
19
|
end
|
27
|
-
|
28
|
-
# def form_tag_html(html_options)
|
29
|
-
# extra_tags = extra_tags_for_form(html_options)
|
30
|
-
# "#{tag(:form, html_options, true) + extra_tags}"
|
31
|
-
# end
|
32
|
-
|
33
|
-
# def form_for(*args, &block) # TODO: remove this once Haml 4.1 is out. the form_for_with_haml is buggy.
|
34
|
-
# form_for_without_haml(*args, &block)
|
35
|
-
# end
|
36
|
-
|
37
|
-
# def content_tag(name, content_or_options_with_block=nil, options=nil, escape=false, &block)
|
38
|
-
# super
|
39
|
-
# end
|
40
20
|
end
|
41
|
-
end
|
21
|
+
end
|
data/test/haml_test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cells-haml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abdelkader Boudih
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cells
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- gemfiles/rails_4.2-tilt-2.0.gemfile
|
91
91
|
- gemfiles/rails_4.2-tilt-3.0.gemfile
|
92
92
|
- lib/cell/haml.rb
|
93
|
+
- lib/cell/haml/rails.rb
|
93
94
|
- lib/cell/haml/version.rb
|
94
95
|
- lib/cells-haml.rb
|
95
96
|
- test/cell_generator_test.rb
|
@@ -131,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
132
|
version: '0'
|
132
133
|
requirements: []
|
133
134
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.
|
135
|
+
rubygems_version: 2.4.8
|
135
136
|
signing_key:
|
136
137
|
specification_version: 4
|
137
138
|
summary: Haml integration for Cells
|