seiten 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +32 -0
- data/app/controllers/seiten/pages_controller.rb +12 -0
- data/app/helpers/seiten_helper.rb +38 -0
- data/app/views/seiten/pages/show.html.erb +1 -0
- data/config/routes.rb +11 -0
- data/lib/seiten/controllers/helpers.rb +11 -0
- data/lib/seiten/engine.rb +4 -0
- data/lib/seiten/page.rb +79 -0
- data/lib/seiten/page_store.rb +58 -0
- data/lib/seiten/version.rb +3 -0
- data/lib/seiten.rb +25 -0
- data/lib/tasks/sticky_pages_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/pages/home.html.erb +1 -0
- data/test/dummy/app/views/layouts/application.html.erb +16 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/navigation.yml +15 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +651 -0
- data/test/dummy/log/test.log +226 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- data/test/fixtures/navigation.yml +17 -0
- data/test/integration/navigation_test.rb +14 -0
- data/test/page_test.rb +62 -0
- data/test/seiten_test.rb +7 -0
- data/test/test_helper.rb +25 -0
- metadata +185 -0
@@ -0,0 +1,226 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
3
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
4
|
+
Connecting to database specified by database.yml
|
5
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
6
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
7
|
+
Connecting to database specified by database.yml
|
8
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
9
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
10
|
+
Connecting to database specified by database.yml
|
11
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
12
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
13
|
+
Connecting to database specified by database.yml
|
14
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
15
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
16
|
+
Connecting to database specified by database.yml
|
17
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
18
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
19
|
+
Connecting to database specified by database.yml
|
20
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
21
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
22
|
+
Connecting to database specified by database.yml
|
23
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
24
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
25
|
+
Connecting to database specified by database.yml
|
26
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
27
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
28
|
+
Connecting to database specified by database.yml
|
29
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
30
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
31
|
+
Connecting to database specified by database.yml
|
32
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
33
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 09:54:27 +0200
|
34
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
35
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
36
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
37
|
+
Connecting to database specified by database.yml
|
38
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
39
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 10:26:04 +0200
|
40
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
41
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
42
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
43
|
+
Connecting to database specified by database.yml
|
44
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
45
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 10:26:28 +0200
|
46
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
47
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
48
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
49
|
+
Connecting to database specified by database.yml
|
50
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
51
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 10:27:05 +0200
|
52
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
53
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
54
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
55
|
+
Connecting to database specified by database.yml
|
56
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
57
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 10:42:34 +0200
|
58
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
59
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
60
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
61
|
+
Connecting to database specified by database.yml
|
62
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
63
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 11:19:07 +0200
|
64
|
+
Processing by Seiten::PagesController#show as HTML
|
65
|
+
Completed 500 Internal Server Error in 1ms
|
66
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
67
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
68
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
69
|
+
Connecting to database specified by database.yml
|
70
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
71
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 11:21:43 +0200
|
72
|
+
Processing by Seiten::PagesController#show as HTML
|
73
|
+
Completed 500 Internal Server Error in 1ms
|
74
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
75
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
76
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
77
|
+
Connecting to database specified by database.yml
|
78
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
79
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 11:26:13 +0200
|
80
|
+
Processing by Seiten::PagesController#show as HTML
|
81
|
+
Completed 500 Internal Server Error in 1ms
|
82
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
83
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
84
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
85
|
+
Connecting to database specified by database.yml
|
86
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
87
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 11:26:29 +0200
|
88
|
+
Processing by Seiten::PagesController#show as HTML
|
89
|
+
Completed 500 Internal Server Error in 1ms
|
90
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
91
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
92
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
93
|
+
Connecting to database specified by database.yml
|
94
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
95
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 11:29:33 +0200
|
96
|
+
Processing by Seiten::PagesController#show as HTML
|
97
|
+
Completed 500 Internal Server Error in 1ms
|
98
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
99
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
100
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
101
|
+
Connecting to database specified by database.yml
|
102
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
103
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 11:30:51 +0200
|
104
|
+
Processing by Seiten::PagesController#show as HTML
|
105
|
+
Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)
|
106
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
107
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
108
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
109
|
+
Connecting to database specified by database.yml
|
110
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
111
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:03:58 +0200
|
112
|
+
Processing by Seiten::PagesController#show as HTML
|
113
|
+
Completed 500 Internal Server Error in 1ms
|
114
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
115
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
116
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
117
|
+
Connecting to database specified by database.yml
|
118
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
119
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:04:39 +0200
|
120
|
+
Processing by Seiten::PagesController#show as HTML
|
121
|
+
Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
|
122
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
123
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
124
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
125
|
+
Connecting to database specified by database.yml
|
126
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
127
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:05:22 +0200
|
128
|
+
Processing by Seiten::PagesController#show as HTML
|
129
|
+
Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
|
130
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
131
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
132
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
133
|
+
Connecting to database specified by database.yml
|
134
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
135
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:09:45 +0200
|
136
|
+
Processing by Seiten::PagesController#show as HTML
|
137
|
+
Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
|
138
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
139
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
140
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
141
|
+
Connecting to database specified by database.yml
|
142
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
143
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:10:26 +0200
|
144
|
+
Processing by Seiten::PagesController#show as HTML
|
145
|
+
Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
|
146
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
147
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
148
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
149
|
+
Connecting to database specified by database.yml
|
150
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
151
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:11:43 +0200
|
152
|
+
Processing by Seiten::PagesController#show as HTML
|
153
|
+
Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)
|
154
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
155
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
156
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
157
|
+
Connecting to database specified by database.yml
|
158
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
159
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:12:09 +0200
|
160
|
+
Processing by Seiten::PagesController#show as HTML
|
161
|
+
Completed 404 Not Found in 0ms
|
162
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
163
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
164
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
165
|
+
Connecting to database specified by database.yml
|
166
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
167
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:12:21 +0200
|
168
|
+
Processing by Seiten::PagesController#show as HTML
|
169
|
+
Completed 404 Not Found in 0ms
|
170
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
171
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
172
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
173
|
+
Connecting to database specified by database.yml
|
174
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
175
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:25:55 +0200
|
176
|
+
Processing by Seiten::PagesController#show as HTML
|
177
|
+
Completed 500 Internal Server Error in 8ms
|
178
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
179
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
180
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
181
|
+
Connecting to database specified by database.yml
|
182
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
183
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:30:38 +0200
|
184
|
+
Processing by Seiten::PagesController#show as HTML
|
185
|
+
Completed 500 Internal Server Error in 5ms
|
186
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
187
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
188
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
189
|
+
Connecting to database specified by database.yml
|
190
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
191
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:35:11 +0200
|
192
|
+
Processing by Seiten::PagesController#show as HTML
|
193
|
+
Completed 500 Internal Server Error in 6ms
|
194
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
195
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
196
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
197
|
+
Connecting to database specified by database.yml
|
198
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
199
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:38:25 +0200
|
200
|
+
Processing by Seiten::PagesController#show as HTML
|
201
|
+
Rendered app/pages/home.html.erb (0.2ms)
|
202
|
+
Rendered /Users/pulleasy/code/seiten/app/views/seiten/pages/show.html.erb within layouts/application (1.8ms)
|
203
|
+
Completed 500 Internal Server Error in 11ms
|
204
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
205
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
206
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
207
|
+
Connecting to database specified by database.yml
|
208
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
209
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:39:00 +0200
|
210
|
+
Processing by Seiten::PagesController#show as HTML
|
211
|
+
Rendered app/pages/home.html.erb (0.2ms)
|
212
|
+
Rendered /Users/pulleasy/code/seiten/app/views/seiten/pages/show.html.erb within layouts/application (1.8ms)
|
213
|
+
Completed 200 OK in 20ms (Views: 18.4ms | ActiveRecord: 0.0ms)
|
214
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
215
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
216
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
217
|
+
Connecting to database specified by database.yml
|
218
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
219
|
+
Started GET "/" for 127.0.0.1 at 2013-07-23 14:42:45 +0200
|
220
|
+
Processing by Seiten::PagesController#show as HTML
|
221
|
+
Rendered app/pages/home.html.erb (0.2ms)
|
222
|
+
Rendered /Users/pulleasy/code/seiten/app/views/seiten/pages/show.html.erb within layouts/application (1.8ms)
|
223
|
+
Completed 200 OK in 19ms (Views: 18.1ms | ActiveRecord: 0.0ms)
|
224
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
225
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
226
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/404.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/422.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>The change you wanted was rejected.</h1>
|
23
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
+
</div>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<style type="text/css">
|
6
|
+
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
+
div.dialog {
|
8
|
+
width: 25em;
|
9
|
+
padding: 0 4em;
|
10
|
+
margin: 4em auto 0 auto;
|
11
|
+
border: 1px solid #ccc;
|
12
|
+
border-right-color: #999;
|
13
|
+
border-bottom-color: #999;
|
14
|
+
}
|
15
|
+
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
+
</style>
|
17
|
+
</head>
|
18
|
+
|
19
|
+
<body>
|
20
|
+
<!-- This file lives in public/500.html -->
|
21
|
+
<div class="dialog">
|
22
|
+
<h1>We're sorry, but something went wrong.</h1>
|
23
|
+
</div>
|
24
|
+
</body>
|
25
|
+
</html>
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
+
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
6
|
+
require 'rails/commands'
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
90351
|
@@ -0,0 +1,17 @@
|
|
1
|
+
- title: "Home"
|
2
|
+
url: "/"
|
3
|
+
|
4
|
+
- title: "Products"
|
5
|
+
nodes:
|
6
|
+
- title: "Kreatify"
|
7
|
+
nodes:
|
8
|
+
- title: "About"
|
9
|
+
- title: "Pricing"
|
10
|
+
- title: "Ruvetia"
|
11
|
+
redirect: true
|
12
|
+
nodes:
|
13
|
+
- title: "Meetups"
|
14
|
+
- title: "Team"
|
15
|
+
|
16
|
+
- title: "About"
|
17
|
+
- title: "Contact"
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class NavigationTest < ActionDispatch::IntegrationTest
|
4
|
+
|
5
|
+
def test_returns_navigation
|
6
|
+
visit "/"
|
7
|
+
assert has_content?("Home")
|
8
|
+
assert has_content?("Products")
|
9
|
+
assert has_content?("Kreatify")
|
10
|
+
assert has_content?("Ruvetia")
|
11
|
+
assert has_content?("About")
|
12
|
+
assert has_content?("Contact")
|
13
|
+
end
|
14
|
+
end
|
data/test/page_test.rb
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class PageTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def test_returns_correct_number_of_page_objects
|
6
|
+
pages = Seiten::Page.all
|
7
|
+
assert_equal 10, pages.count
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_returns_page_title
|
11
|
+
assert_equal "Home", Seiten::Page.find(1).title
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_returns_page_slug
|
15
|
+
assert_equal "/", Seiten::Page.find(1).slug
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_returns_parent_page
|
19
|
+
page = Seiten::Page.find(3)
|
20
|
+
assert_equal Seiten::Page.find(2).title, page.parent.title
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_returns_children_pages
|
24
|
+
page = Seiten::Page.find(2)
|
25
|
+
assert_equal ["Kreatify", "Ruvetia"], page.children.map(&:title)
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_returns_true_if_page_is_child_of_parent
|
29
|
+
child = Seiten::Page.find(3)
|
30
|
+
assert_equal true, Seiten::Page.find(2).parent_of?(child)
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_returns_true_if_page_child_is_deeply_nested
|
34
|
+
child = Seiten::Page.find(5)
|
35
|
+
assert_equal true, Seiten::Page.find(2).parent_of?(child)
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_returns_false_if_page_is_not_child_of_parent
|
39
|
+
wrong_child = Seiten::Page.find(1)
|
40
|
+
assert_equal false, Seiten::Page.find(2).parent_of?(wrong_child)
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_returns_true_for_active_page
|
44
|
+
active_page = Seiten::Page.find(1)
|
45
|
+
assert_equal true, active_page.active?(active_page)
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_returns_true_for_parent_of_active_page
|
49
|
+
active_page = Seiten::Page.find(3)
|
50
|
+
assert_equal true, Seiten::Page.find(2).active?(active_page)
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_returns_false_for_not_active_page
|
54
|
+
active_page = Seiten::Page.find(1)
|
55
|
+
assert_equal false, active_page.active?(Seiten::Page.find(2))
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_finds_page_by_slug
|
59
|
+
page = Seiten::Page.find_by_slug("/products/ruvetia")
|
60
|
+
assert_equal "Ruvetia", page.title
|
61
|
+
end
|
62
|
+
end
|
data/test/seiten_test.rb
ADDED
data/test/test_helper.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require "rails/test_help"
|
6
|
+
require "capybara/rails"
|
7
|
+
|
8
|
+
Rails.backtrace_cleaner.remove_silencers!
|
9
|
+
|
10
|
+
# Load support files
|
11
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
12
|
+
|
13
|
+
# Load fixtures from the engine
|
14
|
+
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
15
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
16
|
+
end
|
17
|
+
|
18
|
+
class Test::Unit::TestCase
|
19
|
+
Seiten.config[:storage_type] = :yaml
|
20
|
+
Seiten.config[:storage_file] = File.join('..', 'fixtures', 'navigation.yml')
|
21
|
+
end
|
22
|
+
|
23
|
+
class ActionDispatch::IntegrationTest
|
24
|
+
include Capybara::DSL
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: seiten
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel Puglisi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-07-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.2.13
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.13
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sqlite3
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: capybara
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Seiten lets you create static pages for your Rails project and provides
|
56
|
+
you with some cool navigational helper likes breadcrumb or custom navigations.
|
57
|
+
email:
|
58
|
+
- pulleasy@gmail.com
|
59
|
+
executables: []
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- app/controllers/seiten/pages_controller.rb
|
64
|
+
- app/helpers/seiten_helper.rb
|
65
|
+
- app/views/seiten/pages/show.html.erb
|
66
|
+
- config/routes.rb
|
67
|
+
- lib/seiten/controllers/helpers.rb
|
68
|
+
- lib/seiten/engine.rb
|
69
|
+
- lib/seiten/page.rb
|
70
|
+
- lib/seiten/page_store.rb
|
71
|
+
- lib/seiten/version.rb
|
72
|
+
- lib/seiten.rb
|
73
|
+
- lib/tasks/sticky_pages_tasks.rake
|
74
|
+
- MIT-LICENSE
|
75
|
+
- Rakefile
|
76
|
+
- test/dummy/app/assets/javascripts/application.js
|
77
|
+
- test/dummy/app/assets/stylesheets/application.css
|
78
|
+
- test/dummy/app/controllers/application_controller.rb
|
79
|
+
- test/dummy/app/helpers/application_helper.rb
|
80
|
+
- test/dummy/app/pages/home.html.erb
|
81
|
+
- test/dummy/app/views/layouts/application.html.erb
|
82
|
+
- test/dummy/config/application.rb
|
83
|
+
- test/dummy/config/boot.rb
|
84
|
+
- test/dummy/config/database.yml
|
85
|
+
- test/dummy/config/environment.rb
|
86
|
+
- test/dummy/config/environments/development.rb
|
87
|
+
- test/dummy/config/environments/production.rb
|
88
|
+
- test/dummy/config/environments/test.rb
|
89
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
90
|
+
- test/dummy/config/initializers/inflections.rb
|
91
|
+
- test/dummy/config/initializers/mime_types.rb
|
92
|
+
- test/dummy/config/initializers/secret_token.rb
|
93
|
+
- test/dummy/config/initializers/session_store.rb
|
94
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
95
|
+
- test/dummy/config/locales/en.yml
|
96
|
+
- test/dummy/config/navigation.yml
|
97
|
+
- test/dummy/config/routes.rb
|
98
|
+
- test/dummy/config.ru
|
99
|
+
- test/dummy/db/development.sqlite3
|
100
|
+
- test/dummy/db/test.sqlite3
|
101
|
+
- test/dummy/log/development.log
|
102
|
+
- test/dummy/log/test.log
|
103
|
+
- test/dummy/public/404.html
|
104
|
+
- test/dummy/public/422.html
|
105
|
+
- test/dummy/public/500.html
|
106
|
+
- test/dummy/public/favicon.ico
|
107
|
+
- test/dummy/Rakefile
|
108
|
+
- test/dummy/README.rdoc
|
109
|
+
- test/dummy/script/rails
|
110
|
+
- test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
|
111
|
+
- test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
|
112
|
+
- test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
|
113
|
+
- test/dummy/tmp/pids/server.pid
|
114
|
+
- test/fixtures/navigation.yml
|
115
|
+
- test/integration/navigation_test.rb
|
116
|
+
- test/page_test.rb
|
117
|
+
- test/seiten_test.rb
|
118
|
+
- test/test_helper.rb
|
119
|
+
homepage: http://danielpuglisi.com
|
120
|
+
licenses: []
|
121
|
+
metadata: {}
|
122
|
+
post_install_message:
|
123
|
+
rdoc_options: []
|
124
|
+
require_paths:
|
125
|
+
- lib
|
126
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - '>='
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - '>='
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '0'
|
136
|
+
requirements: []
|
137
|
+
rubyforge_project:
|
138
|
+
rubygems_version: 2.0.3
|
139
|
+
signing_key:
|
140
|
+
specification_version: 4
|
141
|
+
summary: Static Pages for Rails.
|
142
|
+
test_files:
|
143
|
+
- test/dummy/app/assets/javascripts/application.js
|
144
|
+
- test/dummy/app/assets/stylesheets/application.css
|
145
|
+
- test/dummy/app/controllers/application_controller.rb
|
146
|
+
- test/dummy/app/helpers/application_helper.rb
|
147
|
+
- test/dummy/app/pages/home.html.erb
|
148
|
+
- test/dummy/app/views/layouts/application.html.erb
|
149
|
+
- test/dummy/config/application.rb
|
150
|
+
- test/dummy/config/boot.rb
|
151
|
+
- test/dummy/config/database.yml
|
152
|
+
- test/dummy/config/environment.rb
|
153
|
+
- test/dummy/config/environments/development.rb
|
154
|
+
- test/dummy/config/environments/production.rb
|
155
|
+
- test/dummy/config/environments/test.rb
|
156
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
157
|
+
- test/dummy/config/initializers/inflections.rb
|
158
|
+
- test/dummy/config/initializers/mime_types.rb
|
159
|
+
- test/dummy/config/initializers/secret_token.rb
|
160
|
+
- test/dummy/config/initializers/session_store.rb
|
161
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
162
|
+
- test/dummy/config/locales/en.yml
|
163
|
+
- test/dummy/config/navigation.yml
|
164
|
+
- test/dummy/config/routes.rb
|
165
|
+
- test/dummy/config.ru
|
166
|
+
- test/dummy/db/development.sqlite3
|
167
|
+
- test/dummy/db/test.sqlite3
|
168
|
+
- test/dummy/log/development.log
|
169
|
+
- test/dummy/log/test.log
|
170
|
+
- test/dummy/public/404.html
|
171
|
+
- test/dummy/public/422.html
|
172
|
+
- test/dummy/public/500.html
|
173
|
+
- test/dummy/public/favicon.ico
|
174
|
+
- test/dummy/Rakefile
|
175
|
+
- test/dummy/README.rdoc
|
176
|
+
- test/dummy/script/rails
|
177
|
+
- test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
|
178
|
+
- test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
|
179
|
+
- test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
|
180
|
+
- test/dummy/tmp/pids/server.pid
|
181
|
+
- test/fixtures/navigation.yml
|
182
|
+
- test/integration/navigation_test.rb
|
183
|
+
- test/page_test.rb
|
184
|
+
- test/seiten_test.rb
|
185
|
+
- test/test_helper.rb
|