treetop-dcf 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,7 +19,7 @@ Its much faster but fails on certain valid files.
19
19
 
20
20
  ## Installation
21
21
 
22
- sudo gem install treetop-dcf
22
+ gem install treetop-dcf
23
23
 
24
24
  ## Acknowledgements
25
25
 
data/lib/dcf.rb CHANGED
@@ -19,6 +19,6 @@ module Dcf
19
19
  end
20
20
 
21
21
  def self.version
22
- "0.2.0"
22
+ "0.2.1"
23
23
  end
24
24
  end
@@ -16,7 +16,7 @@ grammar Dcf
16
16
  end
17
17
 
18
18
  rule value
19
- eol? (!eol .)+ (eol white+ (!eol .)+)*
19
+ (!next_record !parasep .)*
20
20
  {
21
21
  def text_value
22
22
  # I don't really like this, but it works for the files I'm parsing, so..
@@ -33,6 +33,10 @@ grammar Dcf
33
33
  ':' white*
34
34
  end
35
35
 
36
+ rule parasep
37
+ "\n" "\n"
38
+ end
39
+
36
40
  rule eol
37
41
  "\n"
38
42
  end
@@ -1,8 +1,5 @@
1
1
  require 'test/unit'
2
2
 
3
- # for some reason these tests fail when run via TextMate
4
- # but succeed when run on the command line.
5
-
6
3
  tests = Dir["#{File.dirname(__FILE__)}/test_*.rb"]
7
4
  tests.each do |file|
8
5
  require file
@@ -41,6 +41,11 @@ EOF
41
41
  assert_equal "rgl,car,MASS,ffmanova,akima,labdsv,RColorBrewer,vegan,tcltk2,tcltk,maptools,sciplot", stat["Depends"]
42
42
  end
43
43
 
44
+ should "parse fields with blank values" do
45
+ parse = Dcf.parse("A: \nB: b")
46
+ assert_equal [{"A"=>"", "B"=>"b"}], parse
47
+ end
48
+
44
49
  should "parse a simple entry" do
45
50
  parse = Dcf.parse("Attr: Value\n").first
46
51
  assert_equal ["Attr"], parse.keys
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: treetop-dcf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ hash: 21
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 1
10
+ version: 0.2.1
5
11
  platform: ruby
6
12
  authors:
7
13
  - "Bj\xC3\xB8rn Arild M\xC3\xA6land"
@@ -9,19 +15,39 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2009-10-28 00:00:00 +01:00
18
+ date: 2011-03-16 00:00:00 +01:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: treetop
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 21
30
+ segments:
31
+ - 1
32
+ - 2
33
+ - 5
23
34
  version: 1.2.5
24
- version:
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: shoulda
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
48
+ version: "0"
49
+ type: :development
50
+ version_requirements: *id002
25
51
  description: Easy to use parser for Debian Control Files.
26
52
  email: bjorn.maeland@gmail.com
27
53
  executables: []
@@ -34,35 +60,46 @@ files:
34
60
  - lib/dcf.rb
35
61
  - lib/dcf_grammar.treetop
36
62
  - README.markdown
63
+ - test/helper.rb
64
+ - test/suite.rb
65
+ - test/test_dcf.rb
37
66
  has_rdoc: true
38
- homepage: http://github.com/Chrononaut/treetop-dcf
39
- licenses: []
40
-
67
+ homepage: http://github.com/bmaland/treetop-dcf
68
+ licenses:
69
+ - MIT
41
70
  post_install_message:
42
- rdoc_options:
43
- - --charset=UTF-8
71
+ rdoc_options: []
72
+
44
73
  require_paths:
45
74
  - lib
46
75
  required_ruby_version: !ruby/object:Gem::Requirement
76
+ none: false
47
77
  requirements:
48
78
  - - ">="
49
79
  - !ruby/object:Gem::Version
80
+ hash: 3
81
+ segments:
82
+ - 0
50
83
  version: "0"
51
- version:
52
84
  required_rubygems_version: !ruby/object:Gem::Requirement
85
+ none: false
53
86
  requirements:
54
87
  - - ">="
55
88
  - !ruby/object:Gem::Version
56
- version: "0"
57
- version:
89
+ hash: 23
90
+ segments:
91
+ - 1
92
+ - 3
93
+ - 6
94
+ version: 1.3.6
58
95
  requirements: []
59
96
 
60
- rubyforge_project:
61
- rubygems_version: 1.3.5
97
+ rubyforge_project: treetop-dcf
98
+ rubygems_version: 1.5.2
62
99
  signing_key:
63
100
  specification_version: 3
64
101
  summary: Easy to use parser for Debian Control Files.
65
102
  test_files:
66
103
  - test/helper.rb
67
- - test/test_dcf.rb
68
104
  - test/suite.rb
105
+ - test/test_dcf.rb