schreihals 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -0
- data/example/Gemfile +7 -3
- data/example/config.ru +2 -2
- data/example/public/media/.gitkeep +0 -0
- data/lib/schreihals/version.rb +1 -1
- data/lib/schreihals.rb +9 -2
- data/lib/views/404.haml +5 -0
- data/lib/views/layout.haml +1 -2
- metadata +27 -25
data/README.md
CHANGED
@@ -32,3 +32,14 @@ Just a list of keywords I need to write about:
|
|
32
32
|
* `google_analytics_id`
|
33
33
|
* `link`
|
34
34
|
* `read_more`
|
35
|
+
|
36
|
+
## Version History
|
37
|
+
|
38
|
+
### 0.0.2
|
39
|
+
|
40
|
+
* Fix various stupid bugs from the initial release, including the broken example app. Duh!
|
41
|
+
* When a post or page could not be found, we now display a proper 404 page (with correct status code.)
|
42
|
+
|
43
|
+
### 0.0.1
|
44
|
+
|
45
|
+
* Initial release.
|
data/example/Gemfile
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
4
|
-
#
|
5
|
-
gem '
|
3
|
+
# In a real-world schreihals blog, remove the :path option, obviously.
|
4
|
+
#
|
5
|
+
gem 'schreihals', :path => '../'
|
6
|
+
|
7
|
+
# For the time being, we need this fork of document_mapper.
|
8
|
+
#
|
9
|
+
gem 'document_mapper', :git => 'git://github.com/hmans/document_mapper.git', :branch => "after_load_hook"
|
data/example/config.ru
CHANGED
File without changes
|
data/lib/schreihals/version.rb
CHANGED
data/lib/schreihals.rb
CHANGED
@@ -20,7 +20,9 @@ module Schreihals
|
|
20
20
|
#
|
21
21
|
self.attributes = {
|
22
22
|
disqus: true,
|
23
|
-
status: 'published'
|
23
|
+
status: 'published',
|
24
|
+
summary: nil,
|
25
|
+
link: nil
|
24
26
|
}.merge(attributes)
|
25
27
|
|
26
28
|
# Set slug
|
@@ -65,6 +67,7 @@ module Schreihals
|
|
65
67
|
class App < Sinatra::Application
|
66
68
|
set :blog_title, "My Schreihals Blog"
|
67
69
|
set :blog_url, ""
|
70
|
+
set :blog_description, ""
|
68
71
|
set :author_name, "Author"
|
69
72
|
set :disqus_name, nil
|
70
73
|
set :google_analytics_id, nil
|
@@ -141,8 +144,12 @@ module Schreihals
|
|
141
144
|
if @post = Post.where(:slug => slug).first
|
142
145
|
haml :post
|
143
146
|
else
|
144
|
-
|
147
|
+
halt 404
|
145
148
|
end
|
146
149
|
end
|
150
|
+
|
151
|
+
not_found do
|
152
|
+
haml :"404"
|
153
|
+
end
|
147
154
|
end
|
148
155
|
end
|
data/lib/views/404.haml
ADDED
data/lib/views/layout.haml
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
!!!
|
1
|
+
!!! 5
|
2
2
|
%html
|
3
3
|
%head
|
4
4
|
%title= [@page_title, settings.blog_title].compact.join(" | ")
|
5
5
|
%link{href: '/schreihals.css', media: "screen", rel: "stylesheet", type: "text/css"}
|
6
6
|
%link{ href: '/atom.xml', title: "Subscribe via Atom Feed", rel: 'alternate', type: 'application/atom+xml' }
|
7
|
-
/ %script{ src: asset_path('application.js') }
|
8
7
|
%body
|
9
8
|
%header
|
10
9
|
.container
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schreihals
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
16
|
-
requirement: &
|
16
|
+
requirement: &70220324705880 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70220324705880
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: activesupport
|
27
|
-
requirement: &
|
27
|
+
requirement: &70220324704580 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70220324704580
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: shotgun
|
38
|
-
requirement: &
|
38
|
+
requirement: &70220324702440 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70220324702440
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: haml
|
49
|
-
requirement: &
|
49
|
+
requirement: &70220324701320 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70220324701320
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: sass
|
60
|
-
requirement: &
|
60
|
+
requirement: &70220324700620 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70220324700620
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: document_mapper
|
71
|
-
requirement: &
|
71
|
+
requirement: &70220324699420 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70220324699420
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: coderay
|
82
|
-
requirement: &
|
82
|
+
requirement: &70220324698340 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70220324698340
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: redcarpet
|
93
|
-
requirement: &
|
93
|
+
requirement: &70220324697560 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70220324697560
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rack-cache
|
104
|
-
requirement: &
|
104
|
+
requirement: &70220324696600 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70220324696600
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: rack-codehighlighter
|
115
|
-
requirement: &
|
115
|
+
requirement: &70220324695840 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :runtime
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70220324695840
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: schnitzelstyle
|
126
|
-
requirement: &
|
126
|
+
requirement: &70220324695100 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: 0.0.1
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70220324695100
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: rspec
|
137
|
-
requirement: &
|
137
|
+
requirement: &70220324694080 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,7 +142,7 @@ dependencies:
|
|
142
142
|
version: 2.0.0
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *70220324694080
|
146
146
|
description: A simple blog engine for hackers.
|
147
147
|
email:
|
148
148
|
- hendrik@mans.de
|
@@ -160,10 +160,12 @@ files:
|
|
160
160
|
- example/config.ru
|
161
161
|
- example/posts/2010-06-17-pythton-is-great.md
|
162
162
|
- example/posts/2011-12-22-ruby-is-great.md
|
163
|
+
- example/public/media/.gitkeep
|
163
164
|
- lib/public/.gitkeep
|
164
165
|
- lib/public/favicon.ico
|
165
166
|
- lib/schreihals.rb
|
166
167
|
- lib/schreihals/version.rb
|
168
|
+
- lib/views/404.haml
|
167
169
|
- lib/views/atom.haml
|
168
170
|
- lib/views/index.haml
|
169
171
|
- lib/views/layout.haml
|