rwdschedule 0.99 → 1.00
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.txt +10 -0
- data/code/superant.com.schedule/downloadrwdschedulefiles.rb +19 -13
- data/code/superant.com.schedule/loadconfigurationrecord.rb +1 -2
- data/code/superant.com.schedule/saveconfigurationrecord.rb +4 -1
- data/code/superant.com.schedule/test_cases.rb +46 -0
- data/configuration/rwdapplicationidentity.dist +1 -1
- data/configuration/rwdschedule.dist +3 -2
- data/configuration/rwdtinker.dist +2 -2
- data/extras/icalendar/base.rb +17 -0
- data/extras/icalendar/calendar.rb +44 -0
- data/extras/icalendar/calendar_parser.rb +237 -0
- data/extras/icalendar/component.rb +91 -0
- data/extras/icalendar/component/alarm.rb +16 -0
- data/extras/icalendar/component/event.rb +25 -0
- data/extras/icalendar/component/freebusy.rb +12 -0
- data/extras/icalendar/component/journal.rb +25 -0
- data/extras/icalendar/component/timezone.rb +26 -0
- data/extras/icalendar/component/todo.rb +21 -0
- data/extras/icalendar/helpers.rb +103 -0
- data/extras/icalendar/parameter.rb +25 -0
- data/extras/zip/ioextras.rb +114 -0
- data/extras/zip/stdrubyext.rb +111 -0
- data/extras/zip/tempfile_bugfixed.rb +195 -0
- data/extras/zip/zip.rb +1377 -0
- data/extras/zip/zipfilesystem.rb +558 -0
- data/extras/zip/ziprequire.rb +61 -0
- data/gui/00coreguibegin/applicationguitop.rwd +1 -1
- data/rwd_files/HowTo_Schedule.txt +4 -0
- data/rwd_files/HowTo_Tinker.txt +3 -0
- data/schedules/200505may02a.sch +4 -0
- data/tests/RubyGauge.rb +179 -0
- data/tests/makedist.rb +1 -0
- metadata +24 -7
- data/schedules/200502february22 test event.sch +0 -5
- data/updates/200507july04a.sch +0 -8
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'zip/zip'
|
2
|
+
|
3
|
+
class ZipList
|
4
|
+
def initialize(zipFileList)
|
5
|
+
@zipFileList = zipFileList
|
6
|
+
end
|
7
|
+
|
8
|
+
def get_input_stream(entry, &aProc)
|
9
|
+
@zipFileList.each {
|
10
|
+
|zfName|
|
11
|
+
Zip::ZipFile.open(zfName) {
|
12
|
+
|zf|
|
13
|
+
begin
|
14
|
+
return zf.get_input_stream(entry, &aProc)
|
15
|
+
rescue Errno::ENOENT
|
16
|
+
end
|
17
|
+
}
|
18
|
+
}
|
19
|
+
raise Errno::ENOENT,
|
20
|
+
"No matching entry found in zip files '#{@zipFileList.join(', ')}' "+
|
21
|
+
" for '#{entry}'"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
module Kernel
|
27
|
+
alias :oldRequire :require
|
28
|
+
|
29
|
+
def require(moduleName)
|
30
|
+
zip_require(moduleName) || oldRequire(moduleName)
|
31
|
+
end
|
32
|
+
|
33
|
+
def zip_require(moduleName)
|
34
|
+
return false if already_loaded?(moduleName)
|
35
|
+
get_resource(ensure_rb_extension(moduleName)) {
|
36
|
+
|zis|
|
37
|
+
eval(zis.read); $" << moduleName
|
38
|
+
}
|
39
|
+
return true
|
40
|
+
rescue Errno::ENOENT => ex
|
41
|
+
return false
|
42
|
+
end
|
43
|
+
|
44
|
+
def get_resource(resourceName, &aProc)
|
45
|
+
zl = ZipList.new($:.grep(/\.zip$/))
|
46
|
+
zl.get_input_stream(resourceName, &aProc)
|
47
|
+
end
|
48
|
+
|
49
|
+
def already_loaded?(moduleName)
|
50
|
+
moduleRE = Regexp.new("^"+moduleName+"(\.rb|\.so|\.dll|\.o)?$")
|
51
|
+
$".detect { |e| e =~ moduleRE } != nil
|
52
|
+
end
|
53
|
+
|
54
|
+
def ensure_rb_extension(aString)
|
55
|
+
aString.sub(/(\.rb)?$/i, ".rb")
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Copyright (C) 2002 Thomas Sondergaard
|
60
|
+
# rubyzip is free software; you can redistribute it and/or
|
61
|
+
# modify it under the terms of the ruby license.
|
data/rwd_files/HowTo_Tinker.txt
CHANGED
@@ -227,6 +227,9 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
|
|
227
227
|
Thanks, Steven Gibson
|
228
228
|
|
229
229
|
== Changelog
|
230
|
+
Version 1.64
|
231
|
+
fixed jump with no location
|
232
|
+
|
230
233
|
Version 1.63
|
231
234
|
changed handling of application name returned
|
232
235
|
added jump seletion options
|
data/tests/RubyGauge.rb
ADDED
@@ -0,0 +1,179 @@
|
|
1
|
+
#--------------------------------------------------------------------#
|
2
|
+
# #
|
3
|
+
# RubyGauge version 1 #
|
4
|
+
# Copyright (c) 2005, Harrison Ainsworth. #
|
5
|
+
# #
|
6
|
+
# http://hxa7241.org/ #
|
7
|
+
# #
|
8
|
+
#--------------------------------------------------------------------#
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
require 'find'
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
# Counts lines of code in ruby source files.
|
19
|
+
#
|
20
|
+
# just a simple example ruby program, produced as an exercise.
|
21
|
+
#
|
22
|
+
# * directories are looked in recursively for source files
|
23
|
+
# * source files with the following name extensions are recognized:
|
24
|
+
# .rb .rbw
|
25
|
+
# * a line is counted as code if it is not empty and not solely comment
|
26
|
+
#
|
27
|
+
# == requirements
|
28
|
+
# ruby 1.8
|
29
|
+
#
|
30
|
+
# == usage
|
31
|
+
# RubyGauge.rb [-f...] (file|directory)pathname ...
|
32
|
+
# RubyGauge.rb -help|-?
|
33
|
+
#
|
34
|
+
# switches:
|
35
|
+
# -f<[l|s][1|2]> set output format to long/short, linecount only /
|
36
|
+
# linecount and filecount (defaults to -fl2)
|
37
|
+
# -help|-? prints this message
|
38
|
+
#
|
39
|
+
# ==acknowledgements
|
40
|
+
# * ruby: http://ruby-lang.org/
|
41
|
+
# * the pragmaticprogrammers pickaxe book:
|
42
|
+
# http://phrogz.net/ProgrammingRuby/
|
43
|
+
# * rubygarden: http://rubygarden.org/ruby?CodingInRuby
|
44
|
+
#
|
45
|
+
# == license
|
46
|
+
# this software is too short and insignificant to have a license.
|
47
|
+
|
48
|
+
module RubyGauge
|
49
|
+
|
50
|
+
# Entry point if run from the command line.
|
51
|
+
#
|
52
|
+
# Reads command line args, writes output to stdout.
|
53
|
+
#
|
54
|
+
def RubyGauge.main
|
55
|
+
|
56
|
+
# check if help message needed
|
57
|
+
if $*.empty? || !(RubyGauge.getSwitchs( $*, '(help|\?)' ).empty?)
|
58
|
+
|
59
|
+
puts "\n#{@@BANNER}\n#{@@HELP}"
|
60
|
+
|
61
|
+
else
|
62
|
+
|
63
|
+
# count
|
64
|
+
pathnames = RubyGauge.getTokens( $*, '^[^-\/]', ' ' )
|
65
|
+
|
66
|
+
fileCount = []
|
67
|
+
lineCount = RubyGauge.countLinesInFileTree( pathnames, fileCount )
|
68
|
+
|
69
|
+
# output counts
|
70
|
+
format = RubyGauge.getSwitchs( $*, 'f', '-fl2' ).last[2,2]
|
71
|
+
|
72
|
+
(@@LINES_FORMAT = { 's' => "#{lineCount}" }).default = "\n #{lineCount} line#{lineCount == 1 ? '' : 's'} of code\n"
|
73
|
+
(@@FILES_FORMAT = { 's' => " #{fileCount}" }).default = " #{fileCount[0]} file#{fileCount[0] == 1 ? '' : 's'}\n"
|
74
|
+
print @@LINES_FORMAT[format[0,1]]
|
75
|
+
print @@FILES_FORMAT[format[0,1]] unless format[1,1] == '1'
|
76
|
+
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
def RubyGauge.getSwitchs( commandline, pattern, default=nil )
|
83
|
+
|
84
|
+
RubyGauge.getTokens( commandline, '^(-|\/)' + pattern, default )
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
|
89
|
+
def RubyGauge.getTokens( commandline, pattern, default=nil )
|
90
|
+
|
91
|
+
tokens = []
|
92
|
+
|
93
|
+
commandline.each do |token|
|
94
|
+
if token =~ /#{pattern}/
|
95
|
+
tokens.push token
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
if tokens.empty? && default
|
100
|
+
tokens.push default
|
101
|
+
end
|
102
|
+
|
103
|
+
tokens
|
104
|
+
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
# Counts lines of ruby code in filetree recursively.
|
109
|
+
#
|
110
|
+
# A line is counted as code if it is not empty and not solely comment.
|
111
|
+
#
|
112
|
+
# == parameters
|
113
|
+
# * pathnames: Array of String of file or directory pathname
|
114
|
+
# (relative or absolute)
|
115
|
+
# * fileCount: Array of Numeric, length 1. Just an example of a
|
116
|
+
# 'reference' parameter
|
117
|
+
# * return: Fixnum of the line count
|
118
|
+
#
|
119
|
+
def RubyGauge.countLinesInFileTree( pathnames, fileCount=[] )
|
120
|
+
|
121
|
+
fileCount[0] = 0
|
122
|
+
lineCount = 0
|
123
|
+
|
124
|
+
# scan directory tree
|
125
|
+
Find.find( *pathnames ) do |fileOrDirName|
|
126
|
+
|
127
|
+
# filter file types (to ruby)
|
128
|
+
if FileTest.file?( fileOrDirName ) &&
|
129
|
+
FileTest.readable?( fileOrDirName ) &&
|
130
|
+
fileOrDirName =~ /\.(rb|rbw)\Z/
|
131
|
+
|
132
|
+
fileCount[0] += 1
|
133
|
+
|
134
|
+
filePathname = File.expand_path( fileOrDirName )
|
135
|
+
|
136
|
+
# read file
|
137
|
+
File.open( filePathname, 'r' ) do |file|
|
138
|
+
|
139
|
+
# scan file lines
|
140
|
+
file.each_line do |line|
|
141
|
+
# select non blank, non comment-only line
|
142
|
+
unless line =~ /^\s*(#|\Z)/
|
143
|
+
lineCount += 1
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
lineCount
|
153
|
+
|
154
|
+
end
|
155
|
+
|
156
|
+
|
157
|
+
@@BANNER = "-------------------------------------------------------------\n" +
|
158
|
+
"RubyGauge 2005 (v1)\n" +
|
159
|
+
"Copyright (c) 2005, Harrison Ainsworth.\n\n" +
|
160
|
+
"http://hxa7241.org/\n" +
|
161
|
+
"-------------------------------------------------------------\n"
|
162
|
+
|
163
|
+
@@HELP = "RubyGauge counts lines of code in ruby source files.\n\n" +
|
164
|
+
"* directories are looked in recursively for source files\n" +
|
165
|
+
"* source files with the following name extensions are recognized: .rb .rbw\n" +
|
166
|
+
"* a line is counted as code if it is not empty and not solely comment\n" +
|
167
|
+
"\nusage:\n" +
|
168
|
+
" RubyGauge.rb [-f...] (file|directory)pathname ...\n" +
|
169
|
+
" RubyGauge.rb -help|-?\n" +
|
170
|
+
"\nswitches:\n" +
|
171
|
+
" -f<[l|s][1|2]> set output format to long/short, linecount only / linecount and filecount (defaults to -fl2)\n" +
|
172
|
+
" -help|-? prints this message\n"
|
173
|
+
|
174
|
+
end
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
RubyGauge.main
|
data/tests/makedist.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.8
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rwdschedule
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "
|
7
|
-
date: 2005-04-
|
6
|
+
version: "1.00"
|
7
|
+
date: 2005-04-10
|
8
8
|
summary: rwdschedule is an calendar application using rwdtinker and RubyWebDialogs.
|
9
9
|
require_paths:
|
10
10
|
- "."
|
@@ -100,26 +100,42 @@ files:
|
|
100
100
|
- code/superant.com.schedule/renameicseventdata.rb
|
101
101
|
- code/superant.com.schedule/exporticseventrecord.rb
|
102
102
|
- code/superant.com.schedule/jumplinkupdate.rb
|
103
|
+
- code/superant.com.schedule/test_cases.rb
|
103
104
|
- configuration/tinkerwin2variables.dist
|
104
105
|
- configuration/rwdtinker.dist
|
105
106
|
- configuration/language.dist
|
106
107
|
- configuration/rwdapplicationidentity.dist
|
107
108
|
- configuration/rwdcalendar.dist
|
108
109
|
- configuration/rwdschedule.dist
|
109
|
-
- extras/zip
|
110
110
|
- extras/rconftool.rb
|
111
|
-
- extras/icalendar
|
112
111
|
- extras/cal.rb
|
113
112
|
- extras/icalendar.rb
|
113
|
+
- extras/zip/ioextras.rb
|
114
|
+
- extras/zip/stdrubyext.rb
|
115
|
+
- extras/zip/tempfile_bugfixed.rb
|
116
|
+
- extras/zip/zip.rb
|
117
|
+
- extras/zip/zipfilesystem.rb
|
118
|
+
- extras/zip/ziprequire.rb
|
119
|
+
- extras/icalendar/calendar.rb
|
120
|
+
- extras/icalendar/calendar_parser.rb
|
121
|
+
- extras/icalendar/parameter.rb
|
122
|
+
- extras/icalendar/helpers.rb
|
123
|
+
- extras/icalendar/component.rb
|
124
|
+
- extras/icalendar/base.rb
|
125
|
+
- extras/icalendar/component/freebusy.rb
|
126
|
+
- extras/icalendar/component/journal.rb
|
127
|
+
- extras/icalendar/component/todo.rb
|
128
|
+
- extras/icalendar/component/event.rb
|
129
|
+
- extras/icalendar/component/alarm.rb
|
130
|
+
- extras/icalendar/component/timezone.rb
|
114
131
|
- schedules/archive
|
115
132
|
- schedules/20050120T09.ics
|
116
133
|
- schedules/Enterprise.ics
|
117
134
|
- schedules/US Holidays.ics
|
118
135
|
- schedules/testics05.ics
|
119
|
-
- schedules/
|
136
|
+
- schedules/200505may02a.sch
|
120
137
|
- schedules/200502february20.ics
|
121
138
|
- schedules/200502february26.ics
|
122
|
-
- updates/200507july04a.sch
|
123
139
|
- ev/browser.rb
|
124
140
|
- ev/ftools.rb
|
125
141
|
- ev/net.rb
|
@@ -210,14 +226,15 @@ files:
|
|
210
226
|
- rwd_files/tinker.png
|
211
227
|
- rwd_files/HowTo_Schedule.txt
|
212
228
|
- zips/rwdahelloworld-0.5.zip
|
229
|
+
- tests/RubyGauge.rb
|
213
230
|
- tests/totranslate.lang
|
214
231
|
- tests/cleancnf.sh
|
215
232
|
- tests/rdep.rb
|
216
233
|
- tests/checkdepends.sh
|
217
234
|
- tests/makedist.rb
|
235
|
+
- Readme.txt
|
218
236
|
- init.rb
|
219
237
|
- rwdconfig.dist
|
220
|
-
- Readme.txt
|
221
238
|
test_files: []
|
222
239
|
rdoc_options:
|
223
240
|
- "--main"
|