httpit 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -0
- data/bin/httpit +6 -5
- data/httpit.gemspec +1 -1
- metadata +3 -3
data/README.md
CHANGED
data/bin/httpit
CHANGED
@@ -68,23 +68,24 @@ get %r{.+} do
|
|
68
68
|
|
69
69
|
abs_path = File.join(ROOT, @path)
|
70
70
|
|
71
|
-
# *.sass.css suport
|
72
71
|
if @path =~ /.+\.sass\.css/
|
73
72
|
content_type :css
|
74
|
-
sass @path.
|
73
|
+
sass @path.chomp('.sass.css').to_sym
|
75
74
|
|
76
|
-
elsif !File.file?(abs_path) && !File.directory?(abs_path)
|
77
|
-
# shows 404 if file not found
|
75
|
+
elsif !File.file?(abs_path) && !File.directory?(abs_path)
|
78
76
|
halt 404
|
79
77
|
|
80
78
|
elsif @path =~ /.+\.md/
|
81
|
-
# render markdown template
|
82
79
|
content_type :html
|
83
80
|
content = File.open(abs_path) {|f| f.read }
|
84
81
|
return RedCloth.new(content).to_html
|
85
82
|
|
83
|
+
elsif @path =~ /.+\.haml/
|
84
|
+
haml @path.chomp('.haml').to_sym
|
85
|
+
|
86
86
|
elsif File.file?(abs_path)
|
87
87
|
send_file(abs_path)
|
88
|
+
|
88
89
|
else
|
89
90
|
@files = get_content(@path)
|
90
91
|
haml :listing
|
data/httpit.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httpit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pavel Evstigneev
|