evdispatch 0.2.6 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.3.0 2008-04-22
2
+ * Add type checking
3
+ * Add support to stream responses directly to Ruby main thread over a pipe
4
+
1
5
  == 0.2.6 2008-04-21
2
6
  * Fix an issue with sending an HTTP POST, had to set CURLOPT_POSTFIELDS
3
7
 
data/Manifest.txt CHANGED
@@ -32,6 +32,9 @@ ext/revdispatch/test.rb
32
32
  ext/revdispatch/stest.rb
33
33
  ext/revdispatch/extconf.rb
34
34
  ext/revdispatch/revdispatch.cc
35
+ ext/revdispatch/rhttp.cc
36
+ ext/revdispatch/rhttp.h
37
+ ext/revdispatch/util.h
35
38
  ext/revdispatch/libdispatch-0.1/
36
39
  ext/revdispatch/libdispatch-0.1/src/
37
40
  ext/revdispatch/libdispatch-0.1/test/
@@ -1,39 +1,32 @@
1
1
  require 'mkmf'
2
2
 
3
- libdispatch="./libdispatch-0.1"
3
+ libdispatch=File.expand_path("./libdispatch-0.1")
4
4
  libev="libev-3.31"
5
5
 
6
6
  if !File.exist?("#{libdispatch}/src/.libs") or !File.exist?("#{libdispatch}/#{libev}/.libs")
7
7
  system("chmod a+x #{libdispatch}/configure")
8
8
  system("chmod a+x #{libdispatch}/#{libev}/configure")
9
9
  # configure and build #{libev} and #{libdispatch} we'll link against the static libraries
10
- if !system("cd #{libdispatch} && ./configure && make")
10
+ if !system("cd #{libdispatch} && ./configure --disable-shared && make")
11
11
  STDERR.puts "Failed to compile #{libdispatch}er"
12
12
  exit(1)
13
13
  end
14
- system("mkdir libdeps")
15
- # copy the .a files into this folder
16
- system("cp #{libdispatch}/src/.libs/libdispatch.a libdeps")
17
- system("cp #{libdispatch}/#{libev}/.libs/libev.a libdeps")
18
- if( `uname`.grep(/darwin/i) )
19
- puts "running ranlib"
20
- system("ranlib libdeps/*.a")
14
+
15
+ if( !`uname -m `.grep(/ppc/i).empty? )
16
+ system("ranlib #{libdispatch}/src/.libs/libdispatch.a")
17
+ system("ranlib #{libdispatch}/#{libev}/.libs/libev.a")
21
18
  end
22
19
  end
23
20
 
24
- $srcs = ['revdispatch.cc']
25
- $objs = ['revdispatch.o']
26
-
27
21
  # put the header files first
28
- $CPPFLAGS = " -I./#{libdispatch}/ -I./#{libdispatch}/src -I./#{libdispatch}/#{libev}/ #{$CPPFLAGS}"
22
+ $CPPFLAGS = " -Wall -I#{libdispatch}/ -I#{libdispatch}/src -I#{libdispatch}/#{libev}/ #{$CPPFLAGS}"
29
23
 
30
24
  # link to the static library versions of libdispatch and #{libev}
31
- if( `uname`.grep(/linux/i) )
32
- $LDFLAGS << " ./#{libdispatch}/src/.libs/libdispatch.a ./#{libdispatch}/#{libev}/.libs/libev.a "
25
+ if( !`uname`.grep(/linux/i).empty? )
26
+ $LDFLAGS << " #{libdispatch}/src/.libs/libdispatch.a #{libdispatch}/#{libev}/.libs/libev.a "
33
27
  end
34
- #$LIBS << " -L./#{libdispatch}/#{libev}/.libs/ -lev"
35
- #$LIBS << " -L./#{libdispatch}/src/.libs/ -ldispatch"
36
- $LIBS << " -Llibdeps -lev -ldispatch"
28
+ $LIBS << " -L#{libdispatch}/#{libev}/.libs/ -lev"
29
+ $LIBS << " -L#{libdispatch}/src/.libs/ -ldispatch"
37
30
 
38
31
  dir_config("revdispatch")
39
32
  have_library("c", "main")
@@ -43,3 +36,4 @@ have_library("pthread", "pthread_create")
43
36
  have_library("curl", "curl_easy_init")
44
37
 
45
38
  create_makefile("revdispatch")
39
+ puts "LDFLAGS: #{$LDFLAGS}\nLIBS: #{$LIBS}\nCXXFLAGS: #{$CXXFLAGS}"
@@ -1,8 +1,8 @@
1
- # Makefile.in generated by automake 1.9.6 from Makefile.am.
1
+ # Makefile.in generated by automake 1.10 from Makefile.am.
2
2
  # @configure_input@
