cells-slim 0.0.2 → 0.0.3

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: f150ba4af0b1d9be44e276ef2082d325632a0e78
4
- data.tar.gz: 4a856b33b8fa00d1e9407b77bbf0154121a269a5
3
+ metadata.gz: 6a53be884b2a5686c65df3b073d2010c380f255e
4
+ data.tar.gz: 9476c9c296cf27f24e2d01fb0776f760b8098db8
5
5
  SHA512:
6
- metadata.gz: 32f23e27d4f67d50314d41656a4f189304445d14223753ec64de2e2e1245e273dc4143a7cfa7ae984a09aa04e03c81b75bd4ba037bef8cce2139a26a7f6c96a8
7
- data.tar.gz: 85b7e71eedc1b18c8164cbaeaadf2a81da8d44a5852b9146154d56aa09fd58d92fb2a6d2e14c2d31410251e4de6f102b19b68a2851268cac343582ad2efeac51
6
+ metadata.gz: 8751297e177abc681d5adeb06f5916ba8fe77f2d4db3038d768d940168f9807aaa5e677a8ea1379988113e8b1c266d609e3fce2fbc974a9eaf67afd416c4c18c
7
+ data.tar.gz: 6f41d30423fd9157f1e430029a6488c59d95d813ae3fd1e10713508bda339c61808c1e3abc586deca576b73d9b3d05744878d6a49c2fd200792fd0d325d1f210
@@ -11,4 +11,3 @@ script: bundle exec rake
11
11
 
12
12
  gemfile:
13
13
  - gemfiles/rails4.2.gemfile
14
- - gemfiles/rails4.1.gemfile
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ 0.0.3
2
+
3
+ * Fix #concat.
4
+ * Change #tag_options so it escapes strings.
5
+ * Remove #tag_option.
6
+
1
7
  # 0.0.2
2
8
 
3
9
  * Updates for Cells 4: Fixes output_buffer.
data/README.md CHANGED
@@ -12,7 +12,7 @@ gem 'cells-slim'
12
12
 
13
13
  ## Usage
14
14
 
15
- Outside of Rails, you need to include `Cell::Erb` in your cell.
15
+ Outside of Rails, you need to include `Cell::Slim` in your cell.
16
16
 
17
17
  ```ruby
18
18
  class CommentCell < Cell::ViewModel
@@ -21,4 +21,4 @@ class CommentCell < Cell::ViewModel
21
21
 
22
22
  ## Documentation
23
23
 
24
- [More documentation](http://trailblazerb.org/gems/cells/templates.html) can be found on the Trailblazer page.
24
+ [More documentation](http://trailblazerb.org/gems/cells/templates.html) can be found on the Trailblazer page.
@@ -1,12 +1,7 @@
1
- # This file was generated by Appraisal
2
-
3
1
  source "https://rubygems.org"
4
2
 
5
- gem "pry-byebug", :platforms => [:mri_20, :mri_21]
6
- gem "appraisal"
7
- gem "minitest-reporters"
8
- gem "cells", :github => "apotonick/cells", :branch => "cells-4"
3
+ gem "cells", "4.0.0.beta6"
9
4
  gem "railties", "~> 4.2.0"
10
5
  gem "minitest", "~> 5.2"
11
6
 
12
- gemspec :path => "../"
7
+ gemspec path: "../"
@@ -54,13 +54,16 @@ module Cell
54
54
  "#{tag(:form, html_options, true) + extra_tags}"
55
55
  end
56
56
 
57
- # Rails 4.0, TagHelper.
58
- def tag_option(key, value, escape)
59
- super(key, value, false)
57
+ def tag_options(options, escape = true)
58
+ super(options, true)
60
59
  end
61
60
 
62
61
  def content_tag_string(name, content, options, escape=true)
63
62
  super(name, content, options, false)
64
63
  end
64
+
65
+ def concat(string)
66
+ @output_buffer << string
67
+ end
65
68
  end
66
69
  end
@@ -1,5 +1,5 @@
1
1
  module Cell
2
2
  module Slim
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -5,7 +5,7 @@
5
5
  = link_to "/rails/sucks"
6
6
  | hallo
7
7
 
8
- = content_tag(:ul)
8
+ = content_tag(:ul, "data-x" => '{"a":"1"}')
9
9
  | Hallo
10
10
 
11
11
  - answer = "<script>oui!</script>"
@@ -32,3 +32,5 @@
32
32
 
33
33
  = form_for OpenStruct.new, url: "/", as: "open" do |f|
34
34
  = f.text_field :id
35
+
36
+ = concatting
@@ -55,4 +55,11 @@ private
55
55
  "<b>No current page!<b>".html_safe
56
56
  end
57
57
  end
58
+
59
+ def concatting
60
+ content_tag :div do
61
+ concat content_tag :p, "Concat!"
62
+ concat "Whoo"
63
+ end
64
+ end
58
65
  end
@@ -33,7 +33,7 @@ class SlimTest < MiniTest::Spec
33
33
  #{input_tag}
34
34
  <a href=\"/rails/sucks\">hallo
35
35
  </a>
36
- <ul>Hallo
36
+ <ul data-x="{&quot;a&quot;:&quot;1&quot;}">Hallo
37
37
  </ul>
38
38
  </form>
39
39
  Weiter!
@@ -46,6 +46,7 @@ Bonjour!
46
46
  #{form_with_body_tag}
47
47
  #{form_for_tag}
48
48
  </form>
49
+ <div><p>Concat!</p>Whoo</div>
49
50
  }.gsub("\n", "").gsub(" ", "")
50
51
  end
51
52
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cells-slim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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-05 00:00:00.000000000 Z
12
+ date: 2015-06-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cells
@@ -83,7 +83,6 @@ files:
83
83
  - README.md
84
84
  - Rakefile
85
85
  - cells-slim.gemspec
86
- - gemfiles/rails4.1.gemfile
87
86
  - gemfiles/rails4.2.gemfile
88
87
  - lib/cell/slim.rb
89
88
  - lib/cell/slim/version.rb
@@ -1,12 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "pry-byebug", :platforms => [:mri_20, :mri_21]
6
- gem "appraisal"
7
- gem "minitest-reporters"
8
- gem "cells", :github => "apotonick/cells", :branch => "cells-4"
9
- gem "railties", "~> 4.1.0"
10
- gem "minitest", "~> 5.2"
11
-
12
- gemspec :path => "../"