cells-slim 0.0.5 → 0.0.6

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
- SHA1:
3
- metadata.gz: 38cd125a9853ca57cd03bbc8eeaa908eba711c63
4
- data.tar.gz: 60c330a0cc1b48b92a54fcfae6f0f3eb5ae95d46
2
+ SHA256:
3
+ metadata.gz: f0b5b27149489ac1f463ca7aafd322561c88edaca5dcf89c1449cc560c1d9c3e
4
+ data.tar.gz: 9ef5b16f43aade60de28631ec83b085fa8c834266d52c29ed51261aca4c8acb0
5
5
  SHA512:
6
- metadata.gz: 7cc7a327698372e4459b39673b3486866ee8e102cfce030081496ffc43cff185132a01da7fd905106c4d99161b132a573c8cf1d6070dc36a59dcf4095f53bba3
7
- data.tar.gz: e43274ea550c28b0e110588cbb18d4c5369abaf15ef1ea5618aa4df1013d7e8d84075592188b773f6fa412c5cbc6d24f87f65e5bbd4ce45e7ba9eda7460c1764
6
+ metadata.gz: 6faa7c49ae0948e26b1cbbe4add6d53ebb12a6d35c75e8dd8c39af967d0d33780510730659c9b0dba096fd6e460bb6f685c32345026820b6408a6ee9bb5ed044
7
+ data.tar.gz: 40112c9d040e15a4144f676af28f204f5c831979381c1690730b90a87b0b6037be763216b758570ac2f0df2d4d308bbfa83ef236820f9a55fc47e4d73d8d0d4e
@@ -1,8 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.4.1
4
+ - 2.3.3
3
5
  - 2.2
4
6
  - 2.1
5
- - 2.0.0
6
7
 
7
8
  sudo: false
8
9
 
@@ -10,5 +11,3 @@ bundler_args: '--without local_development --jobs 3 --retry 3'
10
11
 
11
12
  script: bundle exec rake
12
13
 
13
- gemfile:
14
- - gemfiles/rails4.2.gemfile
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.0.6
2
+
3
+ * Rails 5.1 compatibility
4
+ * `cells` is now explicitly required as a dependency
5
+
1
6
  # 0.0.5
2
7
 
3
8
  * Restrict to Cells < 5.0.0.
data/README.md CHANGED
@@ -19,6 +19,38 @@ class CommentCell < Cell::ViewModel
19
19
  include Cell::Slim
20
20
  ```
21
21
 
22
+ ## Important
23
+
24
+ Cells Slim change default settings for Slim and disables escaping in templates.
25
+ To re-enable it, you can use below snippet:
26
+
27
+ It can be changed easy by override **template_options_for** from **Cells::Slim**:
28
+ ```ruby
29
+ module Cell
30
+ module Slim
31
+ def template_options_for(options)
32
+ {
33
+ template_class: ::Slim::Template,
34
+ suffix: 'slim',
35
+ disable_escape: false,
36
+ escape_code: false,
37
+ use_html_safe: false, # set true for Rails
38
+ buffer: '@output_buffer'
39
+ }
40
+ end
41
+ end
42
+ end
43
+ ```
44
+
45
+ This can be put in **config/application.rb**.
46
+
47
+ **Remember** that you need to use '==' instead of '=' ([reference in Slim docs](http://www.rubydoc.info/gems/slim/frames#Output_without_HTML_escaping___)) in your templates for code which should not be escaped, for example form_builder (notice that only from_for line require '=='):
48
+ ```
49
+ == form_for model, url: users_path, method: method do |f|
50
+ = f.text_field :first_name
51
+ = f.text_field :last_name
52
+ ```
53
+
22
54
  ## Documentation
23
55
 
24
- [More documentation](http://trailblazerb.org/gems/cells/templates.html) can be found on the Trailblazer page.
56
+ [More documentation](http://trailblazer.to/gems/cells/templates.html) can be found on the Trailblazer page.
@@ -37,12 +37,12 @@ module Cell
37
37
  "#{tag(:form, html_options, true) + extra_tags}"
38
38
  end
39
39
 
40
- def tag_options(options, escape = true)
41
- super(options, true)
40
+ def tag(name = nil, options = nil, open = false, escape = true)
41
+ super(name, options, open, true)
42
42
  end
43
43
 
44
- def content_tag_string(name, content, options, escape=true)
45
- super(name, content, options, false)
44
+ def content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block)
45
+ super(name, content_or_options_with_block, options, false, &block)
46
46
  end
47
47
 
48
48
  def concat(string)
@@ -1,5 +1,5 @@
1
1
  module Cell
2
2
  module Slim
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -1 +1,2 @@
1
- require "cell/slim"
1
+ require "cells"
2
+ require "cell/slim"
@@ -5,7 +5,6 @@ ENV['RAILS_ENV'] = 'test'
5
5
  require_relative 'dummy/config/environment'
6
6
  require "rails/test_help" # adds stuff like @routes, etc.
7
7
 
8
- require "cell/railtie"
9
8
  require 'cell/slim'
10
9
 
11
10
  # Cell::ViewModel.send :include, Cell::Slim
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.5
4
+ version: 0.0.6
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: 2016-04-18 00:00:00.000000000 Z
12
+ date: 2018-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cells
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  requirements: []
133
133
  rubyforge_project:
134
- rubygems_version: 2.4.8
134
+ rubygems_version: 2.7.3
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: Slim integration for Cells.