sdl4r 0.9.4 → 0.9.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 (47) hide show
  1. data/CHANGELOG +28 -0
  2. data/README +9 -0
  3. data/Rakefile +3 -2
  4. data/TODO +78 -0
  5. data/doc/classes/SDL4R.html +207 -53
  6. data/doc/classes/SDL4R/Parser.html +111 -49
  7. data/doc/classes/SDL4R/SdlBinary.html +125 -65
  8. data/doc/classes/SDL4R/SdlParseError.html +52 -30
  9. data/doc/classes/SDL4R/SdlTimeSpan.html +497 -279
  10. data/doc/classes/SDL4R/Tag.html +866 -514
  11. data/doc/created.rid +1 -1
  12. data/doc/files/CHANGELOG.html +52 -25
  13. data/doc/files/LICENSE.html +43 -52
  14. data/doc/files/README.html +52 -43
  15. data/doc/files/lib/sdl4r/parser/reader_rb.html +16 -27
  16. data/doc/files/lib/sdl4r/parser/time_span_with_zone_rb.html +17 -21
  17. data/doc/files/lib/sdl4r/parser/token_rb.html +17 -21
  18. data/doc/files/lib/sdl4r/parser/tokenizer_rb.html +17 -21
  19. data/doc/files/lib/sdl4r/parser_rb.html +21 -22
  20. data/doc/files/lib/sdl4r/sdl4r_rb.html +25 -25
  21. data/doc/files/lib/sdl4r/sdl_binary_rb.html +17 -21
  22. data/doc/files/lib/sdl4r/sdl_parse_error_rb.html +17 -21
  23. data/doc/files/lib/sdl4r/sdl_time_span_rb.html +17 -21
  24. data/doc/files/lib/sdl4r/tag_rb.html +25 -24
  25. data/doc/files/lib/sdl4r_rb.html +17 -21
  26. data/doc/fr_class_index.html +15 -12
  27. data/doc/fr_file_index.html +23 -12
  28. data/doc/fr_method_index.html +176 -91
  29. data/doc/index.html +7 -10
  30. data/doc/rdoc-style.css +210 -119
  31. data/lib/sdl4r.rb +3 -0
  32. data/lib/sdl4r/parser.rb +3 -5
  33. data/lib/sdl4r/parser/reader.rb +3 -3
  34. data/lib/sdl4r/parser/time_span_with_zone.rb +3 -0
  35. data/lib/sdl4r/parser/token.rb +3 -0
  36. data/lib/sdl4r/parser/tokenizer.rb +3 -0
  37. data/lib/sdl4r/sdl4r.rb +20 -8
  38. data/lib/sdl4r/sdl_binary.rb +3 -0
  39. data/lib/sdl4r/sdl_parse_error.rb +3 -0
  40. data/lib/sdl4r/sdl_time_span.rb +3 -0
  41. data/lib/sdl4r/tag.rb +18 -4
  42. data/test/sdl4r/parser_test.rb +7 -2
  43. data/test/sdl4r/sdl4r_test.rb +6 -2
  44. data/test/sdl4r/sdl_test.rb +3 -0
  45. data/test/sdl4r/tag_test.rb +3 -0
  46. metadata +72 -74
  47. data/TODO.txt +0 -177
