zen 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/CHANGELOG.md +12 -2
  2. data/MANIFEST +17 -10
  3. data/ROADMAP.md +8 -4
  4. data/bin/zen +2 -3
  5. data/lib/zen.rb +20 -14
  6. data/lib/zen/bin/{zen_binary.rb → base.rb} +0 -0
  7. data/lib/zen/controller/main_controller.rb +7 -4
  8. data/lib/zen/{base/database.rb → database.rb} +3 -2
  9. data/lib/zen/error/language_error.rb +10 -0
  10. data/lib/zen/error/package_error.rb +10 -0
  11. data/lib/zen/error/plugin_error.rb +10 -0
  12. data/lib/zen/error/theme_error.rb +10 -0
  13. data/lib/zen/helper/acl.rb +11 -4
  14. data/lib/zen/{base/language.rb → language.rb} +11 -3
  15. data/lib/zen/layout/admin.xhtml +21 -12
  16. data/lib/zen/layout/login.xhtml +17 -11
  17. data/lib/zen/liquid/general.rb +1 -27
  18. data/lib/zen/{base/logger.rb → logger.rb} +0 -0
  19. data/lib/zen/{base/package.rb → package.rb} +65 -55
  20. data/lib/zen/package/all.rb +5 -0
  21. data/lib/zen/package/categories/lib/categories.rb +7 -8
  22. data/lib/zen/package/comments/lib/comments.rb +7 -8
  23. data/lib/zen/package/comments/lib/comments/controller/comments_form.rb +1 -1
  24. data/lib/zen/package/comments/lib/comments/liquid/comments.rb +3 -1
  25. data/lib/zen/package/custom_fields/lib/custom_fields.rb +7 -8
  26. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_value.rb +14 -0
  27. data/lib/zen/package/custom_fields/migrations/1295255665_create_schema.rb +1 -1
  28. data/lib/zen/package/menus/lib/menus.rb +5 -6
  29. data/lib/zen/package/sections/lib/sections.rb +4 -5
  30. data/lib/zen/package/sections/lib/sections/language/en/section_entries.yml +2 -2
  31. data/lib/zen/package/sections/lib/sections/liquid/section_entries.rb +9 -2
  32. data/lib/zen/package/settings/lib/settings.rb +7 -8
  33. data/lib/zen/package/users/lib/users.rb +7 -8
  34. data/lib/zen/package/users/lib/users/view/admin/access-rules/form.xhtml +5 -5
  35. data/lib/zen/package/users/lib/users/view/admin/access-rules/index.xhtml +4 -4
  36. data/lib/zen/plugin.rb +172 -0
  37. data/lib/zen/plugin/markup.rb +30 -0
  38. data/lib/zen/public/admin/css/layout.css +17 -0
  39. data/lib/zen/strict_struct.rb +36 -0
  40. data/lib/zen/task/db.rb +14 -4
  41. data/lib/zen/task/package.rb +13 -8
  42. data/lib/zen/task/theme.rb +88 -0
  43. data/lib/zen/theme.rb +129 -0
  44. data/lib/zen/{base/version.rb → version.rb} +1 -1
  45. data/proto/app/config/config.rb +19 -6
  46. data/proto/app/config/database.rb +58 -2
  47. data/proto/app/config/middlewares.rb +69 -4
  48. data/proto/app/config/requires.rb +9 -2
  49. data/proto/app/{logs → log}/.gitkeep +0 -0
  50. data/proto/package/lib/package.rb +3 -13
  51. data/proto/package/lib/package/controller/controllers.rb +5 -9
  52. data/proto/package/lib/package/language/en/languages.yml +4 -0
  53. metadata +66 -26
  54. data/proto/package/LICENSE +0 -0
  55. data/proto/package/README.textile +0 -0
  56. data/proto/package/lib/package/language/en/languages.rb +0 -3
@@ -8,12 +8,12 @@ module EXTENSION
8
8
  class CONTROLLER < Zen::Controllers::AdminController
9
9
  include ::EXTENSION::Models
10
10
 
11
- map "/admin/module"
11
+ map "/admin/module"
12
12
  trait :extension_identifier => ''
13
13
 
14
14
  before_all do
15
15
  csrf_protection :save, :delete do
16
- respond(@zen_general_lang.errors[:csrf], 401)
16
+ respond(lang('zen_general.errors.csrf'), 401)
17
17
  end
18
18
  end
19
19
 
@@ -25,16 +25,12 @@ module EXTENSION
25
25
  def initialize
26
26
  super
27
27
 
28
- @form_save_url = ''
29
- @lang = Zen::Language.load ''
28
+ Zen::Language.load 'language'
30
29
 
31
30
  # Set the page title
