user-choices 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,4 +1,10 @@
1
- Version 1.1.4 -- in progress
1
+ Version 1.1.5
2
+ * Improved example files so that they don't include old S4TUtils load-path
3
+ setting. Not needed by the people who'll use them.
4
+ * Example slowtests didn't set the libpath, so they used the gem version.
5
+ * Better release process Rakefile.
6
+
7
+ Version 1.1.4
2
8
  * Enable better command_line documentation: ChoicesBuilder#add_help_line,
3
9
  ChoicesBuilder#section, ChoicesBuilder#section_specific_to_script.
4
10
  * One Rakefile instead of two.
data/Manifest.txt CHANGED
@@ -11,6 +11,16 @@ examples/older/postprocess.rb
11
11
  examples/older/switches.rb
12
12
  examples/older/two-args.rb
13
13
  examples/older/types.rb
14
+ examples/tutorial/css/LICENSE.txt
15
+ examples/tutorial/css/bg2.gif
16
+ examples/tutorial/css/left.gif
17
+ examples/tutorial/css/left_on.gif
18
+ examples/tutorial/css/main.css
19
+ examples/tutorial/css/right.gif
20
+ examples/tutorial/css/right_on.gif
21
+ examples/tutorial/css/tvline.gif
22
+ examples/tutorial/css/von-foerster.jpg
23
+ examples/tutorial/css/von-foerster2.jpg
14
24
  examples/tutorial/index.html
15
25
  examples/tutorial/tutorial1.rb
16
26
  examples/tutorial/tutorial2.rb
data/Rakefile CHANGED
@@ -9,6 +9,9 @@ require 'lib/user-choices/version'
9
9
  PROJECT='user-choices'
10
10
  THIS_RELEASE=UserChoices::Version
11
11
  ROOT = "svn+ssh://marick@rubyforge.org/var/svn/#{PROJECT}"
12
+ ALL_EXPORTS="#{ENV['HOME']}/tmp/exports"
13
+ PROJECT_EXPORTS = "#{ALL_EXPORTS}/#{PROJECT}"
14
+
12
15
 
13
16
  Hoe.new(PROJECT, THIS_RELEASE) do |p|
14
17
  p.rubyforge_name = PROJECT
@@ -37,6 +40,21 @@ task 'slow' do
37
40
  S4tUtils.run_particular_tests('test', 'slow')
38
41
  end
39
42
 
43
+ def assert_in_exports(taskname)
44
+ unless Dir.pwd == PROJECT_EXPORTS
45
+ puts "Run task '#{taskname}' from export directory: " + PROJECT_EXPORTS
46
+ exit 1
47
+ end
48
+ end
49
+
50
+ desc "Upload all the web pages"
51
+ task 'upload_pages' do | task |
52
+ assert_in_exports task.name
53
+ exec = "scp -r examples/tutorial/* marick@rubyforge.org:/var/www/gforge-projects/#{PROJECT}/"
54
+ puts exec
55
+ system(exec)
56
+ end
57
+
40
58
  desc "Tag release with current version."
41
59
  task 'tag_release' do
42
60
  from = "#{ROOT}/trunk"
@@ -49,10 +67,33 @@ end
49
67
 
50
68
  desc "Export to ~/tmp/exports/#{PROJECT}"
51
69
  task 'export' do
52
- Dir.chdir("#{ENV['HOME']}/tmp/exports") do
70
+ Dir.chdir(ALL_EXPORTS) do
53
71
  rm_rf PROJECT
54
72
  exec = "svn export #{ROOT}/trunk #{PROJECT}"
55
73
  puts exec
56
74
  system exec
57
75
  end
76
+ end
77
+
78
+ def step(name)
79
+ STDOUT.puts "** #{name} **"
80
+ STDOUT.puts `rake #{name}`
81
+ STDOUT.print 'OK? > '
82
+ exit if STDIN.readline =~ /[nN]/
83
+ end
84
+
85
+ desc "Complete release of everything - asks for confirmation after steps"
86
+ # Because in Ruby 1.8.6, Rake doesn't notice subtask failures.
87
+ task 'release_everything' do
88
+ step 'check_manifest'
89
+ step 'test'
90
+ step 'export'
91
+ Dir.chdir("#{ALL_EXPORTS}/#{PROJECT}") do
92
+ puts "Working in #{Dir.pwd}"
93
+ step 'upload_pages'
94
+ step 'publish_docs'
95
+ ENV['VERSION'] = THIS_RELEASE
96
+ step 'release'
97
+ end
98
+ step 'tag_release'
58
99
  end
