rblosxom 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ 2011-01-01 Percy Lau <percy.lau@gmail.com> 0.1.3
2
+ * Added wiki_render, Up to ruby1.9
3
+
4
+ 2010-03-22 Percy Lau <percy.lau@gmail.com> 0.1.3b
5
+ * Added itsucks-compass-960-plugin
6
+
1
7
  2010-01-19 Percy Lau <percy.lau@gmail.com> 0.1.2
2
8
  * Added logger handler, category_list and archive_list helper
3
9
 
data/INSTALL CHANGED
@@ -1,25 +1,26 @@
1
- INSTALL
2
- -------
1
+ == INSTALL
3
2
 
4
3
  安装 rblosxom gem:
5
4
  $ gem install rblosxom --source http://gemcutter.org
6
5
 
7
6
  运行 demo:
8
- $ rbloxom-demo
7
+ $ rblosxom-demo
9
8
 
10
9
  通过浏览器访问 http://127.0.0.1:7878/
11
10
 
12
- HACKING
13
- -------
11
+ == HACKING
14
12
 
15
13
  下载 source
16
- $ hg clone https://itsucks@bitbucket.org/itsucks/rblosxom
14
+ $ hg clone https://pernn@bitbucket.org/pernn/rblosxom
17
15
 
18
- 需要安装 sinatra, haml, rdiscount, compass, compass-960-plugin
19
- $ gem install sinatra, haml, rdiscount, compass, compass-960-plugin
16
+ 安装 rack, sinatra, haml, rdiscount, itsucks-compass-960-plugin
17
+ $ gem install sinatra, haml, rdiscount, itsucks-compass-960-plugin
20
18
 
21
19
  定制 theme:
22
20
  $ compass -r ninesixty -f 960 --sass-dir=sass --css-dir=stylesheets --javascript-dir=javascripts --images-dir=images public
23
21
 
24
22
  更新 css:
25
23
  $ compass -u public
24
+
25
+ 运行:
26
+ $ rackup config/rackup.ru
data/Manifest ADDED
@@ -0,0 +1,32 @@
1
+ AUTHORS
2
+ ChangeLog
3
+ INSTALL
4
+ MIT-LICENSE
5
+ Manifest
6
+ README.mkd
7
+ Rakefile
8
+ VERSION
9
+ bin/rblosxom-demo
10
+ config/rackup.ru
11
+ demo/grid.rb
12
+ demo/main.rb
13
+ demo/wiki_render.rb
14
+ lib/rblosxom.rb
15
+ lib/rblosxom/base.rb
16
+ public/config.rb
17
+ public/images/12_col.gif
18
+ public/images/16_col.gif
19
+ public/sass/grid.sass
20
+ public/sass/screen.sass
21
+ public/stylesheets/grid.css
22
+ public/stylesheets/screen.css
23
+ rblosxom.gemspec
24
+ views/footer.haml
25
+ views/grid.haml
26
+ views/header.haml
27
+ views/index.haml
28
+ views/layout.haml
29
+ views/404.haml
30
+ views/500.haml
31
+ views/wiki.haml
32
+ views/wikis.haml
@@ -6,8 +6,6 @@
6
6
  - [rdiscount][rdiscount]
7
7
  - [compass-960][compass_960]
8
8
 
9
- 目前版本0.1.2
10
-
11
9
  Author
12
10
  ------
13
11
  Percy Lau <percy.lau@gmail.com>
@@ -30,7 +28,7 @@ Released under [MIT License][license].
30
28
  [haml]: http://haml.hamptoncatlin.com/
31
29
  [rdiscount]: http://github.com/rtomayko/rdiscount/
32
30
  [compass_960]: http://github.com/chriseppstein/compass-960-plugin/
33
- [rblosxom]: http://bitbucket.org/itsucks/rblosxom/
34
- [license]: http://bitbucket.org/itsucks/rblosxom/src/tip/MIT-LICENSE
35
- [install]: http://bitbucket.org/itsucks/rblosxom/src/tip/INSTALL
36
- [changelog]: http://bitbucket.org/itsucks/rblosxom/src/tip/ChangeLog
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
data/Rakefile ADDED
@@ -0,0 +1,18 @@
1
+ begin
2
+ require 'echoe'
3
+
4
+ Echoe.new('rblosxom', open('VERSION').read) do |p|
5
+ p.summary = "Ruby based blosxom."
6
+ p.description = "Rblosxom is a blosxom program written in ruby."
7
+ p.url = "http://rblosxom.heroku.com"
8
+ p.author = ['Percy Lau']
9
+ p.email = "percy.lau@gmail.com"
10
+ p.runtime_dependencies = ['sinatra', 'haml', 'rdiscount']
11
+ p.development_dependencies = ['itsucks-compass-960-plugin']
12
+ p.has_rdoc = false
13
+ end
14
+
15
+ rescue LoadError => boom
16
+ puts "You are missing a dependency required for meta-operations on this gem."
17
+ puts "#{boom.to_s.capitalize}."
18
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.3
data/config/rackup.ru CHANGED
@@ -1,7 +1,10 @@
1
1
  require 'sinatra'
