Capcode 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -10,6 +10,9 @@ Capcode is a web microframework
10
10
 
11
11
  == FEATURES/PROBLEMS:
12
12
 
13
+ === 0.8.1
14
+ * Sorry for 0.8.0 !!
15
+
13
16
  === 0.8.0
14
17
  * Bugs corrections in haml and text renderer
15
18
  * Text renderer is now automaticaly included
@@ -466,7 +466,7 @@ This is also the working directory !
466
466
  407: <span class="ruby-keyword kw">begin</span>
467
467
  408: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">parse!</span> <span class="ruby-constant">ARGV</span>
468
468
  409: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">OptionParser</span><span class="ruby-operator">::</span><span class="ruby-constant">ParseError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ex</span>
469
- 410: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;!! #{ex.message}&quot;</span>
469
+ 410: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;!! #{ex.message}&quot;</span>
470
470
  411: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;** use `#{File.basename($0)} --help` for more details...&quot;</span>
471
471
  412: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
472
472
  413: <span class="ruby-keyword kw">end</span>
@@ -501,7 +501,7 @@ This is also the working directory !
501
501
  442: <span class="ruby-keyword kw">end</span>
502
502
  443:
503
503
  444: <span class="ruby-comment cmt"># Set Static directory</span>
504
- 445: <span class="ruby-ivar">@@__STATIC_DIR</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;/&quot;</span>, <span class="ruby-identifier">conf</span>[<span class="ruby-identifier">:static</span>]))
504
+ 445: <span class="ruby-ivar">@@__STATIC_DIR</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;/&quot;</span>, <span class="ruby-identifier">conf</span>[<span class="ruby-identifier">:static</span>])) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">conf</span>[<span class="ruby-identifier">:static</span>].<span class="ruby-identifier">nil?</span>
505
505
  446:
506
506
  447: <span class="ruby-comment cmt"># Initialize Rack App</span>
507
507
  448: <span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;** Map routes.&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">__VERBOSE</span>
@@ -1 +1 @@
1
- Wed, 08 Jul 2009 01:50:53 +0200
1
+ Wed, 08 Jul 2009 02:03:05 +0200
@@ -81,7 +81,7 @@ end</strong>
81
81
  <div id="README" class="page_shade">
82
82
  <div class="page">
83
83
  <div class="header">
84
- <div class="path">README / Wed Jul 08 01:50:29 +0200 2009</div>
84
+ <div class="path">README / Wed Jul 08 02:02:45 +0200 2009</div>
85
85
  </div>
86
86
 
87
87
  <h1><a href="../classes/Capcode.html">Capcode</a></h1>
@@ -98,6 +98,12 @@ Copyright (C) 2009 Gregoire Lejeune
98
98
  <a href="../classes/Capcode.html">Capcode</a> is a web microframework
99
99
  </p>
100
100
  <h2>FEATURES/PROBLEMS:</h2>
101
+ <h3>0.8.1</h3>
102
+ <ul>
103
+ <li>Sorry for 0.8.0 !!
104
+
105
+ </li>
106
+ </ul>
101
107
  <h3>0.8.0</h3>
102
108
  <ul>
103
109
  <li>Bugs corrections in haml and text renderer
@@ -81,7 +81,7 @@ end</strong>
81
81
  <div id="lib/capcode.rb" class="page_shade">
82
82
  <div class="page">
83
83
  <div class="header">
84
- <div class="path">lib/capcode.rb / Wed Jul 08 01:46:27 +0200 2009</div>
84
+ <div class="path">lib/capcode.rb / Wed Jul 08 02:02:06 +0200 2009</div>
85
85
  </div>
86
86
 
87
87
  <pre>
@@ -407,7 +407,7 @@ module Capcode
407
407
  begin
408
408
  opts.parse! ARGV
409
409
  rescue OptionParser::ParseError => ex
410
- STDERR.puts "!! #{ex.message}"
410
+ puts "!! #{ex.message}"
411
411
  puts "** use `#{File.basename($0)} --help` for more details..."
412
412
  exit 1
413
413
  end
@@ -442,7 +442,7 @@ module Capcode
442
442
  end
443
443
 
444
444
  # Set Static directory
445
- @@__STATIC_DIR = File.expand_path(File.join("/", conf[:static]))
445
+ @@__STATIC_DIR = File.expand_path(File.join("/", conf[:static])) unless conf[:static].nil?
446
446
 
447
447
  # Initialize Rack App
448
448
  puts "** Map routes." if __VERBOSE
@@ -521,7 +521,6 @@ module Capcode
521
521
  end
522
522
 
523
523
  def static #:nodoc:
524
- puts "-------------------- #{@@__STATIC_DIR}"
525
524
  @@__STATIC_DIR
526
525
  end
527
526
  end
@@ -1,7 +1,9 @@
1
1
  module Capcode
2
2
  module Helpers
3
3
  def render_static( f, _ )
4
- puts ":static => #{f}"
4
+ if Capcode.static.nil?
5
+ return [404, {}, ""]
6
+ end
5
7
  redirect File.join( Capcode.static, f )
6
8
  end
7
9
  end
@@ -1,3 +1,3 @@
1
1
  module Capcode
2
- CAPCOD_VERION="0.8.0"
2
+ CAPCOD_VERION="0.8.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Capcode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Gr\xC3\xA9goire Lejeune"