@@ -1,9 +1,4 @@
1
- ### The following adjusts the load path so that the correct version of
2
- ### a self-contained package is found, no matter where the script is
3
- ### run from.
4
- require 'pathname'
5
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
6
- require 's4t-utils/load-path-auto-adjuster'
1
+ #!/usr/bin/env ruby
7
2
 
8
3
  require 'pp'
9
4
  require 'user-choices'
@@ -1,10 +1,4 @@
1
- ### The following adjusts the load path so that the correct version of
2
- ### a self-contained package is found, no matter where the script is
3
- ### run from.
4
- require 'pathname'
5
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
6
- require 's4t-utils/load-path-auto-adjuster'
7
-
1
+ #!/usr/bin/env ruby
8
2
 
9
3
  require 'pp'
10
4
  require 'user-choices'
@@ -1,9 +1,4 @@
1
- ### The following adjusts the load path so that the correct version of
2
- ### a self-contained package is found, no matter where the script is
3
- ### run from.
4
- require 'pathname'
5
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
6
- require 's4t-utils/load-path-auto-adjuster'
1
+ #!/usr/bin/env ruby
7
2
 
8
3
  require 'pp'
9
4
  require 'user-choices'
@@ -1,10 +1,4 @@
1
- ### The following adjusts the load path so that the correct version of
2
- ### a self-contained package is found, no matter where the script is
3
- ### run from.
4
- require 'pathname'
5
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
6
- require 's4t-utils/load-path-auto-adjuster'
7
-
1
+ #!/usr/bin/env ruby
8
2
 
9
3
  require 'pp'
10
4
  require 'user-choices'
@@ -1,10 +1,4 @@
1
- ### The following adjusts the load path so that the correct version of
2
- ### a self-contained package is found, no matter where the script is
3
- ### run from.
4
- require 'pathname'
5
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
6
- require 's4t-utils/load-path-auto-adjuster'
7
-
1
+ #!/usr/bin/env ruby
8
2
 
9
3
  require 'pp'
10
4
  require 'user-choices'
@@ -1,10 +1,4 @@
1
- ### The following adjusts the load path so that the correct version of
2
- ### a self-contained package is found, no matter where the script is
3
- ### run from.
4
- require 'pathname'
5
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
6
- require 's4t-utils/load-path-auto-adjuster'
7
-
1
+ #!/usr/bin/env ruby
8
2
 
9
3
  require 'pp'
10
4
  require 'user-choices'
@@ -1,10 +1,4 @@
1
- ### The following adjusts the load path so that the correct version of
2
- ### a self-contained package is found, no matter where the script is
3
- ### run from.
4
- require 'pathname'
5
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
6
- require 's4t-utils/load-path-auto-adjuster'
7
-
1
+ #!/usr/bin/env ruby
8
2
 
9
3
  require 'pp'
10
4
  require 'user-choices'
