rblosxom 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ 2011-01-08 00:30:50 +0800 Percy Lau <percy.lau@gmail.com> 0.1.5
2
+ * remove markdown support, only support textile page
3
+
1
4
  2011-01-03 Percy Lau <percy.lau@gmail.com> 0.1.4
2
5
  * see hg log -r 33:26
3
6
 
data/INSTALL CHANGED
@@ -13,8 +13,8 @@ $ rblosxom-demo
13
13
  下载 source
14
14
  $ hg clone https://pernn@bitbucket.org/pernn/rblosxom
15
15
 
16
- 安装 rack, sinatra, haml, rdiscount, itsucks-compass-960-plugin
17
- $ gem install sinatra, haml, rdiscount, itsucks-compass-960-plugin
16
+ 安装 rack, sinatra, haml, RedCloth, itsucks-compass-960-plugin
17
+ $ gem install sinatra, haml, RedCloth, itsucks-compass-960-plugin
18
18
 
19
19
  定制 theme:
20
20
  $ compass -r ninesixty -f 960 --sass-dir=sass --css-dir=stylesheets --javascript-dir=javascripts --images-dir=images public
data/Manifest CHANGED
@@ -3,7 +3,7 @@ ChangeLog
3
3
  INSTALL
4
4
  MIT-LICENSE
5
5
  Manifest
6
- README.mkd
6
+ README.textile
7
7
  Rakefile
8
8
  VERSION
9
9
  bin/rblosxom-demo
data/README.textile ADDED
@@ -0,0 +1,33 @@
1
+ "rblosxom":rblosxom 是一个 "blosxom":blosxom 程序, 它使用了下面的框架和工具:
2
+
3
+ * "sinatra":sinatra
4
+ * "haml":haml
5
+ * "compass-960":compass_960
6
+ * "RedCloth":RedCloth
7
+
8
+ h3. Author
9
+
10
+ Percy Lau <percy.lau@gmail.com>
11
+
12
+ h3. Changelog
13
+
14
+ Please see the "Changelog":changelog.
15
+
16
+ h3. Install
17
+
18
+ Please see the "INSTALL":install.
19
+
20
+ h3. License
21
+
22
+ Released under "MIT License":license.
23
+
24
+
25
+ [blosxom]http://blosxom.sourceforge.net/
26
+ [rblosxom]http://bitbucket.org/pernn/rblosxom/
27
+ [sinatra]http://www.sinatrarb.com/
28
+ [haml]http://haml.hamptoncatlin.com/
29
+ [compass_960]http://github.com/chriseppstein/compass-960-plugin/
30
+ [RedCloth]http://redcloth.org/
31
+ [license]http://bitbucket.org/pernn/rblosxom/src/tip/MIT-LICENSE
32
+ [install]http://bitbucket.org/pernn/rblosxom/src/tip/INSTALL
33
+ [changelog]http://bitbucket.org/pernn/rblosxom/src/tip/ChangeLog
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ begin
7
7
  p.url = "http://rblosxom.heroku.com"
8
8
  p.author = ['Percy Lau']
9
9
  p.email = "percy.lau@gmail.com"
10
- p.runtime_dependencies = ['sinatra', 'haml', 'rdiscount']
10
+ p.runtime_dependencies = ['sinatra', 'haml', 'RedCloth']
11
11
  p.development_dependencies = ['itsucks-compass-960-plugin']
12
12
  p.has_rdoc = false
13
13
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
data/config/main.yml CHANGED
@@ -7,7 +7,6 @@ datadir: ./data/main
7
7
  url: http://rblosxom.heroku.com/
8
8
  depth: 0
9
9
  num_entries: 40
10
- file_extension: mkd
11
10
  default_flavour: html
12
11
  show_future_entries: 0
13
12
  theme: default
data/config/wiki.yml CHANGED
@@ -7,7 +7,6 @@ datadir: ./data/wiki
7
7
  url: http://rblosxom.heroku.com/
8
8
  depth: 0
9
9
  num_entries: 40
10
- file_extension: mkd
11
10
  default_flavour: html
12
11
  show_future_entries: 0
13
12
  theme: default
data/demo/main.rb CHANGED
@@ -6,9 +6,9 @@ module Rblosxom
6
6
  set_common_variables
7
7
  @log.info "Main start"
8
8
  @log.debug "Main debug"
9
- index_file = File.expand_path("#{@root}/#{@config["datadir"]}/main.mkd")
9
+ index_file = File.expand_path("#{@root}/#{@config["datadir"]}/main.textile")
10
10
  unless File.exist?(index_file)
11
- index_file = File.expand_path("#{@root}/README.mkd")
11
+ index_file = File.expand_path("#{@root}/README.textile")
12
12
  end
13
13
  content = File.read(index_file)
14
14
  haml :index, :layout => true, :locals => { :content => content }
data/demo/wiki_render.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'rblosxom/base'
2
- require 'rdiscount'
3
2
 
4
3
  module Rblosxom
5
4
  class Base < Sinatra::Base
