narf 0.7.2 → 0.7.3
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.
- data/ChangeLog +37 -0
- data/bin/narf +0 -0
- data/bin/narftest +1 -1
- data/build.rb +23 -7
- data/build.rb~ +22 -5
- data/lib/web/wiki.rb +1 -1
- data/narf.gemspec +1 -1
- data/narf.gemspec~ +1 -1
- data/pre-setup.rb +1 -1
- data/sapi/narf.c +1 -1
- metadata +2 -2
data/ChangeLog
CHANGED
@@ -1,4 +1,41 @@
|
|
1
1
|
------------------------------------------------------------------------
|
2
|
+
rev 122: patsplat | 2005-02-25 23:28:21 -0500 (Fri, 25 Feb 2005) | 2 lines
|
3
|
+
|
4
|
+
tweaks for narf.c on linux ~ pat
|
5
|
+
|
6
|
+
------------------------------------------------------------------------
|
7
|
+
rev 121: patsplat | 2005-02-19 02:32:27 -0500 (Sat, 19 Feb 2005) | 1 line
|
8
|
+
|
9
|
+
made fixes so narf would compile on unix dynamically via rbconfig settings ~ patrick
|
10
|
+
------------------------------------------------------------------------
|
11
|
+
rev 120: patsplat | 2005-02-15 22:58:49 -0500 (Tue, 15 Feb 2005) | 1 line
|
12
|
+
|
13
|
+
tweaked compile rules ~ pat
|
14
|
+
------------------------------------------------------------------------
|
15
|
+
rev 119: patsplat | 2005-02-15 22:55:52 -0500 (Tue, 15 Feb 2005) | 1 line
|
16
|
+
|
17
|
+
added windows cgi documentation ~ pat
|
18
|
+
------------------------------------------------------------------------
|
19
|
+
rev 117: patsplat | 2005-02-14 15:31:23 -0500 (Mon, 14 Feb 2005) | 1 line
|
20
|
+
|
21
|
+
Preparing for 0.7.2 release
|
22
|
+
------------------------------------------------------------------------
|
23
|
+
rev 115: patsplat | 2005-02-13 04:09:54 -0500 (Sun, 13 Feb 2005) | 1 line
|
24
|
+
|
25
|
+
settling in for another release ~ pat
|
26
|
+
------------------------------------------------------------------------
|
27
|
+
rev 113: patsplat | 2005-02-13 03:33:38 -0500 (Sun, 13 Feb 2005) | 1 line
|
28
|
+
|
29
|
+
Preparing for 0.7.0 release
|
30
|
+
------------------------------------------------------------------------
|
31
|
+
rev 112: patsplat | 2005-02-13 03:32:11 -0500 (Sun, 13 Feb 2005) | 1 line
|
32
|
+
|
33
|
+
settling in for another release ~ pat
|
34
|
+
------------------------------------------------------------------------
|
35
|
+
rev 111: patsplat | 2005-02-12 02:52:38 -0500 (Sat, 12 Feb 2005) | 1 line
|
36
|
+
|
37
|
+
calling all platforms: work on the new narf! ~ pat
|
38
|
+
------------------------------------------------------------------------
|
2
39
|
rev 110: patsplat | 2005-02-09 00:38:05 -0500 (Wed, 09 Feb 2005) | 1 line
|
3
40
|
|
4
41
|
made narf runner work for rb and narf files, by extension ~ pat
|
data/bin/narf
CHANGED
Binary file
|
data/bin/narftest
CHANGED
data/build.rb
CHANGED
@@ -7,8 +7,8 @@ require 'ftools'
|
|
7
7
|
require 'find'
|
8
8
|
|
9
9
|
def temp_dir
|
10
|
-
|
11
|
-
|
10
|
+
#(ENV["TEMP"] || "/tmp").gsub(/\\+/, "/")
|
11
|
+
@temp_dir ||= File.join( Dir.pwd, "tmp" )
|
12
12
|
end
|
13
13
|
|
14
14
|
def make_temp( path )
|
@@ -261,7 +261,7 @@ Target.new( "testexamples", "test narf examples" ) {
|
|
261
261
|
}
|
262
262
|
|
263
263
|
|
264
|
-
|
264
|
+
Target.new( "compile", "compile narf interpreter" ) do
|
265
265
|
Dir.mkdir "bin" unless File.exists? "bin"
|
266
266
|
require 'rbconfig'
|
267
267
|
|
@@ -269,11 +269,27 @@ Target.new( "testexamples", "test narf examples" ) {
|
|
269
269
|
puts "cmd: copy sapi/win/narf.exe bin/narf.exe"
|
270
270
|
File.copy 'sapi/win/narf.exe', 'bin/narf.exe'
|
271
271
|
else
|
272
|
-
|
273
|
-
|
274
|
-
|
272
|
+
c = Config::CONFIG
|
273
|
+
libdir = c['libdir']
|
274
|
+
archdir = c['archdir']
|
275
|
+
ld = c['CC']
|
276
|
+
ldflags = c['LDFLAGS']
|
277
|
+
xldflags = c["XLDFLAGS"]
|
278
|
+
xldflags.gsub!(/-L\./, "")
|
279
|
+
xldflags += " #{c['LIBPATHFLAG'] % libdir}"
|
280
|
+
librubyarg = c["LIBRUBYARG"]
|
281
|
+
if c["RUBY_SHARED"]
|
282
|
+
librubyarg.gsub!(/-L\./, "")
|
283
|
+
end
|
284
|
+
|
285
|
+
libs = c["LIBS"]
|
286
|
+
|
287
|
+
#(cmd = "gcc sapi/narf.c -v -I#{archdir} -L#{libdir} #{c['libs']} #{librubyarg} -o bin/narf")
|
288
|
+
|
289
|
+
cmd = [ ld, ldflags, xldflags, "-I#{archdir}", "sapi/narf.c", librubyarg, libs, "-o bin/narf" ].join(" ")
|
290
|
+
puts "cmd: " + cmd
|
275
291
|
`#{cmd}`
|
276
292
|
end
|
277
293
|
end
|
278
|
-
|
294
|
+
|
279
295
|
Target.run( ARGV[0] ) if ($0 == __FILE__)
|
data/build.rb~
CHANGED
@@ -135,6 +135,7 @@ Target.new( "upload_doc", "upload doc" ) {
|
|
135
135
|
"lib/web.rb",
|
136
136
|
"lib/web",
|
137
137
|
"doc/apache_cgi.txt",
|
138
|
+
"doc/windows_cgi.txt",
|
138
139
|
"doc/fastcgi.txt",
|
139
140
|
"doc/mod_ruby.txt",
|
140
141
|
"doc/webrick.txt"
|
@@ -260,7 +261,7 @@ Target.new( "testexamples", "test narf examples" ) {
|
|
260
261
|
}
|
261
262
|
|
262
263
|
|
263
|
-
|
264
|
+
Target.new( "compile", "compile narf interpreter" ) do
|
264
265
|
Dir.mkdir "bin" unless File.exists? "bin"
|
265
266
|
require 'rbconfig'
|
266
267
|
|
@@ -268,11 +269,27 @@ Target.new( "testexamples", "test narf examples" ) {
|
|
268
269
|
puts "cmd: copy sapi/win/narf.exe bin/narf.exe"
|
269
270
|
File.copy 'sapi/win/narf.exe', 'bin/narf.exe'
|
270
271
|
else
|
271
|
-
|
272
|
-
|
273
|
-
|
272
|
+
c = Config::CONFIG
|
273
|
+
libdir = c['libdir']
|
274
|
+
archdir = c['archdir']
|
275
|
+
ld = c['CC']
|
276
|
+
ldflags = c['LDFLAGS']
|
277
|
+
xldflags = c["XLDFLAGS"]
|
278
|
+
xldflags.gsub!(/-L\./, "")
|
279
|
+
xldflags += " #{c['LIBPATHFLAG'] % libdir}"
|
280
|
+
librubyarg = c["LIBRUBYARG"]
|
281
|
+
if c["RUBY_SHARED"]
|
282
|
+
librubyarg.gsub!(/-L\./, "")
|
283
|
+
end
|
284
|
+
|
285
|
+
libs = c["LIBS"]
|
286
|
+
|
287
|
+
mknarf = [ ld, ldflags, xldflags, "-I#{archdir}", "sapi/narf.c", librubyarg, libs, "-o bin/narf" ].join(" ")
|
288
|
+
#(cmd = "gcc sapi/narf.c -v -I#{archdir} -L#{libdir} #{c['libs']} #{librubyarg} -o bin/narf")
|
289
|
+
cmd = mknarf
|
290
|
+
puts "cmd: " + cmd
|
274
291
|
`#{cmd}`
|
275
292
|
end
|
276
293
|
end
|
277
|
-
|
294
|
+
|
278
295
|
Target.run( ARGV[0] ) if ($0 == __FILE__)
|
data/lib/web/wiki.rb
CHANGED
@@ -331,7 +331,7 @@ module Web
|
|
331
331
|
def initialize( wiki )
|
332
332
|
@handled = false
|
333
333
|
@wiki = wiki
|
334
|
-
@template = if (File.basename(Web.script_name) == "admin.rb")
|
334
|
+
@template = if (File.basename(Web.script_name || '') == "admin.rb")
|
335
335
|
"admin.html"
|
336
336
|
else
|
337
337
|
"template.html"
|
data/narf.gemspec
CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
|
|
3
3
|
spec = Gem::Specification.new do |s|
|
4
4
|
#### Basic information.
|
5
5
|
s.name = 'narf'
|
6
|
-
s.version = "0.7.
|
6
|
+
s.version = "0.7.3"
|
7
7
|
s.summary = <<-EOF
|
8
8
|
NARF is a replacement for and derivative of the Ruby CGI library. It exists to trivialize web development .
|
9
9
|
EOF
|
data/narf.gemspec~
CHANGED
@@ -3,7 +3,7 @@ require 'rubygems'
|
|
3
3
|
spec = Gem::Specification.new do |s|
|
4
4
|
#### Basic information.
|
5
5
|
s.name = 'narf'
|
6
|
-
s.version = "0.7.
|
6
|
+
s.version = "0.7.2"
|
7
7
|
s.summary = <<-EOF
|
8
8
|
NARF is a replacement for and derivative of the Ruby CGI library. It exists to trivialize web development .
|
9
9
|
EOF
|
data/pre-setup.rb
CHANGED
data/sapi/narf.c
CHANGED
@@ -8,7 +8,7 @@ int main(int argc, char *argv[])
|
|
8
8
|
ruby_init_loadpath();
|
9
9
|
ruby_script("narf");
|
10
10
|
ruby_set_argv(argc, argv);
|
11
|
-
rb_eval_string_protect("require 'web/runner'; Web::load(ENV['PATH_TRANSLATED']
|
11
|
+
rb_eval_string_protect("require 'web/runner'; Web::load(if (File.exists?ENV['PATH_TRANSLATED'].to_s) then ENV['PATH_TRANSLATED']; elsif(File.exists?ENV['SCRIPT_FILENAME'].to_s) then ENV['SCRIPT_FILENAME']; else ARGV[1]; end );", &state);
|
12
12
|
if (state) {
|
13
13
|
rb_p( ruby_errinfo );
|
14
14
|
}
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.1
|
|
3
3
|
specification_version: 1
|
4
4
|
name: narf
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.7.
|
7
|
-
date: 2005-02-
|
6
|
+
version: 0.7.3
|
7
|
+
date: 2005-02-26
|
8
8
|
summary: NARF is a replacement for and derivative of the Ruby CGI library. It exists to trivialize web development .
|
9
9
|
require_paths:
|
10
10
|
- lib
|