@@ -0,0 +1 @@
1
+ This work is public domain.This work is public domain.
Binary file
Binary file
Binary file
@@ -0,0 +1,242 @@
1
+ #header {
2
+ width:750px;
3
+ height:150px;
4
+ color:#fff;
5
+ font-size:50px;
6
+ letter-spacing:-2px;
7
+ margin:0;
8
+ }
9
+
10
+ .highlight {
11
+ color:#F1Ca3f;
12
+ }
13
+
14
+ #headerLeft {
15
+ background-color:#eaeaea;
16
+ height:150px;
17
+ width:150px;
18
+ float:left;
19
+ background:url("von-foerster.jpg") no-repeat !important;
20
+ }
21
+
22
+ #headerRight {
23
+ background-color:#78300A;
24
+ color:#fff;
25
+ height:150px;
26
+ margin-left:155px;
27
+ background:url("tvline.gif") repeat !important;
28
+ }
29
+
30
+ #headerRight h1 {
31
+ padding-top:25px;
32
+ padding-left:10px;
33
+ font-size:1.2em;
34
+ letter-spacing:-4px;
35
+ line-height:.6em;
36
+ margin:0;
37
+ }
38
+
39
+ #headerRight h2 {
40
+ padding-top:15px;
41
+ padding-left:10px;
42
+ font-size:0.4em;
43
+ letter-spacing:-1px;
44
+ line-height:1.2em;
45
+ margin:0;
46
+ }
47
+
48
+ body {
49
+ font-family:verdana;
50
+ font-size:12px;
51
+ margin:0;
52
+ padding:0;
53
+ }
54
+
55
+ #pageBody {
56
+ background-color:orange;
57
+ font-family:verdana;
58
+ margin:0;
59
+ padding:20px;
60
+ }
61
+
62
+ #inlineTOC {
63
+ float: right;
64
+ list-style: none;
65
+ background: #EBC851;
66
+ margin-left: 1em;
67
+ margin-bottom: 5pt;
68
+ /* include-source: url(inlinetoc.html); */
69
+ }
70
+
71
+ #inlineTOC ul {
72
+ list-style-type: none;
73
+ padding-right: 1em;
74
+ padding-left: 1em;
75
+ }
76
+
77
+ #inlineTOC a {
78
+ font-weight:700;
79
+ color:#765;
80
+ text-decoration:none;
81
+ }
82
+
83
+ #inlineTOC A:hover {
84
+ color:#333;
85
+ }
86
+
87
+
88
+
89
+ #container {
90
+ width:750px;
91
+ height:auto;
92
+ background-color:#FFF;
93
+ margin:0 auto auto;
94
+ padding:0;
95
+ }
96
+
97
+ #nav {
98
+ width:80%;
99
+ font-family:Verdana, sans-serif;
100
+ margin:2em;
101
+ padding:5px;
102
+ }
103
+
104
+ #nav ul,#nav li {
105
+ display:inline;
106
+ color:#339;
107
+ font-weight:700;
108
+ margin:0;
109
+ padding:0;
110
+ }
111
+
112
+ #nav li a {
113
+ height:25px;
114
+ width:25px;
115
+ background-color:red;
116
+ border:1px solid #000;
117
+ }
118
+
119
+ #logo {
120
+ background-color:#FFF;
121
+ text-align:left;
122
+ width:750px;
123
+ height:auto;
124
+ padding-bottom:10px;
125
+ padding-left:5px;
126
+ font-size:30px;
127
+ }
128
+
129
+ #content {
130
+ margin-top:50px;
131
+ font-size:14px;
132
+ text-decoration:none;
133
+ width:750px;
134
+ height:auto;
135
+ border-bottom:1px solid #eaeaea;
136
+ line-height:160%;
137
+ }
138
+
139
+ #content h2 {
140
+ color:#000;
141
+ font-size:15px;
142
+ padding-left:2px;
143
+ }
144
+
145
+
146
+ blockquote {
147
+ background-color:#f2f2f2;
148
+ width:auto;
149
+ margin-left:25px;
150
+ margin-right:25px;
151
+ display:block;
152
+ padding:0.5em 0.5em 0.5em 1em;
153
+ }
154
+
155
+ #footer {
156
+ color:gray;
157
+ font-size:10px;
158
+ text-decoration:none;
159
+ padding-top:5px;
160
+ }
161
+
162
+ img.right {
163
+ float:right;
164
+ margin-left:5px;
165
+ padding:5px;
166
+ }
167
+
168
+ img.left {
169
+ float:left;
170
+ margin-right:5px;
171
+ padding:5px;
172
+ }
173
+
174
+ img.center {
175
+ display: block;
176
+ margin-left: auto;
177
+ margin-right: auto
178
+ }
179
+
180
+ .normal {
181
+ color:gray;
182
+ text-decoration:none;
183
+ }
184
+
185
+ #outer-container {
186
+ background-color:#fff;
187
+ width:790px;
188
+ border:1px solid #888;
189
+ margin:auto;
190
+ padding:15px 0;
191
+ }
192
+
193
+ #centerNav {
194
+ padding-left:253px;
195
+ }
196
+
197
+ #headerNav {
198
+ margin-top:5px;
199
+ font-size:93%;
200
+ background-color: #F1Ca3f;
201
+ float:left;
202
+ width:100%;
203
+ line-height:normal;
204
+ padding-bottom:-1px;
205
+ }
206
+
207
+ #headerNav UL {
208
+ list-style-type:none;
209
+ margin:0;
210
+ padding:10px 10px 0;
211
+ }
212
+
213
+ #headerNav LI {
214
+ background:url(left.gif) no-repeat left top;
215
+ float:left;
216
+ margin:0;
217
+ padding:0 0 0 9px;
218
+ }
219
+
220
+ #headerNav A {
221
+ display:block;
222
+ font-weight:700;
223
+ background:url(right.gif) no-repeat right top;
224
+ color:#765;
225
+ text-decoration:none;
226
+ float:none;
227
+ padding:5px 15px 4px 6px;
228
+ }
229
+
230
+ #headerNav A:hover {
231
+ color:#333;
232
+ }
233
+
234
+ #headerNav #current {
235
+ background-image:url(left_on.gif);
236
+ }
237
+
238
+ #headerNav #current A {
239
+ background-image:url(right_on.gif);
240
+ padding-bottom:5px;
241
+ color:#333;
242
+ }
Binary file
Binary file
Binary file
@@ -6,18 +6,37 @@
6
6
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
7
 
