manifest 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.
Files changed (3) hide show
  1. data/lib/manifest.rb +14 -3
  2. data/lib/manifest/version.rb +1 -1
  3. metadata +2 -2
@@ -31,15 +31,26 @@ module Manifest
31
31
  map.merge!(name=>nil)
32
32
  else
33
33
  valuesAsHash = {}
34
+
35
+ nestedList = false
34
36
  values.split(/,/).inject([]) { |array, att1|
35
-
36
- if (/[\]|\[|\)|\(]"/.match(att1))
37
+ # split and then recompose. Not optimal at all but the manifest format is such a pain...
38
+ if nestedList
37
39
  last = array.pop
38
- array << "#{last},#{att1}"
40
+ array << "#{last},#{att1}"
39
41
  else
40
42
  array << att1
41
43
  end
44
+
45
+ if (/.*"$/.match(att1))
46
+ nestedList = false
47
+ elsif /"/.match(att1) # if a " is in the value, it means we entered a subentry. And since it is not at the
48
+ # end of the line, we can conclude we are in a nested list.
49
+ nestedList = true
50
+ end
51
+ array
42
52
  }.each { |attribute|
53
+ p attribute
43
54
  optionalAttributes = {}
44
55
  values = attribute.split(/;/)
45
56
  value = values.shift
@@ -13,7 +13,7 @@ module Manifest #:nodoc:
13
13
  module VERSION #:nodoc:
14
14
  MAJOR = 0
15
15
  MINOR = 0
16
- TINY = 4
16
+ TINY = 5
17
17
 
18
18
  STRING = [MAJOR, MINOR, TINY].join('.')
19
19
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manifest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antoine Toulme
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-08-11 00:00:00 +02:00
12
+ date: 2009-09-11 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency