walter 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. data/Manifest +0 -1
  2. data/README.md +11 -4
  3. data/Rakefile +3 -3
  4. data/lib/walter.rb +12 -8
  5. data/walter.gemspec +4 -4
  6. metadata +5 -6
  7. data/config.ru +0 -3
data/Manifest CHANGED
@@ -1,6 +1,5 @@
1
1
  Manifest
2
2
  README.md
3
3
  Rakefile
4
- config.ru
5
4
  lib/walter.rb
6
5
  walter.gemspec
data/README.md CHANGED
@@ -7,14 +7,16 @@ It is also like very inspired by [toto](http://cloudhead.io/toto)'s architecture
7
7
 
8
8
  The name is of course a tribue to Walter Benjamin and his obsession for quotes.
9
9
 
10
- Expose your collections in 10 seconds
11
- ====================================
10
+ Mini-start in 10 seconds
11
+ =========================
12
12
 
13
13
  $ sudo gem install walter
14
14
  $ git clone git://github.com/taniki/theodor.git webquotes
15
15
  $ cd webquotes
16
16
  $ thin start -R config.ru
17
17
 
18
+ (configuring [passenger](http://modrails.com) is 10 more seconds)
19
+
18
20
  Features
19
21
  ========
20
22
 
@@ -22,7 +24,12 @@ Features
22
24
  - bibliographical info should be like bibtex specs and formated in yaml
23
25
  - body can be formated with markdown (rdiscount)
24
26
  - templating is done with *erb*
25
- - URL are not in german just for fun
27
+ - URL are not in german just because of guiltiness
28
+
29
+ Some collectors
30
+ ===============
31
+
32
+ - [fragments](http://fragments.cendres.net)
26
33
 
27
34
  TODO
28
35
  ====
@@ -36,7 +43,7 @@ TODO
36
43
  - put a proper permalink system
37
44
  - different levels of importance
38
45
 
39
- - #### über-mich
46
+ - #### über-ich
40
47
  - check english typographic rules
41
48
  - make it easy for multilingual stuffs
42
49
  - clean the code
data/Rakefile CHANGED
@@ -2,11 +2,11 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('walter', '0.0.3') do |p|
5
+ Echoe.new('walter', '0.0.4') do |p|
6
6
  p.description = "A small webapp to explore and read a bunch of quotes stored as textfiles"
7
- p.url = "https://github.com/taniki/walter"
7
+ p.url = "http://github.com/taniki/walter"
8
8
  p.author = "Duong Tam Kien"
9
9
  p.email = "tk@deveha.com"
10
- p.ignore_pattern = ["tmp/*", "quotes/*", "views/*", "public/css/*", "._*" ]
10
+ p.ignore_pattern = ["tmp/*", "quotes/*", "views/*", "public/css/*", "._*", "config.ru"]
11
11
  p.development_dependencies = [ "sinatra", "rdiscount", "yaml", "erb"]
12
12
  end
@@ -8,16 +8,16 @@ require 'rdiscount'
8
8
 
9
9
 
10
10
  module Walter
11
+ Paths = {
12
+ :quotes => 'quotes'
13
+ }
14
+
11
15
 
12
16
  class App < Sinatra::Base
13
17
  set :title, "fragments"
14
18
 
15
- get "/css/benjamin.css" do
16
- less :benjamin
17
- end
18
-
19
19
  get "/" do
20
- file_index = Dir.glob('quotes/*.txt')
20
+ file_index = Dir.glob(Paths[:quotes]+'/*.txt')
21
21
 
22
22
  @books = file_index.map do |f|
23
23
  Book.new f
@@ -28,7 +28,7 @@ module Walter
28
28
 
29
29
  get "/quotes/:name" do
30
30
 
31
- b = Book.new "quotes/"+params[:name]+".txt"
31
+ b = Book.new Paths[:quotes]+"/"+params[:name]+".txt"
32
32
  b.load_quotes
33
33
 
34
34
  @book = b
@@ -78,7 +78,11 @@ module Walter
78
78
 
79
79
  if(meta['title'])
80
80
  else
81
- self.add_quote meta['page'], body
81
+ if meta['page'] or meta['chapter']
82
+ self.add_quote meta['page'], body
83
+ else
84
+ self.add_quote meta['page'], part
85
+ end
82
86
  end
83
87
  end
84
88
  end
@@ -107,7 +111,7 @@ module Walter
107
111
  end
108
112
 
109
113
  def render
110
- RDiscount.new(@body).to_html
114
+ RDiscount.new(@body).to_html if @body
111
115
  end
112
116
 
113
117
  def page
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{walter}
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Duong Tam Kien"]
9
- s.date = %q{2011-01-26}
9
+ s.date = %q{2011-01-28}
10
10
  s.description = %q{A small webapp to explore and read a bunch of quotes stored as textfiles}
11
11
  s.email = %q{tk@deveha.com}
12
12
  s.extra_rdoc_files = ["README.md", "lib/walter.rb"]
13
- s.files = ["Manifest", "README.md", "Rakefile", "config.ru", "lib/walter.rb", "walter.gemspec"]
14
- s.homepage = %q{https://github.com/taniki/walter}
13
+ s.files = ["Manifest", "README.md", "Rakefile", "lib/walter.rb", "walter.gemspec"]
14
+ s.homepage = %q{http://github.com/taniki/walter}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Walter", "--main", "README.md"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{walter}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: walter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Duong Tam Kien
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-26 00:00:00 +01:00
18
+ date: 2011-01-28 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -87,11 +87,10 @@ files:
87
87
  - Manifest
88
88
  - README.md
89
89
  - Rakefile
90
- - config.ru
91
90
  - lib/walter.rb
92
91
  - walter.gemspec
93
92
  has_rdoc: true
94
- homepage: https://github.com/taniki/walter
93
+ homepage: http://github.com/taniki/walter
95
94
  licenses: []
96
95
 
97
96
  post_install_message:
data/config.ru DELETED
@@ -1,3 +0,0 @@
1
- require "walter"
2
-
3
- run Walter::App