data/TODO.txt DELETED
@@ -1,177 +0,0 @@
1
- [x] Tag.each_attribute should allow to iterate on all namespaces if 'namespace' is nil
2
- [x] Tag.get_attributes(namespace)
3
- [x] Implementation of attributes=
4
- [x] Implementation of Sdl.format()
5
- [x] Handle milliseconds in Sdl.format()
6
- [x] Handle timezones in Sdl.format()
7
- [x] Handle the Time class in Sdl.format()
8
- [x] Handle SdlTimeSpan in Sdl.format() ==> via to_s()
9
- [x] Review SdlTimeSpan
10
- [x] Instead of calling Tag.each_attribute(), we could have another way of calling attributes:
11
- with or without given block. Same goes for each_value(), etc.
12
- [x] Is Base64 really compatible with the format defined in the Java version ?
13
- ==> Seems so after having implemented more of the standard tests.
14
- [x] Support both DateTime and Time in parsing (see Parser#combine())
15
- ==> SDL4R::new_date_time can be overriden
16
- [x] Use Date instead of DateTime if only day was specified in SDL (parser.rb)
17
- [x] Add a remove_all_children() to Tag
18
- [x] Rethink the interfaces to access sub-tags, values, attributes, etc
19
- (it is currently difficult to retrieve all the values, or the number of
20
- sub-tags, etc)
21
- ==> to simplify access to values would be ok but attributes or children would be more difficult.
22
- [x] See whether there is such a need to shield users from the actual arrays of
23
- values (we return a copy for the time being).
24
- ==> We don't return copies anymore.
25
- [ ] Add more unit tests
26
- [x] Attribute tests
27
- [x] Date tests
28
- [x] Date + time test
29
- [x] Time zone tests
30
- [x] Number literal tests
31
- [x] Strings literals (especially with line continuations)
32
- [x] Sub tags tests
33
- [x] "null" value test
34
- [x] Comment tests
35
- [ ] Bad syntax tests
36
- [ ] Test write (unit tests)
37
- [ ] Dates
38
- [ ] Numbers
39
- [A] Use YARD in order to generate documentation ?
40
- ==> alternatively, I tried to generate some RDoc templates but none worked in Rake...
41
- [x] In the documentation, present a table giving the returned Ruby type for each SDL type.
42
- [x] Change the interface of SdlTimeSpan to look like the interfaces of Date, DateTime or Time
43
- ==> Add alias methods.
44
- [x] Have SdlTimeSpan implement Comparable
45
- [ ] BUG: the line number is too high by 1 (the column is correct).
46
- [x] PB: binary fields shouldn't be kept as Strings because they would not be saved as binaries but
47
- as strings otherwise.
48
- ==> We use SdlBinary now.
49
- [x] Change the module name to SDL4R? Something else?
50
- ==> Changed to SDL4R.
51
- [/] Fix the differences between test_basic_types.sdl and what is generated from the parsed structure
52
- [x] chars
53
- [x] longs
54
- [x] doubles
55
- [x] decimals
56
- [x] booleans
57
- [x] null
58
- [x] dates
59
- [x] times
60
- [x] negative times
61
- [x] datetimes
62
- [/] zone codes
63
- ==> Time only works in UTC, which means that the original zone code is lost.
64
- ==> DateTime doesn't give the zone code but only the offset.
65
- [ ] Use TzTime? Use a custom object that knows whether a time zone was specified?
66
- ==> http://tztime.rubyforge.org/
67
- ==> along with TzInfo: http://tzinfo.rubyforge.org/
68
- [x] BUG: Base64 wrapped lines are 64 chars long and not 72 (traditionnal length)
69
- ==> Because of a limitation in the regular expressions ==> find another algorithm
70
- [x] See whether we can do better for numbers of arbitrary precision (decimals).
71
- ==> Ruby BigDecimal
72
- ==> Ruby Decimal http://ruby-decimal.rubyforge.org/
73
- ==> Now: http://flt.rubyforge.org/ : use this if the lib is available
74
- ==> We use flt if available.
75
- [ ] See how Ruby floats relate to Java floats and doubles.
76
- [ ] Add tests for the SDL class
77
- [ ] Allow unicode characters in identifiers.
78
- [ ] FUTURE: It might be useful to allow people to replace the standard types by their own. This
79
- could be useful for dates or numbers, for instance.
80
- [N] To install a gem in the Netbeans gems repository, it needs to run as an administrator.
81
- Otherwise, it fails silently.
82
- [x] Make it so that the tests pass (with errors or not), when Ftl (DecNum) is not available.
83
- [x] Fix the ParserTest test.
84
- [x] SDL 1.1: tag1; tag2 "a value"; tag3 name="foo"
85
- [x] Create a Tokenizer class
86
- [A] Test attributes with/without namespaces
87
- ==> Guess this is done in test_structures...
88
- [x] Fix Test.test_strings: support for Unicode
89
- ==> Seems to work.
90
- [ ] FUTURE: Consider being able to read text files that are not UTF-8(?)
91
- [ ] BUG: the report on the line no in errors is off by 1 (at least in some cases)
92
- [x] Try to move Reader, Tokenizer, etc to the private part of the SDL module
93
- ==> Doesn't seem to make a difference.
94
- ==> Moved to the Parser namespace.
95
- [x] Factorize "each_child..." methods in Tag and refactor "children(recursive, name)" consequently
96
- + invert "name" and "recursive" in "children()"
97
- [x] Return copies or original arrays in Tag?
98
- ==> we return the implementation Arrays or Hashes (or whatever) for efficiency.
99
- However, we ask the users not to assume anything as we might protect the returned objects in
100
- the future.
101
- [A] BUG: test_tag_write_parse() does not work from the command line (ruby v1.8.7).
102
- ==> This is normal provided that flt was not installed.
103
- [A] Tag.to_string(): break up long lines using the backslash
104
- ==> unless, some day, someone asks for it...
105
- [ ] Tag.hash: the implementation is not very efficient.
106
- ==> Difficult to make better and still simple
107
- ==> Maybe possible when it's frozen.
108
- [x] Implement reading from a URL(?) Other sources idiomatic in Ruby?
109
- ==> Strings, URIs, Pathnames, IOs
110
- [x] See the XML and YAML APIs to find enhancements.
111
- [x] Check the XML functionalities of Tag.
112
- [x] Add tests for Tag
113
- [x] Maybe some methods in the SDL module are not so useful to the general user: make them protected?
114
- [ ] FUTURE: xpath, ypath ==> sdlpath(?)
115
- [ ] FUTURE: evenemential parsing(?)
116
- [x] Move Tokenizer, Reader, etc into the Parser module/class or prefix by Sdl
117
- ==> moved to sdl4r/parser
118
- [ ] FUTURE: add a way to insert a tag after or before another(?)
119
- [ ] FUTURE: allow some way of generating YAML(?)
120
- [ ] FUTURE: allow to turn a YAML structure into a SDL one(?)
121
- [x] Make a Gem
122
- [x] Implement the convenience method of SDL (value(), list(), map())
123
- [x] Move the test files to a sdl4r subdir
124
- [x] 1.2: Ensure that there is a SDL.read() that returns a Tag
125
- [x] 1.2: hasChild(), hasChildren() methods
126
- [x] 1.2: getChildMap(), getChildStringMap() methods
127
- [x] 1.3: periods in identifiers
128
- [A] Create a History.txt file ==> See CHANGELOG
129
- [x] Setup the Rubyforge website
130
- [A] See how both Subversion repositories can be handled (is it necessary?)
131
- ==> No need for the Rubyforge project anymore, it seems (we use Rubygem and gemcutter directly)
132
- [x] Add info to README
133
- [x] Add LICENSE & CHANGELOG files
134
- [x] State in the README that without Flt, all the tests can't run.
135
- ==> it's stated explicitely in the test
136
- [w] Make it so that each test appears separately in test.rb (if possible)
137
- [A] Have the use of Flt be optional.
138
- ==> We use BigDecimal instead.
139
- [x] Be sure that there is a way to change the precision of Flt outside of SDL4
140
- ==> just change the precision in your thread before parsing
141
- [x] Turn Rationals to Floats in coerce_or_fail()?
142
- [ ] BUG: "rake package" tries to archive the contents twice: once with the command that I configure
143
- in Rakefile, once with a zip command that can't work on my machine (zip is not installed). Why?
144
- At least, the first archive is created and seems correct.
145
- [x] Add a "Getting Started" chapter to the README
146
- [ ] FUTURE: Would we need a "write" method in SDL4R?
147
- [x] Implement coerce_or_fail: it is right now allowed to add any garbage to the SDL tags
148
- [x] Fix the doc of Tag.add_value
149
- [ ] Add tests and release a RC or beta version
150
- [x] Make the parser components disappear from the RDoc
151
- [x] Add tests for Tag attributes
152
- [x] Add tests for Tag to_child_hash, etc
153
- [x] Add tests for Tag eql?, etc
154
- [x] Should we interpret arrays in arrays in Tag.<< as a structure specification?
155
- Example: tag << [[1, 2], [3, 4]]
156
- could mean adding 2 anonymous "content" tags to "tag" with the corresponding values
157
- ==> Works fine for matrices
158
- [x] Make the methods of Tag that take a block have a better yield doc/completion
159
- ==> I added :yields: RDoc directives, which doesn't look like it's helping but I guess that's
160
- all I can do for now.
161
- [x] See if we can not support the right order for the namespaces
162
- attribute("a1") # => just the name
163
- attribute("ns1", "a1") # => namespace + name (instead of attribute("a1", "ns1") now)
164
- [N] Never call a class "Test" => it can easily conflict with the "Test" module of Test::Unit and
165
- then, it becomes quite difficult to understand why.
166
- [x] Add tests for to_xml_string
167
- [x] Be stricter and more explicit with Tag and attributes name/namespace
168
- [x] Fix set_attributes: it was correct before.
169
- [ ] Input relevant URLs on http://rubygems.org
170
- [x] What prevents from doing the following?
171
- tag.values << IO.new("toto.txt")
172
- ==> It doesn't break the behavior as long as the value type is OK. Even if it is not allowed,
173
- it still is not too bad.
174
- [x] Somehow, I didn't choose BigDecimal when I started to use Flt::DecNum. Can't remember why but
175
- seems overly complicated.
176
- ==> Remove Flt.
177
- [x] Rename sdl.rb to sdl4r.rb