smart_titles 0.4.1 → 0.4.2
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.
- checksums.yaml +4 -4
- data/Gemfile +1 -3
- data/Gemfile.lock +23 -38
- data/Readme.md +3 -0
- data/lib/smart_titles/helper.rb +3 -3
- data/lib/smart_titles/version.rb +1 -1
- data/smart_titles.gemspec +1 -0
- data/test/test_helper.rb +2 -0
- metadata +15 -2
- data/Guardfile +0 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a694c8648938ede39c941824dc76c18132c45bfc
|
|
4
|
+
data.tar.gz: 427478d18d1b368aefb2e3d7c0d47b3e433cc30b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c2bee5effbb87f5052c52eddb1bad9a97b496bddff9a4ea872ed329e027bf7781660039fd34ad8657f284f03df653658e9d8cf8539ce38a416264980e8a356b
|
|
7
|
+
data.tar.gz: 57d2a47ef475ee52b30a2792ba082fb43a9c828ff4453cbce7fe756a1239a855dd002fe357e0510a62d0e560994b7ae184a8b39b5241b6a5d17d6d6bd5bc9ce9
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,57 +1,42 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
smart_titles (0.
|
|
4
|
+
smart_titles (0.4.0)
|
|
5
5
|
actionpack
|
|
6
6
|
activesupport
|
|
7
|
+
i18n (~> 0.6.9)
|
|
7
8
|
|
|
8
9
|
GEM
|
|
9
10
|
remote: http://rubygems.org/
|
|
10
11
|
specs:
|
|
11
|
-
actionpack (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
builder (~> 3.0.0)
|
|
12
|
+
actionpack (4.0.2)
|
|
13
|
+
activesupport (= 4.0.2)
|
|
14
|
+
builder (~> 3.1.0)
|
|
15
15
|
erubis (~> 2.7.0)
|
|
16
|
-
|
|
17
|
-
rack (~>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
multi_json (~> 1.0)
|
|
27
|
-
builder (3.0.4)
|
|
16
|
+
rack (~> 1.5.2)
|
|
17
|
+
rack-test (~> 0.6.2)
|
|
18
|
+
activesupport (4.0.2)
|
|
19
|
+
i18n (~> 0.6, >= 0.6.4)
|
|
20
|
+
minitest (~> 4.2)
|
|
21
|
+
multi_json (~> 1.3)
|
|
22
|
+
thread_safe (~> 0.1)
|
|
23
|
+
tzinfo (~> 0.3.37)
|
|
24
|
+
atomic (1.1.14)
|
|
25
|
+
builder (3.1.4)
|
|
28
26
|
erubis (2.7.0)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
hike (1.2.1)
|
|
34
|
-
i18n (0.6.1)
|
|
35
|
-
journey (1.0.4)
|
|
36
|
-
multi_json (1.3.7)
|
|
37
|
-
rack (1.4.1)
|
|
38
|
-
rack-cache (1.2)
|
|
39
|
-
rack (>= 0.4)
|
|
27
|
+
i18n (0.6.9)
|
|
28
|
+
minitest (4.7.5)
|
|
29
|
+
multi_json (1.8.2)
|
|
30
|
+
rack (1.5.2)
|
|
40
31
|
rack-test (0.6.2)
|
|
41
32
|
rack (>= 1.0)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
multi_json (~> 1.0)
|
|
46
|
-
rack (~> 1.0)
|
|
47
|
-
tilt (~> 1.1, != 1.3.0)
|
|
48
|
-
thor (0.14.6)
|
|
49
|
-
tilt (1.3.3)
|
|
33
|
+
thread_safe (0.1.3)
|
|
34
|
+
atomic
|
|
35
|
+
tzinfo (0.3.38)
|
|
50
36
|
|
|
51
37
|
PLATFORMS
|
|
52
38
|
ruby
|
|
53
39
|
|
|
54
40
|
DEPENDENCIES
|
|
55
|
-
|
|
56
|
-
rake
|
|
41
|
+
minitest (~> 4.0)
|
|
57
42
|
smart_titles!
|
data/Readme.md
CHANGED
|
@@ -80,6 +80,9 @@ And now products#index page will have "Products from the Coolest Store" browser'
|
|
|
80
80
|
Changelog
|
|
81
81
|
---
|
|
82
82
|
|
|
83
|
+
### 0.4.2
|
|
84
|
+
Compatibility with new I18n.
|
|
85
|
+
|
|
83
86
|
### 0.4.1
|
|
84
87
|
This update fixes XSS vulnerability introduced in 0.3.2. H1 tag returned by "title" would skip HTML-escaping.
|
|
85
88
|
Your app is affected if you include untrusted user input in the title and output the tag:
|
data/lib/smart_titles/helper.rb
CHANGED
|
@@ -37,9 +37,9 @@ module SmartTitles
|
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
title = custom_title
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
catch(:exception) do
|
|
41
|
+
title ||= t('.title', options.merge(throw: true))
|
|
42
|
+
end
|
|
43
43
|
|
|
44
44
|
provide(:page_title, title && title.html_safe) # "provide" already escapes
|
|
45
45
|
content_tag(:h1, title) if title
|
data/lib/smart_titles/version.rb
CHANGED
data/smart_titles.gemspec
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smart_titles
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Semyon Perepelitsa
|
|
@@ -38,6 +38,20 @@ dependencies:
|
|
|
38
38
|
- - '>='
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: i18n
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ~>
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: 0.6.9
|
|
48
|
+
type: :runtime
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ~>
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: 0.6.9
|
|
41
55
|
description:
|
|
42
56
|
email: sema@sema.in
|
|
43
57
|
executables: []
|
|
@@ -47,7 +61,6 @@ files:
|
|
|
47
61
|
- .gitignore
|
|
48
62
|
- Gemfile
|
|
49
63
|
- Gemfile.lock
|
|
50
|
-
- Guardfile
|
|
51
64
|
- License.txt
|
|
52
65
|
- Rakefile
|
|
53
66
|
- Readme.md
|
data/Guardfile
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# A sample Guardfile
|
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
|
3
|
-
|
|
4
|
-
guard 'minitest' do
|
|
5
|
-
# with Minitest::Unit
|
|
6
|
-
watch(%r|^test/(.*)_test\.rb|)
|
|
7
|
-
watch(%r|^lib/(.*)\.rb|) { |m| "test/#{m[1]}_test.rb" }
|
|
8
|
-
watch(%r|^test/test_helper\.rb|) { "test" }
|
|
9
|
-
|
|
10
|
-
# with Minitest::Spec
|
|
11
|
-
# watch(%r|^spec/(.*)_spec\.rb|)
|
|
12
|
-
# watch(%r|^lib/(.*)\.rb|) { |m| "spec/#{m[1]}_spec.rb" }
|
|
13
|
-
# watch(%r|^spec/spec_helper\.rb|) { "spec" }
|
|
14
|
-
end
|