Changeset 196
- Timestamp:
- 03/09/07 14:21:02 (2 years ago)
- Files:
-
- trunk/README (modified) (1 diff)
- trunk/Rakefile (modified) (3 diffs)
- trunk/lib/merb/merb_router.rb (modified) (3 diffs)
- trunk/lib/merb/merb_server.rb (modified) (2 diffs)
- trunk/lib/merb/template/haml.rb (modified) (1 diff)
- trunk/tools/allison (added)
- trunk/tools/allison/LICENSE (added)
- trunk/tools/allison/README (added)
- trunk/tools/allison/allison.css (added)
- trunk/tools/allison/allison.gif (added)
- trunk/tools/allison/allison.js (added)
- trunk/tools/allison/allison.rb (added)
- trunk/tools/allison/cache (added)
- trunk/tools/allison/cache/BODY (added)
- trunk/tools/allison/cache/CLASS_INDEX (added)
- trunk/tools/allison/cache/CLASS_PAGE (added)
- trunk/tools/allison/cache/FILE_INDEX (added)
- trunk/tools/allison/cache/FILE_PAGE (added)
- trunk/tools/allison/cache/FONTS (added)
- trunk/tools/allison/cache/FR_INDEX_BODY (added)
- trunk/tools/allison/cache/IMGPATH (added)
- trunk/tools/allison/cache/INDEX (added)
- trunk/tools/allison/cache/JAVASCRIPT (added)
- trunk/tools/allison/cache/METHOD_INDEX (added)
- trunk/tools/allison/cache/METHOD_LIST (added)
- trunk/tools/allison/cache/SRC_PAGE (added)
- trunk/tools/allison/cache/STYLE (added)
- trunk/tools/allison/cache/URL (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/README
r169 r196 42 42 43 43 Merb::RouteMatcher.prepare do |r| 44 r.resource :posts44 r.resources :posts 45 45 r.add '/:controller/:action/:id' 46 46 r.add '/', :controller => 'files', :action => 'index' trunk/Rakefile
r195 r196 18 18 VERS = "0.2.0" 19 19 CLEAN.include ['**/.*.sw?', '*.gem', '.config'] 20 RDOC_OPTS = ['--quiet', '--title', "Merb Documentation",21 "--opname", "index.html",22 "--line-numbers", 'TODO',23 "--main", "README",24 "--inline-source"]25 20 26 21 setup_clean [ "pkg", "lib/*.bundle", "*.gem", … … 35 30 36 31 32 #Rake::RDocTask.new do |rdoc| 33 # rdoc.rdoc_dir = 'doc/rdoc' 34 # rdoc.options += RDOC_OPTS 35 # rdoc.main = "README" 36 # rdoc.title = "Merb Documentation" 37 # rdoc.rdoc_files.add ['README', 'LICENSE', 'TODO', 'lib/**/*.rb'] 38 #end 37 39 Rake::RDocTask.new do |rdoc| 38 rdoc.rdoc_dir = 'doc/rdoc' 39 rdoc.options += RDOC_OPTS 40 rdoc.main = "README" 41 rdoc.title = "Merb Documentation" 42 rdoc.rdoc_files.add ['README', 'LICENSE', 'TODO', 'lib/**/*.rb'] 40 files =['README', 'LICENSE', 'TODO', 'lib/**/*.rb'] 41 rdoc.rdoc_files.add(files) 42 rdoc.main = "README" # page to start on 43 rdoc.title = "Merb Docs" 44 rdoc.template = __DIR__+"/tools/allison/allison.rb" 45 rdoc.rdoc_dir = 'doc' # rdoc output folder 46 rdoc.options << '--line-numbers' << '--inline-source' 43 47 end 48 49 44 50 45 51 spec = Gem::Specification.new do |s| … … 49 55 s.has_rdoc = true 50 56 s.extra_rdoc_files = ["README", "LICENSE", 'TODO'] 51 s.rdoc_options += RDOC_OPTS +52 ['--exclude', '^(app|uploads)']57 #s.rdoc_options += RDOC_OPTS + 58 # ['--exclude', '^(app|uploads)'] 53 59 s.summary = "Merb == Mongrel + Erb. Pocket rocket web framework." 54 60 s.description = s.summary trunk/lib/merb/merb_router.rb
r194 r196 108 108 109 109 class Resource 110 110 # TODO : come up with naming convention and generate helper 111 # methods for route generation. Route generation 112 # framework needed but needs to be simple and light 113 111 114 def initialize(resource, procs=[], opts={}) 112 115 @resource, @procs, @opts = resource, procs, opts … … 143 146 procs = [] 144 147 yield Resource.new(res, procs, opts) 145 procs.reverse.each {|p| p.call }148 procs.reverse.each {|p| p.call} 146 149 else 147 150 generate_resources_routes(res,opts) … … 155 158 procs = [] 156 159 yield Resource.new(res, procs, opts) 157 procs.reverse.each {|p| p.call }160 procs.reverse.each {|p| p.call} 158 161 else 159 162 generate_singleton_routes(res,opts) trunk/lib/merb/merb_server.rb
r193 r196 40 40 opts.separator 'If no flags are given, Merb starts in the foreground on port 4000' 41 41 opts.separator '*'*80 42 42 43 opts.on("-u", "--user USER", "This flag is for having merb run as a user other than the one currently logged in. Note: if you set this you must also provide a --group option for it to take effect.") do |config| 44 options[:user] = config 45 end 46 47 opts.on("-G", "--group GROUP", "This flag is for having merb run as a group other than the one currently logged in. Note: if you set this you must also provide a --user option for it to take effect.") do |config| 48 options[:group] = config 49 end 50 43 51 opts.on("-f", "--config-file FILENAME", "This flag is for adding extra config files for things like the upload progress module") do |config| 44 52 options[:config] = config … … 257 265 initialize_merb 258 266 259 mconfig = Mongrel::Configurator.new :host => (@@merb_opts[:host]||"0.0.0.0"), :port => (port ||4000) do 267 mconf_hash = {:host => (@@merb_opts[:host]||"0.0.0.0"), :port => (port ||4000)} 268 if @@merb_opts[:user] and @@merb_opts[:group] 269 mconf_hash[:user] = @@merb_opts[:user] 270 mconf_hash[:group] = @@merb_opts[:group] 271 end 272 mconfig = Mongrel::Configurator.new(mconf_hash) do 260 273 yconfig = YAML.load(Erubis::Eruby.new(IO.read(File.expand_path(@@merb_opts[:config]))).result) if @@merb_opts[:config] 261 274 listener do trunk/lib/merb/template/haml.rb
r195 r196 39 39 end 40 40 41 # OPTIMIZE : add haml template caching42 41 def transform(options = {}) 43 42 opts, file, view_context = options.values_at(:opts, :file, :view_context)
