alchemy-usermanual 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +13 -0
  3. data/.travis.yml +10 -0
  4. data/Gemfile +9 -0
  5. data/LICENSE.txt +27 -0
  6. data/README.md +65 -0
  7. data/Rakefile +39 -0
  8. data/alchemy-usermanual.gemspec +26 -0
  9. data/app/assets/images/alchemy/icon_user_manual.png +0 -0
  10. data/app/assets/javascripts/alchemy/user_manual.js.coffee +8 -0
  11. data/app/assets/stylesheets/alchemy/user_manual.scss +577 -0
  12. data/app/controllers/alchemy/admin/user_manual_controller.rb +11 -0
  13. data/app/views/alchemy/admin/user_manual/show.html.erb +9 -0
  14. data/config/authorization_rules.rb +5 -0
  15. data/config/initializers/alchemy_module.rb +15 -0
  16. data/config/locales/de.yml +25 -0
  17. data/config/locales/en.yml +25 -0
  18. data/config/routes.rb +5 -0
  19. data/lib/alchemy/user_manual/creator.rb +43 -0
  20. data/lib/alchemy/user_manual/engine.rb +21 -0
  21. data/lib/alchemy/user_manual/helpers/template_helper.rb +51 -0
  22. data/lib/alchemy/user_manual/templates/elements.md.erb +13 -0
  23. data/lib/alchemy/user_manual/templates/introduction.md.erb +3 -0
  24. data/lib/alchemy/user_manual/templates/page_layouts.md.erb +13 -0
  25. data/lib/alchemy/user_manual/version.rb +5 -0
  26. data/lib/alchemy/usermanual.rb +9 -0
  27. data/spec/controllers/admin/user_manual_controller_spec.rb +14 -0
  28. data/spec/dummy/README.rdoc +28 -0
  29. data/spec/dummy/Rakefile +6 -0
  30. data/spec/dummy/app/assets/images/.keep +0 -0
  31. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  32. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  33. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  34. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  35. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  36. data/spec/dummy/app/mailers/.keep +0 -0
  37. data/spec/dummy/app/models/.keep +0 -0
  38. data/spec/dummy/app/models/concerns/.keep +0 -0
  39. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  40. data/spec/dummy/bin/bundle +3 -0
  41. data/spec/dummy/bin/rails +4 -0
  42. data/spec/dummy/bin/rake +4 -0
  43. data/spec/dummy/config.ru +4 -0
  44. data/spec/dummy/config/alchemy/elements.yml +6 -0
  45. data/spec/dummy/config/alchemy/page_layouts.yml +2 -0
  46. data/spec/dummy/config/application.rb +28 -0
  47. data/spec/dummy/config/boot.rb +5 -0
  48. data/spec/dummy/config/database.yml +25 -0
  49. data/spec/dummy/config/environment.rb +5 -0
  50. data/spec/dummy/config/environments/development.rb +29 -0
  51. data/spec/dummy/config/environments/production.rb +80 -0
  52. data/spec/dummy/config/environments/test.rb +36 -0
  53. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  54. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  55. data/spec/dummy/config/initializers/inflections.rb +16 -0
  56. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  57. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  58. data/spec/dummy/config/initializers/session_store.rb +3 -0
  59. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  60. data/spec/dummy/config/locales/en.yml +23 -0
  61. data/spec/dummy/config/routes.rb +3 -0
  62. data/spec/dummy/db/migrate/20131214164341_alchemy_two_point_six.alchemy.rb +337 -0
  63. data/spec/dummy/db/schema.rb +338 -0
  64. data/spec/dummy/lib/assets/.keep +0 -0
  65. data/spec/dummy/log/.keep +0 -0
  66. data/spec/dummy/public/404.html +58 -0
  67. data/spec/dummy/public/422.html +58 -0
  68. data/spec/dummy/public/500.html +57 -0
  69. data/spec/dummy/public/favicon.ico +0 -0
  70. data/spec/libraries/creator_spec.rb +29 -0
  71. data/spec/libraries/template_helper_spec.rb +7 -0
  72. data/spec/spec_helper.rb +21 -0
  73. metadata +231 -0