8
8
  <title>Using User-Choices</title>
9
+ <link rel="stylesheet" type="text/css" media="screen" href="css/main.css" />
9
10
 
10
11
  </head>
11
12
 
12
13
  <body>
13
- <h1 style="text-align: center">Using the User-Choices gem</h1>
14
- <p style="text-align: center"><a href="http://www.exampler.com/blog/" title="Exploration Through Example - Brian Marick's Blog">Brian Marick</a>, <a href="http://www.exampler.com" title="Exampler Consulting">Exampler Consulting</a></p>
14
+ <div id="pageBody">
15
+ <div id="outer-container">
16
+ <div id="container">
17
+ <div id="header">
18
+ <div id="headerLeft"></div>
19
+ <div id="headerRight"><h1>User Choices</h1><span class="highlight"><h2>Act always to increase the number of choices <br /> &mdash; Heinz von Foerster</h2></span></div>
20
+ </div>
21
+ <div id="headerNav">
22
+ <div id="centerNav">
23
+ <ul>
24
+ <li id="current"><a href="index.html">Home</a></li>
25
+ <li><a href="http://user-choices.rubyforge.org/rdoc/">RDoc</a></li>
26
+ <li><a href="http://rubyforge.org/frs/?group_id=4192">Download</a></li>
27
+ </ul>
28
+ </div>
29
+ </div>
30
+ <div id="content">
31
+
32
+
33
+
15
34
 
16
35
  <p>
17
- Suppose you have a command-line application that uses some number of, oh, let's say "connections". Most of the time, a user will want the same number of connections, so you'll let them set a personal default in a <em>configuration file</em>. Sometimes they want to change the default. Maybe they'll want a one-time change; for that, a <em>command-line option</em> is best. But sometimes they'll want to make the change for an entire login session; for that, setting an <em>environment variable</em> is most convenient.
36
+ Suppose you have a command-line application that uses some number of, oh, let's say "connections". Most of the time, a user will want the same number of connections, so you'll let them set a personal default in a <strong>configuration file</strong>. Sometimes they want to change the default. Maybe they'll want a one-time change; for that, a <strong>command-line option</strong> is best. But sometimes they'll want to make the change for an entire login session; for that, setting an <strong>environment variable</strong> is most convenient.
18
37
  </p>
19
38
  <p>
20
- The User-Choices gem gives your code a unified interface to all those <em>sources</em>. Your code can obey the user's choices without having to bother (much) about how she made them.
39
+ <strong>The User-Choices gem gives your code a unified interface to all those sources.</strong> Your code can obey the user's choices without having to bother (much) about how she made them.
21
40
  </p>
22
41
 
23
42
  <p>
@@ -78,7 +97,7 @@ if $0 == __FILE__ <br />
78
97
 
79
98
  <blockquote>
80
99
  <code>
81
- $ ruby tutorial1.rb<br/>
100
+ $ ruby <a href="tutorial1.rb">tutorial1.rb</a><br/>
82
101
  There are 0 connections.<br/>
