Permalink
Browse files

First commit

  • Loading branch information...
anildigital committed May 8, 2010
0 parents commit 6f1aae7b937008ce3914e10c992b163491c79e4a
4 .gems
@@ -0,0 +1,4 @@
+bluecloth
+nokogiri
+showoff --version 0.1.1
+gli
@@ -0,0 +1 @@
+.DS_Store
@@ -0,0 +1,5 @@
+Best when used with [showoff](http://github.com/schacon/showoff).
+
+See it live [on Heroku](http://pune-rails-meetup-rack.heroku.com/)!
+
+Anil Wadghule
@@ -0,0 +1,2 @@
+require "showoff"
+run ShowOff.new
@@ -0,0 +1,16 @@
+!SLIDE center
+
+# Rack
+## a Ruby Webserver Interface ##
+
+!SLIDE subsection
+# Intro
+
+!SLIDE center
+### λ whoami ###
+
+# Anil Wadghule #
+## Senior Developer ##
+## Calsoft Inc, Pune ##
+## anildigital@gmail.com ##
+## @anildigital ##
@@ -0,0 +1,61 @@
+!SLIDE subsection
+# CGI
+
+!SLIDE small center bullets incremental
+# CGI
+
+* A standard that defines how webserver software can delegate the generation of webpages to a console application.
+* Provides an interface between the webservers and the clients
+* Servers identify the request from client and will invoke appropriate function to return the result to the requested clients.
+
+!SLIDE ruby small
+
+ @@@ruby
+ # Simple CGI script
+
+ require 'cgi'
+
+ # Create a cgi object, with HTML 4 generation methods.
+ cgi = CGI.new('html4')
+
+ # Ask the cgi object to send some text
+ # out to the browser.
+
+ cgi.out {
+ cgi.html {
+ cgi.body {
+ cgi.h1 { 'Hello Ruby!' }
+ }
+ }
+ }
+
+!SLIDE small ruby
+
+ @@@ ruby
+ # Mongrel is a standalone webserver for ruby
+ # applications.
+ # Simple example
+
+ require 'mongrel'
+
+ class SimpleHandler < Mongrel::HttpHandler
+ def process(request, response)
+ response.start(200) do |head,out|
+ head["Content-Type"] = "text/plain"
+ out.write("Hello Ruby!\n")
+ end
+ end
+ end
+
+ h = Mongrel::HttpServer.new("0.0.0.0", "3000")
+ h.register("/hello", SimpleHandler.new)
+ h.run.join
+
+
+!SLIDE bullets small incremental
+
+# What is missing in these programs?
+
+* Follow no standard protocol, could not mix it with sinatra / rails / similar easily.
+* Second example runs only on mongrel
+* No middleware
@@ -0,0 +1,157 @@
+
+SHELL = /bin/sh
+
+#### Start of system configuration section. ####
+
+srcdir = .
+topdir = /Users/anil/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/i686-darwin10.3.0
+hdrdir = $(topdir)
+VPATH = $(srcdir):$(topdir):$(hdrdir)
+exec_prefix = $(prefix)
+prefix = $(DESTDIR)/Users/anil/.rvm/rubies/ruby-1.8.7-p249
+sharedstatedir = $(prefix)/com
+mandir = $(datarootdir)/man
+psdir = $(docdir)
+oldincludedir = $(DESTDIR)/usr/include
+localedir = $(datarootdir)/locale
+bindir = $(exec_prefix)/bin
+libexecdir = $(exec_prefix)/libexec
+sitedir = $(libdir)/ruby/site_ruby
+htmldir = $(docdir)
+vendorarchdir = $(vendorlibdir)/$(sitearch)
+includedir = $(prefix)/include
+infodir = $(datarootdir)/info
+vendorlibdir = $(vendordir)/$(ruby_version)
+sysconfdir = $(prefix)/etc
+libdir = $(exec_prefix)/lib
+sbindir = $(exec_prefix)/sbin
+rubylibdir = $(libdir)/ruby/$(ruby_version)
+docdir = $(datarootdir)/doc/$(PACKAGE)
+dvidir = $(docdir)
+vendordir = $(libdir)/ruby/vendor_ruby
+datarootdir = $(prefix)/share
+pdfdir = $(docdir)
+archdir = $(rubylibdir)/$(arch)
+sitearchdir = $(sitelibdir)/$(sitearch)
+datadir = $(datarootdir)
+localstatedir = $(prefix)/var
+sitelibdir = $(sitedir)/$(ruby_version)
+
+CC = gcc
+LIBRUBY = $(LIBRUBY_A)
+LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
+LIBRUBYARG_SHARED =
+LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
+
+RUBY_EXTCONF_H =
+CFLAGS = -fno-common -g -O2 -pipe -fno-common $(cflags)
+INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
+DEFS =
+CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
+CXXFLAGS = $(CFLAGS)
+ldflags = -L.
+dldflags =
+archflag =
+DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
+LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace
+AR = ar
+EXEEXT =
+
+RUBY_INSTALL_NAME = ruby
+RUBY_SO_NAME = ruby
+arch = i686-darwin10.3.0
+sitearch = i686-darwin10.3.0
+ruby_version = 1.8
+ruby = /Users/anil/.rvm/rubies/ruby-1.8.7-p249/bin/ruby
+RUBY = $(ruby)
+RM = rm -f
+MAKEDIRS = mkdir -p
+INSTALL = /usr/bin/install -c
+INSTALL_PROG = $(INSTALL) -m 0755
+INSTALL_DATA = $(INSTALL) -m 644
+COPY = cp
+
+#### End of system configuration section. ####
+
+preload =
+
+libpath = . $(libdir)
+LIBPATH = -L. -L$(libdir)
+DEFFILE =
+
+CLEANFILES = mkmf.log
+DISTCLEANFILES =
+
+extout =
+extout_prefix =
+target_prefix =
+LOCAL_LIBS =
+LIBS = -ldl -lobjc
+SRCS = rock.c
+OBJS = rock.o
+TARGET = rock
+DLLIB = $(TARGET).bundle
+EXTSTATIC =
+STATIC_LIB =
+
+BINDIR = $(bindir)
+RUBYCOMMONDIR = $(sitedir)$(target_prefix)
+RUBYLIBDIR = $(sitelibdir)$(target_prefix)
+RUBYARCHDIR = $(sitearchdir)$(target_prefix)
+
+TARGET_SO = $(DLLIB)
+CLEANLIBS = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map
+CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
+
+all: $(DLLIB)
+static: $(STATIC_LIB)
+
+clean:
+ @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES)
+
+distclean: clean
+ @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
+
+realclean: distclean
+install: install-so install-rb
+
+install-so: $(RUBYARCHDIR)
+install-so: $(RUBYARCHDIR)/$(DLLIB)
+$(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
+install-rb: pre-install-rb install-rb-default
+install-rb-default: pre-install-rb-default
+pre-install-rb: Makefile
+pre-install-rb-default: Makefile
+$(RUBYARCHDIR):
+ $(MAKEDIRS) $@
+
+site-install: site-install-so site-install-rb
+site-install-so: install-so
+site-install-rb: install-rb
+
+.SUFFIXES: .c .m .cc .cxx .cpp .C .o
+
+.cc.o:
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
+
+.cxx.o:
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
+
+.cpp.o:
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
+
+.C.o:
+ $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<
+
+.c.o:
+ $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
+
+$(DLLIB): $(OBJS) Makefile
+ @-$(RM) $@
+ $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
+
+
+
+$(OBJS): ruby.h defines.h
@@ -0,0 +1,5 @@
+require 'mkmf'
+extension_name = 'rock'
+
+dir_config(extension_name)
+create_makefile(extension_name)
Oops, something went wrong.

0 comments on commit 6f1aae7

Please sign in to comment.