wbzyl-sinatra-rdiscount 0.0.8 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -1,4 +1,4 @@
1
- # Extension providing RDiscount templates for Sinatra
1
+ # Extension providing RDiscount templates for Sinatra apps
2
2
 
3
3
  The *sinatra-rdiscount* gem is an extension for Sinatra
4
4
  implemented as a gem.
@@ -29,6 +29,12 @@ and run the above code:
29
29
  The result could be seen here: *http://localhost:4567*.
30
30
 
31
31
  Another example could be find in the *examples* directory.
32
+ Run it with:
33
+
34
+ rackup -p 4567 config.ru
35
+
36
+ Now, visit the following url *http://localhost:4567/hello2*
37
+ and contemplate the sheer beauty of the rendered code.
32
38
 
33
39
 
34
40
  ## Template Languages (*update to The Sinatra Book*)
@@ -74,8 +80,8 @@ within *./views/application.rdiscount* layout.
74
80
 
75
81
  ## Important Info
76
82
 
77
- Layouts are **HTML**, not RDiscount, files with ERB
78
- insertions. Example:
83
+ Layouts are **RHTML** not RDiscount files.
84
+ Layout example:
79
85
 
80
86
  <!DOCTYPE html>
81
87
  <html>
@@ -87,16 +93,15 @@ insertions. Example:
87
93
  </body>
88
94
  </html>
89
95
 
90
- Templates are RDiscount files with changed embedded pattern.
91
- The default pattern `'<% %>'` is replaced by `'{% %}'`.
92
- Example:
96
+ Templates are **Markdown** files with ERB insertions delimited
97
+ by `'{% %}'`. Template example:
93
98
 
94
99
  # Hello {%= @name %}
95
100
 
96
- Such changes were necessary to avoid messing with
97
- RDiscount engine which converts bare `&lt;` to `&amp;lt;`.
98
-
99
- Also I think that there is no way with RDiscount to render
100
- that line:
101
+ Such a change in embedded code pattern was necessary,
102
+ to avoid messing with RDiscount engine,
103
+ which converts bare `&lt;` to `&amp;lt;`.
104
+ Also I think that there is no way for RDiscount renderer
105
+ to generate that line:
101
106
 
102
107
  <!DOCTYPE html>
data/Rakefile CHANGED
@@ -14,7 +14,6 @@ begin
14
14
  s.description = "An extension providing RDiscount templates for Sinatra applications."
15
15
  s.authors = ["Włodek Bzyl"]
16
16
 
17
- s.add_dependency 'rdiscount', '>=1.3.4'
18
17
  s.add_dependency 'erubis', '>=2.6.4'
19
18
  end
20
19
  rescue LoadError
@@ -4,7 +4,7 @@ require 'rdiscount'
4
4
  require 'sinatra/base'
5
5
 
6
6
  module Sinatra
7
- module RDiscountTemplate
7
+ module RDiscount
8
8
 
9
9
  def rdiscount(template, options={}, locals={})
10
10
  render :rdiscount, template, options, locals
@@ -29,5 +29,5 @@ module Sinatra
29
29
 
30
30
  end
31
31
 
32
- helpers RDiscountTemplate
32
+ helpers RDiscount
33
33
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "sinatra-rdiscount"
5
- s.version = '0.0.8'
6
- s.date = '2009-03-31'
5
+ s.version = '0.1.0'
6
+ s.date = '2009-05-01'
7
7
 
8
8
  s.summary = "RDiscount templates for Sinatra applications"
9
9
  s.email = "matwb@univ.gda.pl"
@@ -27,8 +27,6 @@ Gem::Specification.new do |s|
27
27
  examples/views/hello.rdiscount
28
28
  examples/public/stylesheets/application.css}
29
29
 
30
- s.add_dependency 'sinatra', '>=0.9.1'
31
- s.add_dependency 'rdiscount', '>=1.3.4'
32
30
  s.add_dependency 'erubis', '>=2.6.4'
33
31
 
34
32
  s.rubygems_version = '1.3.1'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wbzyl-sinatra-rdiscount
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "W\xC5\x82odek Bzyl"
@@ -9,29 +9,9 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-31 00:00:00 -07:00
12
+ date: 2009-05-01 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: sinatra
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 0.9.1
24
- version:
25
- - !ruby/object:Gem::Dependency
26
- name: rdiscount
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.3.4
34
- version:
35
15
  - !ruby/object:Gem::Dependency
36
16
  name: erubis
37
17
  type: :runtime