render_component_vho 3.0.3 → 3.1.0

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.
data/Rakefile CHANGED
@@ -22,7 +22,7 @@ Jeweler::Tasks.new do |gem|
22
22
  gem.description = %Q{Components allow you to call other actions for their rendered response while executing another action}
23
23
  gem.email = "david@loudthinking.com"
24
24
  gem.authors = ["David Heinemeier Hansson"]
25
- gem.add_runtime_dependency 'railties', '~>3.0.0'
25
+ gem.add_runtime_dependency 'railties', '~>3.1.0'
26
26
  # Include your dependencies below. Runtime dependencies are required when using your gem,
27
27
  # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
28
28
  # gem.add_runtime_dependency 'jabber4r', '> 0.1'
@@ -57,4 +57,4 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
57
57
  rdoc.title = "render_component #{version}"
58
58
  rdoc.rdoc_files.include('README*')
59
59
  rdoc.rdoc_files.include('lib/**/*.rb')
60
- end
60
+ end
@@ -86,6 +86,7 @@ module RenderComponent
86
86
 
87
87
  private
88
88
  def component_response(options, reuse_response)
89
+ options[:controller] = options[:controller].to_s if options[:controller] && options[:controller].is_a?(Symbol)
89
90
  klass = component_class(options)
90
91
  component_request = request_for_component(klass.controller_path, options)
91
92
  # needed ???
@@ -1,8 +1,8 @@
1
1
  module RenderComponent
2
2
  module Version
3
3
  MAJOR = 3
4
- MINOR = 0
5
- PATCH = 3
4
+ MINOR = 1
5
+ PATCH = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{render_component_vho}
8
- s.version = "3.0.3"
8
+ s.version = "3.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Heinemeier Hansson"]
12
- s.date = %q{2011-01-26}
12
+ s.date = %q{2011-11-07}
13
13
  s.description = %q{Components allow you to call other actions for their rendered response while executing another action}
14
14
  s.email = %q{david@loudthinking.com}