32
31
  if !action.method.nil?
33
- method = action.method.to_sym
34
-
35
- if @lang.titles.key? method
36
- @page_title = @lang.titles[method]
37
- end
32
+ method = action.method.to_sym
33
+ @page_title = lang("language.titles.#{method}") rescue nil
38
34
  end
39
35
  end
40
36
 
@@ -0,0 +1,4 @@
1
+ titles:
2
+ index :''
3
+ edit : ''
4
+ new : ''
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: zen
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.3
5
+ version: 0.2.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Yorick Peterse
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-20 00:00:00 +01:00
13
+ date: 2011-03-27 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: "0"
46
+ version: 2.1.4
47
47
  type: :runtime
48
48
  version_requirements: *id003
49
49
  - !ruby/object:Gem::Dependency
@@ -54,7 +54,7 @@ dependencies:
54
54
  requirements:
55
55
  - - ">="
56
56
  - !ruby/object:Gem::Version
57
- version: "0"
57
+ version: 2.2.2
58
58
  type: :runtime
59
59
  version_requirements: *id004
60
60
  - !ruby/object:Gem::Dependency
@@ -65,7 +65,7 @@ dependencies:
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: "0"
68
+ version: 1.5.1
69
69
  type: :runtime
70
70
  version_requirements: *id005
71
71
  - !ruby/object:Gem::Dependency
@@ -76,7 +76,7 @@ dependencies:
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: "0"
79
+ version: 0.14.6
80
80
  type: :runtime
81
81
  version_requirements: *id006
82
82
  - !ruby/object:Gem::Dependency
@@ -87,7 +87,7 @@ dependencies:
87
87
  requirements:
88
88
  - - ">="
89
89
  - !ruby/object:Gem::Version
90
- version: "0"
90
+ version: 0.9.1
91
91
  type: :runtime
92
92
  version_requirements: *id007
93
93
  - !ruby/object:Gem::Dependency
@@ -98,7 +98,7 @@ dependencies:
98
98
  requirements:
99
99
  - - ">="
100
100
  - !ruby/object:Gem::Version
101
- version: "0"
101
+ version: 0.0.6
102
102
  type: :runtime
103
103
  version_requirements: *id008
104
104
  - !ruby/object:Gem::Dependency
@@ -109,7 +109,7 @@ dependencies:
109
109
  requirements:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
- version: "0"
112
+ version: "1.0"
113
113
  type: :runtime
114
114
  version_requirements: *id009
115
115
  - !ruby/object:Gem::Dependency
@@ -120,42 +120,75 @@ dependencies:
120
120
  requirements:
121
121
  - - ">="
122
122
  - !ruby/object:Gem::Version
123
- version: "0"
123
+ version: 1.6.8
124
124
  type: :development
125
125
  version_requirements: *id010
126
126
  - !ruby/object:Gem::Dependency
127
- name: rspec
127
+ name: redcloth
128
128
  prerelease: false
129
129
  requirement: &id011 !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements:
132
132
  - - ">="
133
133
  - !ruby/object:Gem::Version
134
- version: "2.0"
134
+ version: 4.2.7
135
135
  type: :development
136
136
  version_requirements: *id011
137
137
  - !ruby/object:Gem::Dependency
138
- name: yard
138
+ name: rspec
139
139
  prerelease: false
140
140
  requirement: &id012 !ruby/object:Gem::Requirement
141
141
  none: false
142
142
  requirements:
143
143
  - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: "0"
145
+ version: 2.5.0
146
146
  type: :development
147
147
  version_requirements: *id012
148
148
  - !ruby/object:Gem::Dependency
149
- name: capybara
149
+ name: yard
150
150
  prerelease: false
151
151
  requirement: &id013 !ruby/object:Gem::Requirement
152
152
  none: false
153
153
  requirements:
154
154
  - - ">="
155
155
  - !ruby/object:Gem::Version
156
- version: "0"
156
+ version: 0.6.5
157
157
  type: :development
158
158
  version_requirements: *id013
159
+ - !ruby/object:Gem::Dependency
160
+ name: capybara
161
+ prerelease: false
162
+ requirement: &id014 !ruby/object:Gem::Requirement
163
+ none: false
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: 0.4.1.2
168
+ type: :development
169
+ version_requirements: *id014
170
+ - !ruby/object:Gem::Dependency
171
+ name: rack-test
172
+ prerelease: false
173
+ requirement: &id015 !ruby/object:Gem::Requirement
174
+ none: false
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: "0"
179
+ type: :development
180
+ version_requirements: *id015
181
+ - !ruby/object:Gem::Dependency
182
+ name: sqlite3
183
+ prerelease: false
184
+ requirement: &id016 !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: "0"
190
+ type: :development
191
+ version_requirements: *id016
159
192
  description: Zen is a fully modular CMS written using Ramaze. Unlike traditional Content Management Systems you are completely free to build whatever you want.
