httpit 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69512fe962e7c56e5780206561979552a4b7f64c
4
- data.tar.gz: b466438f481cbf0de8630092139ccade86fb1fae
3
+ metadata.gz: e19ebaa7ce0e21e0b32202483af61281e3f4d1e1
4
+ data.tar.gz: 3910a728291a9c12fa4e50593597a86ca099c2b1
5
5
  SHA512:
6
- metadata.gz: 6a29ad9e6f31b40bfe83b1521dfe8f0162a0f6e3b92d092e3aca55dfde19d0b563445fb04591e66a40178c7a258824f38104e8617e9875a80c232add23abcd97
7
- data.tar.gz: 5b9753f954cfe6bf8fd5a05313028a8be3c4e1672537673337fe17b01bf9299d2fbe68f16c0a20174bd0103326b0980ea609465fe91ba6290dba29d4b39be4e0
6
+ metadata.gz: b5be5fd8a6994d9a3eeae756b48640d1cdbea106621c49acbb06a9bd1457b32fcce502d49ee856f37899741d0b468eb0aa3356ce316455224e5e014c35deb858
7
+ data.tar.gz: 1a0394c8a94ddd895de86f13fc0b261d9494c4c09469ba94e22a05605112fe23464c6d9638f0b5a83e70853cf0c766fb05eacce2b9f1acfd7e9f10a439aa2a30
@@ -1,23 +1,23 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- httpit (0.4.6)
5
- RedCloth (~> 4.2.9)
4
+ httpit (0.4.8)
6
5
  haml (~> 4.0.2)
6
+ kramdown (~> 1.3.0)
7
7
  sass (~> 3.2.8)
8
8
  sinatra (~> 1.4.2)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- RedCloth (4.2.9)
14
- haml (4.0.3)
13
+ haml (4.0.4)
15
14
  tilt
15
+ kramdown (1.3.0)
16
16
  rack (1.5.2)
17
- rack-protection (1.5.0)
17
+ rack-protection (1.5.1)
18
18
  rack
19
- sass (3.2.12)
20
- sinatra (1.4.3)
19
+ sass (3.2.13)
20
+ sinatra (1.4.4)
21
21
  rack (~> 1.4)
22
22
  rack-protection (~> 1.4)
23
23
  tilt (~> 1.3, >= 1.3.4)
data/bin/httpit CHANGED
@@ -14,7 +14,6 @@ require 'sinatra/base'
14
14
  require 'haml'
15
15
  require 'sass'
16
16
  require 'sass/plugin'
17
- require 'redcloth'
18
17
 
19
18
  ROOT = Pathname.pwd
20
19
 
@@ -166,8 +165,9 @@ class HttpIt < Sinatra::Base
166
165
  halt 404
167
166
 
168
167
  elsif @path =~ /.+\.md/
168
+ require 'kramdown' unless defined?(Kramdown::Document)
169
169
  content_type :html
170
- return RedCloth.new(abs_path.read).to_html
170
+ return Kramdown::Document.new(File.open(abs_path, 'r:utf8', &:read)).to_html
171
171
 
172
172
  elsif @path =~ /.+\.haml/
173
173
  haml @path.chomp('.haml').to_sym
@@ -1,9 +1,9 @@
1
- h1. This is a Heading 1
1
+ # This is a Heading 1
2
2
 
3
3
  This might be an introductory paragraph on the general topic.
4
4
 
5
- h2. Heading 2 gets more specific
5
+ # Heading 2 gets more specific
6
6
 
7
7
  Now we're getting into the details.
8
8
 
9
- !images/bird.jpg(This page is valid HTML)!
9
+ ![This page is valid HTML](images/bird.jpg)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "httpit"
3
- s.version = "0.4.8"
3
+ s.version = "0.4.9"
4
4
  s.summary = "Web server for static files"
5
5
  s.description = "HTTP sever for directory index with extra features"
6
6
  s.author = "Pavel Evstigneev"
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.add_runtime_dependency 'sinatra', "~> 1.4.2"
16
16
  s.add_runtime_dependency 'haml', '~> 4.0.2'
17
- s.add_runtime_dependency 'RedCloth', "~> 4.2.9"
17
+ s.add_runtime_dependency 'kramdown', "~> 1.3.0"
18
18
  s.add_runtime_dependency 'sass', "~> 3.2.8"
19
19
  end
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: httpit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Evstigneev
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 4.0.2
41
41
  - !ruby/object:Gem::Dependency
42
- name: RedCloth
42
+ name: kramdown
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: 4.2.9
47
+ version: 1.3.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 4.2.9
54
+ version: 1.3.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sass
57
57
  requirement: !ruby/object:Gem::Requirement