wbzyl-sinatra-rdiscount 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -2
- data/LICENSE +1 -1
- data/README.markdown +14 -17
- data/Rakefile +17 -20
- data/VERSION.yml +1 -1
- data/examples/app.rb +2 -2
- data/examples/mapp.rb +4 -2
- data/sinatra-rdiscount.gemspec +14 -5
- metadata +35 -5
data/.gitignore
CHANGED
data/LICENSE
CHANGED
data/README.markdown
CHANGED
@@ -1,40 +1,37 @@
|
|
1
|
-
#
|
1
|
+
# Sinatra RDiscount Extension
|
2
2
|
|
3
|
-
The *sinatra-rdiscount*
|
4
|
-
implemented as a gem.
|
5
|
-
It provides a request-helper method named `rdiscount`
|
3
|
+
The *sinatra-rdiscount* extension provides `rdiscount` helper method
|
6
4
|
for rendering RDiscount templates.
|
7
5
|
|
8
|
-
To
|
6
|
+
To install it, run:
|
9
7
|
|
10
|
-
|
11
|
-
cd sinatra-rdiscount
|
12
|
-
gem build sinatra-rdiscount
|
13
|
-
sudo gem install sinatra-rdiscount
|
8
|
+
sudo gem install wbzyl-sinatra-rdiscount -s http://gems.github.com
|
14
9
|
|
15
|
-
|
10
|
+
To test it, create a simple Sinatra application:
|
16
11
|
|
12
|
+
# app.rb
|
17
13
|
require 'rubygems'
|
18
14
|
require 'sinatra'
|
15
|
+
|
16
|
+
gem 'wbzyl-sinatra-rdiscount', '>=0.1.4'
|
19
17
|
require 'sinatra/rdiscount'
|
20
18
|
|
21
19
|
get "/" do
|
22
|
-
rdiscount "# Hello
|
20
|
+
rdiscount "# Hello RDiscount"
|
23
21
|
end
|
24
22
|
|
25
|
-
and run
|
23
|
+
and run it with:
|
26
24
|
|
27
25
|
ruby app.rb
|
28
26
|
|
29
|
-
The result could be seen
|
27
|
+
The result could be seen at *http://localhost:4567*.
|
30
28
|
|
31
|
-
Another example could be find in the *examples* directory.
|
32
|
-
Run it with:
|
29
|
+
Another example could be find in the *examples* directory. Run it with:
|
33
30
|
|
34
31
|
rackup -p 4567 config.ru
|
35
32
|
|
36
|
-
|
37
|
-
|
33
|
+
and visit *http://localhost:4567/hello2* to contemplate the sheer
|
34
|
+
beauty of the rendered "Hello RDiscount".
|
38
35
|
|
39
36
|
|
40
37
|
## Template Languages (*update to The Sinatra Book*)
|
data/Rakefile
CHANGED
@@ -1,21 +1,26 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
|
3
1
|
require 'rake'
|
4
2
|
require 'rake/testtask'
|
5
3
|
require "rake/clean"
|
6
4
|
|
7
5
|
begin
|
8
6
|
require 'jeweler'
|
9
|
-
Jeweler::Tasks.new do |
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
7
|
+
Jeweler::Tasks.new do |gem|
|
8
|
+
gem.name = "sinatra-rdiscount"
|
9
|
+
gem.summary = "Sinatra extension providing RDiscount templates for Sinatra application."
|
10
|
+
gem.email = "matwb@univ.gda.pl"
|
11
|
+
gem.homepage = "http://github.com/wbzyl/sinatra-rdiscount"
|
12
|
+
gem.description = gem.summary
|
13
|
+
gem.authors = ["Wlodek Bzyl"]
|
14
|
+
|
15
|
+
gem.add_runtime_dependency 'sinatra', '>= 0.9.2'
|
16
|
+
gem.add_runtime_dependency 'erubis', '>=2.6.4'
|
17
|
+
gem.add_runtime_dependency 'rdiscount', '>=1.3.4'
|
18
|
+
|
19
|
+
gem.add_development_dependency 'rack', '>=1.0.0'
|
20
|
+
gem.add_development_dependency 'rack-test', '>=0.3.0'
|
21
|
+
|
22
|
+
# gem is a Gem::Specification
|
23
|
+
# refer to http://www.rubygems.org/read/chapter/20 for additional settings
|
19
24
|
end
|
20
25
|
rescue LoadError
|
21
26
|
puts "Jeweler not available."
|
@@ -28,11 +33,3 @@ Rake::TestTask.new(:test) do |t|
|
|
28
33
|
t.pattern = 'test/**/*_test.rb'
|
29
34
|
t.verbose = false
|
30
35
|
end
|
31
|
-
|
32
|
-
desc 'Install the package as a gem.'
|
33
|
-
task :install => [:clean, :build] do
|
34
|
-
gem = Dir['pkg/*.gem'].last
|
35
|
-
sh "sudo gem install --no-rdoc --no-ri --local #{gem}"
|
36
|
-
end
|
37
|
-
|
38
|
-
task :default => :test
|
data/VERSION.yml
CHANGED
data/examples/app.rb
CHANGED
data/examples/mapp.rb
CHANGED
data/sinatra-rdiscount.gemspec
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{sinatra-rdiscount}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["
|
9
|
-
s.date = %q{2009-05-
|
10
|
-
s.description = %q{
|
8
|
+
s.authors = ["Wlodek Bzyl"]
|
9
|
+
s.date = %q{2009-05-22}
|
10
|
+
s.description = %q{Sinatra extension providing RDiscount templates for Sinatra application.}
|
11
11
|
s.email = %q{matwb@univ.gda.pl}
|
12
12
|
s.extra_rdoc_files = [
|
13
13
|
"LICENSE",
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
s.rdoc_options = ["--charset=UTF-8"]
|
38
38
|
s.require_paths = ["lib"]
|
39
39
|
s.rubygems_version = %q{1.3.3}
|
40
|
-
s.summary = %q{
|
40
|
+
s.summary = %q{Sinatra extension providing RDiscount templates for Sinatra application.}
|
41
41
|
s.test_files = [
|
42
42
|
"test/test_helper.rb",
|
43
43
|
"test/sinatra_rdiscount_test.rb",
|
@@ -50,14 +50,23 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.specification_version = 3
|
51
51
|
|
52
52
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
53
|
+
s.add_runtime_dependency(%q<sinatra>, [">= 0.9.2"])
|
53
54
|
s.add_runtime_dependency(%q<erubis>, [">= 2.6.4"])
|
54
55
|
s.add_runtime_dependency(%q<rdiscount>, [">= 1.3.4"])
|
56
|
+
s.add_development_dependency(%q<rack>, [">= 1.0.0"])
|
57
|
+
s.add_development_dependency(%q<rack-test>, [">= 0.3.0"])
|
55
58
|
else
|
59
|
+
s.add_dependency(%q<sinatra>, [">= 0.9.2"])
|
56
60
|
s.add_dependency(%q<erubis>, [">= 2.6.4"])
|
57
61
|
s.add_dependency(%q<rdiscount>, [">= 1.3.4"])
|
62
|
+
s.add_dependency(%q<rack>, [">= 1.0.0"])
|
63
|
+
s.add_dependency(%q<rack-test>, [">= 0.3.0"])
|
58
64
|
end
|
59
65
|
else
|
66
|
+
s.add_dependency(%q<sinatra>, [">= 0.9.2"])
|
60
67
|
s.add_dependency(%q<erubis>, [">= 2.6.4"])
|
61
68
|
s.add_dependency(%q<rdiscount>, [">= 1.3.4"])
|
69
|
+
s.add_dependency(%q<rack>, [">= 1.0.0"])
|
70
|
+
s.add_dependency(%q<rack-test>, [">= 0.3.0"])
|
62
71
|
end
|
63
72
|
end
|
metadata
CHANGED
@@ -1,17 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wbzyl-sinatra-rdiscount
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Wlodek Bzyl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-22 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.2
|
24
|
+
version:
|
15
25
|
- !ruby/object:Gem::Dependency
|
16
26
|
name: erubis
|
17
27
|
type: :runtime
|
@@ -32,7 +42,27 @@ dependencies:
|
|
32
42
|
- !ruby/object:Gem::Version
|
33
43
|
version: 1.3.4
|
34
44
|
version:
|
35
|
-
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: rack
|
47
|
+
type: :development
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.0.0
|
54
|
+
version:
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rack-test
|
57
|
+
type: :development
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 0.3.0
|
64
|
+
version:
|
65
|
+
description: Sinatra extension providing RDiscount templates for Sinatra application.
|
36
66
|
email: matwb@univ.gda.pl
|
37
67
|
executables: []
|
38
68
|
|
@@ -85,7 +115,7 @@ rubyforge_project:
|
|
85
115
|
rubygems_version: 1.2.0
|
86
116
|
signing_key:
|
87
117
|
specification_version: 3
|
88
|
-
summary:
|
118
|
+
summary: Sinatra extension providing RDiscount templates for Sinatra application.
|
89
119
|
test_files:
|
90
120
|
- test/test_helper.rb
|
91
121
|
- test/sinatra_rdiscount_test.rb
|