configtoolkit 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/FAQ.txt CHANGED
@@ -94,13 +94,14 @@ can tell it to treat ConfigToolkit::BaseConfig.add_required_param and
94
94
  ConfigToolkit::BaseConfig.add_optional_param as attribute specifiers via
95
95
  command-line options (the -A option), but this produces slightly broken
96
96
  output because +rdoc+ misinterprets the second and third (if present) arguments
97
- to the method as additional attributes (since +attr_reader+, for instance,
97
+ to the methods as additional attributes (since +attr_reader+, for instance,
98
98
  can take multiple Symbols as arguments, each of which becomes an attribute).
99
- The +configtoolkit+ gem includes small patch to +rdoc+ (*only* to version 2.0.0,
100
- available as a gem at http://rubyforge.org/projects/rdoc/) that fixes this for
99
+ The +configtoolkit+ includes a small patch for the +rdoc+ gem (only
100
+ versions 2.0.0 and 2.1.0, which can be obtained with +gem+ or at
101
+ http://rubyforge.org/projects/rdoc/) that fixes this for
101
102
  ConfigToolkit::BaseConfig.add_required_param and
102
103
  ConfigToolkit::BaseConfig.add_optional_param:
103
- ======+rdoc_support/rdoc.patch+:
104
+ ======+rdoc_support/rdoc-2.0.0.patch+:
104
105
  --- parse_rb.rb 2008-07-14 12:25:06.000000000 -0400
105
106
  +++ /usr/lib/ruby/gems/1.8/gems/rdoc-2.0.0/lib/rdoc/parsers/parse_rb.rb 2008-07-14 12:32:02.000000000 -0400
106
107
  @@ -2505,6 +2505,21 @@
@@ -126,12 +127,40 @@ ConfigToolkit::BaseConfig.add_optional_param:
126
127
  att = RDoc::Attr.new get_tkread, name, rw, comment
127
128
  context.add_attribute att
128
129
 
129
- The patch should be applied to +rdoc-2.0.0/lib/rdoc/parsers/parse_rb.rb+ in the
130
- Ruby gems directory with the +patch+ utility.
130
+ This patch only should be applied to the +rdoc+ version 2.0.0 gem with the
131
+ +patch+ utility:
132
+ ======+rdoc_support/rdoc-2.1.0.patch+:
133
+ --- rdoc-2.1.0/lib/rdoc/parser/ruby.rb 2008-07-25 13:09:44.000000000 -0400
134
+ +++ /usr/lib/ruby/gems/1.8/gems/rdoc-2.1.0/lib/rdoc/parser/ruby.rb 2008-07-25 13:08:37.000000000 -0400
135
+ @@ -1807,6 +1807,21 @@
136
+ rw = '?' if rw.nil?
137
+ end
138
+
139
+ + #
140
+ + # This is a temporary hack.
141
+ + # At some point in the (near) future, this should be specifiable via
142
+ + # rdoc's command-line options.
143
+ + #
144
+ + # Unlike the attr* family of functions, only the first argument of
145
+ + # the add*param functions is an attribute; the other arguments
146
+ + # constrain the attribute.
147
+ + #
148
+ + if((tk.name == "add_optional_param") || (tk.name == "add_required_param"))
149
+ + if(args.size > 1)
150
+ + args[1, args.size - 1] = nil
151
+ + end
152
+ + end
153
+ +
154
+ for name in args
155
+ att = RDoc::Attr.new get_tkread, name, rw, comment
156
+ context.add_attribute att
157
+
158
+ This patch only should be applied to the +rdoc+ version 2.1.0 gem with the
159
+ +patch+ utility:
131
160
 
132
- After applying this patch, +rdoc+ should register the parameters as attributes
133
- with this command-line option:
134
- --accessor=add_optional_param=rw,add_required_param=rw
161
+ After applying the appropriate patch, +rdoc+ should register the parameters as
162
+ attributes with this command-line option:
163
+ --accessor=add_optional_param=RW,add_required_param=RW
135
164
 
136
165
  As with standard attributes, +rdoc+ will display a comment block above the
137
166
  call to add a new parameter in the generated HTML along with the attribute. The
data/Hash.txt CHANGED
@@ -125,4 +125,4 @@ When run, the program produces:
125
125
  }
126
126
 
127
127
  The Hash dumped from the second config:
128
- {:production=>{:www=>{:addresses=>[#<URI::HTTP:0xb7e2f8d0 URL:http://www.designingpatterns.com>, #<URI::HTTP:0xb7e2f880 URL:http://tokyo.designingpatterns.com>], :num_cpus=>64, :os=>{:version=>10.0, :name=>"Solaris"}, :behind_firewall=>true, :contains_sensitive_data=>true}}}
128
+ {:production=>{:www=>{:addresses=>[#<URI::HTTP:0xb7e8b018 URL:http://www.designingpatterns.com>, #<URI::HTTP:0xb7e8aed8 URL:http://tokyo.designingpatterns.com>], :num_cpus=>64, :os=>{:version=>10.0, :name=>"Solaris"}, :behind_firewall=>true, :contains_sensitive_data=>true}}}
@@ -1,3 +1,8 @@
1
+ === 2.1.0 / 2008-07-25
2
+ * Small documentation enhancements
3
+ * Add a patch for properly documenting configuration parameters for rdoc
4
+ version 2.1.0, in addition to the existing patch for rdoc version 2.0.0
5
+
1
6
  === 2.0.0 / 2008-07-03
2
7
  This version of the ConfigToolkit has a ton of enhancements. I really would
3
8
  welcome input from the community about it!
@@ -40,6 +40,8 @@ lib/configtoolkit/types.rb
40
40
  lib/configtoolkit/writer.rb
41
41
  lib/configtoolkit/yamlreader.rb
42
42
  lib/configtoolkit/yamlwriter.rb
43
+ rdoc_support/rdoc-2.0.0.patch
44
+ rdoc_support/rdoc-2.1.0.patch
43
45
  test/readerwritertest.rb
44
46
  test/test_baseconfig.rb
45
47
  test/test_hash.rb
data/README.txt CHANGED
@@ -3,8 +3,8 @@
3
3
  * Documentation: http://configtoolkit.rubyforge.org/
4
4
 
5
5
  == DESCRIPTION:
6
- This package makes sourcing information from configuration files robust
7
- and easy! It:
6
+ This package makes sourcing information from (parsing) configuration files
7
+ robust and easy! It:
8
8
  * Allows programmers to specify the type of data that should be loaded
9
9
  from a configuration file. The toolkit automatically will validate
10
10
  the file's data against this specification when loading the file, ensuring
@@ -15,9 +15,9 @@ and easy! It:
15
15
  from the configuration's specification.
16
16
  * Allows programmers to create configuration files,
17
17
  easily and programatically.
18
- * Provides a class that can load Ruby configuration files (allowing the
18
+ * Provides a class that can load (parse) Ruby configuration files (allowing the
19
19
  full power of Ruby to be used within configuration files).
20
- * Provides classes that can load from and dump to YAML and key-value
20
+ * Provides classes that can load from (parse) and dump to YAML and key-value
21
21
  configuration files.
22
22
  * Provides classes that can load from and dump to Hashes.
23
23
  * Is very extensible, allowing the engine to be used with custom format
@@ -64,9 +64,9 @@ and easy! It:
64
64
  same configuration file and can be loaded into separate configuration
65
65
  instances (by specifying a different "containing object name" for each
66
66
  ConfigToolkit::BaseConfig#load call)
67
- * A reader class to read Ruby configuration files
67
+ * A reader class to read (parse) Ruby configuration files
68
68
  (ConfigToolkit::RubyReader)
69
- * A reader class to read YAML configuration files
69
+ * A reader class to read (parse) YAML configuration files
70
70
  (ConfigToolkit::YAMLReader)
71
71
  * A writer class to dump YAML configuration files
72
72
  (ConfigToolkit::YAMLWriter)
@@ -74,7 +74,7 @@ and easy! It:
74
74
  (ConfigToolkit::HashReader)
75
75
  * A writer class do dump configuration directly to a Hash
76
76
  (ConfigToolkit::HashWriter)
77
- * A reader class to read key-value configuration files
77
+ * A reader class to read (parse) key-value configuration files
78
78
  (ConfigToolkit::KeyValueReader)
79
79
  * A writer class to dump key-value configuration files
80
80
  (ConfigToolkit::KeyValueWriter)
@@ -85,7 +85,7 @@ and easy! It:
85
85
  * The ConfigToolkit code has detailed comments.
86
86
  * The ConfigToolkit code has many example programs (in the +examples+
87
87
  subdirectory).
88
- * The ConfigToolkit package includesx extensive documentation, including
88
+ * The ConfigToolkit package includes extensive documentation, including
89
89
  FAQ.txt and documentation for the support file formats.
90
90
 
91
91
  == PROBLEMS:
data/Rakefile CHANGED
@@ -3,7 +3,7 @@
3
3
  require 'rubygems'
4
4
  require 'hoe'
5
5
 
6
- Hoe.new('configtoolkit', "2.0.0") do |p|
6
+ Hoe.new('configtoolkit', "2.1.0") do |p|
7
7
  p.extra_deps << ['relative', '>= 1.0.0']
8
8
  p.extra_deps << ['assertions', '>= 1.0.0']
9
9
  p.remote_rdoc_dir = ''
@@ -0,0 +1,24 @@
1
+ --- parse_rb.rb 2008-07-14 12:25:06.000000000 -0400
2
+ +++ /usr/lib/ruby/gems/1.8/gems/rdoc-2.0.0/lib/rdoc/parsers/parse_rb.rb 2008-07-14 12:32:02.000000000 -0400
3
+ @@ -2505,6 +2505,21 @@
4
+ rw = @options.extra_accessor_flags[tk.name]
5
+ end
6
+
7
+ + #
8
+ + # This is a temporary hack.
9
+ + # At some point in the (near) future, this should be specifiable via
10
+ + # rdoc's command-line options.
11
+ + #
12
+ + # Unlike the attr* family of functions, only the first argument of
13
+ + # the add*param functions is an attribute; the other arguments
14
+ + # constrain the attribute.
15
+ + #
16
+ + if((tk.name == "add_optional_param") || (tk.name == "add_required_param"))
17
+ + if(args.size > 1)
18
+ + args[1, args.size - 1] = nil
19
+ + end
20
+ + end
21
+ +
22
+ for name in args
23
+ att = RDoc::Attr.new get_tkread, name, rw, comment
24
+ context.add_attribute att
@@ -0,0 +1,24 @@
1
+ --- rdoc-2.1.0/lib/rdoc/parser/ruby.rb 2008-07-25 13:09:44.000000000 -0400
2
+ +++ /usr/lib/ruby/gems/1.8/gems/rdoc-2.1.0/lib/rdoc/parser/ruby.rb 2008-07-25 13:08:37.000000000 -0400
3
+ @@ -1807,6 +1807,21 @@
4
+ rw = '?' if rw.nil?
5
+ end
6
+
7
+ + #
8
+ + # This is a temporary hack.
9
+ + # At some point in the (near) future, this should be specifiable via
10
+ + # rdoc's command-line options.
11
+ + #
12
+ + # Unlike the attr* family of functions, only the first argument of
13
+ + # the add*param functions is an attribute; the other arguments
14
+ + # constrain the attribute.
15
+ + #
16
+ + if((tk.name == "add_optional_param") || (tk.name == "add_required_param"))
17
+ + if(args.size > 1)
18
+ + args[1, args.size - 1] = nil
19
+ + end
20
+ + end
21
+ +
22
+ for name in args
23
+ att = RDoc::Attr.new get_tkread, name, rw, comment
24
+ context.add_attribute att
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configtoolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DesigningPatterns
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-14 00:00:00 -04:00
12
+ date: 2008-07-25 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -42,7 +42,7 @@ dependencies:
42
42
  - !ruby/object:Gem::Version
43
43
  version: 1.7.0
44
44
  version:
45
- description: "This package makes sourcing information from configuration files robust and easy! It: * Allows programmers to specify the type of data that should be loaded from a configuration file. The toolkit automatically will validate the file's data against this specification when loading the file, ensuring that the specification always is obeyed and saving the programmer the tedious chore of writing validation code. * Automagically generates parameter accessor methods (getters, setters, and predicates to test for presence), an equality operator, and a +to_s+ method from the configuration's specification. * Allows programmers to create configuration files, easily and programatically. * Provides a class that can load Ruby configuration files (allowing the full power of Ruby to be used within configuration files). * Provides classes that can load from and dump to YAML and key-value configuration files. * Provides classes that can load from and dump to Hashes. * Is very extensible, allowing the engine to be used with custom format configuration files and with custom data validation rules."
45
+ description: "This package makes sourcing information from (parsing) configuration files robust and easy! It: * Allows programmers to specify the type of data that should be loaded from a configuration file. The toolkit automatically will validate the file's data against this specification when loading the file, ensuring that the specification always is obeyed and saving the programmer the tedious chore of writing validation code. * Automagically generates parameter accessor methods (getters, setters, and predicates to test for presence), an equality operator, and a +to_s+ method from the configuration's specification. * Allows programmers to create configuration files, easily and programatically. * Provides a class that can load (parse) Ruby configuration files (allowing the full power of Ruby to be used within configuration files). * Provides classes that can load from (parse) and dump to YAML and key-value configuration files. * Provides classes that can load from and dump to Hashes. * Is very extensible, allowing the engine to be used with custom format configuration files and with custom data validation rules."
46
46
  email:
47
47
  - technical.inquiries@designingpatterns.com
48
48
  executables: []
@@ -101,6 +101,8 @@ files:
101
101
  - lib/configtoolkit/writer.rb
102
102
  - lib/configtoolkit/yamlreader.rb
103
103
  - lib/configtoolkit/yamlwriter.rb
104
+ - rdoc_support/rdoc-2.0.0.patch
105
+ - rdoc_support/rdoc-2.1.0.patch
104
106
  - test/readerwritertest.rb
105
107
  - test/test_baseconfig.rb
106
108
  - test/test_hash.rb
@@ -170,7 +172,7 @@ rubyforge_project: configtoolkit
170
172
  rubygems_version: 1.2.0
171
173
  signing_key:
172
174
  specification_version: 2
173
- summary: "This package makes sourcing information from configuration files robust and easy! It: * Allows programmers to specify the type of data that should be loaded from a configuration file"
175
+ summary: "This package makes sourcing information from (parsing) configuration files robust and easy! It: * Allows programmers to specify the type of data that should be loaded from a configuration file"
174
176
  test_files:
175
177
  - test/test_baseconfig.rb
176
178
  - test/test_ruby.rb