trailblazer-cells 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 +4 -4
- data/CHANGES.md +5 -1
- data/Gemfile +2 -0
- data/README.md +3 -3
- data/lib/trailblazer/cell.rb +4 -19
- data/lib/trailblazer/cells/version.rb +1 -1
- data/trailblazer-cells.gemspec +3 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12d3fc2c4ed542d7588828ef2d6aa0433fbe9adb
|
4
|
+
data.tar.gz: 353a9ee96194b3abe151d8d41efe684bd613fb8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89ded3c915da84bb3fc2b44553cdb2d98695d5f38161dbd83bcbb85addd52ca41c8ad82466a0e3b4b3c0822b6b2464334fb3c26ee7a015236285db4614113a2f
|
7
|
+
data.tar.gz: 0fda90975aad1e26554091d7f7529b01fddd3f05b09a1c030405c08cc925591e4966c3974b9442298310ee3bba7875e2d81a5e6935e719e24c71c4e89bc9dd70
|
data/CHANGES.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -9,9 +9,9 @@ In Trailblazer, class structures as the following are very common, let's say for
|
|
9
9
|
```ruby
|
10
10
|
module Post
|
11
11
|
module Cell
|
12
|
-
class New < Trailblazer::Cell # => app/concepts/post/
|
13
|
-
class Show < Trailblazer::Cell # => app/concepts/post/
|
14
|
-
class SideBar < Trailblazer::Cell # => app/concepts/post/
|
12
|
+
class New < Trailblazer::Cell # => app/concepts/post/view
|
13
|
+
class Show < Trailblazer::Cell # => app/concepts/post/view
|
14
|
+
class SideBar < Trailblazer::Cell # => app/concepts/post/view
|
15
15
|
```
|
16
16
|
|
17
17
|
## Automatic `show`
|
data/lib/trailblazer/cell.rb
CHANGED
@@ -11,6 +11,7 @@ module Trailblazer
|
|
11
11
|
name.camelize.constantize
|
12
12
|
end
|
13
13
|
|
14
|
+
# Comment::Cell::Show #=> comment/view/
|
14
15
|
def controller_path
|
15
16
|
@controller_path ||= File.join(util.underscore(name.sub(/(::Cell.+)/, '')), views_dir)
|
16
17
|
end
|
@@ -29,29 +30,13 @@ module Trailblazer
|
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
33
|
+
# Comment::Cell::Show #=> show
|
32
34
|
def state_for_implicit_render(options)
|
33
35
|
self.class.view_name
|
34
36
|
end
|
35
37
|
|
36
|
-
|
37
|
-
module Show
|
38
|
-
def show
|
39
|
-
render
|
40
|
-
end
|
41
|
-
end
|
42
|
-
include Show
|
43
|
-
|
44
|
-
module Layout
|
45
|
-
def render(options={})
|
46
|
-
options[:layout] = @options[:layout] if @options[:layout]
|
47
|
-
super
|
48
|
-
end
|
38
|
+
alias_method :concept, :cell # TODO: test me.
|
49
39
|
|
50
|
-
|
51
|
-
return content unless layout = options[:layout]
|
52
|
-
layout.new(model, parent_controller: parent_controller, content: content) # TODO: test parent_controller.
|
53
|
-
end
|
54
|
-
end
|
55
|
-
include Layout
|
40
|
+
include Layout::External # from ViewModel.
|
56
41
|
end
|
57
42
|
end
|
data/trailblazer-cells.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
lib = File.expand_path(
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require
|
3
|
+
require "trailblazer/cells/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "trailblazer-cells"
|
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency "minitest"
|
23
23
|
spec.add_development_dependency "cells-erb"
|
24
24
|
|
25
|
-
spec.add_dependency "cells", ">= 4.0.
|
25
|
+
spec.add_dependency "cells", ">= 4.1.0.rc1", "< 5.0.0"
|
26
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-cells
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,7 +72,7 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 4.0.
|
75
|
+
version: 4.1.0.rc1
|
76
76
|
- - "<"
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: 5.0.0
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
requirements:
|
83
83
|
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: 4.0.
|
85
|
+
version: 4.1.0.rc1
|
86
86
|
- - "<"
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: 5.0.0
|