@@ -18,7 +17,7 @@ module Rblosxom
18
17
 
19
18
  def pages
20
19
  Dir.chdir(File.expand_path("#{@root}/#{@config["datadir"]}")) {
21
- (Dir["**/*.mkd"] + Dir["**/*.markdown"] + Dir["**/*.textile"]).sort
20
+ Dir["**/*.textile"].sort
22
21
  }
23
22
  end
24
23
  end
@@ -46,18 +45,7 @@ module Rblosxom
46
45
  request_file = File.expand_path("#{@root}/#{@config["datadir"]}/#{request.env["PATH_INFO"][1..-1]}")
47
46
  @log.debug "Wiki Render request file: #{request_file}"
48
47
  begin
49
- content = File.open(request_file) do |file|
50
- ext = request_file.split(".")[-1];
51
- case ext
52
- when "markdown", "mkd"
53
- RDiscount.new(file.read).to_html
54
- when "textile"
55
- RedCloth.new(file.read).to_html
56
- else
57
- file.read
58
- end
59
- end
60
- haml :wiki, :layout => true, :locals => { :content => content }
48
+ haml :wiki, :layout => true, :locals => { :content => File.read(request_file) }
61
49
  rescue
62
50
  #raise Sinatra::NotFound
63
51
  halt 404, 'page not found!'
data/lib/rblosxom/base.rb CHANGED
@@ -46,7 +46,7 @@ module Rblosxom
46
46
  def category_list
47
47
  list = []
48
48
  Dir["#{options.config["datadir"]}/**/*"].each do |path|
49
- list.push([path, Dir["#{path}/*.#{options.config["file_extension"]}"].length]) if File.directory? path
49
+ list.push([path, Dir["#{path}/*.textile]}"].length]) if File.directory? path
50
50
  end
51
51
  list
52
52
  end
@@ -76,7 +76,6 @@ module Rblosxom
76
76
  url: http://rblosxom.heroku.com/
77
77
  depth: 0
78
78
  num_entries: 40
79
- file_extension: mkd
80
79
  default_flavour: html
81
80
  show_future_entries: 0
82
81
  theme: default
data/rblosxom.gemspec CHANGED
@@ -2,19 +2,19 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rblosxom}
5
- s.version = "0.1.4"
5
+ s.version = "0.1.5"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Percy Lau"]
9
- s.date = %q{2011-01-03}
9
+ s.date = %q{2011-01-09}
10
10
  s.default_executable = %q{rblosxom-demo}
11
11
  s.description = %q{Rblosxom is a blosxom program written in ruby.}
12
12
  s.email = %q{percy.lau@gmail.com}
13
13
  s.executables = ["rblosxom-demo"]
