rblosxom 0.1.0 → 0.1.1

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
+ 2009-12-23 Percy Lau <percy.lau@gmail.com> 0.1.1
2
+ * Added Rblosxom options root, config_file, config
3
+
1
4
  2009-12-20 Percy Lau <percy.lau@gmail.com> 0.1.0
2
5
 
3
6
  * rblosxom init
data/README.rdoc CHANGED
@@ -8,7 +8,7 @@ README
8
8
  - [rdiscount][rdiscount]
9
9
  - [compass-960][compass_960]
10
10
 
11
- 目前这个版本也是第一个版本0.1.0,功能还不多。
11
+ 目前这个版本也是第一个版本0.1.1,功能还不多。
12
12
 
13
13
  Author
14
14
  ------
data/config/rackup.ru CHANGED
@@ -1,13 +1,18 @@
1
1
  require 'sinatra'
2
- require 'rblosxom'
2
+ begin
3
+ require 'rblosxom'
4
+ rescue LoadError => e
5
+ require 'lib/rblosxom'
6
+ end
3
7
 
4
8
  disable :run
5
- set :root, File.expand_path("../", File.dirname(__FILE__))
9
+ set :environment, :development
6
10
 
7
11
  $LOAD_PATH.unshift File.expand_path("../demo", File.dirname(__FILE__))
8
- require 'rapp'
12
+
13
+ require 'main'
9
14
  map "/" do
10
- run Rblosxom::Rblosxom
15
+ run Rblosxom::Main
11
16
  end
12
17
 
13
18
  require 'grid'
data/demo/grid.rb CHANGED
@@ -1,10 +1,7 @@
1
1
  require 'rblosxom/base'
2
2
 
3
3
  module Rblosxom
4
- class Grid < App
5
- set :public, File.join(root, "public")
6
- set :views, File.join(root, "views")
7
-
4
+ class Grid < Base
8
5
  get '/?' do
9
6
  set_common_variables
10
7
  haml :grid, :layout => false, :locals => { }
@@ -1,11 +1,7 @@
1
1
  require 'rblosxom/base'
2
- require 'rdiscount'
3
2
 
4
3
  module Rblosxom
5
- class Rblosxom < App
6
- set :public, File.join(root, "public")
7
- set :views, File.join(root, "views")
8
-
4
+ class Main < Base
9
5
  get '/?' do
10
6
  set_common_variables
11
7
  content = File.read(File.expand_path("../README.rdoc", File.dirname(__FILE__)))
@@ -15,4 +11,4 @@ module Rblosxom
15
11
  end
16
12
 
17
13
  # vim: ft=ruby:fenc=utf-8:sw=4:ts=4:sts=4:et:
18
- # rapp.rb end here
14
+ # main.rb end here
data/lib/rblosxom/base.rb CHANGED
@@ -21,7 +21,9 @@ module Rblosxom
21
21
  end
22
22
  end
23
23
 
24
- class App < Sinatra::Application
24
+ class Base < Sinatra::Base
25
+ include Helpers
26
+
25
27
  unless defined? CONFIG
26
28
  CONFIG = YAML.load(<<-END)
27
29
  title: Rblosxom
@@ -41,9 +43,15 @@ module Rblosxom
41
43
  END
42
44
  end
43
45
 
44
- set :config, Proc.new { (defined? config_file) ? YAML::load(File.read(config_file)) : CONFIG }
45
- set :public, Proc.new { root && File.join(root, "themes", config["theme"], "public") }
46
- include Helpers
46
+ class << self
47
+ attr_accessor :config_file
48
+ attr_reader :config
49
+ end
50
+ set :config, Proc.new { config_file ? YAML::load(File.read(config_file)) : CONFIG }
51
+
52
+ set :root, File.expand_path("../../", File.dirname(__FILE__))
53
+ set :static, true
54
+ enable :sessions
47
55
  end
48
56
  end
49
57
 
data/rblosxom.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'rblosxom'
3
- s.version = '0.1.0'
4
- s.date = '2009-12-18'
3
+ s.version = '0.1.1'
4
+ s.date = '2009-12-23'
5
5
 
6
6
  s.description = "Ruby based Blosxom."
7
7
  s.summary = "rblosxom is a Blosxom program written in ruby."
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
35
35
  s.add_development_dependency 'compass-960-plugin', '>= 0.9.11', '< 1.0'
36
36
 
37
37
  s.has_rdoc = true
38
- s.homepage = "http://bitbucket.org/itsucks/#{s.name}"
38
+ s.homepage = "http://rblosxom.heroku.com/"
39
39
  s.rubygems_version = '1.3.5'
40
40
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "#{s.name} #{s.version}", "--main", "README.rdoc", "--webcvs", "http://bitbucket.org/itsucks/#{s.name}"]
41
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rblosxom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Percy Lau
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-18 00:00:00 +08:00
12
+ date: 2009-12-23 00:00:00 +08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -74,25 +74,25 @@ files:
74
74
  - MIT-LICENSE
75
75
  - AUTHORS
76
76
  - config/rackup.ru
77
+ - demo/main.rb
77
78
  - demo/grid.rb
78
- - demo/rapp.rb
79
- - public/images/12_col.gif
80
79
  - public/images/16_col.gif
80
+ - public/images/12_col.gif
81
+ - public/sass/_debug.sass
81
82
  - public/sass/_sticky_footer.sass
82
83
  - public/sass/_grid.sass
83
84
  - public/sass/grid.sass
84
- - public/sass/_debug.sass
85
85
  - public/sass/screen.sass
86
- - public/stylesheets/screen.css
87
86
  - public/stylesheets/grid.css
88
- - views/header.haml
89
- - views/grid.haml
87
+ - public/stylesheets/screen.css
90
88
  - views/layout.haml
91
- - views/index.haml
92
89
  - views/footer.haml
90
+ - views/index.haml
91
+ - views/header.haml
92
+ - views/grid.haml
93
93
  - rblosxom.gemspec
94
94
  has_rdoc: true
95
- homepage: http://bitbucket.org/itsucks/rblosxom
95
+ homepage: http://rblosxom.heroku.com/
96
96
  licenses: []
97
97
 
98
98
  post_install_message:
@@ -100,7 +100,7 @@ rdoc_options:
100
100
  - --line-numbers
101
101
  - --inline-source
102
102
  - --title
103
- - rblosxom 0.1.0
103
+ - rblosxom 0.1.1
104
104
  - --main
105
105
  - README.rdoc
106
106
  - --webcvs