serial_translator 0.0.1 → 0.0.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/lib/serial_translator.rb +4 -0
- data/lib/serial_translator/version.rb +1 -1
- data/spec/lib/serial_translator_spec.rb +16 -0
- 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: 2d9a361ac3956ed0f39ecda9c4ef8a791d73e648
|
4
|
+
data.tar.gz: 61bf47fefc8860f5b4ff7891150c76bac52fae9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aa2be05d525d8786cb8bfdc8c2484e321cf49c0434bc5ae06f2a69a1be9606525cd0bb3eb90bec82ba94d580ea2b2d0049762300ca097d7c7f221ea2939a449
|
7
|
+
data.tar.gz: 6e86c7ecb095ee16134e39826ca43655cb0e6fc4ac784a6cc81129cc2dd20d522968c6f0144f6ff90d14f9e59c3b97d6b7be86a68d95feae09379db07623bd00
|
data/lib/serial_translator.rb
CHANGED
@@ -72,4 +72,20 @@ describe SerialTranslator do
|
|
72
72
|
object.translated_locales.should eq [:en]
|
73
73
|
end
|
74
74
|
end
|
75
|
+
|
76
|
+
describe '#translated_into?' do
|
77
|
+
before { object.title_translations = { en: 'Foo', de: '' } }
|
78
|
+
|
79
|
+
it 'returns true if there is a translation available for this locale' do
|
80
|
+
object.should be_translated_into :en
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'returns false if there is no translation present for this locale' do
|
84
|
+
object.should_not be_translated_into :de
|
85
|
+
end
|
86
|
+
|
87
|
+
it 'returns false if this locale is unknown yet' do
|
88
|
+
object.should_not be_translated_into :yml
|
89
|
+
end
|
90
|
+
end
|
75
91
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serial_translator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- betterplace development team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|