grosser-pomo 0.5.0 → 0.5.1

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.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 5
3
- :patch: 0
3
+ :patch: 1
4
4
  :major: 0
@@ -22,7 +22,7 @@ module Pomo
22
22
  end
23
23
 
24
24
  def complete?
25
- not msgid.to_s.strip.empty? and not msgstr.nil?
25
+ not msgid.nil? and not msgstr.nil?
26
26
  end
27
27
 
28
28
  def fuzzy?
@@ -2,33 +2,40 @@ require File.expand_path("../spec_helper", File.dirname(__FILE__))
2
2
 
3
3
  include Pomo
4
4
  describe Pomo::PoFile do
5
- it "parses nothing" do
6
- PoFile.parse("").should be_empty
7
- end
5
+ describe :parse do
6
+ it "parses nothing" do
7
+ PoFile.parse("").should be_empty
8
+ end
8
9
 
9
- it "parses a simple msgid and msgstr" do
10
- t = PoFile.parse(%Q(msgid "xxx"\nmsgstr "yyy"))
11
- t[0].to_hash.should == {:msgid=>'xxx',:msgstr=>'yyy'}
12
- end
10
+ it "parses a simple msgid and msgstr" do
11
+ t = PoFile.parse(%Q(msgid "xxx"\nmsgstr "yyy"))
12
+ t[0].to_hash.should == {:msgid=>'xxx',:msgstr=>'yyy'}
13
+ end
13
14
 
14
- it "parses a simple msgid and msg with additional whitespace" do
15
- t = PoFile.parse(%Q( msgid "xxx" \n msgstr "yyy" ))
16
- t[0].to_hash.should == {:msgid=>'xxx',:msgstr=>'yyy'}
17
- end
15
+ it "parses a simple msgid and msg with additional whitespace" do
16
+ t = PoFile.parse(%Q( msgid "xxx" \n msgstr "yyy" ))
17
+ t[0].to_hash.should == {:msgid=>'xxx',:msgstr=>'yyy'}
18
+ end
18
19
 
19
- it "parses a multiline msgid/msgstr" do
20
- t = PoFile.parse(%Q(msgid "xxx"\n"aaa"\n\n\nmsgstr ""\n"bbb"))
21
- t[0].to_hash.should == {:msgid=>'xxxaaa',:msgstr=>'bbb'}
22
- end
20
+ it "parses an empty msgid with text (gettext meta data)" do
21
+ t = PoFile.parse(%Q(msgid ""\nmsgstr "PLURAL FORMS"))
22
+ t[0].to_hash.should == {:msgid=>'',:msgstr=>'PLURAL FORMS'}
23
+ end
23
24
 
24
- it "parses simple comments" do
25
- t = PoFile.parse(%Q(#test\nmsgid "xxx"\nmsgstr "yyy"))
26
- t[0].to_hash.should == {:msgid=>'xxx',:msgstr=>'yyy',:comment=>"test\n"}
27
- end
25
+ it "parses a multiline msgid/msgstr" do
26
+ t = PoFile.parse(%Q(msgid "xxx"\n"aaa"\n\n\nmsgstr ""\n"bbb"))
27
+ t[0].to_hash.should == {:msgid=>'xxxaaa',:msgstr=>'bbb'}
28
+ end
28
29
 
29
- it "parses comments above msgstr" do
30
- t = PoFile.parse(%Q(#test\nmsgid "xxx"\n#another\nmsgstr "yyy"))
31
- t[0].to_hash.should == {:msgid=>'xxx',:msgstr=>'yyy',:comment=>"test\nanother\n"}
30
+ it "parses simple comments" do
31
+ t = PoFile.parse(%Q(#test\nmsgid "xxx"\nmsgstr "yyy"))
32
+ t[0].to_hash.should == {:msgid=>'xxx',:msgstr=>'yyy',:comment=>"test\n"}
33
+ end
34
+
35
+ it "parses comments above msgstr" do
36
+ t = PoFile.parse(%Q(#test\nmsgid "xxx"\n#another\nmsgstr "yyy"))
37
+ t[0].to_hash.should == {:msgid=>'xxx',:msgstr=>'yyy',:comment=>"test\nanother\n"}
38
+ end
32
39
  end
33
40
 
34
41
  describe "instance interface" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grosser-pomo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-31 00:00:00 -07:00
12
+ date: 2009-05-01 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -19,23 +19,20 @@ executables: []
19
19
 
20
20
  extensions: []
21
21
 
22
- extra_rdoc_files: []
23
-
22
+ extra_rdoc_files:
23
+ - README.markdown
24
24
  files:
25
25
  - README.markdown
26
26
  - VERSION.yml
27
- - lib/pomo
28
27
  - lib/pomo.rb
29
28
  - lib/pomo/mo_file.rb
30
29
  - lib/pomo/po_file.rb
31
30
  - lib/pomo/translation.rb
32
- - spec/files
33
31
  - spec/files/complex.mo
34
32
  - spec/files/empty.mo
35
33
  - spec/files/plural.mo
36
34
  - spec/files/singular.mo
37
35
  - spec/files/singular_2.mo
38
- - spec/pomo
39
36
  - spec/pomo/mo_file_spec.rb
40
37
  - spec/pomo/po_file_spec.rb
41
38
  - spec/pomo/translation_spec.rb
@@ -47,7 +44,6 @@ has_rdoc: true
47
44
  homepage: http://github.com/grosser/pomo
48
45
  post_install_message:
49
46
  rdoc_options:
50
- - --inline-source
51
47
  - --charset=UTF-8
52
48
  require_paths:
53
49
  - lib
@@ -70,5 +66,8 @@ rubygems_version: 1.2.0
70
66
  signing_key:
71
67
  specification_version: 2
72
68
  summary: "Ruby/Gettext: A .po and .mo file parser/generator"
73
- test_files: []
74
-
69
+ test_files:
70
+ - spec/pomo/po_file_spec.rb
71
+ - spec/pomo/translation_spec.rb
72
+ - spec/pomo/mo_file_spec.rb
73
+ - spec/spec_helper.rb