page_title_helper 1.0.1 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +79 -0
- data/CODE_OF_CONDUCT.md +77 -0
- data/Gemfile +5 -0
- data/README.md +201 -155
- data/Rakefile +8 -62
- data/lib/page_title_helper.rb +56 -52
- data/lib/page_title_helper/version.rb +5 -0
- data/page_title_helper.gemspec +30 -0
- data/test/en.yml +11 -1
- data/test/multiple_formats_test.rb +50 -50
- data/test/page_title_helper_test.rb +89 -71
- data/test/test_helper.rb +33 -13
- metadata +112 -43
- data/.gitignore +0 -4
- data/VERSION.yml +0 -4
- data/rails/init.rb +0 -4
data/test/test_helper.rb
CHANGED
@@ -1,23 +1,43 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'active_support'
|
3
4
|
require 'action_view'
|
4
|
-
require
|
5
|
+
require 'page_title_helper'
|
5
6
|
|
6
7
|
unless defined?(IRB)
|
7
8
|
require 'active_support/test_case'
|
8
9
|
require 'shoulda'
|
9
|
-
require 'rr'
|
10
|
-
# enable RR to use all the mocking magic, uweee!
|
11
|
-
Test::Unit::TestCase.send(:include, RR::Adapters::TestUnit)
|
12
10
|
end
|
13
11
|
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
# Use sorted tests. We need to change that after the tests have been converted
|
13
|
+
# to RSpec.
|
14
|
+
ActiveSupport.test_order = :sorted
|
15
|
+
|
16
|
+
# fake global Rails module
|
17
|
+
module Rails
|
18
|
+
class << self
|
19
|
+
def root
|
20
|
+
@pathname ||= Pathname.new('/this/is/just/for/testing/page_title_helper')
|
21
|
+
end
|
17
22
|
|
18
|
-
|
19
|
-
|
20
|
-
|
23
|
+
def env
|
24
|
+
'test'
|
25
|
+
end
|
21
26
|
end
|
22
|
-
|
23
|
-
|
27
|
+
end
|
28
|
+
|
29
|
+
# Mock ActionView a bit to allow easy (fake) template assignment
|
30
|
+
class TestView < ActionView::Base
|
31
|
+
attr_reader :controller
|
32
|
+
|
33
|
+
def initialize(controller_path = nil, action = nil)
|
34
|
+
@controller = ActionView::TestCase::TestController.new
|
35
|
+
@controller.controller_path = controller_path
|
36
|
+
params[:action] = action if action
|
37
|
+
end
|
38
|
+
|
39
|
+
def controller!(controller_path, action)
|
40
|
+
@controller.controller_path = controller_path
|
41
|
+
params[:action] = action
|
42
|
+
end
|
43
|
+
end
|
metadata
CHANGED
@@ -1,69 +1,138 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: page_title_helper
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Lukas Westermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
date: 2021-02-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.2.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '6.2'
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 5.2.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6.2'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rake
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 10.3.2
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 10.3.2
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: shoulda
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rubocop
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: 0.82.0
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 0.82.0
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rubocop-rails
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 2.5.2
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 2.5.2
|
89
|
+
description: Simple, internationalized and DRY page titles and headings for Rails.
|
90
|
+
email:
|
91
|
+
- lukas.westermann@gmail.com
|
18
92
|
executables: []
|
19
|
-
|
20
93
|
extensions: []
|
21
|
-
|
22
|
-
|
23
|
-
-
|
24
|
-
-
|
25
|
-
|
26
|
-
- .gitignore
|
94
|
+
extra_rdoc_files: []
|
95
|
+
files:
|
96
|
+
- CHANGELOG.md
|
97
|
+
- CODE_OF_CONDUCT.md
|
98
|
+
- Gemfile
|
27
99
|
- LICENSE
|
28
100
|
- README.md
|
29
101
|
- Rakefile
|
30
|
-
- VERSION.yml
|
31
102
|
- lib/page_title_helper.rb
|
32
|
-
-
|
103
|
+
- lib/page_title_helper/version.rb
|
104
|
+
- page_title_helper.gemspec
|
33
105
|
- test/en.yml
|
34
106
|
- test/en_wohaapp.yml
|
35
107
|
- test/multiple_formats_test.rb
|
36
108
|
- test/page_title_helper_test.rb
|
37
109
|
- test/test_helper.rb
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
110
|
+
homepage: https://github.com/lwe/page_title_helper
|
111
|
+
licenses:
|
112
|
+
- MIT
|
113
|
+
metadata: {}
|
42
114
|
post_install_message:
|
43
|
-
rdoc_options:
|
44
|
-
|
45
|
-
require_paths:
|
115
|
+
rdoc_options: []
|
116
|
+
require_paths:
|
46
117
|
- lib
|
47
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
-
requirements:
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
requirements:
|
49
120
|
- - ">="
|
50
|
-
- !ruby/object:Gem::Version
|
51
|
-
version:
|
52
|
-
|
53
|
-
|
54
|
-
requirements:
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 2.5.0
|
123
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
55
125
|
- - ">="
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version:
|
58
|
-
version:
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
59
128
|
requirements: []
|
60
|
-
|
61
|
-
rubyforge_project:
|
62
|
-
rubygems_version: 1.3.5
|
129
|
+
rubygems_version: 3.2.3
|
63
130
|
signing_key:
|
64
|
-
specification_version:
|
65
|
-
summary: Simple, internationalized and DRY page titles and headings for
|
66
|
-
test_files:
|
131
|
+
specification_version: 4
|
132
|
+
summary: Simple, internationalized and DRY page titles and headings for Rails.
|
133
|
+
test_files:
|
134
|
+
- test/en.yml
|
135
|
+
- test/en_wohaapp.yml
|
67
136
|
- test/multiple_formats_test.rb
|
68
137
|
- test/page_title_helper_test.rb
|
69
138
|
- test/test_helper.rb
|
data/.gitignore
DELETED
data/VERSION.yml
DELETED
data/rails/init.rb
DELETED