3
3
 
4
4
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5
- # 2003, 2004, 2005 Free Software Foundation, Inc.
5
+ # 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
6
6
  # This Makefile.in is free software; the Free Software Foundation
7
7
  # gives unlimited permission to copy and/or distribute it,
8
8
  # with or without modifications, as long as this notice is preserved.
@@ -13,15 +13,11 @@
13
13
  # PARTICULAR PURPOSE.
14
14
 
15
15
  @SET_MAKE@
16
- srcdir = @srcdir@
17
- top_srcdir = @top_srcdir@
18
16
  VPATH = @srcdir@
19
17
  pkgdatadir = $(datadir)/@PACKAGE@
20
18
  pkglibdir = $(libdir)/@PACKAGE@
21
19
  pkgincludedir = $(includedir)/@PACKAGE@
22
- top_builddir = .
23
20
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24
- INSTALL = @INSTALL@
25
21
  install_sh_DATA = $(install_sh) -c -m 644
26
22
  install_sh_PROGRAM = $(install_sh) -c
27
23
  install_sh_SCRIPT = $(install_sh) -c
@@ -35,18 +31,18 @@ PRE_UNINSTALL = :
35
31
  POST_UNINSTALL = :
36
32
  build_triplet = @build@
37
33
  host_triplet = @host@
34
+ subdir = .
38
35
  DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
39
36
  $(srcdir)/Makefile.in $(srcdir)/config.h.in \
40
37
  $(top_srcdir)/configure config.guess config.sub depcomp \
41
38
  install-sh ltmain.sh missing
42
- subdir = .
43
39
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
44
- am__aclocal_m4_deps = $(top_srcdir)/libev-3.2/libev.m4 \
40
+ am__aclocal_m4_deps = $(top_srcdir)/libev-3.31/libev.m4 \
45
41
  $(top_srcdir)/configure.ac
46
42
  am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
47
43
  $(ACLOCAL_M4)
48
44
  am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
49
- configure.lineno configure.status.lineno
45
+ configure.lineno config.status.lineno
50
46
  mkinstalldirs = $(install_sh) -d
51
47
  CONFIG_HEADER = config.h
52
48
  CONFIG_CLEAN_FILES =
@@ -56,10 +52,13 @@ SOURCES =
56
52
  DIST_SOURCES =
57
53
  RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
58
54
  html-recursive info-recursive install-data-recursive \
59
- install-exec-recursive install-info-recursive \
60
- install-recursive installcheck-recursive installdirs-recursive \
61
- pdf-recursive ps-recursive uninstall-info-recursive \
62
- uninstall-recursive
55
+ install-dvi-recursive install-exec-recursive \
56
+ install-html-recursive install-info-recursive \
57
+ install-pdf-recursive install-ps-recursive install-recursive \
58
+ installcheck-recursive installdirs-recursive pdf-recursive \
59
+ ps-recursive uninstall-recursive
60
+ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
61
+ distclean-recursive maintainer-clean-recursive
63
62
  ETAGS = etags
64
63
  CTAGS = ctags
65
64
  DIST_SUBDIRS = $(SUBDIRS)
@@ -75,8 +74,6 @@ GZIP_ENV = --best
75
74
  distuninstallcheck_listfiles = find . -type f -print
76
75
  distcleancheck_listfiles = find . -type f -print
77
76
  ACLOCAL = @ACLOCAL@
78
- AMDEP_FALSE = @AMDEP_FALSE@
79
- AMDEP_TRUE = @AMDEP_TRUE@
80
77
  AMTAR = @AMTAR@
81
78
  AR = @AR@
82
79
  AUTOCONF = @AUTOCONF@
@@ -103,6 +100,8 @@ EGREP = @EGREP@
103
100
  EXEEXT = @EXEEXT@
104
101
  F77 = @F77@
105
102
  FFLAGS = @FFLAGS@
103
+ GREP = @GREP@
104
+ INSTALL = @INSTALL@
106
105
  INSTALL_DATA = @INSTALL_DATA@
107
106
  INSTALL_PROGRAM = @INSTALL_PROGRAM@
108
107
  INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -115,9 +114,8 @@ LIBTOOL = @LIBTOOL@
115
114
  LN_S = @LN_S@
116
115
  LTLIBOBJS = @LTLIBOBJS@
117
116
  MAINT = @MAINT@
118
- MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
119
- MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
120
117
  MAKEINFO = @MAKEINFO@