15
15
  s.extra_rdoc_files = [
@@ -35,34 +35,24 @@ Gem::Specification.new do |s|
35
35
  s.require_paths = ["lib"]
36
36
  s.rubygems_version = %q{1.3.7}
37
37
  s.summary = %q{render actions in other controllers for their rendered response}
38
- s.test_files = [
39
- "test/abstract_unit.rb",
40
- "test/components_test.rb"
41
- ]
42
38
 
43
39
  if s.respond_to? :specification_version then
44
40
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
45
41
  s.specification_version = 3
46
42
 
47
43
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
- s.add_development_dependency(%q<shoulda>, [">= 0"])
49
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
50
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
51
- s.add_development_dependency(%q<rcov>, [">= 0"])
52
- s.add_runtime_dependency(%q<railties>, ["~> 3.0.0"])
44
+ s.add_runtime_dependency(%q<jeweler>, [">= 0"])
45
+ s.add_runtime_dependency(%q<rcov>, [">= 0"])
46
+ s.add_runtime_dependency(%q<railties>, ["~> 3.1.0"])
53
47
  else
54
- s.add_dependency(%q<shoulda>, [">= 0"])
55
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
56
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
48
+ s.add_dependency(%q<jeweler>, [">= 0"])
57
49
  s.add_dependency(%q<rcov>, [">= 0"])
58
- s.add_dependency(%q<railties>, ["~> 3.0.0"])
50
+ s.add_dependency(%q<railties>, ["~> 3.1.0"])
59
51
  end
60
52
  else
61
- s.add_dependency(%q<shoulda>, [">= 0"])
62
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
63
- s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
53
+ s.add_dependency(%q<jeweler>, [">= 0"])
64
54
  s.add_dependency(%q<rcov>, [">= 0"])
65
- s.add_dependency(%q<railties>, ["~> 3.0.0"])
55
+ s.add_dependency(%q<railties>, ["~> 3.1.0"])
66
56
  end
67
57
  end
68
58
 
@@ -49,6 +49,9 @@ class CallersController < ActionController::Base
49
49
  def rescue_action(e) raise end
50
50
  end
51
51
 
52
+ class ChildCallersController < CallersController
53
+ end
54
+
52
55
  class CalleesController < ActionController::Base
53
56
  def being_called
54
57
  render :text => "#{params[:name] || session[:name] || "Lady"} of the House, speaking"
@@ -79,6 +82,7 @@ class ComponentsTest < ActionController::IntegrationTest #ActionController::Test
79
82
  def setup
80
83
  @routes.draw do
81
84
  match 'callers/:action', :to => 'callers'
85
+ match 'child_callers/:action', :to => 'child_callers'
82
86
  match 'callees/:action', :to => 'callees'
83
87
  end
84
88
  end
@@ -145,6 +149,11 @@ class ComponentsTest < ActionController::IntegrationTest #ActionController::Test
145
149
  get '/callers/calling_from_controller_with_session'
146
150
  assert_equal "Bernd of the House, speaking", @response.body
147
151
  end
152
+
153
+ def test_child_calling_from_template
154
+ get '/child_callers/calling_from_template'
155
+ assert_equal "Ring, ring: Lady of the House, speaking", @response.body
156
+ end
148
157
 
149
158
 
150
159
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: render_component_vho
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
+ - 1
8
9
  - 0
9
- - 3
10
- version: 3.0.3
10
+ version: 3.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Heinemeier Hansson
@@ -15,12 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-26 00:00:00 +01:00
18
+ date: 2011-11-07 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  prerelease: false
23
- name: shoulda
23
+ name: jeweler
24
24
  version_requirements: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
@@ -31,43 +31,11 @@ dependencies:
31
31
  - 0
32
32
  version: "0"
33
33
  requirement: *id001
34
- type: :development
35
- - !ruby/object:Gem::Dependency
36
- prerelease: false
37
- name: bundler
38
- version_requirements: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ~>
42
- - !ruby/object:Gem::Version
43
- hash: 23
44
- segments:
45
- - 1
46
- - 0
47
- - 0
48
- version: 1.0.0
49
- requirement: *id002
50
- type: :development
51
- - !ruby/object:Gem::Dependency
52
- prerelease: false
53
- name: jeweler
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ~>
58
- - !ruby/object:Gem::Version
59
- hash: 7
60
- segments:
61
- - 1
62
- - 5
63
- - 2
64
- version: 1.5.2
65
- requirement: *id003
66
- type: :development
34
+ type: :runtime
67
35
  - !ruby/object:Gem::Dependency
68
36
  prerelease: false
69
37
  name: rcov
70
- version_requirements: &id004 !ruby/object:Gem::Requirement
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
71
39
  none: false
72
40
  requirements:
73
41
  - - ">="
@@ -76,23 +44,23 @@ dependencies:
76
44
  segments:
77
45
  - 0
78
46
  version: "0"
79
- requirement: *id004
80
- type: :development
47
+ requirement: *id002
48
+ type: :runtime
81
49
  - !ruby/object:Gem::Dependency
82
50
  prerelease: false
83
51
  name: railties
84
- version_requirements: &id005 !ruby/object:Gem::Requirement
52
+ version_requirements: &id003 !ruby/object:Gem::Requirement
85
53
  none: false
86
54
  requirements:
87
55
  - - ~>
88
56
  - !ruby/object:Gem::Version
89
- hash: 7
57
+ hash: 3
90
58
  segments:
91
59
  - 3
60
+ - 1
92
61
  - 0
93
- - 0
94
- version: 3.0.0
95
- requirement: *id005
62
+ version: 3.1.0
63
+ requirement: *id003
96
64
  type: :runtime
97
65
  description: Components allow you to call other actions for their rendered response while executing another action
98
66
  email: david@loudthinking.com
@@ -150,6 +118,5 @@ rubygems_version: 1.3.7
150
118
  signing_key:
151
119
  specification_version: 3
152
120
  summary: render actions in other controllers for their rendered response
153
- test_files:
154
- - test/abstract_unit.rb
155
- - test/components_test.rb
121
+ test_files: []
122
+