14
- s.extra_rdoc_files = ["README.mkd", "bin/rblosxom-demo", "lib/rblosxom.rb", "lib/rblosxom/base.rb"]
15
- s.files = ["AUTHORS", "ChangeLog", "INSTALL", "MIT-LICENSE", "Manifest", "README.mkd", "Rakefile", "VERSION", "bin/rblosxom-demo", "config/rackup.ru", "config/main.yml", "config/wiki.yml", "demo/grid.rb", "demo/main.rb", "demo/wiki_render.rb", "lib/rblosxom.rb", "lib/rblosxom/base.rb", "public/config.rb", "public/images/12_col.gif", "public/images/16_col.gif", "public/sass/grid.sass", "public/sass/screen.sass", "public/stylesheets/grid.css", "public/stylesheets/screen.css", "rblosxom.gemspec", "views/footer.haml", "views/grid.haml", "views/header.haml", "views/index.haml", "views/layout.haml", "views/404.haml", "views/500.haml", "views/wiki.haml", "views/wikis.haml"]
14
+ s.extra_rdoc_files = ["README.textile", "bin/rblosxom-demo", "lib/rblosxom.rb", "lib/rblosxom/base.rb"]
15
+ s.files = ["AUTHORS", "ChangeLog", "INSTALL", "MIT-LICENSE", "Manifest", "README.textile", "Rakefile", "VERSION", "bin/rblosxom-demo", "config/rackup.ru", "config/main.yml", "config/wiki.yml", "demo/grid.rb", "demo/main.rb", "demo/wiki_render.rb", "lib/rblosxom.rb", "lib/rblosxom/base.rb", "public/config.rb", "public/images/12_col.gif", "public/images/16_col.gif", "public/sass/grid.sass", "public/sass/screen.sass", "public/stylesheets/grid.css", "public/stylesheets/screen.css", "rblosxom.gemspec", "views/footer.haml", "views/grid.haml", "views/header.haml", "views/index.haml", "views/layout.haml", "views/404.haml", "views/500.haml", "views/wiki.haml", "views/wikis.haml"]
16
16
  s.homepage = %q{http://rblosxom.heroku.com}
17
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rblosxom", "--main", "README.mkd"]
17
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rblosxom", "--main", "README.textile"]
18
18
  s.require_paths = ["lib"]
19
19
  s.rubyforge_project = %q{rblosxom}
20
20
  s.rubygems_version = %q{1.3.7}
@@ -27,18 +27,18 @@ Gem::Specification.new do |s|
27
27
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
28
28
  s.add_runtime_dependency(%q<sinatra>, [">= 0"])
29
29
  s.add_runtime_dependency(%q<haml>, [">= 0"])
30
- s.add_runtime_dependency(%q<rdiscount>, [">= 0"])
30
+ s.add_runtime_dependency(%q<RedCloth>, [">= 0"])
31
31
  s.add_development_dependency(%q<itsucks-compass-960-plugin>, [">= 0"])
32
32
  else
33
33
  s.add_dependency(%q<sinatra>, [">= 0"])
34
34
  s.add_dependency(%q<haml>, [">= 0"])
35
- s.add_dependency(%q<rdiscount>, [">= 0"])
35
+ s.add_dependency(%q<RedCloth>, [">= 0"])
36
36
  s.add_dependency(%q<itsucks-compass-960-plugin>, [">= 0"])
37
37
  end
38
38
  else
39
39
  s.add_dependency(%q<sinatra>, [">= 0"])
40
40
  s.add_dependency(%q<haml>, [">= 0"])
41
- s.add_dependency(%q<rdiscount>, [">= 0"])
41
+ s.add_dependency(%q<RedCloth>, [">= 0"])
42
42
  s.add_dependency(%q<itsucks-compass-960-plugin>, [">= 0"])
43
43
  end
44
44
  end
data/views/index.haml CHANGED
@@ -2,7 +2,7 @@
2
2
  #header= haml :header, :layout => false
3
3
  #main.clearfix
4
4
  .g12
5
- :markdown
5
+ :textile
6
6
  #{content}
7
7
 
8
8
  #footer
data/views/wiki.haml CHANGED
@@ -2,7 +2,8 @@
2
2
  #header= haml :header, :layout => false
3
3
  #main.clearfix
4
4
  .g12
5
- #{content}
5
+ :textile
6
+ #{content}
6
7
 
7
8
  #footer
8
9
  .inner= haml :footer, :layout => false, :locals => { }
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 4
9
- version: 0.1.4
8
+ - 5
9
+ version: 0.1.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Percy Lau
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-03 00:00:00 +08:00
17
+ date: 2011-01-09 00:00:00 +08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -44,7 +44,7 @@ dependencies:
44
44
  type: :runtime
45
45
  version_requirements: *id002
46
46
  - !ruby/object:Gem::Dependency
47
- name: rdiscount
47
+ name: RedCloth
48
48
  prerelease: false
49
49
  requirement: &id003 !ruby/object:Gem::Requirement
50
50
  none: false
@@ -76,7 +76,7 @@ executables:
76
76
  extensions: []
77
77
 
78
78
  extra_rdoc_files:
79
- - README.mkd
79
+ - README.textile
80
80
  - bin/rblosxom-demo
81
81
  - lib/rblosxom.rb
82
82
  - lib/rblosxom/base.rb
@@ -86,7 +86,7 @@ files:
86
86
  - INSTALL
87
87
  - MIT-LICENSE
88
88
  - Manifest
89
- - README.mkd
89
+ - README.textile
90
90
  - Rakefile
91
91
  - VERSION
92
92
  - bin/rblosxom-demo
@@ -126,7 +126,7 @@ rdoc_options:
126
126
  - --title
127
127
  - Rblosxom
128
128
  - --main
129
- - README.mkd
129
+ - README.textile
130
130
  require_paths:
131
131
  - lib
132
132
  required_ruby_version: !ruby/object:Gem::Requirement
data/README.mkd DELETED
@@ -1,34 +0,0 @@
1
- [rblosxom][rblosxom]是一个[blosxom][blosxom]程序,
2
- 它使用了下面的框架和工具:
3
-
4
- - [sinatra][sinatra]
5
- - [haml][haml]
6
- - [rdiscount][rdiscount]
7
- - [compass-960][compass_960]
8
-
9
- Author
10
- ------
11
- Percy Lau <percy.lau@gmail.com>
12
-
13
- Changelog
14
- ---------
15
- Please see the [Changelog][changelog].
16
-
17
- Install
18
- -------
19
- Please see the [INSTALL][install].
20
-
21
- License
22
- -------
23
- Released under [MIT License][license].
24
-
25
-
26
- [blosxom]: http://blosxom.sourceforge.net/
27
- [sinatra]: http://www.sinatrarb.com/
28
- [haml]: http://haml.hamptoncatlin.com/
29
- [rdiscount]: http://github.com/rtomayko/rdiscount/
30
- [compass_960]: http://github.com/chriseppstein/compass-960-plugin/
31
- [rblosxom]: http://bitbucket.org/pernn/rblosxom/
32
- [license]: http://bitbucket.org/pernn/rblosxom/src/tip/MIT-LICENSE
33
- [install]: http://bitbucket.org/pernn/rblosxom/src/tip/INSTALL
34
- [changelog]: http://bitbucket.org/pernn/rblosxom/src/tip/ChangeLog