releaf 0.1.1
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/LICENSE +24 -0
- data/README.md +74 -0
- data/Rakefile +62 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_2e83ff_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_888888_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-icons_cd0a0a_256x240.png +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/close.png +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/loading.gif +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/next.png +0 -0
- data/app/assets/images/releaf/3rd_party/lightbox/prev.png +0 -0
- data/app/assets/images/releaf/add.png +0 -0
- data/app/assets/images/releaf/background.jpg +0 -0
- data/app/assets/images/releaf/button/button_bgr.gif +0 -0
- data/app/assets/images/releaf/button/button_hover_bgr.png +0 -0
- data/app/assets/images/releaf/controllers/content/close.gif +0 -0
- data/app/assets/images/releaf/controllers/content/close_active.gif +0 -0
- data/app/assets/images/releaf/controllers/content/close_hover.gif +0 -0
- data/app/assets/images/releaf/controllers/content/global_fields_bgr.png +0 -0
- data/app/assets/images/releaf/controllers/content/open.gif +0 -0
- data/app/assets/images/releaf/controllers/content/open_2.gif +0 -0
- data/app/assets/images/releaf/controllers/content/open_active.gif +0 -0
- data/app/assets/images/releaf/controllers/content/open_hover.gif +0 -0
- data/app/assets/images/releaf/controllers/sessions/background.jpg +0 -0
- data/app/assets/images/releaf/controllers/sessions/logo.jpg +0 -0
- data/app/assets/images/releaf/expand_tool/close.png +0 -0
- data/app/assets/images/releaf/expand_tool/close_hover.png +0 -0
- data/app/assets/images/releaf/expand_tool/close_hover_shim.png +0 -0
- data/app/assets/images/releaf/expand_tool/close_shim.png +0 -0
- data/app/assets/images/releaf/expand_tool/loader.gif +0 -0
- data/app/assets/images/releaf/expand_tool/open.png +0 -0
- data/app/assets/images/releaf/expand_tool/open_hover.png +0 -0
- data/app/assets/images/releaf/expand_tool/open_hover_shim.png +0 -0
- data/app/assets/images/releaf/expand_tool/open_shim.png +0 -0
- data/app/assets/images/releaf/favicon.ico +0 -0
- data/app/assets/images/releaf/globalFieldContainerBgr.png +0 -0
- data/app/assets/images/releaf/icons/129.png +0 -0
- data/app/assets/images/releaf/icons/130.png +0 -0
- data/app/assets/images/releaf/icons/accept.png +0 -0
- data/app/assets/images/releaf/icons/add.png +0 -0
- data/app/assets/images/releaf/icons/arrow_down.png +0 -0
- data/app/assets/images/releaf/icons/arrow_left.png +0 -0
- data/app/assets/images/releaf/icons/arrow_refresh.png +0 -0
- data/app/assets/images/releaf/icons/arrow_up.png +0 -0
- data/app/assets/images/releaf/icons/bin_empty.png +0 -0
- data/app/assets/images/releaf/icons/bullet_black.png +0 -0
- data/app/assets/images/releaf/icons/bullet_connect.png +0 -0
- data/app/assets/images/releaf/icons/bullet_start.png +0 -0
- data/app/assets/images/releaf/icons/bullet_tick.png +0 -0
- data/app/assets/images/releaf/icons/chrome.png +0 -0
- data/app/assets/images/releaf/icons/control_play.png +0 -0
- data/app/assets/images/releaf/icons/date.png +0 -0
- data/app/assets/images/releaf/icons/delete.png +0 -0
- data/app/assets/images/releaf/icons/disk.png +0 -0
- data/app/assets/images/releaf/icons/drag-handle.png +0 -0
- data/app/assets/images/releaf/icons/error.png +0 -0
- data/app/assets/images/releaf/icons/eye.png +0 -0
- data/app/assets/images/releaf/icons/firefox.png +0 -0
- data/app/assets/images/releaf/icons/google-not-available.gif +0 -0
- data/app/assets/images/releaf/icons/google.gif +0 -0
- data/app/assets/images/releaf/icons/keyboard.png +0 -0
- data/app/assets/images/releaf/icons/left_16.png +0 -0
- data/app/assets/images/releaf/icons/link.png +0 -0
- data/app/assets/images/releaf/icons/magnifier.png +0 -0
- data/app/assets/images/releaf/icons/notAllowed.png +0 -0
- data/app/assets/images/releaf/icons/page_white_add.png +0 -0
- data/app/assets/images/releaf/icons/page_white_edit.png +0 -0
- data/app/assets/images/releaf/icons/page_white_put.png +0 -0
- data/app/assets/images/releaf/icons/page_white_text.png +0 -0
- data/app/assets/images/releaf/icons/pencil.png +0 -0
- data/app/assets/images/releaf/icons/picture.png +0 -0
- data/app/assets/images/releaf/icons/right_16.png +0 -0
- data/app/assets/images/releaf/icons/tick.png +0 -0
- data/app/assets/images/releaf/icons/warning.png +0 -0
- data/app/assets/images/releaf/icons/world_go.png +0 -0
- data/app/assets/images/releaf/icons/world_link.png +0 -0
- data/app/assets/images/releaf/input/autocompleteExpandIcon.png +0 -0
- data/app/assets/images/releaf/input/input_bgr.gif +0 -0
- data/app/assets/images/releaf/language_root.png +0 -0
- data/app/assets/images/releaf/loader.gif +0 -0
- data/app/assets/images/releaf/logout.png +0 -0
- data/app/assets/images/releaf/main_menu/active_bgr.png +0 -0
- data/app/assets/images/releaf/main_menu/bgr.png +0 -0
- data/app/assets/images/releaf/main_menu/hover_bgr.png +0 -0
- data/app/assets/images/releaf/module.png +0 -0
- data/app/assets/images/releaf/panel_layout/active_bgr.png +0 -0
- data/app/assets/images/releaf/panel_layout/secondary_panel_horizontal_bgr.png +0 -0
- data/app/assets/images/releaf/panel_layout/secondary_panel_vertical_bgr.png +0 -0
- data/app/assets/images/releaf/releaf_table/selected_bgr.png +0 -0
- data/app/assets/images/releaf/releaf_table/th_bgr.gif +0 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/README.md +73 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/jquery.cookie.js +47 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/server.js +24 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.html +19 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.js +80 -0
- data/app/assets/javascripts/releaf/3rd_party/jquery-ui-timepicker-addon.js +1882 -0
- data/app/assets/javascripts/releaf/3rd_party/lightbox.js.erb +379 -0
- data/app/assets/javascripts/releaf/application.js +14 -0
- data/app/assets/javascripts/releaf/controllers/base.js +170 -0
- data/app/assets/javascripts/releaf/controllers/releaf/content.js +90 -0
- data/app/assets/javascripts/releaf/controllers/releaf/translations.js +31 -0
- data/app/assets/javascripts/releaf/include/continuous_scroll.js +321 -0
- data/app/assets/javascripts/releaf/include/field.type_autocomplete.js +58 -0
- data/app/assets/javascripts/releaf/include/field.type_richtext.js +90 -0
- data/app/assets/javascripts/releaf/include/localization.js +12 -0
- data/app/assets/javascripts/releaf/include/nested_fields.js +71 -0
- data/app/assets/javascripts/releaf/include/sortable.js +27 -0
- data/app/assets/javascripts/releaf/lib/request_url.js +183 -0
- data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-1.9.2.custom.css.erb +464 -0
- data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-timepicker-addon.css +10 -0
- data/app/assets/stylesheets/releaf/3rd_party/lightbox.css.erb +157 -0
- data/app/assets/stylesheets/releaf/application.css.erb +122 -0
- data/app/assets/stylesheets/releaf/controllers/base.css.erb +205 -0
- data/app/assets/stylesheets/releaf/controllers/releaf/content.css.erb +416 -0
- data/app/assets/stylesheets/releaf/controllers/releaf/sessions.css.scss.erb +116 -0
- data/app/assets/stylesheets/releaf/controllers/releaf/translations.css.erb +205 -0
- data/app/assets/stylesheets/releaf/include/button.css.erb +176 -0
- data/app/assets/stylesheets/releaf/include/field.css.erb +257 -0
- data/app/assets/stylesheets/releaf/include/input.css.erb +40 -0
- data/app/assets/stylesheets/releaf/include/main_menu.css.erb +66 -0
- data/app/assets/stylesheets/releaf/include/pagination.css.erb +29 -0
- data/app/assets/stylesheets/releaf/include/panel_layout.css.erb +251 -0
- data/app/assets/stylesheets/releaf/include/releaf_table.css.erb +112 -0
- data/app/assets/stylesheets/releaf/include/sortable.css.erb +12 -0
- data/app/controllers/releaf/admins_controller.rb +48 -0
- data/app/controllers/releaf/application_controller.rb +11 -0
- data/app/controllers/releaf/base_application_controller.rb +15 -0
- data/app/controllers/releaf/base_controller.rb +310 -0
- data/app/controllers/releaf/content_controller.rb +166 -0
- data/app/controllers/releaf/roles_controller.rb +36 -0
- data/app/controllers/releaf/sessions_controller.rb +5 -0
- data/app/controllers/releaf/tinymce_assets_controller.rb +26 -0
- data/app/controllers/releaf/translations_controller.rb +121 -0
- data/app/helpers/releaf/admin_helper.rb +79 -0
- data/app/helpers/releaf/application_helper.rb +4 -0
- data/app/helpers/releaf/pagination_renderer.rb +44 -0
- data/app/helpers/releaf/releaf_devise_helper.rb +8 -0
- data/app/models/releaf/admin.rb +51 -0
- data/app/models/releaf/node.rb +221 -0
- data/app/models/releaf/node_base.rb +25 -0
- data/app/models/releaf/role.rb +119 -0
- data/app/models/releaf/tinymce_asset.rb +6 -0
- data/app/views/layouts/releaf/admin.html.haml +51 -0
- data/app/views/releaf/aliases/_edit.body.haml +50 -0
- data/app/views/releaf/aliases/_edit.header.haml +19 -0
- data/app/views/releaf/aliases/_index.row.haml +5 -0
- data/app/views/releaf/aliases/_secondary_panel.haml +13 -0
- data/app/views/releaf/base/_edit.body.haml +19 -0
- data/app/views/releaf/base/_edit.field.haml +96 -0
- data/app/views/releaf/base/_edit.field.type_autocomplete.haml +15 -0
- data/app/views/releaf/base/_edit.field.type_checkbox.haml +5 -0
- data/app/views/releaf/base/_edit.field.type_date.haml +8 -0
- data/app/views/releaf/base/_edit.field.type_datetime.haml +8 -0
- data/app/views/releaf/base/_edit.field.type_delete_nested.haml +3 -0
- data/app/views/releaf/base/_edit.field.type_file.haml +10 -0
- data/app/views/releaf/base/_edit.field.type_image.haml +14 -0
- data/app/views/releaf/base/_edit.field.type_link.haml +4 -0
- data/app/views/releaf/base/_edit.field.type_password.haml +4 -0
- data/app/views/releaf/base/_edit.field.type_richtext.haml +4 -0
- data/app/views/releaf/base/_edit.field.type_richtext_i18n.haml +27 -0
- data/app/views/releaf/base/_edit.field.type_select.haml +11 -0
- data/app/views/releaf/base/_edit.field.type_text.haml +4 -0
- data/app/views/releaf/base/_edit.field.type_text_i18n.haml +27 -0
- data/app/views/releaf/base/_edit.field.type_textarea.haml +4 -0
- data/app/views/releaf/base/_edit.field.type_textarea_i18n.haml +27 -0
- data/app/views/releaf/base/_edit.field.type_time.haml +8 -0
- data/app/views/releaf/base/_edit.footer.haml +14 -0
- data/app/views/releaf/base/_edit.form.haml +4 -0
- data/app/views/releaf/base/_edit.has_many_associations.haml +45 -0
- data/app/views/releaf/base/_edit.header.haml +3 -0
- data/app/views/releaf/base/_index.body.haml +6 -0
- data/app/views/releaf/base/_index.cell.haml +19 -0
- data/app/views/releaf/base/_index.footer.haml +22 -0
- data/app/views/releaf/base/_index.header.haml +4 -0
- data/app/views/releaf/base/_index.row.haml +6 -0
- data/app/views/releaf/base/_index.search.haml +5 -0
- data/app/views/releaf/base/_index.table.haml +8 -0
- data/app/views/releaf/base/_secondary_panel.haml +9 -0
- data/app/views/releaf/base/_show.body.haml +7 -0
- data/app/views/releaf/base/_show.field.haml +78 -0
- data/app/views/releaf/base/_show.field.type_html.haml +1 -0
- data/app/views/releaf/base/_show.footer.haml +16 -0
- data/app/views/releaf/base/_show.header.haml +3 -0
- data/app/views/releaf/base/confirm_destroy.haml +10 -0
- data/app/views/releaf/base/edit.haml +1 -0
- data/app/views/releaf/base/index.haml +3 -0
- data/app/views/releaf/base/new.haml +1 -0
- data/app/views/releaf/base/show.haml +3 -0
- data/app/views/releaf/content/_edit.body.haml +45 -0
- data/app/views/releaf/content/_edit.content_fields.haml +19 -0
- data/app/views/releaf/content/_edit.slug.haml +12 -0
- data/app/views/releaf/content/_get_content_form.haml +7 -0
- data/app/views/releaf/content/_secondary_panel.haml +3 -0
- data/app/views/releaf/content/_show.field.content.haml +11 -0
- data/app/views/releaf/content/_tree_level.haml +16 -0
- data/app/views/releaf/content/ajax.new.haml +3 -0
- data/app/views/releaf/content/index.haml +0 -0
- data/app/views/releaf/roles/_edit.field.admins.haml +0 -0
- data/app/views/releaf/roles/_edit.field.permissions.haml +5 -0
- data/app/views/releaf/roles/_show.field.default.haml +6 -0
- data/app/views/releaf/roles/_show.field.permissions.haml +11 -0
- data/app/views/releaf/sessions/new.html.haml +17 -0
- data/app/views/releaf/translations/_edit.body.haml +50 -0
- data/app/views/releaf/translations/_edit.header.haml +19 -0
- data/app/views/releaf/translations/_index.row.haml +5 -0
- data/app/views/releaf/translations/_secondary_panel.haml +13 -0
- data/bin/releaf +25 -0
- data/lib/generators/releaf/install_generator.rb +87 -0
- data/lib/generators/releaf/templates/config/common_fields.yml.example +17 -0
- data/lib/generators/releaf/templates/controllers/home_controller.rb +4 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_222222_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_2e83ff_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_454545_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_888888_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/jquery_ui/smoothness/ui-icons_cd0a0a_256x240.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/close.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/loading.gif +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/next.png +0 -0
- data/lib/generators/releaf/templates/images/3rd_party/lightbox/prev.png +0 -0
- data/lib/generators/releaf/templates/initializers/releaf.rb +59 -0
- data/lib/generators/releaf/templates/initializers/releaf_i18n.rb +8 -0
- data/lib/generators/releaf/templates/initializers/releaf_store_current_template.rb +25 -0
- data/lib/generators/releaf/templates/javascripts/3rd_party/jquery_ui.js +14850 -0
- data/lib/generators/releaf/templates/javascripts/3rd_party/lightbox.js.erb +379 -0
- data/lib/generators/releaf/templates/javascripts/application.js +15 -0
- data/lib/generators/releaf/templates/javascripts/lib/js_check.js +8 -0
- data/lib/generators/releaf/templates/javascripts/lib/request_url.js +169 -0
- data/lib/generators/releaf/templates/javascripts/lib/sortable.js +29 -0
- data/lib/generators/releaf/templates/migrations/create_releaf_admins.rb +53 -0
- data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +25 -0
- data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +11 -0
- data/lib/generators/releaf/templates/migrations/create_releaf_tinymce_assets.rb +10 -0
- data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +31 -0
- data/lib/generators/releaf/templates/models/admin_ability.rb +51 -0
- data/lib/generators/releaf/templates/seeds.rb +64 -0
- data/lib/generators/releaf/templates/stylesheets/3rd_party/jquery_ui/smoothness.css.erb +1174 -0
- data/lib/generators/releaf/templates/stylesheets/3rd_party/lightbox.css.erb +157 -0
- data/lib/generators/releaf/templates/stylesheets/3rd_party/reset.css +48 -0
- data/lib/generators/releaf/templates/stylesheets/application.scss +15 -0
- data/lib/generators/releaf/templates/stylesheets/style.scss +45 -0
- data/lib/generators/releaf/templates/views/home/index.html.haml +1 -0
- data/lib/generators/releaf/templates/views/layouts/application.html.haml +26 -0
- data/lib/i18n/backend/releaf.rb +96 -0
- data/lib/i18n/backend/releaf/translation.rb +56 -0
- data/lib/i18n/backend/releaf/translation_data.rb +32 -0
- data/lib/i18n/backend/releaf/translation_group.rb +30 -0
- data/lib/i18n/releaf.rb +1 -0
- data/lib/releaf.rb +30 -0
- data/lib/releaf/engine.rb +4 -0
- data/lib/releaf/slug.rb +79 -0
- data/lib/releaf/version.rb +3 -0
- data/lib/tasks/releaf_tasks.rake +4 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/images/rails.png +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/admin_ability.rb +51 -0
- data/spec/dummy/app/models/settings.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.haml +10 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +68 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/common_fields.yml.example +17 -0
- data/spec/dummy/config/database.yml +42 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/devise.rb +232 -0
- data/spec/dummy/config/initializers/dragonfly.rb +1 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/releaf.rb +59 -0
- data/spec/dummy/config/initializers/releaf_i18n.rb +8 -0
- data/spec/dummy/config/initializers/releaf_store_current_template.rb +25 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/devise.en.yml +58 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +11 -0
- data/spec/dummy/db/migrate/20130204164516_create_settings.rb +17 -0
- data/spec/dummy/db/migrate/20130204164523_create_releaf_nodes.rb +25 -0
- data/spec/dummy/db/migrate/20130204164524_create_releaf_roles.rb +11 -0
- data/spec/dummy/db/migrate/20130204164525_create_releaf_translations.rb +31 -0
- data/spec/dummy/db/migrate/20130204164526_create_releaf_admins.rb +53 -0
- data/spec/dummy/db/schema.rb +112 -0
- data/spec/dummy/db/seeds.rb +64 -0
- data/spec/dummy/doc/README_FOR_APP +2 -0
- data/spec/dummy/log/development.log +74 -0
- data/spec/dummy/log/test.log +129 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/tmp/cache/9C5/660/settings%3Ai18n_updated_at +1 -0
- data/spec/factories/factories.rb +24 -0
- data/spec/features/admin_spec.rb +41 -0
- data/spec/spec_helper.rb +23 -0
- data/templates/releaf/installer.rb +196 -0
- metadata +777 -0
data/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Copyright (c) 2012, CubeSystems <info@cubesystems.lv>
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
* Redistributions of source code must retain the above copyright
|
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
|
8
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
|
10
|
+
documentation and/or other materials provided with the distribution.
|
|
11
|
+
* Neither the name of the CubeSystems nor the names of its contributors may
|
|
12
|
+
be used to endorse or promote products derived from this software without
|
|
13
|
+
specific prior written permission.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
16
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
17
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL CubeSystems BE LIABLE FOR ANY
|
|
19
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
20
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
21
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
22
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
23
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
24
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
## Releaf
|
|
2
|
+
|
|
3
|
+
Releaf is Admin interface for Rails projects
|
|
4
|
+
|
|
5
|
+
## Getting started
|
|
6
|
+
|
|
7
|
+
Releaf will work with Rails 3.2.
|
|
8
|
+
You can add it to your Gemfile with:
|
|
9
|
+
```ruby
|
|
10
|
+
gem 'will_paginate', '~> 3.0.4'
|
|
11
|
+
gem 'acts_as_list'
|
|
12
|
+
gem 'awesome_nested_set'
|
|
13
|
+
gem 'cancan', '~> 1.6.8'
|
|
14
|
+
gem 'devise', '~> 2.1.2'
|
|
15
|
+
gem 'dragonfly', '~> 0.9.12'
|
|
16
|
+
gem 'globalize3'
|
|
17
|
+
gem 'haml'
|
|
18
|
+
gem 'haml-rails'
|
|
19
|
+
gem 'jquery-rails'
|
|
20
|
+
gem 'releaf', :git => 'git@github.com:cubesystems/releaf.git'
|
|
21
|
+
gem 'mysql2'
|
|
22
|
+
gem 'rack-cache', :require => 'rack/cache'
|
|
23
|
+
gem 'rails-settings-cached', :git => 'https://github.com/graudeejs/rails-settings-cached'
|
|
24
|
+
gem 'stringex'
|
|
25
|
+
gem 'strong_parameters'
|
|
26
|
+
gem 'tinymce-rails', '~> 3.5.8'
|
|
27
|
+
gem 'tinymce-rails-imageupload'
|
|
28
|
+
gem 'will_paginate', '~> 3.0.4'
|
|
29
|
+
gem 'yui-rails', :git => 'https://github.com/ConnectCubed-Open/yui-rails'
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Run the bundle command to install it.
|
|
33
|
+
|
|
34
|
+
Now in config/application.rb set
|
|
35
|
+
```ruby
|
|
36
|
+
config.active_record.whitelist_attributes = false
|
|
37
|
+
```
|
|
38
|
+
because releaf is expacting strog_params gem to be used
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
```console
|
|
42
|
+
rails generate settings settings
|
|
43
|
+
rake db:migrate
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
After you install Releaf, you need to run the generator:
|
|
48
|
+
```console
|
|
49
|
+
rails generate releaf:install
|
|
50
|
+
rails generate i18n:releaf:install
|
|
51
|
+
rake db:migrate
|
|
52
|
+
rails generate devise:install
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The generator will install an initializer which describes Releaf routes and configuration options (not yet implemented)
|
|
56
|
+
|
|
57
|
+
Now you need to add something like this for releaf itself and standart admin,
|
|
58
|
+
permissions controllers
|
|
59
|
+
```ruby
|
|
60
|
+
mount_releaf_at '/admin'
|
|
61
|
+
namespace :admin do
|
|
62
|
+
resources :admins, :roles do
|
|
63
|
+
get :confirm_destroy, :on => :member
|
|
64
|
+
match :urls, :on => :collection
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Add dragonfly initializer (/config/initializers/dragonfly.rb)
|
|
70
|
+
```ruby
|
|
71
|
+
require 'dragonfly/rails/images'
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Note that you should re-start your app here if you've already started it. Otherwise you'll run into strange errors.
|
data/Rakefile
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env rake
|
|
2
|
+
begin
|
|
3
|
+
require 'bundler/setup'
|
|
4
|
+
rescue LoadError
|
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
|
6
|
+
end
|
|
7
|
+
begin
|
|
8
|
+
require 'rdoc/task'
|
|
9
|
+
rescue LoadError
|
|
10
|
+
require 'rdoc/rdoc'
|
|
11
|
+
require 'rake/rdoctask'
|
|
12
|
+
RDoc::Task = Rake::RDocTask
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
|
17
|
+
rdoc.title = 'Releaf'
|
|
18
|
+
rdoc.options << '--line-numbers'
|
|
19
|
+
rdoc.rdoc_files.include('README*')
|
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
21
|
+
rdoc.rdoc_files.include('app/**/*.rb')
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
desc 'Dummy test app tasks'
|
|
25
|
+
namespace :dummy do
|
|
26
|
+
desc 'Remove current dummy app'
|
|
27
|
+
task :remove do
|
|
28
|
+
dummy = File.expand_path('../spec/dummy', __FILE__)
|
|
29
|
+
sh "rake db:drop"
|
|
30
|
+
sh "rm -rf #{dummy}"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
desc 'Setup new dummy app'
|
|
34
|
+
task :setup do
|
|
35
|
+
dummy = File.expand_path('../spec/dummy', __FILE__)
|
|
36
|
+
|
|
37
|
+
gem 'railties'
|
|
38
|
+
require 'rails/generators'
|
|
39
|
+
require 'rails/generators/rails/app/app_generator'
|
|
40
|
+
template_path = File.expand_path('../templates/releaf/installer.rb', __FILE__)
|
|
41
|
+
application_name = "spec/dummy"
|
|
42
|
+
result = Rails::Generators::AppGenerator.start [application_name, '-m', template_path, '--skip-gemfile', '--database=mysql', '--skip-bundle', '--skip-test-unit'] | ARGV
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
|
47
|
+
if FileTest.exists?(APP_RAKEFILE)
|
|
48
|
+
load 'rails/tasks/engine.rake'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
Bundler::GemHelper.install_tasks
|
|
52
|
+
|
|
53
|
+
Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rake')].each {|f| load f }
|
|
54
|
+
|
|
55
|
+
require 'rspec/core'
|
|
56
|
+
require 'rspec/core/rake_task'
|
|
57
|
+
|
|
58
|
+
desc "Run all specs in spec directory (excluding plugin specs)"
|
|
59
|
+
RSpec::Core::RakeTask.new(:spec => 'app:db:test:prepare')
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
task :default => :spec
|
|
Binary file
|
data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_flat_75_ffffff_40x100.png
ADDED
|
Binary file
|
data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_55_fbf9ee_1x400.png
ADDED
|
Binary file
|
data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_65_ffffff_1x400.png
ADDED
|
Binary file
|
data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_dadada_1x400.png
ADDED
|
Binary file
|
data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_75_e6e6e6_1x400.png
ADDED
|
Binary file
|
data/app/assets/images/releaf/3rd_party/jquery-ui-1.9.2.custom/ui-bg_glass_95_fef1ec_1x400.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# jquery.cookie
|
|
2
|
+
|
|
3
|
+
A simple, lightweight jQuery plugin for reading, writing and deleting cookies.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Include script *after* the jQuery library (unless you are packaging scripts somehow else):
|
|
8
|
+
|
|
9
|
+
<script src="/path/to/jquery.cookie.js"></script>
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Create session cookie:
|
|
14
|
+
|
|
15
|
+
$.cookie('the_cookie', 'the_value');
|
|
16
|
+
|
|
17
|
+
Create expiring cookie, 7 days from then:
|
|
18
|
+
|
|
19
|
+
$.cookie('the_cookie', 'the_value', { expires: 7 });
|
|
20
|
+
|
|
21
|
+
Create expiring cookie, valid across entire page:
|
|
22
|
+
|
|
23
|
+
$.cookie('the_cookie', 'the_value', { expires: 7, path: '/' });
|
|
24
|
+
|
|
25
|
+
Read cookie:
|
|
26
|
+
|
|
27
|
+
$.cookie('the_cookie'); // => 'the_value'
|
|
28
|
+
$.cookie('not_existing'); // => null
|
|
29
|
+
|
|
30
|
+
Delete cookie by passing null as value:
|
|
31
|
+
|
|
32
|
+
$.cookie('the_cookie', null);
|
|
33
|
+
|
|
34
|
+
*Note: when deleting a cookie, you must pass the exact same path, domain and secure options that were used to set the cookie.*
|
|
35
|
+
|
|
36
|
+
## Options
|
|
37
|
+
|
|
38
|
+
expires: 365
|
|
39
|
+
|
|
40
|
+
Define lifetime of the cookie. Value can be a `Number` (which will be interpreted as days from time of creation) or a `Date` object. If omitted, the cookie is a session cookie.
|
|
41
|
+
|
|
42
|
+
path: '/'
|
|
43
|
+
|
|
44
|
+
Default: path of page where the cookie was created.
|
|
45
|
+
|
|
46
|
+
Define the path where cookie is valid. *By default the path of the cookie is the path of the page where the cookie was created (standard browser behavior).* If you want to make it available for instance across the entire page use `path: '/'`.
|
|
47
|
+
|
|
48
|
+
domain: 'example.com'
|
|
49
|
+
|
|
50
|
+
Default: domain of page where the cookie was created.
|
|
51
|
+
|
|
52
|
+
secure: true
|
|
53
|
+
|
|
54
|
+
Default: `false`. If true, the cookie transmission requires a secure protocol (https).
|
|
55
|
+
|
|
56
|
+
raw: true
|
|
57
|
+
|
|
58
|
+
Default: `false`.
|
|
59
|
+
|
|
60
|
+
By default the cookie is encoded/decoded when creating/reading, using `encodeURIComponent`/`decodeURIComponent`. Turn off by setting `raw: true`.
|
|
61
|
+
|
|
62
|
+
## Changelog
|
|
63
|
+
|
|
64
|
+
## Development
|
|
65
|
+
|
|
66
|
+
- Source hosted at [GitHub](https://github.com/carhartl/jquery-cookie)
|
|
67
|
+
- Report issues, questions, feature requests on [GitHub Issues](https://github.com/carhartl/jquery-cookie/issues)
|
|
68
|
+
|
|
69
|
+
Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.
|
|
70
|
+
|
|
71
|
+
## Authors
|
|
72
|
+
|
|
73
|
+
[Klaus Hartl](https://github.com/carhartl)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* jQuery Cookie Plugin
|
|
3
|
+
* https://github.com/carhartl/jquery-cookie
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2011, Klaus Hartl
|
|
6
|
+
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
7
|
+
* http://www.opensource.org/licenses/mit-license.php
|
|
8
|
+
* http://www.opensource.org/licenses/GPL-2.0
|
|
9
|
+
*/
|
|
10
|
+
(function($) {
|
|
11
|
+
$.cookie = function(key, value, options) {
|
|
12
|
+
|
|
13
|
+
// key and at least value given, set cookie...
|
|
14
|
+
if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) {
|
|
15
|
+
options = $.extend({}, options);
|
|
16
|
+
|
|
17
|
+
if (value === null || value === undefined) {
|
|
18
|
+
options.expires = -1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (typeof options.expires === 'number') {
|
|
22
|
+
var days = options.expires, t = options.expires = new Date();
|
|
23
|
+
t.setDate(t.getDate() + days);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
value = String(value);
|
|
27
|
+
|
|
28
|
+
return (document.cookie = [
|
|
29
|
+
encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value),
|
|
30
|
+
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
|
31
|
+
options.path ? '; path=' + options.path : '',
|
|
32
|
+
options.domain ? '; domain=' + options.domain : '',
|
|
33
|
+
options.secure ? '; secure' : ''
|
|
34
|
+
].join(''));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// key and possibly options given, get cookie...
|
|
38
|
+
options = value || {};
|
|
39
|
+
var decode = options.raw ? function(s) { return s; } : decodeURIComponent;
|
|
40
|
+
|
|
41
|
+
var pairs = document.cookie.split('; ');
|
|
42
|
+
for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) {
|
|
43
|
+
if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined
|
|
44
|
+
}
|
|
45
|
+
return null;
|
|
46
|
+
};
|
|
47
|
+
})(jQuery);
|