sinatra-r18n 0.4.7.1 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
data/lib/sinatra/r18n.rb CHANGED
@@ -44,13 +44,7 @@ module Sinatra #::nodoc::
44
44
  end
45
45
 
46
46
  ::R18n::Filters.off(:untranslated)
47
- ::R18n::Filters.add(::R18n::Untranslated, :untranslated_html) do
48
- |content, config, translated_path, untranslated_path, path|
49
- "#{translated_path}<span style='color: red'>#{untranslated_path}</span>"
50
- end
51
- app.configure :production do
52
- ::R18n::Filters.add(::R18n::Untranslated, :hide_untranslated) { '' }
53
- end
47
+ ::R18n::Filters.on(:untranslated_html)
54
48
  end
55
49
  end
56
50
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.join(File.dirname(__FILE__), 'spec_helper')
2
+ require File.expand_path('../spec_helper', __FILE__)
3
3
 
4
4
  describe Sinatra::R18n do
5
5
  before(:all) do
@@ -51,15 +51,7 @@ describe Sinatra::R18n do
51
51
  it "should format untranslated string" do
52
52
  get '/untranslated'
53
53
  last_response.should be_ok
54
- last_response.body.should == "post.<span style='color: red'>no</span>"
55
- end
56
-
57
- it "should hide untranslated string in production" do
58
- set :environment, :production
59
-
60
- get '/untranslated'
61
- last_response.should be_ok
62
- last_response.body.should == "post.<span style='color: red'>no</span>"
54
+ last_response.body.should == 'post.<span style="color: red">no</span>'
63
55
  end
64
56
 
65
57
  it "should localize objects" do
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-r18n
3
3
  version: !ruby/object:Gem::Version
4
- hash: 113
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 7
10
- - 1
11
- version: 0.4.7.1
9
+ - 8
10
+ version: 0.4.8
12
11
  platform: ruby
13
12
  authors:
14
13
  - Andrey "A.I." Sitnik
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2010-08-08 00:00:00 +04:00
18
+ date: 2010-09-22 00:00:00 +04:00
20
19
  default_executable:
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
@@ -27,13 +26,12 @@ dependencies:
27
26
  requirements:
28
27
  - - "="
29
28
  - !ruby/object:Gem::Version
30
- hash: 113
29
+ hash: 31
31
30
  segments:
32
31
  - 0
33
32
  - 4
34
- - 7
35
- - 1
36
- version: 0.4.7.1
33
+ - 8
34
+ version: 0.4.8
37
35
  type: :runtime
38
36
  version_requirements: *id001
39
37
  description: " A Sinatra extension that provides i18n support to translate your web\n application. It is just a wrapper for R18n core library.\n It has nice Ruby-style syntax, filters, flexible locales, custom loaders,\n translation support for any classes, time and number localization, several\n user language support, agnostic core package with out-of-box support for\n Rails, Sinatra, Merb and desktop applications.\n"