cells-rails 0.0.6 → 0.0.7

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: 40821ac015d8c060bd0a7256a50df3e1cd2bfbc4
4
- data.tar.gz: c1b0af24dfd1e96b8ce41a4edfe5ed1706745628
3
+ metadata.gz: 05ee3c22a3ba550a3b49e0211f09027266ba2b1d
4
+ data.tar.gz: 2138fec9accdbe789f88899b84458e7c605c9992
5
5
  SHA512:
6
- metadata.gz: f0f8edd58721c1bfa8c151dc410d20d6a4ad6841e0484f75bffddb49eaa85bde373d75de2fd735b6134b530ea0f38fbe24535f25c49dc7a37886204c6378f4a8
7
- data.tar.gz: 928d93f1c90cc4676b701b6070569a6535390509f1e8595b2f4454d8b81040ca70362253009bba7608c41364b6626700edaecdb16a3e3d2192a62b3498c0cf81
6
+ metadata.gz: 09e7bd48a9fec96bff53f3243323412d655c7a5b9c5b2b23022c60e5926e4ec5da180badc27bf59e04335fa0de1b69b42336a4b76355e601608968e87a605bd1
7
+ data.tar.gz: 46282c8f28d538c0984dd857ba67e8ba0f35a6153d275475077c85fe45d0af87b4fbf16fa11906878e2c02a3b05e7c2b7098ad45b2c904fb6d039e219977c3eb
data/CHANGES.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.0.7
2
+
3
+ * Add `config.cells.include_template_engine = false` to turn off automatic
4
+ inclusion of, e.g., `Cell::Slim`.
5
+ * Require Cells >= 4.1.6.
6
+
1
7
  ## 0.0.6
2
8
 
3
9
  * `Testing` fixed with Rails 5.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Nick Sutterer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -18,3 +18,7 @@ Add this line to your application's Gemfile and keep it real:
18
18
  ```ruby
19
19
  gem 'cells-rails'
20
20
  ```
21
+
22
+ ## License
23
+
24
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/cells-rails.gemspec CHANGED
@@ -7,6 +7,7 @@ Gem::Specification.new do |spec|
7
7
  spec.version = Cells::Rails::VERSION
8
8
  spec.authors = ["Nick Sutterer"]
9
9
  spec.email = ["apotonick@gmail.com"]
10
+ spec.license = "MIT"
10
11
 
11
12
  spec.summary = %q{Convenient Rails support for Cells.}
12
13
  spec.homepage = "http://trailblazer.to"
@@ -16,7 +17,7 @@ Gem::Specification.new do |spec|
16
17
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
17
18
  spec.require_paths = ["lib"]
18
19
 
19
- spec.add_dependency "cells", ">= 4.1"
20
+ spec.add_dependency "cells", ">= 4.1.6", "< 5.0.0"
20
21
  spec.add_dependency "actionpack", ">= 3.0"
21
22
 
22
23
 
data/lib/cell/railtie.rb CHANGED
@@ -54,15 +54,17 @@ module Cell
54
54
  end
55
55
  end
56
56
 
57
- # TODO: allow to turn off this.
58
- initializer "cells.include_template_module", after: "cells.include_default_helpers" do
57
+ IncludeTemplateModules = -> (app) do
58
+ return if app.config.cells.include_template_engine == false
59
+
59
60
  # yepp, this is happening. saves me a lot of coding in each extension.
60
- ViewModel.send(:include, Cell::Erb) if Cell.const_defined?(:Erb, false)
61
- ViewModel.send(:include, Cell::Haml) if Cell.const_defined?(:Haml, false)
61
+ ViewModel.send(:include, Cell::Erb) if Cell.const_defined?(:Erb, false)
62
+ ViewModel.send(:include, Cell::Haml) if Cell.const_defined?(:Haml, false)
62
63
  ViewModel.send(:include, Cell::Hamlit) if Cell.const_defined?(:Hamlit, false)
63
- ViewModel.send(:include, Cell::Slim) if Cell.const_defined?(:Slim, false)
64
+ ViewModel.send(:include, Cell::Slim) if Cell.const_defined?(:Slim, false)
64
65
  end
65
- # ViewModel.template_engine = app.config.app_generators.rails.fetch(:template_engine, "erb").to_s
66
+
67
+ initializer( "cells.include_template_module", after: "cells.include_default_helpers", &IncludeTemplateModules)
66
68
 
67
69
  initializer("cells.development") do |app|
68
70
  if Rails.env == "development"
@@ -1,5 +1,5 @@
1
1
  module Cells
2
2
  module Rails
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cells-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-03 00:00:00.000000000 Z
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cells
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
19
+ version: 4.1.6
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 5.0.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - ">="
25
28
  - !ruby/object:Gem::Version
26
- version: '4.1'
29
+ version: 4.1.6
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 5.0.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: actionpack
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -119,6 +125,7 @@ files:
119
125
  - ".travis.yml"
120
126
  - CHANGES.md
121
127
  - Gemfile
128
+ - LICENSE.txt
122
129
  - README.md
123
130
  - Rakefile
124
131
  - cells-rails.gemspec
@@ -149,7 +156,8 @@ files:
149
156
  - lib/rails/generators/test_unit/concept/concept_generator.rb
150
157
  - lib/rails/generators/test_unit/concept/templates/unit_test.rb.erb
151
158
  homepage: http://trailblazer.to
152
- licenses: []
159
+ licenses:
160
+ - MIT
153
161
  metadata: {}
154
162
  post_install_message:
155
163
  rdoc_options: []
@@ -167,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
175
  version: '0'
168
176
  requirements: []
169
177
  rubyforge_project:
170
- rubygems_version: 2.5.1
178
+ rubygems_version: 2.6.3
171
179
  signing_key:
172
180
  specification_version: 4
173
181
  summary: Convenient Rails support for Cells.