typus 3.1.0.rc18 → 3.1.0.rc19
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.
- data/.gitignore +14 -11
- data/.travis.yml +12 -0
- data/CHANGELOG +253 -0
- data/Gemfile +69 -0
- data/Guardfile +11 -0
- data/README.md +14 -26
- data/Rakefile +24 -100
- data/app/assets/javascripts/typus/application.js +8 -2
- data/app/assets/javascripts/typus/custom.js +2 -0
- data/app/assets/javascripts/typus/jquery.application.js +14 -0
- data/app/assets/stylesheets/typus/application.css +18 -10
- data/app/assets/stylesheets/typus/content.css +0 -1
- data/app/assets/stylesheets/typus/custom.css +11 -0
- data/app/assets/stylesheets/typus/errors.css +1 -1
- data/app/assets/stylesheets/typus/forms.css +17 -5
- data/app/assets/stylesheets/typus/hacks.css +4 -0
- data/app/assets/stylesheets/typus/header.css +8 -2
- data/app/assets/stylesheets/typus/pagination.css +3 -3
- data/app/assets/stylesheets/typus/sidebar.css +4 -0
- data/app/assets/stylesheets/typus/tables.css +0 -1
- data/app/controllers/admin/account_controller.rb +1 -2
- data/app/controllers/admin/base_controller.rb +5 -2
- data/app/controllers/admin/dashboard_controller.rb +5 -0
- data/app/controllers/admin/resource_controller.rb +1 -2
- data/app/controllers/admin/resources_controller.rb +36 -51
- data/app/controllers/admin/session_controller.rb +2 -3
- data/app/helpers/admin/base_helper.rb +2 -5
- data/app/helpers/admin/resources/data_types/belongs_to_helper.rb +35 -27
- data/app/helpers/admin/resources/data_types/dragonfly_helper.rb +16 -3
- data/app/helpers/admin/resources/data_types/has_and_belongs_to_many_helper.rb +45 -13
- data/app/helpers/admin/resources/data_types/has_many_helper.rb +27 -19
- data/app/helpers/admin/resources/data_types/has_one_helper.rb +24 -11
- data/app/helpers/admin/resources/data_types/paperclip_helper.rb +1 -1
- data/app/helpers/admin/resources/data_types/string_helper.rb +1 -1
- data/app/helpers/admin/resources/data_types/text_helper.rb +1 -1
- data/app/helpers/admin/resources/data_types/transversal_helper.rb +1 -1
- data/app/helpers/admin/resources/data_types/tree_helper.rb +1 -1
- data/app/helpers/admin/resources/display_helper.rb +10 -9
- data/app/helpers/admin/resources/filters_helper.rb +3 -10
- data/app/helpers/admin/resources/form_helper.rb +12 -2
- data/app/helpers/admin/resources/list_helper.rb +13 -5
- data/app/helpers/admin/resources/relationships_helper.rb +0 -21
- data/app/helpers/admin/resources_helper.rb +3 -3
- data/app/mailers/admin/mailer.rb +9 -4
- data/app/views/admin/base/user_guide.html.erb +1 -1
- data/app/views/admin/dashboard/{show.html.erb → index.html.erb} +0 -0
- data/app/views/admin/dashboard/widgets/_applications.html.erb +32 -10
- data/app/views/admin/mailer/reset_password_instructions.html.erb +9 -0
- data/app/views/admin/mailer/reset_password_instructions.text.erb +9 -0
- data/app/views/admin/resources/edit.html.erb +3 -13
- data/app/views/admin/resources/index.html.erb +11 -4
- data/app/views/admin/resources/new.html.erb +2 -2
- data/app/views/admin/resources/show.html.erb +1 -1
- data/app/views/admin/shared/_head.html.erb +2 -2
- data/app/views/admin/templates/_belongs_to.html.erb +6 -9
- data/app/views/admin/templates/_dragonfly.html.erb +1 -1
- data/app/views/admin/templates/_dragonfly_form_preview.html.erb +21 -0
- data/app/views/admin/templates/_dragonfly_preview.html.erb +1 -1
- data/app/views/admin/templates/_has_and_belongs_to_many.html.erb +15 -0
- data/app/views/admin/templates/{_has_n.html.erb → _has_many.html.erb} +0 -0
- data/app/views/admin/templates/_password.html.erb +1 -1
- data/app/views/admin/templates/_selector.html.erb +1 -11
- data/app/views/admin/templates/_string.html.erb +2 -20
- data/app/views/admin/templates/_string_with_preview.html.erb +2 -3
- data/app/views/admin/templates/_text.html.erb +1 -8
- data/app/views/admin/templates/_text_with_ckeditor.html.erb +1 -1
- data/app/views/admin/templates/_text_with_ckeditor_and_assets.html.erb +12 -9
- data/app/views/helpers/admin/base/_apps.html.erb +12 -4
- data/app/views/helpers/admin/base/_login_info.html.erb +1 -1
- data/app/views/helpers/admin/resources/_filters.html.erb +2 -1
- data/app/views/helpers/admin/resources/_sidebar.html.erb +25 -41
- data/app/views/layouts/admin/base.html.erb +1 -1
- data/config/locales/typus.ca.yml +1 -1
- data/config/locales/typus.de.yml +40 -35
- data/config/locales/typus.el.yml +1 -1
- data/config/locales/typus.es.yml +1 -1
- data/config/locales/typus.fr.yml +1 -1
- data/config/locales/typus.hu.yml +1 -1
- data/config/locales/typus.it.yml +1 -1
- data/config/locales/typus.locale.models.yml.template +17 -0
- data/config/locales/typus.locale.yml.template +80 -0
- data/config/locales/typus.pt-BR.yml +1 -1
- data/config/locales/typus.pt-PT.yml +2 -2
- data/config/locales/typus.ru.yml +1 -1
- data/config/locales/typus.zh-CN.yml +1 -1
- data/config/routes.rb +5 -1
- data/lib/generators/templates/config/initializers/typus.rb +9 -0
- data/lib/generators/templates/config/typus/README +0 -6
- data/lib/support/active_record.rb +2 -10
- data/lib/support/string.rb +6 -1
- data/lib/typus.rb +49 -10
- data/lib/typus/authentication/base.rb +0 -4
- data/lib/typus/authentication/none_with_role.rb +15 -0
- data/lib/typus/configuration.rb +3 -7
- data/lib/typus/controller/ancestry.rb +1 -1
- data/lib/typus/controller/bulk.rb +6 -2
- data/lib/typus/controller/format.rb +38 -25
- data/lib/typus/orm/active_record/class_methods.rb +0 -1
- data/lib/typus/orm/active_record/search.rb +6 -2
- data/lib/typus/orm/base.rb +4 -3
- data/lib/typus/orm/mongoid.rb +4 -0
- data/lib/typus/orm/{mongo → mongoid}/class_methods.rb +4 -3
- data/lib/typus/resources.rb +9 -0
- data/lib/typus/version.rb +1 -1
- data/typus.gemspec +13 -13
- data/vendor/assets/chosen/chosen-sprite.png +0 -0
- data/vendor/assets/chosen/chosen.css +334 -0
- data/vendor/assets/chosen/chosen.jquery.min.js +10 -0
- data/vendor/assets/fancybox/jquery.fancybox-1.3.4.css +17 -17
- metadata +57 -131
- data/.gitmodules +0 -6
- data/app/assets/javascripts/typus.js +0 -8
- data/app/assets/stylesheets/typus.css +0 -20
- data/app/assets/stylesheets/typus/actions.css +0 -11
- data/app/views/admin/mailer/reset_password_link.text.erb +0 -9
- data/app/views/admin/templates/_belongs_to_with_autocomplete.html.erb +0 -26
- data/lib/typus/controller/associations.rb +0 -146
- data/lib/typus/controller/autocomplete.rb +0 -16
- data/vendor/assets/fancybox/jquery.easing-1.3.pack.js +0 -72
- data/vendor/assets/fancybox/jquery.fancybox-1.3.4.js +0 -1156
- data/vendor/assets/fancybox/jquery.mousewheel-3.0.4.pack.js +0 -14
- data/vendor/assets/formalize/css/_formalize.sass +0 -332
- data/vendor/assets/formalize/css/demo.css +0 -47
- data/vendor/assets/formalize/css/reset.css +0 -202
- data/vendor/assets/formalize/css/text.css +0 -81
- data/vendor/assets/formalize/js/dojo.formalize.js +0 -166
- data/vendor/assets/formalize/js/dojo.formalize.min.js +0 -1
- data/vendor/assets/formalize/js/extjs.formalize.js +0 -163
- data/vendor/assets/formalize/js/extjs.formalize.min.js +0 -1
- data/vendor/assets/formalize/js/jquery.formalize.js +0 -150
- data/vendor/assets/formalize/js/mootools.formalize.js +0 -155
- data/vendor/assets/formalize/js/mootools.formalize.min.js +0 -1
- data/vendor/assets/formalize/js/prototype.formalize.js +0 -163
- data/vendor/assets/formalize/js/prototype.formalize.min.js +0 -1
- data/vendor/assets/formalize/js/yui.formalize.js +0 -152
- data/vendor/assets/formalize/js/yui.formalize.min.js +0 -1
- data/vendor/assets/jquery-tokeninput/jquery.tokeninput.js +0 -736
- data/vendor/assets/jquery-tokeninput/token-input.css +0 -120
data/.gitignore
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
.bundle
|
|
3
|
-
vendor/gems
|
|
4
|
-
Gemfile.lock
|
|
5
|
-
|
|
6
|
-
# Generated stuff
|
|
7
|
-
*.gem
|
|
8
|
-
db/*.sqlite3
|
|
1
|
+
.bundle/
|
|
9
2
|
log/*.log
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
pkg/
|
|
4
|
+
|
|
5
|
+
test/dummy/config/email.yml
|
|
6
|
+
test/dummy/config/mongoid.yml
|
|
7
|
+
test/dummy/db/*.sqlite3
|
|
8
|
+
test/dummy/log/*.log
|
|
9
|
+
test/dummy/public/system/
|
|
10
|
+
test/dummy/tmp/
|
|
11
|
+
|
|
12
|
+
vendor/bundle
|
|
13
|
+
|
|
14
|
+
# This is a RubyGem so there's no need to keep the `Gemfile.lock`.
|
|
15
|
+
Gemfile.lock
|
data/.travis.yml
ADDED
data/CHANGELOG
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
= 3.2.0 (unreleased)
|
|
2
|
+
|
|
3
|
+
* [PLANNED] Models without a controller defined should use the "Resources"
|
|
4
|
+
controller.
|
|
5
|
+
|
|
6
|
+
* [PLANNED] New theme and theme support.
|
|
7
|
+
|
|
8
|
+
= 3.1.0 (unreleased)
|
|
9
|
+
|
|
10
|
+
* [PLANNED] Block changing uploaded files.
|
|
11
|
+
|
|
12
|
+
* [PLANNED] Use roles when using `:none` authentication.
|
|
13
|
+
|
|
14
|
+
* [PLANNED] Fix bulk actions combo separator. (UI)
|
|
15
|
+
|
|
16
|
+
* [PLANNED] Remove "Versions" stuff from demo sidebar.
|
|
17
|
+
|
|
18
|
+
* [PLANNED] Fix selector UI problems.
|
|
19
|
+
|
|
20
|
+
* [PLANNED] Reload data on forms only if data has changed. (UI)
|
|
21
|
+
|
|
22
|
+
* [PLANNED] Take back "Add New" on "BelongsTo" associations.
|
|
23
|
+
|
|
24
|
+
* [PLANNED] Document: `text_with_ckeditor_with_assets`.
|
|
25
|
+
|
|
26
|
+
* [PLANNED] Document: Migrate from `3.0` to `3.1`.
|
|
27
|
+
|
|
28
|
+
* [PLANNED] Document: How to test an admin controller?
|
|
29
|
+
|
|
30
|
+
* [PLANNED] Namespace filters to avoid collision with model attributes.
|
|
31
|
+
|
|
32
|
+
* [PLANNED] Helpers for `display_dragonfly` and `display_paperclip`.
|
|
33
|
+
|
|
34
|
+
* [NEW] Mountable apps support!
|
|
35
|
+
|
|
36
|
+
* [NEW] Filter with scopes.
|
|
37
|
+
|
|
38
|
+
* [NEW] Three different actions to save a record.
|
|
39
|
+
|
|
40
|
+
* [CHANGED] Now we have a dashboard for every installed application.
|
|
41
|
+
|
|
42
|
+
* [CHANGED] Associations are now cleaner. No more "relate" and "unrelate".
|
|
43
|
+
|
|
44
|
+
* [NEW] 960.gs (http://960.gs/)
|
|
45
|
+
|
|
46
|
+
* [NEW] Formalize (http://formalize.me/)
|
|
47
|
+
|
|
48
|
+
* [NEW] Chosen (http://harvesthq.github.com/chosen/)
|
|
49
|
+
|
|
50
|
+
* [CHANGED] We now support data types, which is basically a cleaner way to
|
|
51
|
+
add support to future data models. (Eg. CarrierWave)
|
|
52
|
+
|
|
53
|
+
* [CHANGED] Dragonfly attachments now also show details. (Size, date ...)
|
|
54
|
+
|
|
55
|
+
* [CHANGED] Improved usability by using Fancybox to add new related records.
|
|
56
|
+
|
|
57
|
+
* [NEW] Bulk actions.
|
|
58
|
+
|
|
59
|
+
* [CHANGED] Controllers are now splitted into modules so we can have a library
|
|
60
|
+
of common use cases.
|
|
61
|
+
|
|
62
|
+
* [CHANGED] WillPaginate has been replaced by Kaminari.
|
|
63
|
+
|
|
64
|
+
* [CHANGED] TypusCMS becomes TypusCMF.
|
|
65
|
+
|
|
66
|
+
* [NEW] Applications tabs can be sorted!
|
|
67
|
+
|
|
68
|
+
* [NEW] Models can be hidden from sidebars and dashboard.
|
|
69
|
+
|
|
70
|
+
* [NEW] Module to enable Trash functionality. Need the rails-trash plugin.
|
|
71
|
+
|
|
72
|
+
* [FIXED] We should be able to use namespaced models with more than 2 levels
|
|
73
|
+
of namespace.
|
|
74
|
+
|
|
75
|
+
* [CHANGED] We can't longer set models as "Read Only" from the configuration
|
|
76
|
+
files, this was interesting but not really usefull as anyone could mass-assign
|
|
77
|
+
attributes. Now to set an attribute as "Read Only" you only need to protect
|
|
78
|
+
it using "attr_protected".
|
|
79
|
+
|
|
80
|
+
* [NEW] Detect "attr_protected" roles.
|
|
81
|
+
|
|
82
|
+
* [NEW] Asset pipeline usage. (Yes, we are in Rails 3.1)
|
|
83
|
+
|
|
84
|
+
* [CHANGED] Removed "Autocomplete" module.
|
|
85
|
+
|
|
86
|
+
* [NEW] Typus is now tested with Travis-CI.
|
|
87
|
+
|
|
88
|
+
* [NEW] Improved MongoDB support.
|
|
89
|
+
|
|
90
|
+
* [NEW] Improved Devise support out of the box.
|
|
91
|
+
|
|
92
|
+
* [CHANGED] Improved how exporters work. Exporting only works if we define it
|
|
93
|
+
on the model, otherwise will raise a 422 error.
|
|
94
|
+
|
|
95
|
+
* [CHANGED] Updated mailer templates and renamed them. We are using the
|
|
96
|
+
templates provided by Devise.
|
|
97
|
+
|
|
98
|
+
* [CHANGED] We can set image sizes.
|
|
99
|
+
|
|
100
|
+
* [CHANGED] Moved demo application to "test/dummy" following "enginex"
|
|
101
|
+
conventions.
|
|
102
|
+
|
|
103
|
+
* [CHANGED] We are not longer using FasterCSV on Ruby 1.8.7.
|
|
104
|
+
|
|
105
|
+
* [NEW] Introduced the concept of "Widgets". Dashboard is now a "Widget".
|
|
106
|
+
|
|
107
|
+
* [CHANGED] Custom actions are back!
|
|
108
|
+
|
|
109
|
+
= 3.0.12
|
|
110
|
+
|
|
111
|
+
* [FIXED] Use will_paginate 3.0.0.
|
|
112
|
+
|
|
113
|
+
= 3.0.9
|
|
114
|
+
|
|
115
|
+
* [NEW] Refactored and renamed `User` extensions to `AdminUserV1`.
|
|
116
|
+
|
|
117
|
+
* [NEW] `AdminUserV2` which uses `bcrypt` and it's simpler. This will be the
|
|
118
|
+
default authentication mechanism for my new apps.
|
|
119
|
+
|
|
120
|
+
= 3.0.8 (unreleased)
|
|
121
|
+
|
|
122
|
+
* [FIXED] Missing alias. (Commit 2af7d4cfd98bb0)
|
|
123
|
+
|
|
124
|
+
= 3.0.7
|
|
125
|
+
|
|
126
|
+
*[CHANGED] Updated assets. Please run the `typus:assets` generator in order
|
|
127
|
+
to create the new files on the new location.
|
|
128
|
+
|
|
129
|
+
= 3.0.3
|
|
130
|
+
|
|
131
|
+
* [NEW] Support for has many through relationships. [jmeiss]
|
|
132
|
+
|
|
133
|
+
* [CHANGED] Removed typus pagination module and use `will_paginate` one.
|
|
134
|
+
Pagination options can be configure overriding `Typus.pagination` variable.
|
|
135
|
+
|
|
136
|
+
* [FIXED] Queries are now using the table name. [tyx]
|
|
137
|
+
|
|
138
|
+
* [NEW] All queries are `unscoped` so we can separate completely the frontend
|
|
139
|
+
from the backend.
|
|
140
|
+
|
|
141
|
+
* [NEW] We can disable sortable tables.
|
|
142
|
+
|
|
143
|
+
* [FIXED] Url generation bug when using namespaced STI models. [masone]
|
|
144
|
+
|
|
145
|
+
* [NEW] Raise an exception if config for model cannot be found. [masone]
|
|
146
|
+
|
|
147
|
+
* [FIXED] Minor bug fixes and re-styling ...
|
|
148
|
+
|
|
149
|
+
* [NEW] Layouts contain metatag with generator information.
|
|
150
|
+
|
|
151
|
+
* [NEW] Added missing csrf_meta_tag in `session.html.erb` layout.
|
|
152
|
+
|
|
153
|
+
* [NEW] Added constrain to database to avoid duplicated emails.
|
|
154
|
+
|
|
155
|
+
* [FIXED] Dates on tables are localized.
|
|
156
|
+
|
|
157
|
+
* [FIXED] `@resource.classify.constantize` becomes `@resource.constantize`.
|
|
158
|
+
|
|
159
|
+
* [CHANGED] Updated `typus_preview` to display original filaname when file is
|
|
160
|
+
not an image.
|
|
161
|
+
|
|
162
|
+
* [NEW] Support for Dragonfly attachments. Template for this kind of attribute
|
|
163
|
+
is `_dragonfly.html.erb`.
|
|
164
|
+
|
|
165
|
+
* [CHANGED] Paperclip attachments are detected as `:paperclip` thus the form
|
|
166
|
+
template is not `_paperclip.html.erb`.
|
|
167
|
+
|
|
168
|
+
* [NEW] 中文 (zh-CN) translation. [ZoOL]
|
|
169
|
+
|
|
170
|
+
* [CHANGED] `action_after_save` by default is `index`. This has been changed
|
|
171
|
+
after a usability test with a client.
|
|
172
|
+
|
|
173
|
+
* [NEW] Greek (el) translation. [Spyros Livathinos]
|
|
174
|
+
|
|
175
|
+
* [CHANGED] Updated jQuery to v1.4.4
|
|
176
|
+
|
|
177
|
+
* [CHANGED] Updated fancybox to v1.3.4
|
|
178
|
+
|
|
179
|
+
* [NEW] New generator: `rails generate typus:assets`.
|
|
180
|
+
|
|
181
|
+
* [NEW] Created UserVoice (http://typuscms.uservoice.com/)
|
|
182
|
+
|
|
183
|
+
* [CHANGED] Table of contents on documentation for easier access.
|
|
184
|
+
|
|
185
|
+
* [CHANGED] Display `—` where no content is available.
|
|
186
|
+
|
|
187
|
+
* [NEW] `Admin::ResourcesController` includes `Typus::Extensions` if available.
|
|
188
|
+
|
|
189
|
+
* [CHANGED] Removed `remove_filter_link` helper in favour of predefined links
|
|
190
|
+
to filters.
|
|
191
|
+
|
|
192
|
+
* [NEW] Custom actions can be injected into table actions. This needs some
|
|
193
|
+
refector to be more powerful (roles) but it works for now.
|
|
194
|
+
|
|
195
|
+
* [CHANGED] `current_user` is now `admin_user`.
|
|
196
|
+
|
|
197
|
+
* [CHANGED] All available locales are shown to the user.
|
|
198
|
+
|
|
199
|
+
* [CHANGED] All the I18n stuff of `typus` is now under Typus::I18n namespace.
|
|
200
|
+
|
|
201
|
+
* [CHANGED] `/admin/help` is now `/admin/user_guide`.
|
|
202
|
+
|
|
203
|
+
* [NEW] Link to `/admin/user_guide` from the sidebar.
|
|
204
|
+
|
|
205
|
+
* [CHANGED] AdminUser::LANGUAGES becomes AdminUser::LOCALE so you'll have to
|
|
206
|
+
update your AdminUser.
|
|
207
|
+
|
|
208
|
+
* [NEW] Better application templates.
|
|
209
|
+
|
|
210
|
+
= 3.0.2
|
|
211
|
+
|
|
212
|
+
* [FIXED] Use Arel to get the data on lists. After moving to will_paginate I
|
|
213
|
+
broke the data method, on each list we where "selecting ALL on the table of
|
|
214
|
+
the current model" (Really ugly bug) [Reported by NateW]
|
|
215
|
+
|
|
216
|
+
* [FIXED]* If @current_user was being set many times on each request, thanks
|
|
217
|
+
to Rails caching mechanism this was not affecting to the performance. Now we
|
|
218
|
+
only see the @current_user once. (As it should be.)
|
|
219
|
+
|
|
220
|
+
= 3.0.1
|
|
221
|
+
|
|
222
|
+
* [FIXED] After moving from a vendored paginator to will_paginate I removed
|
|
223
|
+
some stuff which shouldn't be removed, so the 3.0.0 gem is totally broken.
|
|
224
|
+
|
|
225
|
+
* [FIXED] Force query with postgresql adapter to not be case sensitive [jmeiss]
|
|
226
|
+
|
|
227
|
+
= 3.0.0
|
|
228
|
+
|
|
229
|
+
* [NEW] New gem version compatible with Rails 3.
|
|
230
|
+
|
|
231
|
+
= Previously
|
|
232
|
+
|
|
233
|
+
Why a 3.0.0 version? After considering the work done for the Rails 3 transition
|
|
234
|
+
I though it would be a good idea to keep versions syncronized with Rails.
|
|
235
|
+
|
|
236
|
+
Typus will have the same version numbers as Rails as I considered it's pretty
|
|
237
|
+
tied to it. With each release of Rails, we will take the latest features into
|
|
238
|
+
Typus.
|
|
239
|
+
|
|
240
|
+
Pending stuff that someday will be done, donations and collaborations are
|
|
241
|
+
accepted.
|
|
242
|
+
|
|
243
|
+
* Add AJAX, specially when removing and adding new relationships.
|
|
244
|
+
|
|
245
|
+
* Transversal search and full models search.
|
|
246
|
+
|
|
247
|
+
* Test the helpers and add some functional testing.
|
|
248
|
+
|
|
249
|
+
* Nested models.
|
|
250
|
+
|
|
251
|
+
* Contextual content depending on the role logged.
|
|
252
|
+
|
|
253
|
+
* Replace typus authentication by devise.
|
data/Gemfile
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
source 'http://rubygems.org'
|
|
2
|
+
|
|
3
|
+
# Declare your gem's dependencies in typus.gemspec.
|
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
|
5
|
+
# development dependencies will be added by default to the :development group.
|
|
6
|
+
gemspec
|
|
7
|
+
|
|
8
|
+
# Gems used only for assets and not required
|
|
9
|
+
# in production environments by default.
|
|
10
|
+
group :assets do
|
|
11
|
+
gem 'sass-rails', " ~> 3.1.0"
|
|
12
|
+
gem 'coffee-rails', "~> 3.1.0"
|
|
13
|
+
gem 'uglifier'
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Database adapters
|
|
17
|
+
platforms :jruby do
|
|
18
|
+
gem 'activerecord-jdbcmysql-adapter'
|
|
19
|
+
gem 'activerecord-jdbcpostgresql-adapter'
|
|
20
|
+
gem 'activerecord-jdbcsqlite3-adapter'
|
|
21
|
+
|
|
22
|
+
gem 'jruby-openssl' # JRuby limited openssl loaded. http://jruby.org/openssl
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
platforms :ruby do
|
|
26
|
+
gem 'mysql2'
|
|
27
|
+
gem 'pg'
|
|
28
|
+
gem 'sqlite3'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# And this stuff needed for the demo application.
|
|
32
|
+
gem "acts_as_list"
|
|
33
|
+
gem "acts_as_tree"
|
|
34
|
+
gem "factory_girl_rails", "~> 1.1.0"
|
|
35
|
+
gem "rails-permalink", "~> 1.0.0"
|
|
36
|
+
gem "rails-trash", "~> 1.1.2"
|
|
37
|
+
|
|
38
|
+
# For some reason I also need to define the `jquery-rails` gem here.
|
|
39
|
+
gem "jquery-rails"
|
|
40
|
+
|
|
41
|
+
# Rich Text Editor
|
|
42
|
+
gem "ckeditor-rails", "0.0.2"
|
|
43
|
+
|
|
44
|
+
# Alternative authentication
|
|
45
|
+
gem "devise", "~> 1.4.3"
|
|
46
|
+
|
|
47
|
+
# Asset Management with Dragonfly
|
|
48
|
+
gem "dragonfly", "~> 0.9"
|
|
49
|
+
gem "rack-cache", :require => "rack/cache"
|
|
50
|
+
|
|
51
|
+
# Asset Management with Paperclip
|
|
52
|
+
gem "paperclip", "~> 2.3.16"
|
|
53
|
+
|
|
54
|
+
# MongoDB
|
|
55
|
+
gem "mongoid", "~> 2.1"
|
|
56
|
+
gem "bson_ext", "~> 1.3"
|
|
57
|
+
|
|
58
|
+
group :test do
|
|
59
|
+
gem "shoulda-context", "~> 1.0.0.beta1"
|
|
60
|
+
gem "mocha" # Make sure mocha is loaded at the end ...
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Remember to install the Chrome or Safari extension, otherwise it doesn't
|
|
64
|
+
# make sense to have this here.
|
|
65
|
+
group :development do
|
|
66
|
+
gem "guard-livereload"
|
|
67
|
+
gem "rb-fsevent"
|
|
68
|
+
gem "growl_notify"
|
|
69
|
+
end
|
data/Guardfile
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# A sample Guardfile
|
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
|
3
|
+
|
|
4
|
+
guard 'livereload' do
|
|
5
|
+
watch(%r{app/.+\.(erb|haml)})
|
|
6
|
+
watch(%r{app/helpers/.+\.rb})
|
|
7
|
+
watch(%r{(public/|app/assets).+\.(css|js|html)})
|
|
8
|
+
watch(%r{(app/assets/.+\.css)\.s[ac]ss}) { |m| m[1] }
|
|
9
|
+
watch(%r{(app/assets/.+\.js)\.coffee}) { |m| m[1] }
|
|
10
|
+
watch(%r{config/locales/.+\.yml})
|
|
11
|
+
end
|
data/README.md
CHANGED
|
@@ -22,16 +22,14 @@ You can try a demo [here][typus_demo].
|
|
|
22
22
|
- Customizable and extensible templates.
|
|
23
23
|
- Integrated [paperclip][paperclip] and [dragonfly][dragonfly] attachments viewer.
|
|
24
24
|
- Works with `Rails 3.1.X`.
|
|
25
|
-
- Tested with latest Rubies. (`1.8.7-p352`, `ree-1.8.7-2011.03`, `1.9.2-p290`, `jruby-1.6.3`)
|
|
26
|
-
- Tested with `SQLite`, `MySQL` and `PostgreSQL`.
|
|
27
25
|
|
|
28
26
|
## Installing
|
|
29
27
|
|
|
30
28
|
Add **Typus** to your `Gemfile`
|
|
31
29
|
|
|
32
|
-
gem 'typus'
|
|
30
|
+
gem 'typus'
|
|
33
31
|
|
|
34
|
-
# Bundle edge
|
|
32
|
+
# Bundle edge Typus instead:
|
|
35
33
|
# gem 'typus', :git => 'git://github.com/typus/typus.git'
|
|
36
34
|
|
|
37
35
|
Update your bundle, run the generator and start the application server:
|
|
@@ -42,6 +40,14 @@ Update your bundle, run the generator and start the application server:
|
|
|
42
40
|
|
|
43
41
|
and go to <http://0.0.0.0:3000/admin>.
|
|
44
42
|
|
|
43
|
+
## Testing
|
|
44
|
+
|
|
45
|
+
To test clone the git repo and run the following commands:
|
|
46
|
+
|
|
47
|
+
$ git clone git://github.com/typus/typus.git
|
|
48
|
+
$ bundle install --path vendor/bundle
|
|
49
|
+
$ bundle exec rake
|
|
50
|
+
|
|
45
51
|
## Links
|
|
46
52
|
|
|
47
53
|
- [Documentation](https://github.com/typus/typus/wiki)
|
|
@@ -49,32 +55,14 @@ and go to <http://0.0.0.0:3000/admin>.
|
|
|
49
55
|
- [Source Code][typus] and [RubyGems][typus_gem]
|
|
50
56
|
- [Mailing List](http://groups.google.com/group/typus)
|
|
51
57
|
- [Contributors List](http://github.com/typus/typus/contributors)
|
|
58
|
+
- [Travis Builds](http://travis-ci.org/#!/typus/typus)
|
|
52
59
|
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
Copyright (c) 2007-2011 Francesc Esplugas Marti
|
|
56
|
-
|
|
57
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
58
|
-
a copy of this software and associated documentation files (the
|
|
59
|
-
"Software"), to deal in the Software without restriction, including
|
|
60
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
61
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
62
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
63
|
-
the following conditions:
|
|
64
|
-
|
|
65
|
-
The above copyright notice and this permission notice shall be
|
|
66
|
-
included in all copies or substantial portions of the Software.
|
|
60
|
+
## License
|
|
67
61
|
|
|
68
|
-
|
|
69
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
70
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
71
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
72
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
73
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
74
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
62
|
+
Typus is released under the MIT license.
|
|
75
63
|
|
|
76
64
|
[typus]: http://github.com/typus/typus
|
|
77
|
-
[typus_demo]: http://demo.
|
|
65
|
+
[typus_demo]: http://demo.typuscmf.com/
|
|
78
66
|
[typus_demo_code]: https://github.com/typus/demo
|
|
79
67
|
[typus_locales]: https://github.com/typus/typus/tree/master/config/locales
|
|
80
68
|
[typus_gem]: http://rubygems.org/gems/typus
|
data/Rakefile
CHANGED
|
@@ -1,114 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
require '
|
|
3
|
-
require '
|
|
1
|
+
begin
|
|
2
|
+
require 'bundler/setup'
|
|
3
|
+
require 'bundler/gem_tasks'
|
|
4
|
+
rescue LoadError
|
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
6
|
+
end
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
begin
|
|
9
|
+
require 'rdoc/task'
|
|
10
|
+
rescue LoadError
|
|
11
|
+
require 'rdoc/rdoc'
|
|
12
|
+
require 'rake/rdoctask'
|
|
13
|
+
RDoc::Task = Rake::RDocTask
|
|
14
|
+
end
|
|
6
15
|
|
|
7
|
-
|
|
8
|
-
|
|
16
|
+
require 'rake/testtask'
|
|
17
|
+
|
|
18
|
+
Rake::TestTask.new(:test) do |t|
|
|
19
|
+
t.libs << 'lib'
|
|
20
|
+
t.libs << 'test'
|
|
21
|
+
# t.pattern = 'test/**/*_test.rb'
|
|
9
22
|
t.test_files = FileList['test/app/controllers/**/*_test.rb',
|
|
10
23
|
'test/app/models/**/*_test.rb',
|
|
11
24
|
'test/app/mailers/**/*_test.rb',
|
|
12
25
|
'test/config/*_test.rb',
|
|
13
26
|
'test/lib/**/*_test.rb']
|
|
14
|
-
t.verbose =
|
|
27
|
+
t.verbose = false
|
|
15
28
|
end
|
|
16
29
|
|
|
17
|
-
|
|
30
|
+
task :default => :test
|
|
31
|
+
|
|
32
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
|
18
33
|
rdoc.rdoc_dir = 'rdoc'
|
|
19
34
|
rdoc.title = 'Typus'
|
|
20
|
-
rdoc.options << '--line-numbers'
|
|
35
|
+
rdoc.options << '--line-numbers'
|
|
21
36
|
rdoc.rdoc_files.include('README.rdoc')
|
|
22
37
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
23
38
|
end
|
|
24
|
-
|
|
25
|
-
namespace :setup do
|
|
26
|
-
|
|
27
|
-
desc "Setup CI Joe"
|
|
28
|
-
task :cijoe do
|
|
29
|
-
system "git config --replace-all cijoe.runner 'rake test:rubies'"
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
namespace :install do
|
|
35
|
-
|
|
36
|
-
desc "Install REE on Mac OS X Lion"
|
|
37
|
-
task :ree_on_lion do
|
|
38
|
-
system "rvm remove ree"
|
|
39
|
-
system "export CC=/usr/bin/gcc-4.2"
|
|
40
|
-
system "rvm install --force ree"
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
desc "Install JRuby and update Rubygems to latest version."
|
|
44
|
-
task :jruby_on_lion do
|
|
45
|
-
system "rvm remove jruby"
|
|
46
|
-
system "rvm install --force jruby"
|
|
47
|
-
system "rvm use jruby"
|
|
48
|
-
system "gem install rubygems-update"
|
|
49
|
-
system "update_rubygems"
|
|
50
|
-
system "gem update --system"
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
desc "Install common Rubies"
|
|
54
|
-
task :rubies do
|
|
55
|
-
system "rvm install 1.8.7,ree,1.9.2,jruby"
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
desc "Install latest Rubygems"
|
|
59
|
-
task :latest_rubygems do
|
|
60
|
-
system "rvm ruby gem update --system"
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
desc "Install bundler and rake"
|
|
64
|
-
task :bundler_and_rake do
|
|
65
|
-
system "rvm ruby gem install --no-ri --no-rdoc bundler rake"
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
desc "Run bundle in all Ruby versions."
|
|
69
|
-
task :gems do
|
|
70
|
-
system "rvm ruby bundle install --gemfile=test/fixtures/rails_app/Gemfile"
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
namespace :test do
|
|
76
|
-
|
|
77
|
-
# Typus should be compatible with Ruby 1.8.7 and 1.9.2. Currently tests only
|
|
78
|
-
# pass when using 1.9.2 because on 1.8.7 we get an error because `fastercsv`
|
|
79
|
-
# is not loaded. This is because I've not added that library in the Gemfile.
|
|
80
|
-
desc "Test officially supported Ruby versions and database adapters"
|
|
81
|
-
task :supported do
|
|
82
|
-
system "rvm 1.9.2 rake test DB=sqlite3"
|
|
83
|
-
system "rvm 1.9.2 rake test DB=postgresql"
|
|
84
|
-
system "rvm 1.9.2 rake test DB=mysql"
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
# We want to test Typus with all supported databases:
|
|
88
|
-
#
|
|
89
|
-
# - Postgresql
|
|
90
|
-
# - MySQL
|
|
91
|
-
# - SQLite3
|
|
92
|
-
#
|
|
93
|
-
task :rubies do
|
|
94
|
-
system "rvm ruby rake DB=sqlite3"
|
|
95
|
-
system "rvm ruby rake DB=postgresql"
|
|
96
|
-
system "rvm ruby rake DB=mysql"
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
namespace :submodules do
|
|
102
|
-
|
|
103
|
-
desc "Update submodules"
|
|
104
|
-
task :update do
|
|
105
|
-
system "git pull && git submodule update --init"
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
desc "Upgrade submodules"
|
|
109
|
-
task :upgrade do
|
|
110
|
-
system "git submodule foreach 'git pull origin master'"
|
|
111
|
-
system "git ci -m 'Updated submodules' ."
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
end
|