traducto 1.0.3 → 1.0.4
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 +2 -0
- data/README.md +4 -4
- data/lib/traducto/base.rb +5 -5
- data/spec/spec_helper.rb +4 -5
- data/traducto.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc68ea3c2de967b1f946c41eac30cc5f2a560fd2
|
|
4
|
+
data.tar.gz: 640369a35edb3f9a4243d3cdf818b455988e87d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e67a80e679bcbf5404ba2d18ab8df528f3bdd6c687477b02275481004fccde245e72cf80e921ecbbb2f6a520caf386ba2aff83cc57ea71bd843afca2d7393300
|
|
7
|
+
data.tar.gz: 8bd8b31f4e77d2903ede0db155fed1c5e41fefa2dc5fccabc3ad2092b79cc13855b9b7aff215d2c87fc2b98a2ade43fbbed8b3a3f32f756a77522158a1d20c5a
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Traducto [](http://travis-ci.org/alchimikweb/traducto) [](http://travis-ci.org/alchimikweb/traducto) [](https://codeclimate.com/github/alchimikweb/traducto) [](https://coveralls.io/r/alchimikweb/traducto) [](http://badge.fury.io/rb/traducto)
|
|
2
2
|
===============
|
|
3
3
|
|
|
4
4
|
Rails helpers collection to simplify the localization code.
|
|
@@ -82,13 +82,13 @@ You can also provide the format options to wrap the content by paragraphs.
|
|
|
82
82
|
|
|
83
83
|
```ruby
|
|
84
84
|
t('description.intro', format: nil)
|
|
85
|
-
|
|
85
|
+
# => Let me start by
|
|
86
86
|
|
|
87
87
|
t('description.intro', format: :text)
|
|
88
|
-
|
|
88
|
+
# => <p>Let me start by</p>
|
|
89
89
|
|
|
90
90
|
t('description.main', format: :text)
|
|
91
|
-
|
|
91
|
+
# => <p>A lot of ...</p><p>Paragraphs that needs to be ...</p><p>Separated by p tags.</p>
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
|
data/lib/traducto/base.rb
CHANGED
|
@@ -23,7 +23,11 @@ module Traducto
|
|
|
23
23
|
|
|
24
24
|
format
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
if @text.is_a? String
|
|
27
|
+
@text.html_safe
|
|
28
|
+
else
|
|
29
|
+
@text
|
|
30
|
+
end
|
|
27
31
|
end
|
|
28
32
|
|
|
29
33
|
private
|
|
@@ -43,10 +47,6 @@ module Traducto
|
|
|
43
47
|
end
|
|
44
48
|
end
|
|
45
49
|
|
|
46
|
-
def format?
|
|
47
|
-
@options[:format] ? true : false
|
|
48
|
-
end
|
|
49
|
-
|
|
50
50
|
def format_base
|
|
51
51
|
@text = @text.join("\n") if @text.is_a? Array
|
|
52
52
|
end
|
data/spec/spec_helper.rb
CHANGED
|
@@ -2,10 +2,12 @@ ENV["RAILS_ENV"] ||= 'test'
|
|
|
2
2
|
|
|
3
3
|
require 'simplecov'
|
|
4
4
|
require 'simplecov-rcov-text'
|
|
5
|
+
require 'coveralls'
|
|
5
6
|
|
|
6
7
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
|
7
8
|
SimpleCov::Formatter::HTMLFormatter,
|
|
8
|
-
SimpleCov::Formatter::RcovTextFormatter
|
|
9
|
+
SimpleCov::Formatter::RcovTextFormatter,
|
|
10
|
+
Coveralls::SimpleCov::Formatter
|
|
9
11
|
]
|
|
10
12
|
SimpleCov.start do
|
|
11
13
|
add_filter "spec/dummy"
|
|
@@ -18,10 +20,7 @@ require File.expand_path("../dummy/config/environment", __FILE__)
|
|
|
18
20
|
require 'rspec/rails'
|
|
19
21
|
require 'rspec/autorun'
|
|
20
22
|
|
|
21
|
-
require
|
|
22
|
-
Coveralls.wear!
|
|
23
|
-
|
|
24
|
-
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
|
23
|
+
Dir["./spec/support/**/*.rb"].sort.each {|f| require f }
|
|
25
24
|
|
|
26
25
|
RSpec.configure do |config|
|
|
27
26
|
config.mock_with :rspec
|
data/traducto.gemspec
CHANGED
|
@@ -3,7 +3,7 @@ Gem::Specification.new do |gem|
|
|
|
3
3
|
gem.description = "Rails helpers collection to simplify the localization code."
|
|
4
4
|
gem.summary = "Rails helpers collection to simplify the localization code."
|
|
5
5
|
gem.homepage = "https://github.com/alchimikweb/traducto"
|
|
6
|
-
gem.version = "1.0.
|
|
6
|
+
gem.version = "1.0.4"
|
|
7
7
|
gem.licenses = ["MIT"]
|
|
8
8
|
|
|
9
9
|
gem.authors = ["Sebastien Rosa"]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: traducto
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sebastien Rosa
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2014-04-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|