118
+ MKDIR_P = @MKDIR_P@
121
119
  OBJEXT = @OBJEXT@
122
120
  PACKAGE = @PACKAGE@
123
121
  PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -131,16 +129,13 @@ SET_MAKE = @SET_MAKE@
131
129
  SHELL = @SHELL@
132
130
  STRIP = @STRIP@
133
131
  VERSION = @VERSION@
134
- ac_ct_AR = @ac_ct_AR@
132
+ abs_builddir = @abs_builddir@
133
+ abs_srcdir = @abs_srcdir@
134
+ abs_top_builddir = @abs_top_builddir@
135
+ abs_top_srcdir = @abs_top_srcdir@
135
136
  ac_ct_CC = @ac_ct_CC@
136
137
  ac_ct_CXX = @ac_ct_CXX@
137
138
  ac_ct_F77 = @ac_ct_F77@
138
- ac_ct_RANLIB = @ac_ct_RANLIB@
139
- ac_ct_STRIP = @ac_ct_STRIP@
140
- am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
141
- am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
142
- am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
143
- am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
144
139
  am__include = @am__include@
145
140
  am__leading_dot = @am__leading_dot@
146
141
  am__quote = @am__quote@
@@ -152,28 +147,39 @@ build_alias = @build_alias@
152
147
  build_cpu = @build_cpu@
153
148
  build_os = @build_os@
154
149
  build_vendor = @build_vendor@
150
+ builddir = @builddir@
155
151
  datadir = @datadir@
152
+ datarootdir = @datarootdir@
153
+ docdir = @docdir@
154
+ dvidir = @dvidir@
156
155
  exec_prefix = @exec_prefix@
157
156
  host = @host@
158
157
  host_alias = @host_alias@
159
158
  host_cpu = @host_cpu@
160
159
  host_os = @host_os@
161
160
  host_vendor = @host_vendor@
161
+ htmldir = @htmldir@
162
162
  includedir = @includedir@
163
163
  infodir = @infodir@
164
164
  install_sh = @install_sh@
165
165
  libdir = @libdir@
166
166
  libexecdir = @libexecdir@
167
+ localedir = @localedir@
167
168
  localstatedir = @localstatedir@
168
169
  mandir = @mandir@
169
170
  mkdir_p = @mkdir_p@
170
171
  oldincludedir = @oldincludedir@
172
+ pdfdir = @pdfdir@
171
173
  prefix = @prefix@
172
174
  program_transform_name = @program_transform_name@
175
+ psdir = @psdir@
173
176
  sbindir = @sbindir@
174
177
  sharedstatedir = @sharedstatedir@
178
+ srcdir = @srcdir@
175
179
  sysconfdir = @sysconfdir@
176
180
  target_alias = @target_alias@
181
+ top_builddir = @top_builddir@
182
+ top_srcdir = @top_srcdir@
177
183
  AUTOMAKE_OPTIONS = foreign no-dependencies
178
184
  VERSION_INFO = 0:1
179
185
  EXTRA_DIST = LICENSE Changelog autogen.sh \
@@ -223,7 +229,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
223
229
  config.h: stamp-h1
224
230
  @if test ! -f $@; then \
225
231
  rm -f stamp-h1; \
226
- $(MAKE) stamp-h1; \
232
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
227
233
  else :; fi
228
234
 
229
235
  stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@@ -245,7 +251,6 @@ clean-libtool:
245
251
 
246
252
  distclean-libtool:
247
253
  -rm -f libtool
248
- uninstall-info-am:
249
254
 
250
255
  # This directory's subdirectories are mostly independent; you can cd
251
256
  # into them and run `make' without going through this Makefile.
@@ -278,8 +283,7 @@ $(RECURSIVE_TARGETS):
278
283
  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
279
284
  fi; test -z "$$fail"
280
285
 
281
- mostlyclean-recursive clean-recursive distclean-recursive \
282
- maintainer-clean-recursive:
286
+ $(RECURSIVE_CLEAN_TARGETS):
283
287
  @failcom='exit 1'; \
284
288
  for f in x $$MAKEFLAGS; do \
285
289
  case $$f in \
@@ -381,24 +385,22 @@ distclean-tags:
381
385
 
382
386
  distdir: $(DISTFILES)
383
387
  $(am__remove_distdir)
