title_estuary 1.1.1 → 1.2.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/VERSION +1 -1
- data/lib/title_estuary.rb +3 -11
- data/test/high_voltage_integration_test.rb +1 -4
- data/test/inherited_resources_integration_test.rb +1 -4
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/lib/title_estuary.rb
CHANGED
@@ -4,8 +4,9 @@ module TitleEstuary
|
|
4
4
|
# When TitleEstuary is included by a controller,
|
5
5
|
# this hook prevents ActionPack from using
|
6
6
|
# <tt>#page_title</tt> as an action and makes that
|
7
|
-
# method available to helpers and views;
|
8
|
-
#
|
7
|
+
# method available to helpers and views; you may
|
8
|
+
# also want to include
|
9
|
+
# TitleEstuary::InheritedResourcesSupport
|
9
10
|
# and TitleEstuary::HighVoltageSupport
|
10
11
|
# if applicable.
|
11
12
|
#
|
@@ -15,15 +16,6 @@ module TitleEstuary
|
|
15
16
|
base.send :include, TitleEstuary::InstanceMethods
|
16
17
|
base.hide_action(:page_title) if base.respond_to?(:hide_action)
|
17
18
|
base.helper_method(:page_title, :page_title=) if base.respond_to?(:helper_method)
|
18
|
-
if Object.const_defined?(:InheritedResources) &&
|
19
|
-
base <= ::InheritedResources::Base
|
20
|
-
base.send :include, TitleEstuary::InheritedResourcesSupport
|
21
|
-
end
|
22
|
-
if Object.const_defined?(:HighVoltage) &&
|
23
|
-
HighVoltage.const_defined?(:PagesController) &&
|
24
|
-
base <= ::HighVoltage::PagesController
|
25
|
-
base.send :include, TitleEstuary::HighVoltageSupport
|
26
|
-
end
|
27
19
|
end
|
28
20
|
|
29
21
|
module InstanceMethods
|
@@ -2,6 +2,7 @@ require File.dirname(__FILE__) + '/test_helper'
|
|
2
2
|
|
3
3
|
class PagesController < HighVoltage::PagesController
|
4
4
|
include TitleEstuary
|
5
|
+
include TitleEstuary::HighVoltageSupport
|
5
6
|
end
|
6
7
|
|
7
8
|
ActionController::Routing::Routes.draw do |map|
|
@@ -20,10 +21,6 @@ class HighVoltageIntegrationTest < ActionController::TestCase
|
|
20
21
|
clear_translations!
|
21
22
|
end
|
22
23
|
|
23
|
-
should 'have high-voltage support installed' do
|
24
|
-
assert ::PagesController < TitleEstuary::HighVoltageSupport
|
25
|
-
end
|
26
|
-
|
27
24
|
context 'on a GET to :show for a page with no i18n title set' do
|
28
25
|
setup do
|
29
26
|
get :show, :id => 'info'
|
@@ -16,6 +16,7 @@ end
|
|
16
16
|
class DeliciousThingsController < InheritedResources::Base
|
17
17
|
self.resource_class = Pizza
|
18
18
|
include TitleEstuary
|
19
|
+
include TitleEstuary::InheritedResourcesSupport
|
19
20
|
def cheesey; index; end
|
20
21
|
def add_topping; show; end
|
21
22
|
def pizza_url(*args); delicious_thing_url(*args); end
|
@@ -38,10 +39,6 @@ class InheritedResourcesIntegrationTest < ActionController::TestCase
|
|
38
39
|
clear_translations!
|
39
40
|
end
|
40
41
|
|
41
|
-
should 'have inherited-resources support installed' do
|
42
|
-
assert DeliciousThingsController < TitleEstuary::InheritedResourcesSupport
|
43
|
-
end
|
44
|
-
|
45
42
|
context 'on a GET to :index' do
|
46
43
|
setup do
|
47
44
|
Pizza.stubs(:find).returns([])
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: title_estuary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Rosen
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-06 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|