staticmatic 0.9.1 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
|
|
1
|
+
%h1 Test
|
data/lib/staticmatic/server.rb
CHANGED
@@ -16,12 +16,15 @@ module StaticMatic
|
|
16
16
|
|
17
17
|
# remove stylesheets/ directory if applicable
|
18
18
|
file_dir.gsub!(/^\/stylesheets\/?/, "")
|
19
|
-
|
19
|
+
|
20
|
+
file_dir = CGI::unescape(file_dir)
|
21
|
+
file_name = CGI::unescape(file_name)
|
22
|
+
|
20
23
|
if file_ext && file_ext.match(/html|css/)
|
21
24
|
response.start(200) do |head, out|
|
22
25
|
head["Content-Type"] = "text/#{file_ext}"
|
23
26
|
output = ""
|
24
|
-
|
27
|
+
|
25
28
|
if @staticmatic.template_exists?(file_name, file_dir) && !(File.basename(file_name) =~ /^\_/)
|
26
29
|
|
27
30
|
begin
|
@@ -52,6 +55,7 @@ module StaticMatic
|
|
52
55
|
|
53
56
|
def expand_path(path_info)
|
54
57
|
dirname, basename = File.split(path_info)
|
58
|
+
|
55
59
|
extname = File.extname(path_info).sub(/^\./, '')
|
56
60
|
filename = basename.chomp(".#{extname}")
|
57
61
|
|
@@ -72,7 +76,9 @@ module StaticMatic
|
|
72
76
|
# Starts the StaticMatic preview server
|
73
77
|
def start(staticmatic)
|
74
78
|
port = staticmatic.configuration.preview_server_port || 3000
|
75
|
-
|
79
|
+
|
80
|
+
host = staticmatic.configuration.preview_server_host || ""
|
81
|
+
|
76
82
|
config = Mongrel::Configurator.new :host => host do
|
77
83
|
puts "Running Preview of #{staticmatic.base_dir} on #{host}:#{port}"
|
78
84
|
listener :port => port do
|
data/lib/staticmatic/version.rb
CHANGED
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: staticmatic
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.9.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.9.3
|
7
|
+
date: 2007-12-06 00:00:00 +00:00
|
8
8
|
summary: Manage static sites using Haml & Sass
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -47,6 +47,8 @@ files:
|
|
47
47
|
- example/src/pages
|
48
48
|
- example/src/pages/contact.haml
|
49
49
|
- example/src/pages/index.haml
|
50
|
+
- example/src/pages/test test
|
51
|
+
- example/src/pages/test test/blah.haml
|
50
52
|
- example/src/stylesheets
|
51
53
|
- example/src/stylesheets/application.sass
|
52
54
|
- lib
|