384
- mkdir $(distdir)
385
- $(mkdir_p) $(distdir)/libev-3.2 $(distdir)/src $(distdir)/test
386
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
387
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
388
- list='$(DISTFILES)'; for file in $$list; do \
389
- case $$file in \
390
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
391
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
392
- esac; \
388
+ test -d $(distdir) || mkdir $(distdir)
389
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
390
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
391
+ list='$(DISTFILES)'; \
392
+ dist_files=`for file in $$list; do echo $$file; done | \
393
+ sed -e "s|^$$srcdirstrip/||;t" \
394
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
395
+ case $$dist_files in \
396
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
397
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
398
+ sort -u` ;; \
399
+ esac; \
400
+ for file in $$dist_files; do \
393
401
  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
394
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
395
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
396
- dir="/$$dir"; \
397
- $(mkdir_p) "$(distdir)$$dir"; \
398
- else \
399
- dir=''; \
400
- fi; \
401
402
  if test -d $$d/$$file; then \
403
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
402
404
  if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
403
405
  cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
404
406
  fi; \
@@ -412,7 +414,7 @@ distdir: $(DISTFILES)
412
414
  list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
413
415
  if test "$$subdir" = .; then :; else \
414
416
  test -d "$(distdir)/$$subdir" \
415
- || $(mkdir_p) "$(distdir)/$$subdir" \
417
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
416
418
  || exit 1; \
417
419
  distdir=`$(am__cd) $(distdir) && pwd`; \
418
420
  top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -420,6 +422,8 @@ distdir: $(DISTFILES)
420
422
  $(MAKE) $(AM_MAKEFLAGS) \
421
423
  top_distdir="$$top_distdir" \
422
424
  distdir="$$distdir/$$subdir" \
425
+ am__remove_distdir=: \
426
+ am__skip_length_check=: \
423
427
  distdir) \
424
428
  || exit 1; \
425
429
  fi; \
@@ -427,7 +431,7 @@ distdir: $(DISTFILES)
427
431
  -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
428
432
  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
429
433
  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
430
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
434
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
431
435
  || chmod -R a+r $(distdir)
432
436
  dist-gzip: distdir
433
437
  tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
@@ -502,7 +506,7 @@ distcheck: dist
502
506
  $(am__remove_distdir)
503
507
  @(echo "$(distdir) archives ready for distribution: "; \
504
508
  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
505
- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
509
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
506
510
  distuninstallcheck:
507
511
  @cd $(distuninstallcheck_dir) \
508
512
  && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -572,12 +576,20 @@ info-am:
572
576
 
573
577
  install-data-am:
574
578
 
579
+ install-dvi: install-dvi-recursive
580
+
575
581
  install-exec-am:
576
582
 
583
+ install-html: install-html-recursive
584
+
577
585
  install-info: install-info-recursive
578
586
 
579
587
  install-man:
580
588
 
589
+ install-pdf: install-pdf-recursive
590
+
591
+ install-ps: install-ps-recursive
592
+
581
593
  installcheck-am:
582
594
 
583
595
  maintainer-clean: maintainer-clean-recursive
@@ -598,24 +610,26 @@ ps: ps-recursive
598
610
 
599
611
  ps-am:
600
612
 
601
- uninstall-am: uninstall-info-am
613
+ uninstall-am:
602
614
 
603
- uninstall-info: uninstall-info-recursive
615
+ .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
616
+ install-strip
604
617
 
605
- .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
606
- check-am clean clean-generic clean-libtool clean-recursive \
607
- ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
608
- dist-shar dist-tarZ dist-zip distcheck distclean \
618
+ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
619
+ all all-am am--refresh check check-am clean clean-generic \
620
+ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
621
+ dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
609
622
  distclean-generic distclean-hdr distclean-libtool \
610
- distclean-recursive distclean-tags distcleancheck distdir \
611
- distuninstallcheck dvi dvi-am html html-am info info-am \
612
- install install-am install-data install-data-am install-exec \
613
- install-exec-am install-info install-info-am install-man \
614
- install-strip installcheck installcheck-am installdirs \
615
- installdirs-am maintainer-clean maintainer-clean-generic \
616
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
617
- mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
618
- tags tags-recursive uninstall uninstall-am uninstall-info-am
623
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
624
+ dvi-am html html-am info info-am install install-am \
625
+ install-data install-data-am install-dvi install-dvi-am \
626
+ install-exec install-exec-am install-html install-html-am \
627
+ install-info install-info-am install-man install-pdf \
628
+ install-pdf-am install-ps install-ps-am install-strip \
629
+ installcheck installcheck-am installdirs installdirs-am \
630
+ maintainer-clean maintainer-clean-generic mostlyclean \
631
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
632
+ tags tags-recursive uninstall uninstall-am
619
633
 
620
634
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
621
635
  # Otherwise a system limit (for SysV at least) may be exceeded.