entitlement 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -1
- data/entitlement.gemspec +1 -1
- data/lib/entitlement/railtie.rb +10 -1
- data/lib/entitlement/version.rb +1 -1
- metadata +17 -6
data/README.md
CHANGED
@@ -4,6 +4,8 @@ Entitlement lets you set your page titles in a simple, DRY way.
|
|
4
4
|
|
5
5
|
Often you want a page's title to match its heading. Although this is simple to arrange, adding Entitlement to your Gemfile instead is a one-liner. And I'm sure you don't want to write tests for your page titles.
|
6
6
|
|
7
|
+
Entitlement works with Rails 3 and Rails 4.
|
8
|
+
|
7
9
|
|
8
10
|
## Getting started
|
9
11
|
|
@@ -23,7 +25,7 @@ To set your page title, use `tee` in your page's header. This will write it out
|
|
23
25
|
|
24
26
|
`tee` is easy to remember because:
|
25
27
|
|
26
|
-
* it's a
|
28
|
+
* it's a homonym for 't' (for title), and
|
27
29
|
* it acts like Unix's `tee`.
|
28
30
|
|
29
31
|
Or you can just use `title` again:
|
data/entitlement.gemspec
CHANGED
data/lib/entitlement/railtie.rb
CHANGED
@@ -3,7 +3,16 @@ require 'entitlement/view_helpers'
|
|
3
3
|
module Entitlement
|
4
4
|
class Railtie < Rails::Railtie
|
5
5
|
initializer 'entitlement.view_helpers' do
|
6
|
-
|
6
|
+
case Rails::VERSION::MAJOR
|
7
|
+
when 3
|
8
|
+
ActionView::Base.send :include, ViewHelpers
|
9
|
+
when 4
|
10
|
+
ActiveSupport.on_load :action_view do
|
11
|
+
include ViewHelpers
|
12
|
+
end
|
13
|
+
else
|
14
|
+
Rails.logger.warn "Entitlement doesn't support Rails #{Rails.version}."
|
15
|
+
end
|
7
16
|
end
|
8
17
|
end
|
9
18
|
end
|
data/lib/entitlement/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: entitlement
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,19 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-07-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '3'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3'
|
25
30
|
description: Simple page titles in Rails 3.
|
26
31
|
email:
|
27
32
|
- boss@airbladesoftware.com
|
@@ -51,15 +56,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
56
|
- - ! '>='
|
52
57
|
- !ruby/object:Gem::Version
|
53
58
|
version: '0'
|
59
|
+
segments:
|
60
|
+
- 0
|
61
|
+
hash: -923553904683562215
|
54
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
63
|
none: false
|
56
64
|
requirements:
|
57
65
|
- - ! '>='
|
58
66
|
- !ruby/object:Gem::Version
|
59
67
|
version: '0'
|
68
|
+
segments:
|
69
|
+
- 0
|
70
|
+
hash: -923553904683562215
|
60
71
|
requirements: []
|
61
72
|
rubyforge_project: entitlement
|
62
|
-
rubygems_version: 1.8.
|
73
|
+
rubygems_version: 1.8.23
|
63
74
|
signing_key:
|
64
75
|
specification_version: 3
|
65
76
|
summary: Simple page titles in Rails 3.
|