spohlenz-sassic 0.2 → 0.2.1
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/lib/sassic/servlets/template.rb +14 -0
- data/sassic.gemspec +2 -2
- metadata +2 -2
@@ -0,0 +1,14 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../page'
|
2
|
+
|
3
|
+
class Sassic::Servlets::TemplateServlet < WEBrick::HTTPServlet::AbstractServlet
|
4
|
+
def do_GET(req, res)
|
5
|
+
page = Sassic::Page.new(req.path == '/' ? 'index' : req.path.sub(/^\//, ''))
|
6
|
+
|
7
|
+
if page.exists?
|
8
|
+
res.body = page.render
|
9
|
+
else
|
10
|
+
res.status = 404
|
11
|
+
res.body = "<h1>404 Not Available</h1>"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/sassic.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "sassic"
|
3
|
-
s.version = "0.2"
|
3
|
+
s.version = "0.2.1"
|
4
4
|
s.date = "2008-09-17"
|
5
5
|
|
6
6
|
s.authors = [ "Sam Pohlenz" ]
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
"lib/sassic/generator.rb",
|
22
22
|
"lib/sassic/page.rb",
|
23
23
|
"lib/sassic/server.rb",
|
24
|
-
"lib/sassic/servlets/
|
24
|
+
"lib/sassic/servlets/template.rb",
|
25
25
|
"lib/sassic/servlets/sass.rb",
|
26
26
|
"lib/sassic/servlets.rb",
|
27
27
|
"lib/sassic/builder.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spohlenz-sassic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Pohlenz
|
@@ -48,7 +48,7 @@ files:
|
|
48
48
|
- lib/sassic/generator.rb
|
49
49
|
- lib/sassic/page.rb
|
50
50
|
- lib/sassic/server.rb
|
51
|
-
- lib/sassic/servlets/
|
51
|
+
- lib/sassic/servlets/template.rb
|
52
52
|
- lib/sassic/servlets/sass.rb
|
53
53
|
- lib/sassic/servlets.rb
|
54
54
|
- lib/sassic/builder.rb
|