cells-haml 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1fff5928a0a320599bd5fa9a1cf5bd7188e5110
4
- data.tar.gz: b18d5b39e8b5da0815fe0b2d2a975a2f86673d1f
3
+ metadata.gz: 9d164d78990344d5558e5e9a0e599a025e6e9edf
4
+ data.tar.gz: 9ecf73ac5ef7ab21a6ac190730a0a5277f9dba64
5
5
  SHA512:
6
- metadata.gz: 659f4e915f806adb3dffc4e8e5a1b93ea10f1ec99b7163a0e5211c7522a11a15e1c0c5424f25855405948125f47d8cfecf97b3bf2ae764e68021e161aeb7bf33
7
- data.tar.gz: 563e408aa0e04a5f652850016a7791356ae25a787dc5e76a0bd167993590445259cde1126fc58c60096d169449921e8f83b168bd3b981e2833da11d727f00ec5
6
+ metadata.gz: 58dec84fbd28d6a92506d64fe92d30e11dd7a3df4b1e13aebfbc1211854d5faee464e5f7eeaec3849a363d97e1a800c0d43445b71b18ca222cfc9fea6d6a63b2
7
+ data.tar.gz: 7204ba46aeb830d110493064adc5cc3426bfe9da4a2e59772160d14772872224be7a5446b9f3aeb775de6a85975f1d96d8bc4d3179c60c0aad512dfd5877bdec
@@ -0,0 +1,4 @@
1
+ gemfile:
2
+ - gemfiles/rails4.2-tilt-1.4.gemfile
3
+ - gemfiles/rails4.2-tilt-2.0.gemfile
4
+ - gemfiles/rails3.2-tilt-1.4.gemfile
@@ -1,10 +1,11 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
1
+ lib = File.expand_path('../lib/', __FILE__)
2
+ $:.unshift lib unless $:.include?(lib)
3
+
4
+ require 'cell/haml/version'
4
5
 
5
6
  Gem::Specification.new do |spec|
6
7
  spec.name = 'cells-haml'
7
- spec.version = '0.0.1'
8
+ spec.version = Cell::Haml::VERSION
8
9
  spec.authors = ['Abdelkader Boudih', 'Nick Sutterer']
9
10
  spec.email = %w(terminale@gmail.com apotonick@gmail.com)
10
11
  spec.summary = 'Haml integration for Cells'
@@ -18,6 +19,6 @@ Gem::Specification.new do |spec|
18
19
 
19
20
  spec.add_runtime_dependency 'cells', '~> 4.0.0.beta'
20
21
  spec.add_runtime_dependency 'haml', '~> 4.0'
21
- spec.add_development_dependency 'bundler', '>= 1.6'
22
- spec.add_development_dependency 'rake', '~> 10.0'
22
+ spec.add_development_dependency 'bundler'
23
+ spec.add_development_dependency 'rake'
23
24
  end
@@ -0,0 +1,15 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "cells", :github => "apotonick/cells"
6
+ #gem "cells", path: "../../cells"
7
+ gem "appraisal"
8
+ gem "railties", "~> 4.2.0"
9
+ gem "activemodel"
10
+ gem "minitest", "~> 5.2"
11
+ gem "tilt", "~> 1.4"
12
+
13
+ gemspec :path => "../"
14
+
15
+ # gem "erbse", path: "../../erbse"
@@ -0,0 +1,13 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "cells", :github => "apotonick/cells"
6
+ #gem "cells", path: "../../cells"
7
+ gem "appraisal"
8
+ gem "railties", "~> 4.2.0"
9
+ gem "activemodel"
10
+ gem "minitest", "~> 5.2"
11
+ gem "tilt", "~> 2.0"
12
+
13
+ gemspec :path => "../"
@@ -0,0 +1,13 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "cells", :github => "apotonick/cells"
6
+ #gem "cells", path: "../../cells"
7
+ gem "appraisal"
8
+ gem "railties", "~> 4.2.0"
9
+ gem "activemodel"
10
+ gem "minitest", "~> 5.2"
11
+ gem "tilt", "~> 3.0"
12
+
13
+ gemspec :path => "../"
@@ -1,4 +1,3 @@
1
- require 'cells'
2
1
  require 'tilt/haml'
