i18n_sync 0.0.4 → 0.0.5

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{i18n_sync}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Marcos Piccinini"]
@@ -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
- `bin/i18s #{EN} fo`
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
- `bin/i18s spec/work/pt.yml`
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
- `bin/i18s spec/work/pt.yml`
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
- `bin/i18s spec/work/named.en.yml`
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
- `bin/i18s spec/work/order.pt.yml`
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
@@ -1,6 +1,5 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__))
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
- TEST = true
4
3
  require 'i18n_sync'
5
4
  begin
6
5
  require 'spec'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Marcos Piccinini