i18n_sync 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/i18n_sync.gemspec +1 -1
- data/spec/i18n_sync_spec.rb +9 -5
- data/spec/spec_helper.rb +0 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/i18n_sync.gemspec
CHANGED
data/spec/i18n_sync_spec.rb
CHANGED
@@ -3,6 +3,10 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
|
3
3
|
|
4
4
|
EN = "spec/work/en.yml"
|
5
5
|
|
6
|
+
def run(comm)
|
7
|
+
`bin/i18s #{comm}`
|
8
|
+
end
|
9
|
+
|
6
10
|
describe "I18nSync" do
|
7
11
|
before do
|
8
12
|
`rm -rf spec/work`
|
@@ -12,27 +16,27 @@ describe "I18nSync" do
|
|
12
16
|
it "should create a new one" do
|
13
17
|
newfile = "spec/work/fo.yml"
|
14
18
|
`rm #{newfile}` if File.exists?(newfile)
|
15
|
-
|
19
|
+
run("#{EN} fo")
|
16
20
|
File.read(newfile).should eql("\nfo: \n sync: To Sync It!\n test: Test\n")
|
17
21
|
end
|
18
22
|
|
19
23
|
it "should sync files nicely" do
|
20
|
-
|
24
|
+
run("spec/work/pt.yml")
|
21
25
|
File.read(EN).should eql("\nen: \n new: \"Uau, isso é novo\"\n sync: To Sync It!\n test: Test\n")
|
22
26
|
end
|
23
27
|
|
24
28
|
it "should respect namespaces" do
|
25
|
-
|
29
|
+
run("spec/work/pt.yml")
|
26
30
|
File.read("spec/work/named.pt.yml").should eql("\npt:\n something: Algo\n")
|
27
31
|
end
|
28
32
|
|
29
33
|
it "should respect namespaces" do
|
30
|
-
|
34
|
+
run("spec/work/named.en.yml")
|
31
35
|
File.read("spec/work/named.pt.yml").should eql("\npt: \n another: Another\n something: Algo\n")
|
32
36
|
end
|
33
37
|
|
34
38
|
it "should order alphabeticaly namespaces" do
|
35
|
-
|
39
|
+
run("spec/work/order.pt.yml")
|
36
40
|
File.read("spec/work/order.en.yml").should eql("\nen: \n alpha: Alpha\n blue: Blue\n zebra: Zebra\n")
|
37
41
|
File.read("spec/work/named.pt.yml").should eql("\npt:\n something: Algo\n")
|
38
42
|
end
|
data/spec/spec_helper.rb
CHANGED