@@ -0,0 +1,338 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20131214164341) do
15
+
16
+ create_table "alchemy_attachments", :force => true do |t|
17
+ t.string "name"
18
+ t.string "file_name"
19
+ t.string "file_mime_type"
20
+ t.integer "file_size"
21
+ t.integer "creator_id"
22
+ t.integer "updater_id"
23
+ t.datetime "created_at", :null => false
24
+ t.datetime "updated_at", :null => false
25
+ t.text "cached_tag_list"
26
+ t.string "file_uid"
27
+ end
28
+
29
+ add_index "alchemy_attachments", ["file_uid"], :name => "index_alchemy_attachments_on_file_uid"
30
+
31
+ create_table "alchemy_cells", :force => true do |t|
32
+ t.integer "page_id"
33
+ t.string "name"
34
+ t.datetime "created_at", :null => false
35
+ t.datetime "updated_at", :null => false
36
+ end
37
+
38
+ create_table "alchemy_contents", :force => true do |t|
39
+ t.string "name"
40
+ t.string "essence_type"
41
+ t.integer "essence_id"
42
+ t.integer "element_id"
43
+ t.integer "position"
44
+ t.datetime "created_at", :null => false
45
+ t.datetime "updated_at", :null => false
46
+ t.integer "creator_id"
47
+ t.integer "updater_id"
48
+ end
49
+
50
+ add_index "alchemy_contents", ["element_id", "position"], :name => "index_contents_on_element_id_and_position"
51
+
52
+ create_table "alchemy_elements", :force => true do |t|
53
+ t.string "name"
54
+ t.integer "position"
55
+ t.integer "page_id"
56
+ t.boolean "public", :default => true
57
+ t.boolean "folded", :default => false
58
+ t.boolean "unique", :default => false
59
+ t.datetime "created_at", :null => false
60
+ t.datetime "updated_at", :null => false
61
+ t.integer "creator_id"
62
+ t.integer "updater_id"
63
+ t.integer "cell_id"
64
+ t.text "cached_tag_list"
65
+ end
66
+
67
+ add_index "alchemy_elements", ["page_id", "position"], :name => "index_elements_on_page_id_and_position"
68
+
69
+ create_table "alchemy_elements_alchemy_pages", :id => false, :force => true do |t|
70
+ t.integer "element_id"
71
+ t.integer "page_id"
72
+ end
73
+
74
+ create_table "alchemy_essence_booleans", :force => true do |t|
75
+ t.boolean "value"
76
+ t.datetime "created_at", :null => false
77
+ t.datetime "updated_at", :null => false
78
+ t.integer "creator_id"
79
+ t.integer "updater_id"
80
+ end
81
+
82
+ add_index "alchemy_essence_booleans", ["value"], :name => "index_alchemy_essence_booleans_on_value"
83
+
84
+ create_table "alchemy_essence_dates", :force => true do |t|
85
+ t.datetime "date"
86
+ t.integer "creator_id"
87
+ t.integer "updater_id"
88
+ t.datetime "created_at", :null => false
89
+ t.datetime "updated_at", :null => false
90
+ end
91
+
92
+ create_table "alchemy_essence_files", :force => true do |t|
93
+ t.integer "attachment_id"
94
+ t.string "title"
95
+ t.string "css_class"
96
+ t.integer "creator_id"
97
+ t.integer "updater_id"
98
+ t.datetime "created_at", :null => false
99
+ t.datetime "updated_at", :null => false
100
+ end
101
+
102
+ create_table "alchemy_essence_htmls", :force => true do |t|
103
+ t.text "source"
104
+ t.integer "creator_id"
105
+ t.integer "updater_id"
106
+ t.datetime "created_at", :null => false
107
+ t.datetime "updated_at", :null => false
108
+ end
109
+
110
+ create_table "alchemy_essence_links", :force => true do |t|
111
+ t.string "link"
112
+ t.string "link_title"
113
+ t.string "link_target"
114
+ t.string "link_class_name"
115
+ t.datetime "created_at", :null => false
116
+ t.datetime "updated_at", :null => false
117
+ t.integer "creator_id"
118
+ t.integer "updater_id"
119
+ end
120
+
121
+ create_table "alchemy_essence_pictures", :force => true do |t|
122
+ t.integer "picture_id"
123
+ t.string "caption"
124
+ t.string "title"
125
+ t.string "alt_tag"
126
+ t.string "link"
127
+ t.string "link_class_name"
128
+ t.string "link_title"
129
+ t.string "css_class"
130
+ t.string "link_target"
131
+ t.integer "creator_id"
132
+ t.integer "updater_id"
133
+ t.datetime "created_at", :null => false
134
+ t.datetime "updated_at", :null => false
135
+ t.string "crop_from"
136
+ t.string "crop_size"
137
+ t.string "render_size"
138
+ end
139
+
140
+ create_table "alchemy_essence_richtexts", :force => true do |t|
141
+ t.text "body"
142
+ t.text "stripped_body"
143
+ t.boolean "do_not_index", :default => false
144
+ t.boolean "public"
145
+ t.integer "creator_id"
146
+ t.integer "updater_id"
147
+ t.datetime "created_at", :null => false
148
+ t.datetime "updated_at", :null => false
149
+ end
150
+
151
+ create_table "alchemy_essence_selects", :force => true do |t|
152
+ t.string "value"
153
+ t.datetime "created_at", :null => false
154
+ t.datetime "updated_at", :null => false
155
+ t.integer "creator_id"
156
+ t.integer "updater_id"
157
+ end
158
+
159
+ add_index "alchemy_essence_selects", ["value"], :name => "index_alchemy_essence_selects_on_value"
160
+
161
+ create_table "alchemy_essence_texts", :force => true do |t|
162
+ t.text "body"
163
+ t.string "link"
164
+ t.string "link_title"
165
+ t.string "link_class_name"
166
+ t.boolean "public", :default => false
167
+ t.boolean "do_not_index", :default => false
168
+ t.string "link_target"
169
+ t.integer "creator_id"
170
+ t.integer "updater_id"
171
+ t.datetime "created_at", :null => false
172
+ t.datetime "updated_at", :null => false
173
+ end
174
+
175
+ create_table "alchemy_folded_pages", :force => true do |t|
176
+ t.integer "page_id"
177
+ t.integer "user_id"
178
+ t.boolean "folded", :default => false
179
+ end
180
+
181
+ create_table "alchemy_languages", :force => true do |t|
182
+ t.string "name"
183
+ t.string "language_code"
184
+ t.string "frontpage_name"
185
+ t.string "page_layout", :default => "intro"
186
+ t.boolean "public", :default => false
187
+ t.datetime "created_at", :null => false
188
+ t.datetime "updated_at", :null => false
189
+ t.integer "creator_id"
190
+ t.integer "updater_id"
191
+ t.boolean "default", :default => false
192
+ t.string "country_code", :default => "", :null => false
193
+ t.integer "site_id"
194
+ end
195
+
196
+ add_index "alchemy_languages", ["language_code", "country_code"], :name => "index_alchemy_languages_on_language_code_and_country_code"
197
+ add_index "alchemy_languages", ["language_code"], :name => "index_alchemy_languages_on_language_code"
198
+ add_index "alchemy_languages", ["site_id"], :name => "index_alchemy_languages_on_site_id"
199
+
200
+ create_table "alchemy_legacy_page_urls", :force => true do |t|
201
+ t.string "urlname", :null => false
202
+ t.integer "page_id", :null => false
203
+ t.datetime "created_at", :null => false
204
+ t.datetime "updated_at", :null => false
205
+ end
206
+
207
+ add_index "alchemy_legacy_page_urls", ["urlname"], :name => "index_alchemy_legacy_page_urls_on_urlname"
208
+
209
+ create_table "alchemy_pages", :force => true do |t|
210
+ t.string "name"
211
+ t.string "urlname"
212
+ t.string "title"
213
+ t.string "language_code"
214
+ t.boolean "language_root"
215
+ t.string "page_layout"
216
+ t.text "meta_keywords"
217
+ t.text "meta_description"
218
+ t.integer "lft"
219
+ t.integer "rgt"
220
+ t.integer "parent_id"
221
+ t.integer "depth"
222
+ t.boolean "visible", :default => false
223
+ t.boolean "public", :default => false
224
+ t.boolean "locked", :default => false
225
+ t.integer "locked_by"
226
+ t.boolean "restricted", :default => false
227
+ t.boolean "robot_index", :default => true
228
+ t.boolean "robot_follow", :default => true
229
+ t.boolean "sitemap", :default => true
230
+ t.boolean "layoutpage", :default => false
231
+ t.datetime "created_at", :null => false
232
+ t.datetime "updated_at", :null => false
233
+ t.integer "creator_id"
234
+ t.integer "updater_id"
235
+ t.integer "language_id"
236
+ t.text "cached_tag_list"
237
+ end
238
+
239
+ add_index "alchemy_pages", ["language_id"], :name => "index_pages_on_language_id"
240
+ add_index "alchemy_pages", ["parent_id", "lft"], :name => "index_pages_on_parent_id_and_lft"
241
+ add_index "alchemy_pages", ["urlname"], :name => "index_pages_on_urlname"
242
+
243
+ create_table "alchemy_pictures", :force => true do |t|
244
+ t.string "name"
245
+ t.string "image_file_name"
246
+ t.integer "image_file_width"
247
+ t.integer "image_file_height"
248
+ t.datetime "created_at", :null => false
249
+ t.datetime "updated_at", :null => false
250
+ t.integer "creator_id"
251
+ t.integer "updater_id"
252
+ t.string "upload_hash"
253
+ t.text "cached_tag_list"
254
+ t.string "image_file_uid"
255
+ t.integer "image_file_size"
256
+ end
257
+
258
+ create_table "alchemy_sites", :force => true do |t|
259
+ t.string "host"
260
+ t.string "name"
261
+ t.datetime "created_at", :null => false
262
+ t.datetime "updated_at", :null => false
263
+ t.boolean "public", :default => false
264
+ t.text "aliases"
265
+ t.boolean "redirect_to_primary_host"
266
+ end
267
+
268
+ add_index "alchemy_sites", ["host", "public"], :name => "alchemy_sites_public_hosts_idx"
269
+ add_index "alchemy_sites", ["host"], :name => "index_alchemy_sites_on_host"
270
+
271
+ create_table "alchemy_users", :force => true do |t|
272
+ t.string "firstname"
273
+ t.string "lastname"
274
+ t.string "login"
275
+ t.string "email"
276
+ t.string "gender"
277
+ t.string "roles", :default => "registered"
278
+ t.string "language"
279
+ t.string "encrypted_password", :limit => 128, :default => "", :null => false
280
+ t.string "password_salt", :limit => 128, :default => "", :null => false
281
+ t.integer "sign_in_count", :default => 0, :null => false
282
+ t.integer "failed_attempts", :default => 0, :null => false
283
+ t.datetime "last_request_at"
284
+ t.datetime "current_sign_in_at"
285
+ t.datetime "last_sign_in_at"
286
+ t.string "current_sign_in_ip"
287
+ t.string "last_sign_in_ip"
288
+ t.datetime "created_at", :null => false
289
+ t.datetime "updated_at", :null => false
290
+ t.integer "creator_id"
291
+ t.integer "updater_id"
292
+ t.text "cached_tag_list"
293
+ t.string "reset_password_token"
294
+ t.datetime "reset_password_sent_at"
295
+ end
296
+
297
+ add_index "alchemy_users", ["email"], :name => "index_alchemy_users_on_email", :unique => true
298
+ add_index "alchemy_users", ["login"], :name => "index_alchemy_users_on_login", :unique => true
299
+ add_index "alchemy_users", ["reset_password_token"], :name => "index_alchemy_users_on_reset_password_token", :unique => true
300
+ add_index "alchemy_users", ["roles"], :name => "index_alchemy_users_on_roles"
301
+
302
+ create_table "events", :force => true do |t|
303
+ t.string "name"
304
+ t.string "hidden_name"
305
+ t.datetime "starts_at"
306
+ t.datetime "ends_at"
307
+ t.text "description"
308
+ t.decimal "entrance_fee", :precision => 6, :scale => 2
309
+ t.boolean "published"
310
+ t.integer "location_id"
311
+ t.datetime "created_at", :null => false
312
+ t.datetime "updated_at", :null => false
313
+ end
314
+
315
+ create_table "locations", :force => true do |t|
316
+ t.string "name"
317
+ t.datetime "created_at", :null => false
318
+ t.datetime "updated_at", :null => false
319
+ end
320
+
321
+ create_table "taggings", :force => true do |t|
322
+ t.integer "tag_id"
323
+ t.integer "taggable_id"
324
+ t.string "taggable_type"
325
+ t.integer "tagger_id"
326
+ t.string "tagger_type"
327
+ t.string "context"
328
+ t.datetime "created_at"
329
+ end
330
+
331
+ add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id"
332
+ add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"
333
+
334
+ create_table "tags", :force => true do |t|
335
+ t.string "name"
336
+ end
337
+
338
+ end
File without changes
File without changes
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/404.html -->
52
+ <div class="dialog">
53
+ <h1>The page you were looking for doesn't exist.</h1>
54
+ <p>You may have mistyped the address or the page may have moved.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>
@@ -0,0 +1,58 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style>
6
+ body {
7
+ background-color: #EFEFEF;
8
+ color: #2E2F30;
9
+ text-align: center;
10
+ font-family: arial, sans-serif;
11
+ }
12
+
13
+ div.dialog {
14
+ width: 25em;
15
+ margin: 4em auto 0 auto;
16
+ border: 1px solid #CCC;
17
+ border-right-color: #999;
18
+ border-left-color: #999;
19
+ border-bottom-color: #BBB;
20
+ border-top: #B00100 solid 4px;
21
+ border-top-left-radius: 9px;
22
+ border-top-right-radius: 9px;
23
+ background-color: white;
24
+ padding: 7px 4em 0 4em;
25
+ }
26
+
27
+ h1 {
28
+ font-size: 100%;
29
+ color: #730E15;
30
+ line-height: 1.5em;
31
+ }
32
+
33
+ body > p {
34
+ width: 33em;
35
+ margin: 0 auto 1em;
36
+ padding: 1em 0;
37
+ background-color: #F7F7F7;
38
+ border: 1px solid #CCC;
39
+ border-right-color: #999;
40
+ border-bottom-color: #999;
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ border-top-color: #DADADA;
44
+ color: #666;
45
+ box-shadow:0 3px 8px rgba(50, 50, 50, 0.17);
46
+ }
47
+ </style>
48
+ </head>
49
+
50
+ <body>
51
+ <!-- This file lives in public/422.html -->
52
+ <div class="dialog">
53
+ <h1>The change you wanted was rejected.</h1>
54
+ <p>Maybe you tried to change something you didn't have access to.</p>
55
+ </div>
56
+ <p>If you are the application owner check the logs for more information.</p>
57
+ </body>
58
+ </html>