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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f74c352ddf9ca8356a47e8221dbe027368bc8e2
4
- data.tar.gz: fee008432f153662265edaad10620d5a9e739d68
3
+ metadata.gz: 12d3fc2c4ed542d7588828ef2d6aa0433fbe9adb
4
+ data.tar.gz: 353a9ee96194b3abe151d8d41efe684bd613fb8d
5
5
  SHA512:
6
- metadata.gz: d762fade172599396e964ac0fe92c8359a6b97c8e02f9d08966e76722ea34fc21d08c56cb45bdee6eb1bcc120f6a13cdbd6c12c2e80650980145140d77cbf586
7
- data.tar.gz: be2c4a01b0bcd87b4fa9c1426fd24becf4cac15b2e694cb193625cba04418cd820f2e9333dae0f737ed2ef94ada365b572a8126ce2fa7b7a26c929b905b7faaf
6
+ metadata.gz: 89ded3c915da84bb3fc2b44553cdb2d98695d5f38161dbd83bcbb85addd52ca41c8ad82466a0e3b4b3c0822b6b2464334fb3c26ee7a015236285db4614113a2f
7
+ data.tar.gz: 0fda90975aad1e26554091d7f7529b01fddd3f05b09a1c030405c08cc925591e4966c3974b9442298310ee3bba7875e2d81a5e6935e719e24c71c4e89bc9dd70
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.0.2
2
+
3
+ * Stable release for Cells 4.1. We probably move the view name inflector into Cells itself?
4
+
1
5
  # 0.0.1
2
6
 
3
- First release into an unsuspecting world.
7
+ * First release into an unsuspecting world.
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in trailblazer-cells.gemspec
4
4
  gemspec
5
+
6
+ gem "cells", path: "../cells"
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/views
13
- class Show < Trailblazer::Cell # => app/concepts/post/views
14
- class SideBar < Trailblazer::Cell # => app/concepts/post/views
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`
@@ -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
- # Automatic #show so you don't need to define it. Still overridable.
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
- def with_layout(options, content)
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
@@ -1,5 +1,5 @@
1
1
  module Trailblazer
2
2
  module Cells
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -1,6 +1,6 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path("../lib", __FILE__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'trailblazer/cells/version'
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.3", "< 5.0.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.1
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: 2015-12-22 00:00:00.000000000 Z
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.3
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.3
85
+ version: 4.1.0.rc1
86
86
  - - "<"
87
87
  - !ruby/object:Gem::Version
88
88
  version: 5.0.0