160
193
  email: info@yorickpeterse.com
161
194
  executables:
@@ -171,28 +204,30 @@ files:
171
204
  - ROADMAP.md
172
205
  - Thorfile
173
206
  - bin/zen
174
- - lib/zen/base/database.rb
175
- - lib/zen/base/language.rb
176
- - lib/zen/base/logger.rb
177
- - lib/zen/base/package.rb
178
- - lib/zen/base/version.rb
179
- - lib/zen/bin/zen_binary.rb
207
+ - lib/zen/bin/base.rb
180
208
  - lib/zen/controller/admin_controller.rb
181
209
  - lib/zen/controller/base_controller.rb
182
210
  - lib/zen/controller/frontend_controller.rb
183
211
  - lib/zen/controller/main_controller.rb
212
+ - lib/zen/database.rb
213
+ - lib/zen/error/language_error.rb
214
+ - lib/zen/error/package_error.rb
215
+ - lib/zen/error/plugin_error.rb
216
+ - lib/zen/error/theme_error.rb
184
217
  - lib/zen/helper/acl.rb
185
218
  - lib/zen/helper/asset.rb
186
219
  - lib/zen/helper/breadcrumb.rb
187
220
  - lib/zen/helper/common.rb
188
221
  - lib/zen/language/en/zen_general.yml
189
222
  - lib/zen/language/en/zen_models.yml
223
+ - lib/zen/language.rb
190
224
  - lib/zen/layout/admin.xhtml
191
225
  - lib/zen/layout/login.xhtml
192
226
  - lib/zen/liquid/controller_behavior.rb
193
227
  - lib/zen/liquid/general.rb
194
228
  - lib/zen/liquid/redirect.rb
195
229
  - lib/zen/liquid/strip.rb
230
+ - lib/zen/logger.rb
196
231
  - lib/zen/model/methods.rb
197
232
  - lib/zen/model/settings.rb
198
233
  - lib/zen/package/all.rb
@@ -319,6 +354,9 @@ files:
319
354
  - lib/zen/package/users/lib/users.rb
320
355
  - lib/zen/package/users/migrations/.gitkeep
321
356
  - lib/zen/package/users/migrations/1295281013_create_schema.rb
357
+ - lib/zen/package.rb
358
+ - lib/zen/plugin/markup.rb
359
+ - lib/zen/plugin.rb
322
360
  - lib/zen/public/admin/css/boilerplate.css
323
361
  - lib/zen/public/admin/css/buttons.css
324
362
  - lib/zen/public/admin/css/datepicker.css
@@ -368,11 +406,15 @@ files:
368
406
  - lib/zen/public/admin/js/zen/modal.js
369
407
  - lib/zen/public/admin/js/zen/notification.js
370
408
  - lib/zen/public/admin/js/zen/tabs.js
409
+ - lib/zen/strict_struct.rb
371
410
  - lib/zen/task/build.rb
372
411
  - lib/zen/task/clean.rb
373
412
  - lib/zen/task/db.rb
374
413
  - lib/zen/task/package.rb
375
414
  - lib/zen/task/proto.rb
415
+ - lib/zen/task/theme.rb
416
+ - lib/zen/theme.rb
417
+ - lib/zen/version.rb
376
418
  - lib/zen.rb
377
419
  - license.txt
378
420
  - proto/app/Thorfile
@@ -382,16 +424,14 @@ files:
382
424
  - proto/app/config/middlewares.rb
383
425
  - proto/app/config/requires.rb
384
426
  - proto/app/config.ru
385
- - proto/app/logs/.gitkeep
427
+ - proto/app/log/.gitkeep
386
428
  - proto/app/public/.gitkeep
387
429
  - proto/app/start.rb
388
430
  - proto/app/vendor/.gitkeep
389
431
  - proto/app/vendor/themes/.gitkeep
390
432
  - proto/migration.rb
391
- - proto/package/LICENSE
392
- - proto/package/README.textile
393
433
  - proto/package/lib/package/controller/controllers.rb
394
- - proto/package/lib/package/language/en/languages.rb
434
+ - proto/package/lib/package/language/en/languages.yml
395
435
  - proto/package/lib/package/model/model.rb
396
436
  - proto/package/lib/package/view/admin/package/edit.xhtml
397
437
  - proto/package/lib/package/view/admin/package/form.xhtml
File without changes
File without changes
@@ -1,3 +0,0 @@
1
- Zen::Language.translation 'language package name' do |item|
2
-
3
- end