83
102
  {:connections=>0}<br/>
84
103
  </code>
@@ -301,12 +320,12 @@ if $0 == __FILE__ <br />
301
320
  </p>
302
321
  <blockquote><table bgcolor="white" border="0"><tr><td>
303
322
  <code>
304
- &nbsp;&nbsp;<font style="color: #002FBD;">def</font> <font style="color: #600080;">add_choices</font>(builder) <br />
305
- &nbsp;&nbsp;&nbsp;&nbsp;builder.add_choice(<font style="color: #800020;">:connections</font>, <font style="color: #800020;">:type</font>=><font style="color: #800020;">:integer</font>, :<font style="color: #800020;">default</font>=>0) { | command_line | <br />
306
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command_line.uses_option("-c", "--connections COUNT", <br />
307
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Number of connections to open.") <br />
308
- &nbsp;&nbsp;&nbsp;&nbsp;} <br />
309
- &nbsp;&nbsp;<font style="color: #002FBD;">end</font> <br />
323
+ <font style="color: #002FBD;">def</font> <font style="color: #600080;">add_choices</font>(builder) <br />
324
+ &nbsp;&nbsp;builder.add_choice(<font style="color: #800020;">:connections</font>, <font style="color: #800020;">:type</font>=><font style="color: #800020;">:integer</font>, :<font style="color: #800020;">default</font>=>0) { | command_line | <br />
325
+ &nbsp;&nbsp;&nbsp;&nbsp;command_line.uses_option("-c", "--connections COUNT", <br />
326
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Number of connections to open.") <br />
327
+ &nbsp;&nbsp;} <br />
328
+ <font style="color: #002FBD;">end</font> <br />
310
329
  </code>
311
330
 
312
331
  </td></tr></table></blockquote>
@@ -410,10 +429,10 @@ if $0 == __FILE__ <br />
410
429
 
411
430
  <blockquote><table bgcolor="white" border="0"><tr><td>
412
431
  <code>
413
- &nbsp;&nbsp;&nbsp;&nbsp;builder.add_choice(<font style="color: #800020;">:ssh</font>, <font style="color: #800020;">:type</font>=><font style="color: #800020;">:boolean</font>, :<font style="color: #800020;">default</font>=>false) { | command_line | <br />
414
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;command_line.uses_switch("-s", "--ssh", <br />
415
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Use ssh to open connection.") <br />
416
- &nbsp;&nbsp;&nbsp;&nbsp;} <br />
432
+ &nbsp;&nbsp;builder.add_choice(<font style="color: #800020;">:ssh</font>, <font style="color: #800020;">:type</font>=><font style="color: #800020;">:boolean</font>, :<font style="color: #800020;">default</font>=>false) { | command_line | <br />
433
+ &nbsp;&nbsp;&nbsp;&nbsp;command_line.uses_switch("-s", "--ssh", <br />
434
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"Use ssh to open connection.") <br />
435
+ &nbsp;&nbsp;} <br />
417
436
  </code>
418
437
 
419
438
  </td></tr></table></blockquote>
@@ -423,7 +442,7 @@ if $0 == __FILE__ <br />
423
442
 
424
443
 
425
444
  <blockquote><code>
426
- $ ruby tutorial2.rb --ssh<br />
445
+ $ ruby <a href="tutorial2.rb">tutorial2.rb</a> --ssh<br />
427
446
  SSH should be used. <br />
428
447
  $ ruby tutorial2.rb --s file <br />
429
448
  SSH should be used. <br />
@@ -471,7 +490,7 @@ if $0 == __FILE__ <br />
471
490
  </td></tr></table></blockquote>
472
491
 
473
492
  <blockquote><code>
474
- $ ruby tutorial3.rb arg1 arg2 <br />
493
+ $ ruby <a href="tutorial3.rb">tutorial3.rb</a> arg1 arg2 <br />
475
494
  SSH should not be used. <br />
476
495
  There are 19 connections. <br />
477
496
  {<b>:files=>["arg1", "arg2"]</b>, :ssh=>false, :connections=>19} <br />
@@ -526,7 +545,7 @@ There are 19 connections. <br />
526
545
  </td></tr></table></blockquote>
527
546
 
528
547
  <blockquote><code>
529
- $ ruby tutorial4.rb 1 2 3 <br />
548
+ $ ruby <a href="tutorial4.rb">tutorial4.rb</a> 1 2 3 <br />
530
549
  <b>Error in the command line: 3 arguments given, 1 or 2 expected.</b> <br />
531
550
  Usage: ruby tutorial4.rb [options] file1 [file2] <br />
532
551
  <br />
@@ -563,7 +582,7 @@ There are 19 connections. <br />
563
582
  </td></td></table></blockquote>
564
583
 
565
584
  <blockquote><code>
566
- $ ruby tutorial5.rb 1 <br />
585
+ $ ruby <a href="tutorial5.rb">tutorial5.rb</a> 1 <br />
567
586
  {:infile=>"1"} <br />
568
587
  $ ruby tutorial5.rb <br />
569
588
  Error in the command line: 0 arguments given, 1 expected. <br />
@@ -591,7 +610,7 @@ There are 19 connections. <br />
591
610
  </td></td></table></blockquote>
592
611
 
593
612
  <blockquote><code>
594
- $ ruby tutorial6.rb <br />
613
+ $ ruby <a href="tutorial6.rb">tutorial6.rb</a> <br />
595
614
  {} <br />
596
615
  </code></blockquote>
597
616
  </dd>
@@ -637,7 +656,7 @@ There are 19 connections. <br />
637
656
  </td></tr></table></blockquote>
638
657
 
639
658
  <blockquote><code>
640
- $ ruby tutorial7.rb one two <br />
659
+ $ ruby <a href="tutorial7.rb">tutorial7.rb</a> one two <br />
641
660
  {:outfile=>"two", :files=>["one", "two"], :infile=>"one"} <br /> </code></blockquote>
642
661
 
643
662
  <p>There's no need to call <code>postprocess_user_choices</code> yourself. It's done automatically.</p>
@@ -650,5 +669,13 @@ There are 19 connections. <br />
650
669
  </p>
651
670
  </li>
652
671
  </ul>
672
+
673
+
674
+
675
+ </div>
676
+ </div>
677
+ </div>
678
+ </div>
679
+
653
680
  </body>
654
681
  </html>
@@ -5,13 +5,6 @@
5
5
 
6
6
  # See the tutorial for explanations.
7
7
 
8
- ### The following adjusts the load path so that the correct version of
9
- ### a self-contained package is found, no matter where the script is
10
- ### run from.
11
- require 'pathname'
12
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
13
- require 's4t-utils/load-path-auto-adjuster'
14
-
15
8
  require 'pp'
16
9
  require 'user-choices'
17
10
 
@@ -3,16 +3,8 @@
3
3
  # Created by Brian Marick on 2007-08-09.
4
4
  # Copyright (c) 2007. All rights reserved.
5
5
 
6
-
7
6
  # See the tutorial for explanations.
8
7
 
9
- ### The following adjusts the load path so that the correct version of
10
- ### a self-contained package is found, no matter where the script is
11
- ### run from.
12
- require 'pathname'
13
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
14
- require 's4t-utils/load-path-auto-adjuster'
15
-
16
8
  require 'pp'
17
9
  require 'user-choices'
18
10
 
@@ -3,16 +3,8 @@
3
3
  # Created by Brian Marick on 2007-08-09.
4
4
  # Copyright (c) 2007. All rights reserved.
5
5
 
6
-
7
6
  # See the tutorial for explanations.
8
7
 
9
- ### The following adjusts the load path so that the correct version of
10
- ### a self-contained package is found, no matter where the script is
11
- ### run from.
12
- require 'pathname'
13
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
14
- require 's4t-utils/load-path-auto-adjuster'
15
-
16
8
  require 'pp'
17
9
  require 'user-choices'
18
10
 
@@ -3,16 +3,8 @@
3
3
  # Created by Brian Marick on 2007-08-09.
4
4
  # Copyright (c) 2007. All rights reserved.
5
5
 
6
-
7
6
  # See the tutorial for explanations.
8
7
 
9
- ### The following adjusts the load path so that the correct version of
10
- ### a self-contained package is found, no matter where the script is
11
- ### run from.
12
- require 'pathname'
13
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
14
- require 's4t-utils/load-path-auto-adjuster'
15
-
16
8
  require 'pp'
17
9
  require 'user-choices'
18
10
 
@@ -5,13 +5,6 @@
5
5
 
6
6
  # See the tutorial for explanations.
7
7
 
8
- ### The following adjusts the load path so that the correct version of
9
- ### a self-contained package is found, no matter where the script is
10
- ### run from.
11
- require 'pathname'
12
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
13
- require 's4t-utils/load-path-auto-adjuster'
14
-
15
8
  require 'pp'
16
9
  require 'user-choices'
17
10
 
@@ -5,13 +5,6 @@
5
5
 
6
6
  # See the tutorial for explanations.
7
7
 
8
- ### The following adjusts the load path so that the correct version of
9
- ### a self-contained package is found, no matter where the script is
10
- ### run from.
11
- require 'pathname'
12
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
13
- require 's4t-utils/load-path-auto-adjuster'
14
-
15
8
  require 'pp'
16
9
  require 'user-choices'
17
10
 
@@ -5,13 +5,6 @@
5
5
 
6
6
  # See the tutorial for explanations.
7
7
 
8
- ### The following adjusts the load path so that the correct version of
9
- ### a self-contained package is found, no matter where the script is
10
- ### run from.
11
- require 'pathname'
12
- $:.unshift((Pathname.new(__FILE__).parent.parent.parent + 'lib').to_s)
13
- require 's4t-utils/load-path-auto-adjuster'
14
-
15
8
  require 'pp'
16
9
  require 'user-choices'
17
10
 
@@ -1,3 +1,3 @@
1
1
  module UserChoices
2
- Version = '1.1.4'
2
+ Version = '1.1.5'
3
3
  end
@@ -12,8 +12,9 @@ class Examples < Test::Unit::TestCase
12
12
  eval(result)
13
13
  end
14
14
 
15
- EX = "ruby #{PACKAGE_ROOT}/examples/older/"
16
- TUT = "ruby #{PACKAGE_ROOT}/examples/tutorial/"
15
+ LIB="-I#{PACKAGE_ROOT}/lib"
16
+ EX = "ruby #{LIB} #{PACKAGE_ROOT}/examples/older/"
17
+ TUT = "ruby #{LIB} #{PACKAGE_ROOT}/examples/tutorial/"
17
18
 
18
19
  require "#{PACKAGE_ROOT}/examples/older/command-line"
19
20
  # require "#{PACKAGE_ROOT}/examples/default-values" # not needed
@@ -22,6 +23,7 @@ class Examples < Test::Unit::TestCase
22
23
  require "#{PACKAGE_ROOT}/examples/older/switches"
23
24
  require "#{PACKAGE_ROOT}/examples/older/two-args"
24
25
  require "#{PACKAGE_ROOT}/examples/older/types"
26
+
25
27
 
26
28
 
27
29
  def test_succeeding_examples
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: user-choices
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.4
6
+ version: 1.1.5
7
7
  date: 2007-09-28 00:00:00 -05:00
8
8
  summary: Unified interface to command-line, environment, and configuration files.
9
9
  require_paths:
@@ -42,6 +42,16 @@ files:
42
42
  - examples/older/switches.rb
43
43
  - examples/older/two-args.rb
44
44
  - examples/older/types.rb
45
+ - examples/tutorial/css/LICENSE.txt
46
+ - examples/tutorial/css/bg2.gif
47
+ - examples/tutorial/css/left.gif
48
+ - examples/tutorial/css/left_on.gif
49
+ - examples/tutorial/css/main.css
50
+ - examples/tutorial/css/right.gif
51
+ - examples/tutorial/css/right_on.gif
52
+ - examples/tutorial/css/tvline.gif
53
+ - examples/tutorial/css/von-foerster.jpg
54
+ - examples/tutorial/css/von-foerster2.jpg
45
55
  - examples/tutorial/index.html
46
56
  - examples/tutorial/tutorial1.rb
47
57
  - examples/tutorial/tutorial2.rb
@@ -82,6 +92,7 @@ extra_rdoc_files:
82
92
  - Manifest.txt
83
93
  - README.txt
84
94
  - examples/older/README.txt
95
+ - examples/tutorial/css/LICENSE.txt
85
96
  executables: []
86
97
 
87
98
  extensions: []