2
+ require 'logger'
2
3
  begin
3
4
  require 'rblosxom'
4
5
  rescue LoadError => e
6
+ topdir = File.expand_path("../", File.dirname(__FILE__))
7
+ $LOAD_PATH.unshift(topdir) unless $LOAD_PATH.include?(topdir)
5
8
  require 'lib/rblosxom'
6
9
  end
7
10
 
@@ -11,6 +14,7 @@ set :environment, :development
11
14
  $LOAD_PATH.unshift File.expand_path("../demo", File.dirname(__FILE__))
12
15
 
13
16
  require 'main'
17
+ Rblosxom::Main.log_level = Logger::DEBUG
14
18
  map "/" do
15
19
  run Rblosxom::Main
16
20
  end
@@ -19,3 +23,8 @@ require 'grid'
19
23
  map '/grid' do
20
24
  run Rblosxom::Grid
21
25
  end
26
+
27
+ require 'wiki_render'
28
+ map '/wiki' do
29
+ run Rblosxom::Wiki
30
+ end
data/demo/main.rb CHANGED
@@ -5,8 +5,9 @@ module Rblosxom
5
5
  get '/?' do
6
6
  set_common_variables
7
7
  @log.info "Main start"
8
- content = File.read(File.expand_path("../README.rdoc", File.dirname(__FILE__)))
9
- haml :index, :layout => true, :locals => { :readme => content }
8
+ @log.debug "Main debug"
9
+ content = File.read(File.expand_path("../README.mkd", File.dirname(__FILE__)))
10
+ haml :index, :layout => true, :locals => { :content => content }
10
11
  end
11
12
  end
12
13
  end