3
2
 
4
3
  module Cell
@@ -86,4 +85,4 @@ module Cell
86
85
  end
87
86
 
88
87
  ViewModel.template_engine = :haml
89
- end
88
+ end
@@ -0,0 +1,5 @@
1
+ module Cell
2
+ module Haml
3
+ VERSION = "0.0.2"
4
+ end
5
+ end
File without changes
@@ -0,0 +1 @@
1
+ = content_tag(:div) { "Beachparty" }
@@ -0,0 +1,4 @@
1
+ = content_tag :span do
2
+ Title:
3
+ = content_tag :div do
4
+ Still Knee Deep
@@ -0,0 +1,8 @@
1
+ Word.
2
+
3
+ = form_tag "/erubis/is/horribly/outdated" do
4
+ = link_to "/rails/sucks" do
5
+ hallo
6
+
7
+ = content_tag( :ul) do
8
+ Hallo
@@ -0,0 +1,42 @@
1
+ class SongCell < Cell::ViewModel
2
+ self.view_paths = ["test/dummy/app/cells"]
3
+
4
+ include ActionView::Helpers::FormHelper
5
+
6
+ def with_form_tag_and_content_tag
7
+ render
8
+ end
9
+
10
+ def with_content_tag_and_content_tag
11
+ render
12
+ end
13
+
14
+ def with_content_tag
15
+ render
16
+ end
17
+
18
+ def with_block
19
+ render
20
+ end
21
+
22
+ def with_capture
23
+ render
24
+ end
25
+
26
+ def with_form_tag
27
+ form_tag("/songs") + content_tag(:span) + "</form>"
28
+ end
29
+
30
+ def with_link_to
31
+ render
32
+ end
33
+
34
+ def with_form_for_block
35
+ render
36
+ end
37
+
38
+ private
39
+ def cap
40
+ "yay, #{with_output_buffer { yield } }"
41
+ end
42
+ end
@@ -1,7 +1,40 @@
1
1
  require 'test_helper'
2
2
 
3
- class HamlTest < MiniTest::Test
4
- def test_template_engine
5
- assert_equal :haml, Cell::ViewModel.template_engine
3
+ class HamlTest < MiniTest::Spec
4
+ it { Cell::ViewModel.template_engine.must_equal :haml }
5
+
6
+
7
+ let (:controller) { ApplicationController.new.tap { |ctl| ctl.send("request=", ActionDispatch::Request.new({})) } }
8
+ let (:song_cell) { SongCell.new(controller) }
9
+
10
+
11
+ # URL helpers work in cell instance.
12
+ it { song_cell.songs_path.must_equal "/songs" }
13
+
14
+ # content_tag { }
15
+ it { song_cell.(:with_content_tag).must_equal "<div>Beachparty</div>\n" }
16
+
17
+ # content_tag { content_tag { } }
18
+ it do song_cell.(:with_content_tag_and_content_tag).must_equal %{<span>Title:
19
+ <div>Still Knee Deep
20
+ </div>
21
+ </span>
22
+ }
6
23
  end
24
+
25
+ # form_tag { content_tag { } }
26
+ it( "xxx") do
27
+ form_tag = "<form action=\"/erubis/is/horribly/outdated\" accept-charset=\"UTF-8\" method=\"post\"><input name=\"utf8\" type=\"hidden\" value=\"&#x2713;\" />"
28
+ form_tag = "<form accept-charset=\"UTF-8\" action=\"/erubis/is/horribly/outdated\" method=\"post\"><div style=\"margin:0;padding:0;display:inline\"><input name=\"utf8\" type=\"hidden\" value=\"&#x2713;\" /></div>" if ActionPack::VERSION::MAJOR == 3
29
+
30
+ song_cell.(:with_form_tag_and_content_tag).must_equal %{Word.
31
+ #{form_tag}
32
+ <a href=\"/rails/sucks\">hallo
33
+ </a>
34
+ <ul>Hallo
35
+ </ul>
36
+ </form>
37
+ }
38
+ end
39
+
7
40
  end
