cells-haml 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0f73d06290427c68b91eb0d931dec9eef52e02c
4
- data.tar.gz: 061a88e884f257cf8e3bf6a608c89e7cf5e1abca
3
+ metadata.gz: 0e329f5d26cb5f6cd564e0b7c9223c44407b04aa
4
+ data.tar.gz: 104f171e7b76879fb091896e47f0200109693091
5
5
  SHA512:
6
- metadata.gz: 9cb262e8d90a0c1f01950c961dc690b4f735102b080fa2980e05207bf52783eef20442dcfc3422ceb39daf473dadf8cad4f1cad08d5edbd69647965e9dfa2d12
7
- data.tar.gz: 50f0f1f294dc5f8cd0522820935f021a606a7d0625de837f2ffcf261cad4a7833da6c646565fbbdff60e27eacea9b8a9309df783cb1b818aaa170702c9946acb
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
@@ -1,5 +1,5 @@
1
1
  module Cell
2
2
  module Haml
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
data/lib/cell/haml.rb CHANGED
@@ -13,29 +13,9 @@ module Cell
13
13
 
14
14
  attr_writer :output_buffer
15
15
 
16
- include ActionView::Helpers::FormHelper
17
-
18
- # From FormTagHelper. why do they escape every possible string? why?
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
@@ -4,6 +4,9 @@ Word.
4
4
  = text_field_tag :id
5
5
  = link_to "/rails/sucks" do
6
6
  hallo
7
+ .row
8
+ Cool
9
+
7
10
 
8
11
  = content_tag(:ul) do
9
12
  Hallo
data/test/haml_test.rb CHANGED
@@ -39,6 +39,9 @@ class HamlTest < MiniTest::Spec
39
39
  #{form_tag}
40
40
  #{input_tag}
41
41
  <a href=\"/rails/sucks\">hallo
42
+ <div class='row'>
43
+ Cool
44
+ </div>
42
45
  </a>
43
46
  <ul>Hallo
44
47
  </ul>
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.8
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: 2015-06-09 00:00:00.000000000 Z
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.2.2
135
+ rubygems_version: 2.4.8
135
136
  signing_key:
136
137
  specification_version: 4
137
138
  summary: Haml integration for Cells