mozaic 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +10 -0
- data/lib/generators/mozaic/install_generator.rb +2 -2
- data/lib/generators/mozaic/layout_generator.rb +1 -1
- data/lib/generators/templates/install/keep +0 -0
- data/lib/mozaic/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b40575904ccf29394649df9c3a8490298cd7e8951480d44485f786ab1aca1293
|
4
|
+
data.tar.gz: 5548ccaccc83a76649c8daa7d3d9ce47415a696eb67b8523fa291ecaa7d2011a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e2a715d2922ff3fe9173c73615a103f3c221022fa07e35aa35a6564f9e149c2a69dcaf25d9b3a2a3acb17775e1f6a85683b93ac0c40fdad4781ff7c1cec46a5
|
7
|
+
data.tar.gz: 4357d59b79ab839245a3d03a0dec5a4b2e4e170098d6cd28af315e50fb22f6b251fbd303969165a9d48f1c143ddebcf2078a7aacb876bf020491c16d75aed99f
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -111,6 +111,16 @@ Mozaic.configure do |config|
|
|
111
111
|
end
|
112
112
|
```
|
113
113
|
|
114
|
+
Return `false` in the block to return `nil` instead of rendering the component:
|
115
|
+
|
116
|
+
```ruby
|
117
|
+
Mozaic.configure do |config|
|
118
|
+
config.define_component :name, lovely: true do |options|
|
119
|
+
false unless options[:lovely] == true
|
120
|
+
end
|
121
|
+
end
|
122
|
+
```
|
123
|
+
|
114
124
|
Components can also be defined in your ActiveRecord classes:
|
115
125
|
|
116
126
|
```ruby
|
@@ -18,8 +18,8 @@ module Mozaic
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def create_assets
|
21
|
-
template '
|
22
|
-
template '
|
21
|
+
template 'keep', 'app/assets/javascripts/mozaic/.keep'
|
22
|
+
template 'keep', 'app/assets/stylesheets/mozaic/.keep'
|
23
23
|
end
|
24
24
|
|
25
25
|
end
|
@@ -15,7 +15,7 @@ module Mozaic
|
|
15
15
|
def create_files
|
16
16
|
names = options[:name].split('/')
|
17
17
|
name = names.pop
|
18
|
-
template 'layout.html.erb', "app/views/layouts/#{names.join('/')}/#{name
|
18
|
+
template 'layout.html.erb', "app/views/layouts/#{names.join('/')}/#{name}.html.erb"
|
19
19
|
end
|
20
20
|
|
21
21
|
end
|
File without changes
|
data/lib/mozaic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mozaic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Hübotter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -99,6 +99,7 @@ files:
|
|
99
99
|
- lib/generators/templates/component/asset.js.erb
|
100
100
|
- lib/generators/templates/component/partial.html.erb
|
101
101
|
- lib/generators/templates/install/initializer.rb
|
102
|
+
- lib/generators/templates/install/keep
|
102
103
|
- lib/generators/templates/install/layout.html.erb
|
103
104
|
- lib/generators/templates/layout/layout.html.erb
|
104
105
|
- lib/mozaic.rb
|