@@ -1,13 +1,10 @@
1
- begin
2
- require 'byebug'
3
- rescue LoadError
4
- end
5
- require 'minitest/reporters'
6
- Minitest::Reporters.use! [Minitest::Reporters::ProgressReporter.new]
1
+ require "pp"
7
2
  require 'minitest/autorun'
8
3
 
9
4
  ENV['RAILS_ENV'] = 'test'
10
5
 
11
- require 'cells'
6
+
7
+ require "cells"
12
8
  require_relative 'dummy/config/environment'
13
- require 'cell/haml'
9
+
10
+ require "cells-haml"
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.1
4
+ version: 0.0.2
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-02-13 00:00:00.000000000 Z
12
+ date: 2015-05-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cells
@@ -45,28 +45,28 @@ dependencies:
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '1.6'
48
+ version: '0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '1.6'
55
+ version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rake
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: '10.0'
62
+ version: '0'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
- version: '10.0'
69
+ version: '0'
70
70
  description: Haml integration for Cells
71
71
  email:
72
72
  - terminale@gmail.com
@@ -76,15 +76,24 @@ extensions: []
76
76
  extra_rdoc_files: []
77
77
  files:
78
78
  - ".gitignore"
79
+ - ".travis.yml"
79
80
  - Gemfile
80
81
  - LICENSE.txt
81
82
  - README.md
82
83
  - Rakefile
83
84
  - cells-haml.gemspec
85
+ - gemfiles/rails_4.2-tilt-1.4.gemfile
86
+ - gemfiles/rails_4.2-tilt-2.0.gemfile
87
+ - gemfiles/rails_4.2-tilt-3.0.gemfile
84
88
  - lib/cell/haml.rb
85
- - lib/cells/haml.rb
89
+ - lib/cell/haml/version.rb
90
+ - lib/cells-haml.rb
86
91
  - test/cell_generator_test.rb
87
92
  - test/dummy/Rakefile
93
+ - test/dummy/app/cells/song/with_content_tag.haml
94
+ - test/dummy/app/cells/song/with_content_tag_and_content_tag.haml
95
+ - test/dummy/app/cells/song/with_form_tag_and_content_tag.haml
96
+ - test/dummy/app/cells/song_cell.rb
88
97
  - test/dummy/app/controllers/application_controller.rb
89
98
  - test/dummy/config.ru
90
99
  - test/dummy/config/application.rb
@@ -116,13 +125,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
125
  version: '0'
117
126
  requirements: []
118
127
  rubyforge_project:
119
- rubygems_version: 2.4.5
128
+ rubygems_version: 2.2.2
120
129
  signing_key:
121
130
  specification_version: 4
122
131
  summary: Haml integration for Cells
123
132
  test_files:
124
133
  - test/cell_generator_test.rb
125
134
  - test/dummy/Rakefile
135
+ - test/dummy/app/cells/song/with_content_tag.haml
136
+ - test/dummy/app/cells/song/with_content_tag_and_content_tag.haml
137
+ - test/dummy/app/cells/song/with_form_tag_and_content_tag.haml
138
+ - test/dummy/app/cells/song_cell.rb
126
139
  - test/dummy/app/controllers/application_controller.rb
127
140
  - test/dummy/config.ru
128
141
  - test/dummy/config/application.rb
@@ -134,4 +147,3 @@ test_files:
134
147
  - test/dummy/config/routes.rb
135
148
  - test/haml_test.rb
136
149
  - test/test_helper.rb
137
- has_rdoc: