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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 169123fe04d64048f27bc19d1b846c7259d0caf3
4
- data.tar.gz: a82477fa9f9b231e0db25a1d47dfd79fa8610170
3
+ metadata.gz: a694c8648938ede39c941824dc76c18132c45bfc
4
+ data.tar.gz: 427478d18d1b368aefb2e3d7c0d47b3e433cc30b
5
5
  SHA512:
6
- metadata.gz: c599748e4160dcb4f62d1edf15efdb502852f10040c28e1e69f5fcf3f73a756c828ed9c276cf578888bf20c8a4998e8f0b580fd6918a3ade3261533e8e1f75a0
7
- data.tar.gz: 169da91edabc4395076f3f62045f0dcdbd86bd383681726f311c473d14ea9b0499526f0ead181b330d77ce702c7c1512264f5b4291e05bdf358854c46a237aec
6
+ metadata.gz: 5c2bee5effbb87f5052c52eddb1bad9a97b496bddff9a4ea872ed329e027bf7781660039fd34ad8657f284f03df653658e9d8cf8539ce38a416264980e8a356b
7
+ data.tar.gz: 57d2a47ef475ee52b30a2792ba082fb43a9c828ff4453cbce7fe756a1239a855dd002fe357e0510a62d0e560994b7ae184a8b39b5241b6a5d17d6d6bd5bc9ce9
data/Gemfile CHANGED
@@ -3,6 +3,4 @@ source "http://rubygems.org"
3
3
  # Specify your gem's dependencies in smart_titles.gemspec
4
4
  gemspec
5
5
 
6
- group :guards do
7
- gem 'guard-minitest'
8
- end
6
+ gem 'minitest', '~> 4.0'
data/Gemfile.lock CHANGED
@@ -1,57 +1,42 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- smart_titles (0.3.2)
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 (3.2.9)
12
- activemodel (= 3.2.9)
13
- activesupport (= 3.2.9)
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
- journey (~> 1.0.4)
17
- rack (~> 1.4.0)
18
- rack-cache (~> 1.2)
19
- rack-test (~> 0.6.1)
20
- sprockets (~> 2.2.1)
21
- activemodel (3.2.9)
22
- activesupport (= 3.2.9)
23
- builder (~> 3.0.0)
24
- activesupport (3.2.9)
25
- i18n (~> 0.6)
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
- guard (0.8.8)
30
- thor (~> 0.14.6)
31
- guard-minitest (0.4.0)
32
- guard (~> 0.4)
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
- rake (0.9.2.2)
43
- sprockets (2.2.1)
44
- hike (~> 1.2)
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
- guard-minitest
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:
@@ -37,9 +37,9 @@ module SmartTitles
37
37
  end
38
38
 
39
39
  title = custom_title
40
- title ||= begin t('.title', options.merge(raise: true))
41
- rescue I18n::MissingTranslationData
42
- end
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
@@ -1,3 +1,3 @@
1
1
  module SmartTitles
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
data/smart_titles.gemspec CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_dependency 'activesupport'
16
16
  s.add_dependency 'actionpack'
17
+ s.add_dependency 'i18n', '~> 0.6.9'
17
18
 
18
19
  s.files = `git ls-files`.split("\n")
19
20
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
data/test/test_helper.rb CHANGED
@@ -6,3 +6,5 @@ require 'minitest/autorun'
6
6
  require 'active_support/all'
7
7
  require 'action_view'
8
8
  require 'smart_titles'
9
+
10
+ I18n.enforce_available_locales = true
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.1
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