@@ -0,0 +1,67 @@
1
+ require 'rblosxom/base'
2
+ require 'rdiscount'
3
+
4
+ module Rblosxom
5
+ class Base < Sinatra::Base
6
+ not_found do
7
+ haml :'404', :layout => false
8
+ end
9
+
10
+ error do
11
+ haml :'500', :layout => false
12
+ end
13
+
14
+ helpers do
15
+ def title
16
+ File.basename(Dir.getwd).gsub(/_/, ' ')
17
+ end
18
+
19
+ def pages
20
+ (Dir["**/*.mkd"] + Dir["**/*.markdown"] + Dir["**/*.textile"]).sort
21
+ end
22
+ end
23
+ end
24
+
25
+ class Wiki < Base
26
+ get '/?' do
27
+ set_common_variables
28
+ @log.info "Wiki Render start"
29
+ @log.debug "Wiki Render debug"
30
+
31
+ # If there is only one file present, serve that instantly.`
32
+ redirect "/wiki/#{pages.first}", 302 if pages.size == 1
33
+
34
+ haml :wikis, :layout => true
35
+ end
36
+
37
+ page_regex = '(?:/[.\w]+)+'
38
+ page_url = %r@^(#{page_regex})\b$@
39
+ get page_url do
40
+ set_common_variables
41
+ @log.info "Wiki Render #{request.env["PATH_INFO"]}"
42
+ @log.info "Wiki Render #{params[:captures]}"
43
+
44
+ request_file = request.env["PATH_INFO"][1..-1]
45
+ begin
46
+ content = File.open(request_file) do |file|
47
+ ext = request_file.split(".")[-1];
48
+ case ext
49
+ when "markdown", "mkd"
50
+ RDiscount.new(file.read).to_html
51
+ when "textile"
52
+ RedCloth.new(file.read).to_html
53
+ else
54
+ file.read
55
+ end
56
+ end
57
+ haml :wiki, :layout => true, :locals => { :content => content }
58
+ rescue
59
+ #raise Sinatra::NotFound
60
+ halt 404, 'page not found!'
61
+ end
62
+ end
63
+ end
64
+ end
65
+
66
+ # vim: ft=ruby:fenc=utf-8:sw=4:ts=4:sts=4:et:
67
+ # wiki_render.rb end here
data/lib/rblosxom/base.rb CHANGED
@@ -14,7 +14,7 @@ module Rblosxom
14
14
 
15
15
  module Helpers
16
16
  def set_common_variables
17
- require 'ftools'
17
+ require 'fileutils'
18
18
  require 'logger'
19
19
  @config = options.config
20
20
  @log = Proc.new {
@@ -32,7 +32,7 @@ module Rblosxom
32
32
  log = Logger.new(STDOUT)
33
33
  end
34
34
  log.progname = "#{::Rblosxom.name}"
35
- log.level = Logger::INFO
35
+ log.level = options.log_level ? options.log_level : Logger::INFO
36
36
  log.datetime_format = "%Y-%m-%d %H:%M:%S %Z "
37
37
  log
38
38
  }.call
@@ -86,6 +86,7 @@ module Rblosxom
86
86
  class << self
87
87
  attr_accessor :config_file
88
88
  attr_accessor :log_file
89
+ attr_accessor :log_level
89
90
  attr_reader :config
90
91
  end
91
92
  set :config, Proc.new { config_file ? YAML::load(File.read(config_file)) : CONFIG }
data/public/config.rb ADDED
@@ -0,0 +1,13 @@
1
+ require 'ninesixty'
2
+ # Require any additional compass plugins here.
3
+
4
+ project_type = :stand_alone
5
+ # Set this to the root of your project when deployed:
6
+ http_path = "/"
7
+ css_dir = "stylesheets"
8
+ sass_dir = "sass"
9
+ images_dir = "images"
10
+ javascripts_dir = "javascripts"
11
+ output_style = :compact
12
+ # To enable relative paths to assets via compass helper functions. Uncomment:
13
+ # relative_assets = true
@@ -1,11 +1,17 @@
1
- // Layout
2
- // %body
3
- // #wrap
4
- // #header
5
- // #main.clearfix
6
- // .g12
7
- // .g16
8
- // #footer
1
+ /*
2
+ 960 Grid System ~ Core CSS.
3
+ Learn more ~ http://960.gs/
4
+
5
+ Licensed under GPL and MIT.
6
+
7
+ /* Layout
8
+ /* %body
9
+ /* #wrap
10
+ /* #header
11
+ /* #main.clearfix
12
+ /* .g12
13
+ /* .g16
14
+ /* #footer
9
15
 
10
16
  /* @import compass/reset.sass
11
17
  /* +global-reset
@@ -15,9 +21,8 @@
15
21
  @import 960/text.sass
16
22
  +text
17
23
 
18
- @import _grid.sass
19
- @import _debug.sass
20
- @import _sticky_footer.sass
24
+ @import 960/debug.sass
25
+ @import 960/sticky_footer.sass
21
26
 
22
27
  !background_color = #123
23
28
  !text_color = #27261f
@@ -78,6 +83,6 @@ body
78
83
 
79
84
  +sticky-footer(!footer_height, "#wrap", "#main", "#footer")
80
85
 
81
- // Debug
82
- +showgrid(".g12")
83
- +showgrid(".g16", !col_16)
86
+ /* Debug
87
+ +showgrid_12(".g12")
88
+ +showgrid_16(".g16")
@@ -1,12 +1,19 @@
1
- // Layout
2
- // %body
3
- // #wrap
4
- // #header
5
- // #main.clearfix
6
- // .g12
7
- // .content
8
- // .sidebar
9
- // #footer
1
+ /*
2
+ 960 Grid System ~ Core CSS.
3
+ Learn more ~ http://960.gs/
4
+
5
+ Licensed under GPL and MIT.
6
+
7
+ /*
8
+ Layout
9
+ %body
10
+ #wrap
11
+ #header
12
+ #main.clearfix
13
+ .g12
14
+ .content
15
+ .sidebar
16
+ #footer
10
17
 
11
18
  /* @import compass/reset.sass
12
19
  /* +global-reset
@@ -16,12 +23,11 @@
16
23
  @import 960/text.sass
17
24
  +text
18
25
 
19
- @import _grid.sass
20
- @import _debug.sass
21
- @import _sticky_footer.sass
26
+ @import 960/debug.sass
27
+ @import 960/sticky_footer.sass
22
28
 
23
- !background_color = white
24
- !text_color = #666
29
+ !background_color = #F1F1F1
30
+ !text_color = black
25
31
  !header_height = 80px
26
32
  !footer_height = 3em
27
33
 
@@ -40,20 +46,25 @@ body
40
46
  +grid-pushs
41
47
  +grid-pulls
42
48
  +grid-children
49
+ :-moz-border-radius 10px
50
+ :-webkit-border-radius 10px
51
+ :background-color white
52
+ :padding-top 1em
53
+ :border 3px solid #CCC
43
54
 
44
55
  #header
45
56
  :height= !header_height
46
- :border-bottom 2px solid #F90
47
57
  h1
48
58
  +grid(6,12)
49
- :color #F90
50
59
  :letter-spacing -1px
51
60
  :margin 30px 0px 0px 15px
52
61
  :padding 0
53
62
  :font-weight normal
63
+ :color #383
54
64
  span
65
+ :color black
55
66
  :font-size 16px
56
- :color #FFC875
67
+ :color #CCC
57
68
  ul
58
69
  +grid(6,12)
59
70
  :list-style-type none
@@ -65,29 +76,25 @@ body
65
76
  :display inline
66
77
  :margin 0 0 0 10px
67
78
  a
68
- :text-decoration none
69
- :color #999
70
- :font-weight bold
71
79
  &.active
72
80
  :text-decoration none
73
- :color #F90
74
81
  :font-weight bold
75
82
  &:hover
76
83
  :text-decoration none
77
- :color #333
78
84
 
79
85
  #main
86
+ a
87
+ &:hover
88
+ :text-decoration none
80
89
  p
81
90
  :margin 0 15px 15px 15px
82
91
  h1
83
- :color #F90
84
92
  :font-size 140%
85
93
  h2, h3
86
94
  :margin 0 0 15px 0
87
95
  :padding 5px 15px
88
96
  :font-size 120%
89
97
  :font-weight normal
90
- :color #F90
91
98
  :border-bottom 1px solid #E5E5E5
92
99
  .content
93
100
  +grid(9,12)
@@ -106,13 +113,8 @@ body
106
113
  #footer
107
114
  .inner
108
115
  +grid(12,12)
109
- :border-top 2px solid #F90
110
- :color #999
111
116
  a
112
- :color #999
113
- :text-decoration none
114
117
  &:hover
115
- :color #F90
116
118
  :text-decoration none
117
119
  .left
118
120
  :float left
@@ -122,5 +124,5 @@ body
122
124
 
123
125
  +sticky-footer(!footer_height, "#wrap", "#main", "#footer")
124
126
 
125
- // Debug
126
- /* +showgrid(".g12")
127
+ /* Debug
128
+ /* +showgrid_12(".g12")
@@ -1,3 +1,12 @@
1
+ /* 960 Grid System ~ Core CSS. Learn more ~ http://960.gs/ Licensed under GPL and MIT. */
2
+ /* Layout */
3
+ /* %body */
4
+ /* #wrap */
5
+ /* #header */
6
+ /* #main.clearfix */
7
+ /* .g12 */
8
+ /* .g16 */
9
+ /* #footer */
1
10
  /* @import compass/reset.sass */
2
11
  /* +global-reset */
3
12
  body { font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif; }
@@ -26,10 +35,6 @@ li { margin-left: 30px; }
26
35
 
27
36
  p, dl, hr, h1, h2, h3, h4, h5, h6, ol, ul, pre, table, address, fieldset { margin-bottom: 20px; }
28
37
 
29
- /* add 960 pull, push classes */
30
-
31
- /* selector= container */
32
-
33
38
  body { background-color: #112233; color: #27261f; }
34
39
 
35
40
  #header, #footer, .g12, .g16 { margin-left: auto; margin-right: auto; width: 960px; overflow: hidden; display: inline-block; }
@@ -205,6 +210,7 @@ body > #wrap { height: auto; min-height: 100%; }
205
210
  .clearfix { display: block; }
206
211
 
207
212
  /* End hide from IE-mac */
208
- .g12 { background-image: url('/images/12_col.gif?1261547183'); background-repeat: repeat-y; }
213
+ /* Debug */
214
+ .g12 { background-image: url('/images/12_col.gif?1269189232'); background-repeat: repeat-y; }
209
215
 
210
- .g16 { background-image: url('/images/16_col.gif?1261547183'); background-repeat: repeat-y; }
216
+ .g16 { background-image: url('/images/16_col.gif?1269189232'); background-repeat: repeat-y; }
@@ -1,3 +1,5 @@
1
+ /* 960 Grid System ~ Core CSS. Learn more ~ http://960.gs/ Licensed under GPL and MIT. */
2
+ /* Layout %body #wrap #header #main.clearfix .g12 .content .sidebar #footer */
1
3
  /* @import compass/reset.sass */
2
4
  /* +global-reset */
3
5
  body { font: 13px/1.5 Helvetica, Arial, 'Liberation Sans', FreeSans, sans-serif; }
@@ -26,15 +28,12 @@ li { margin-left: 30px; }
26
28
 
27
29
  p, dl, hr, h1, h2, h3, h4, h5, h6, ol, ul, pre, table, address, fieldset { margin-bottom: 20px; }
28
30
 
29
- /* add 960 pull, push classes */
30
-
31
- /* selector= container */
32
-
33
- body { background-color: white; color: #666666; }
31
+ body { background-color: #f1f1f1; color: black; }
34
32
 
35
33
  #header, #footer, .g12 { margin-left: auto; margin-right: auto; width: 960px; overflow: hidden; display: inline-block; }
36
34
  #header, #footer, .g12 { display: block; }
37
35
 
36
+ .g12 { -moz-border-radius: 10px; -webkit-border-radius: 10px; background-color: white; padding-top: 1em; border: 3px solid #CCC; }
38
37
  .g12 .grid_1, .g12 .grid_2, .g12 .grid_3, .g12 .grid_4, .g12 .grid_5, .g12 .grid_6, .g12 .grid_7, .g12 .grid_8, .g12 .grid_9, .g12 .grid_10, .g12 .grid_11, .g12 .grid_12 { display: inline; float: left; margin-left: 10px; margin-right: 10px; }
39
38
  .g12 .grid_1 { width: 60px; }
40
39
  .g12 .grid_2 { width: 140px; }
@@ -95,26 +94,25 @@ body { background-color: white; color: #666666; }
95
94
  .g12 .alpha { margin-left: 0; }
96
95
  .g12 .omega { margin-right: 0; }
97
96
 
98
- #header { height: 80px; border-bottom: 2px solid #F90; }
99
- #header h1 { display: inline; float: left; margin-left: 10px; margin-right: 10px; width: 460px; color: #F90; letter-spacing: -1px; margin: 30px 0px 0px 15px; padding: 0; font-weight: normal; }
100
- #header h1 span { font-size: 16px; color: #FFC875; }
97
+ #header { height: 80px; }
98
+ #header h1 { display: inline; float: left; margin-left: 10px; margin-right: 10px; width: 460px; letter-spacing: -1px; margin: 30px 0px 0px 15px; padding: 0; font-weight: normal; color: #383; }
99
+ #header h1 span { color: black; font-size: 16px; color: #CCC; }
101
100
  #header ul { display: inline; float: left; margin-left: 10px; margin-right: 10px; width: 460px; list-style-type: none; text-align: right; color: #CCC; padding: 0; margin: 40px 15px 0 0; }
102
101
  #header ul li { display: inline; margin: 0 0 0 10px; }
103
- #header ul li a { text-decoration: none; color: #999; font-weight: bold; }
104
- #header ul li a.active { text-decoration: none; color: #F90; font-weight: bold; }
105
- #header ul li a:hover { text-decoration: none; color: #333; }
102
+ #header ul li a.active { text-decoration: none; font-weight: bold; }
103
+ #header ul li a:hover { text-decoration: none; }
106
104
 
105
+ #main a:hover { text-decoration: none; }
107
106
  #main p { margin: 0 15px 15px 15px; }
108
- #main h1 { color: #F90; font-size: 140%; }
109
- #main h2, #main h3 { margin: 0 0 15px 0; padding: 5px 15px; font-size: 120%; font-weight: normal; color: #F90; border-bottom: 1px solid #E5E5E5; }
107
+ #main h1 { font-size: 140%; }
108
+ #main h2, #main h3 { margin: 0 0 15px 0; padding: 5px 15px; font-size: 120%; font-weight: normal; border-bottom: 1px solid #E5E5E5; }
110
109
  #main .content { display: inline; float: left; margin-left: 10px; margin-right: 10px; width: 700px; }
111
110
  #main .content img { border: 1px solid #CDCDCD; float: left; margin: 0px 15px 5px; padding: 5px; }
112
111
  #main .sidebar { display: inline; float: left; margin-left: 10px; margin-right: 10px; width: 220px; }
113
112
  #main .sidebar p.title { margin: 0px 20px; font-weight: bold; font-style: oblique; }
114
113
 
115
- #footer .inner { display: inline; float: left; margin-left: 10px; margin-right: 10px; width: 940px; border-top: 2px solid #F90; color: #999; }
116
- #footer .inner a { color: #999; text-decoration: none; }
117
- #footer .inner a:hover { color: #F90; text-decoration: none; }
114
+ #footer .inner { display: inline; float: left; margin-left: 10px; margin-right: 10px; width: 940px; }
115
+ #footer .inner a:hover { text-decoration: none; }
118
116
  #footer .inner .left { float: left; }
119
117
  #footer .inner .right { float: right; text-align: right; }
120
118
 
@@ -138,4 +136,5 @@ body > #wrap { height: auto; min-height: 100%; }
138
136
  .clearfix { display: block; }
139
137
 
140
138
  /* End hide from IE-mac */
141
- /* +showgrid(".g12") */
139
+ /* Debug */
140
+ /* +showgrid_12(".g12") */
data/rblosxom.gemspec CHANGED
@@ -1,41 +1,44 @@
1
- Gem::Specification.new do |s|
2
- s.name = 'rblosxom'
3
- s.version = '0.1.2'
4
- s.date = '2010-01-19'
1
+ # -*- encoding: utf-8 -*-
5
2
 
6
- s.description = "Ruby based Blosxom."
7
- s.summary = "rblosxom is a Blosxom program written in ruby."
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{rblosxom}
5
+ s.version = "0.1.3"
8
6
 
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
9
8
  s.authors = ["Percy Lau"]
10
- s.email = "percy.lau@gmail.com"
11
- s.requirements << 'Ruby, version 1.8.0 (or newer)'
12
-
13
- # = MANIFEST =
14
- s.files = Dir["lib/**/*.rb",
15
- "bin/rblosxom-demo",
16
- "README.rdoc",
17
- "INSTALL",
18
- "ChangeLog",
19
- "MIT-LICENSE",
20
- "AUTHORS",
21
- "config/rackup.ru",
22
- "demo/*.rb",
23
- "public/**/*.gif",
24
- "public/**/*.sass",
25
- "public/**/*.css",
26
- "views/**/*.haml",
27
- "rblosxom.gemspec"]
28
- # = MANIFEST =
29
-
9
+ s.date = %q{2011-01-01}
10
+ s.default_executable = %q{rblosxom-demo}
11
+ s.description = %q{Rblosxom is a blosxom program written in ruby.}
12
+ s.email = %q{percy.lau@gmail.com}
30
13
  s.executables = ["rblosxom-demo"]
31
- s.extra_rdoc_files = %w[README.rdoc MIT-LICENSE]
32
- s.add_dependency 'sinatra', '>= 0.9.4'
33
- s.add_dependency 'haml', '>= 2.2.14'
34
- s.add_dependency 'rdiscount', '>= 1.5.5'
35
- s.add_development_dependency 'compass-960-plugin', '>= 0.9.11', '< 1.0'
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", "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
+ s.homepage = %q{http://rblosxom.heroku.com}
17
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Rblosxom", "--main", "README.mkd"]
18
+ s.require_paths = ["lib"]
19
+ s.rubyforge_project = %q{rblosxom}
20
+ s.rubygems_version = %q{1.3.7}
21
+ s.summary = %q{Ruby based blosxom.}
22
+
23
+ if s.respond_to? :specification_version then
24
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
+ s.specification_version = 3
36
26
 
37
- s.has_rdoc = true
38
- s.homepage = "http://rblosxom.heroku.com/"
39
- s.rubygems_version = '1.3.5'
40
- s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "#{s.name} #{s.version}", "--main", "README.rdoc", "--webcvs", "http://bitbucket.org/itsucks/#{s.name}"]
27
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
28
+ s.add_runtime_dependency(%q<sinatra>, [">= 0"])
29
+ s.add_runtime_dependency(%q<haml>, [">= 0"])
30
+ s.add_runtime_dependency(%q<rdiscount>, [">= 0"])
31
+ s.add_development_dependency(%q<itsucks-compass-960-plugin>, [">= 0"])
32
+ else
33
+ s.add_dependency(%q<sinatra>, [">= 0"])
34
+ s.add_dependency(%q<haml>, [">= 0"])
35
+ s.add_dependency(%q<rdiscount>, [">= 0"])
36
+ s.add_dependency(%q<itsucks-compass-960-plugin>, [">= 0"])
37
+ end
38
+ else
39
+ s.add_dependency(%q<sinatra>, [">= 0"])
40
+ s.add_dependency(%q<haml>, [">= 0"])
41
+ s.add_dependency(%q<rdiscount>, [">= 0"])
42
+ s.add_dependency(%q<itsucks-compass-960-plugin>, [">= 0"])
43
+ end
41
44
  end
data/views/404.haml ADDED
@@ -0,0 +1,2 @@
1
+ %div
2
+ 404, Page Not Found.
data/views/500.haml ADDED
@@ -0,0 +1,2 @@
1
+ %div
2
+ 500, Internel Server Error.
data/views/grid.haml CHANGED
@@ -225,6 +225,7 @@
225
225
  .grid_7.omega
226
226
  %p 400
227
227
  #footer
228
- %p
229
- generated with
230
- = @footer[:generator]
228
+ .inner
229
+ %p
230
+ generated with
231
+ = @footer[:generator]
data/views/index.haml CHANGED
@@ -3,6 +3,7 @@
3
3
  #main.clearfix
4
4
  .g12
5
5
  :markdown
6
- #{readme}
6
+ #{content}
7
7
 
8
- #footer= haml :footer, :layout => false, :locals => { }
8
+ #footer
9
+ .inner= haml :footer, :layout => false, :locals => { }
data/views/wiki.haml ADDED
@@ -0,0 +1,8 @@
1
+ #wrap
2
+ #header= haml :header, :layout => false
3
+ #main.clearfix
4
+ .g12
5
+ #{content}
6
+
7
+ #footer
8
+ .inner= haml :footer, :layout => false, :locals => { }
data/views/wikis.haml ADDED
@@ -0,0 +1,11 @@
1
+ #wrap
2
+ #header= haml :header, :layout => false
3
+ #main.clearfix
4
+ .g12
5
+ %ul
6
+ - pages.each do |page|
7
+ %li
8
+ %a{:href => "wiki/#{page}"}= page
9
+
10
+ #footer
11
+ .inner= haml :footer, :layout => false, :locals => { }
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rblosxom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 3
9
+ version: 0.1.3
5
10
  platform: ruby
6
11
  authors:
7
12
  - Percy Lau
@@ -9,90 +14,107 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-01-19 00:00:00 +08:00
17
+ date: 2011-01-01 00:00:00 +08:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: sinatra
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
23
- version: 0.9.4
24
- version:
28
+ segments:
29
+ - 0
30
+ version: "0"
31
+ type: :runtime
32
+ version_requirements: *id001
25
33
  - !ruby/object:Gem::Dependency
26
34
  name: haml
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
33
- version: 2.2.14
34
- version:
41
+ segments:
42
+ - 0
43
+ version: "0"
44
+ type: :runtime
45
+ version_requirements: *id002
35
46
  - !ruby/object:Gem::Dependency
36
47
  name: rdiscount
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
48
+ prerelease: false
49
+ requirement: &id003 !ruby/object:Gem::Requirement
50
+ none: false
40
51
  requirements:
41
52
  - - ">="
42
53
  - !ruby/object:Gem::Version
43
- version: 1.5.5
44
- version:
54
+ segments:
55
+ - 0
56
+ version: "0"
57
+ type: :runtime
58
+ version_requirements: *id003
45
59
  - !ruby/object:Gem::Dependency
46
- name: compass-960-plugin
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
60
+ name: itsucks-compass-960-plugin
61
+ prerelease: false
62
+ requirement: &id004 !ruby/object:Gem::Requirement
63
+ none: false
50
64
  requirements:
51
65
  - - ">="
52
66
  - !ruby/object:Gem::Version
53
- version: 0.9.11
54
- - - <
55
- - !ruby/object:Gem::Version
56
- version: "1.0"
57
- version:
58
- description: Ruby based Blosxom.
67
+ segments:
68
+ - 0
69
+ version: "0"
70
+ type: :development
71
+ version_requirements: *id004
72
+ description: Rblosxom is a blosxom program written in ruby.
59
73
  email: percy.lau@gmail.com
60
74
  executables:
61
75
  - rblosxom-demo
62
76
  extensions: []
63
77
 
64
78
  extra_rdoc_files:
65
- - README.rdoc
66
- - MIT-LICENSE
67
- files:
68
- - lib/rblosxom/base.rb
69
- - lib/rblosxom.rb
79
+ - README.mkd
70
80
  - bin/rblosxom-demo
71
- - README.rdoc
72
- - INSTALL
81
+ - lib/rblosxom.rb
82
+ - lib/rblosxom/base.rb
83
+ files:
84
+ - AUTHORS
73
85
  - ChangeLog
86
+ - INSTALL
74
87
  - MIT-LICENSE
75
- - AUTHORS
88
+ - Manifest
89
+ - README.mkd
90
+ - Rakefile
91
+ - VERSION
92
+ - bin/rblosxom-demo
76
93
  - config/rackup.ru
77
94
  - demo/grid.rb
78
95
  - demo/main.rb
96
+ - demo/wiki_render.rb
97
+ - lib/rblosxom.rb
98
+ - lib/rblosxom/base.rb
99
+ - public/config.rb
79
100
  - public/images/12_col.gif
80
101
  - public/images/16_col.gif
81
- - public/sass/_sticky_footer.sass
82
- - public/sass/_grid.sass
83
102
  - public/sass/grid.sass
84
- - public/sass/_debug.sass
85
103
  - public/sass/screen.sass
86
- - public/stylesheets/screen.css
87
104
  - public/stylesheets/grid.css
88
- - views/header.haml
105
+ - public/stylesheets/screen.css
106
+ - rblosxom.gemspec
107
+ - views/footer.haml
89
108
  - views/grid.haml
90
- - views/layout.haml
109
+ - views/header.haml
91
110
  - views/index.haml
92
- - views/footer.haml
93
- - rblosxom.gemspec
111
+ - views/layout.haml
112
+ - views/404.haml
113
+ - views/500.haml
114
+ - views/wiki.haml
115
+ - views/wikis.haml
94
116
  has_rdoc: true
95
- homepage: http://rblosxom.heroku.com/
117
+ homepage: http://rblosxom.heroku.com
96
118
  licenses: []
97
119
 
98
120
  post_install_message:
@@ -100,31 +122,34 @@ rdoc_options:
100
122
  - --line-numbers
101
123
  - --inline-source
102
124
  - --title
103
- - rblosxom 0.1.2
125
+ - Rblosxom
104
126
  - --main
105
- - README.rdoc
106
- - --webcvs
107
- - http://bitbucket.org/itsucks/rblosxom
127
+ - README.mkd
108
128
  require_paths:
109
129
  - lib
110
130
  required_ruby_version: !ruby/object:Gem::Requirement
131
+ none: false
111
132
  requirements:
112
133
  - - ">="
113
134
  - !ruby/object:Gem::Version
135
+ segments:
136
+ - 0
114
137
  version: "0"
115
- version:
116
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
+ none: false
117
140
  requirements:
118
141
  - - ">="
119
142
  - !ruby/object:Gem::Version
120
- version: "0"
121
- version:
122
- requirements:
123
- - Ruby, version 1.8.0 (or newer)
124
- rubyforge_project:
125
- rubygems_version: 1.3.5
143
+ segments:
144
+ - 1
145
+ - 2
146
+ version: "1.2"
147
+ requirements: []
148
+
149
+ rubyforge_project: rblosxom
150
+ rubygems_version: 1.3.7
126
151
  signing_key:
127
152
  specification_version: 3
128
- summary: rblosxom is a Blosxom program written in ruby.
153
+ summary: Ruby based blosxom.
129
154
  test_files: []
130
155
 
@@ -1,9 +0,0 @@
1
- !col_12 = "12_col.gif"
2
- !col_16 = "16_col.gif"
3
-
4
- /* selector= container
5
- =showgrid(!debug_selector = "#wrap", !grid_pic = "12_col.gif")
6
- #{!debug_selector}
7
- :background
8
- :image= image_url(!grid_pic)
9
- :repeat repeat-y
@@ -1,16 +0,0 @@
1
- /* add 960 pull, push classes
2
- =grid-push(!n, !cols = !ninesixty_columns)
3
- :left= (!ninesixty_grid_width / !cols) * !n
4
-
5
- =grid-pushs(!cols = !ninesixty_columns)
6
- @for !n from 1 through !cols - 1
7
- .push_#{!n}
8
- +grid-push(!n, !cols)
9
-
10
- =grid-pull(!n, !cols = !ninesixty_columns)
11
- :left= -(!ninesixty_grid_width / !cols) * !n
12
-
13
- =grid-pulls(!cols = !ninesixty_columns)
14
- @for !n from 1 through !cols - 1
15
- .pull_#{!n}
16
- +grid-pull(!n, !cols)
@@ -1,30 +0,0 @@
1
- =sticky-footer(!footer_height = "3em", !root_selector = "#wrap", !content_selector = "#main", !footer_selector = "#footer")
2
- *
3
- :margin 0
4
- :padding 0
5
- html, body, #{!root_selector}
6
- :height 100%
7
- body > #{!root_selector}
8
- :height auto
9
- :min-height 100%
10
- #{!content_selector}
11
- :padding-bottom #{!footer_height} /* must be same height as the footer */
12
- #{!footer_selector}
13
- :position relative
14
- :margin-top -#{!footer_height} /* negative value of footer height */
15
- :height #{!footer_height}
16
- :clear both
17
- .clearfix
18
- :display inline-block
19
- .clearfix:after
20
- :content "."
21
- :display block
22
- :height 0
23
- :clear both
24
- :visibility hidden
25
- /* Hides from IE-mac \*/
26
- * html .clearfix
27
- :height 1%
28
- .clearfix
29
- :display block
30
- /* End hide from IE-mac */