markview 0.2.0 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,8 +2,8 @@ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abb
2
2
  acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,
3
3
  strong,sub,sup,tt,var,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,
4
4
  tbody,tfoot,thead,tr,th,td { margin:0; padding:0; border:0; outline:0;
5
- font-weight:inherit; font-style:inherit; font-size:100%;
6
- font-family:inherit; vertical-align:baseline; }
5
+ font-weight:inherit; font-style:inherit; font-size:100%;
6
+ font-family:inherit; vertical-align:baseline; }
7
7
 
8
8
  body { line-height:1; color:black; background: white; }
9
9
  ol,ul { list-style:none; }
@@ -16,19 +16,20 @@ blockquote,q { quotes:"" ""; }
16
16
 
17
17
  body { background:#fff; font-size:15px; }
18
18
  body * { line-height:1.4em; }
19
- body,input,textarea { font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,sans-serif; color:#333; }
19
+ body,input,textarea { font-family:'Helvetica Neue',Helvetica,Arial,sans-serif; color:#333; }
20
20
 
21
21
  a { color:#2e80d3; text-decoration:none; }
22
22
  a:hover { text-decoration:underline; }
23
23
 
24
24
  p#file {font-size:150%;}
25
25
 
26
- div#content {margin:2% auto; position:relative; width:60%; }
26
+ div#content {margin:2% auto; position:relative; width:920px; }
27
27
  div#content > div { float:left; }
28
28
  div#content div#markview-output { border: 1px solid #E9E9E9; background:#F8F8F8; padding:5%; overflow-y:auto; }
29
29
 
30
- .markview * { line-height:1.4em; }
31
- .markview em { background-color:#fffeca; padding:0 0.08em;}
30
+ .markview * {line-height:1.4em;}
31
+ .markview a {text-decoration:none;}
32
+ .markview em {font-style:italic; padding:0 0.08em;}
32
33
  .markview i{font-style:italic}
33
34
  .markview strong,.markview b{font-weight:bold}
34
35
  .markview abbr{border-bottom:1px dashed;cursor:help}
@@ -42,7 +43,6 @@ div#content div#markview-output { border: 1px solid #E9E9E9; background:#F8F8F8;
42
43
  .markview h5{color:#777}
43
44
  .markview h6{color:#777;font-size:90%}
44
45
 
45
- .markview a{text-decoration:underline}
46
46
  .markview p{line-height:1.5em;margin:0 0 1em}
47
47
 
48
48
  .markview ul ul,.markview ol ol{margin-bottom:0;margin-top:0}
@@ -52,7 +52,8 @@ div#content div#markview-output { border: 1px solid #E9E9E9; background:#F8F8F8;
52
52
  .markview ol li{list-style:decimal}
53
53
 
54
54
  .markview blockquote{border-left:5px solid #ddd;color:#555;margin:0 0 1em;padding-left:0.6em}
55
- .markview dt{font-weight:bold;margin-left:1em}.markview dd{margin-bottom:1em;margin-left:2em}
55
+ .markview dt{font-weight:bold;margin-left:1em}
56
+ .markview dd{margin-bottom:1em;margin-left:2em}
56
57
 
57
58
  .markview table{margin:0 0 1em;width:100%}
58
59
  .markview table th{background:#eee;border-bottom:1px solid #bbb;padding:0.2em 1em}
data/lib/markview.rb CHANGED
@@ -6,24 +6,24 @@ require 'github/markup'
6
6
  module Markview
7
7
  class Application < Sinatra::Base
8
8
  dir = File.dirname(File.expand_path(__FILE__))
9
-
9
+
10
10
  set :views, "#{dir}/markview/views"
11
11
  set :public, "#{dir}/markview/public"
12
12
  set :static, true
13
13
 
14
- # Renders the html using RDiscount
14
+ # Renders the html using GitHub::Markup
15
15
  def self.markdown_me
16
16
  ARGV[0] ||= Dir.glob("README*")[0]
17
17
  begin
18
18
  GitHub::Markup.render(ARGV[0], File.read(ARGV[0]))
19
19
  rescue Errno::ENOENT
20
- raise LoadError, "Failed open document. Please specify a file."; exit
20
+ raise LoadError, "Failed to open document. Please specify a file."; exit
21
21
  end
22
22
  end
23
23
 
24
24
  get '/' do
25
25
  @markdown = Application.markdown_me
26
- @title = ARGV[0]
26
+ @title = ARGF.filename.gsub(/(.+\/)?/, '') # /path/to/README.txt => README.txt
27
27
  erb :base
28
28
  end
29
29
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mark Sands
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-03 00:00:00 -06:00
17
+ date: 2010-03-27 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -60,9 +60,23 @@ dependencies:
60
60
  type: :runtime
61
61
  version_requirements: *id003
62
62
  - !ruby/object:Gem::Dependency
63
- name: contest
63
+ name: rdiscount
64
64
  prerelease: false
65
65
  requirement: &id004 !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ segments:
70
+ - 1
71
+ - 6
72
+ - 3
73
+ version: 1.6.3
74
+ type: :runtime
75
+ version_requirements: *id004
76
+ - !ruby/object:Gem::Dependency
77
+ name: contest
78
+ prerelease: false
79
+ requirement: &id005 !ruby/object:Gem::Requirement
66
80
  requirements:
67
81
  - - ">="
68
82
  - !ruby/object:Gem::Version
@@ -72,11 +86,11 @@ dependencies:
72
86
  - 2
73
87
  version: 0.1.2
74
88
  type: :development
75
- version_requirements: *id004
89
+ version_requirements: *id005
76
90
  - !ruby/object:Gem::Dependency
77
91
  name: turn
78
92
  prerelease: false
79
- requirement: &id005 !ruby/object:Gem::Requirement
93
+ requirement: &id006 !ruby/object:Gem::Requirement
80
94
  requirements:
81
95
  - - ">="
82
96
  - !ruby/object:Gem::Version
@@ -86,7 +100,7 @@ dependencies:
86
100
  - 0
87
101
  version: 0.7.0
88
102
  type: :development
89
- version_requirements: *id005
103
+ version_requirements: *id006
90
104
  description: Conveniently launches practically any markup formatted files in a browser, rendering on the fly.
91
105
  email: marksands07@gmail.com
92
106
  executables:
@@ -127,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
141
  version: "0"
128
142
  requirements: []
129
143
 
130
- rubyforge_project:
144
+ rubyforge_project: markview
131
145
  rubygems_version: 1.3.6
132
146
  signing_key:
133
147
  specification_version: 3