releaf 0.1.2 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +19 -21
- data/lib/releaf.rb +1 -34
- data/lib/releaf/all.rb +3 -0
- data/lib/releaf/rspec.rb +4 -0
- data/lib/releaf/rspec/features_matchers.rb +76 -0
- data/lib/releaf/rspec/helpers.rb +227 -0
- data/lib/releaf/rspec/matchers.rb +16 -0
- data/lib/releaf/test.rb +5 -0
- data/spec/factories/author.rb +6 -0
- data/spec/factories/book.rb +5 -0
- data/spec/factories/chapter.rb +7 -0
- data/spec/factories/common.rb +5 -0
- data/spec/factories/home_page.rb +5 -0
- data/spec/factories/node.rb +43 -0
- data/spec/factories/node_route.rb +7 -0
- data/spec/factories/publisher.rb +5 -0
- data/spec/factories/role.rb +21 -0
- data/spec/factories/text_page.rb +5 -0
- data/spec/factories/user.rb +22 -0
- data/spec/rails_helper.rb +122 -0
- data/spec/spec_helper.rb +81 -24
- data/spec/support/controller_macros.rb +8 -0
- data/spec/support/excel_helpers.rb +63 -0
- data/spec/support/shared/service_includer.rb +9 -0
- data/spec/support/wait_steps.rb +23 -0
- metadata +141 -499
- data/README.md +0 -77
- data/Rakefile +0 -70
- 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 +0 -73
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/jquery.cookie.js +0 -47
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/server.js +0 -24
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.html +0 -19
- data/app/assets/javascripts/releaf/3rd_party/jquery-cookie/test.js +0 -80
- data/app/assets/javascripts/releaf/3rd_party/jquery-ui-timepicker-addon.js +0 -1882
- data/app/assets/javascripts/releaf/3rd_party/lightbox.js.erb +0 -379
- data/app/assets/javascripts/releaf/application.js +0 -14
- data/app/assets/javascripts/releaf/controllers/base.js +0 -130
- data/app/assets/javascripts/releaf/controllers/releaf/content.js +0 -90
- data/app/assets/javascripts/releaf/controllers/releaf/translations.js +0 -31
- data/app/assets/javascripts/releaf/include/continuous_scroll.js +0 -321
- data/app/assets/javascripts/releaf/include/field.type_autocomplete.js +0 -58
- data/app/assets/javascripts/releaf/include/field.type_date_or_datetime_or_time.js +0 -43
- data/app/assets/javascripts/releaf/include/field.type_richtext.js +0 -90
- data/app/assets/javascripts/releaf/include/localization.js +0 -12
- data/app/assets/javascripts/releaf/include/nested_fields.js +0 -64
- data/app/assets/javascripts/releaf/include/sortable.js +0 -29
- data/app/assets/javascripts/releaf/lib/request_url.js +0 -183
- data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-1.9.2.custom.css.erb +0 -464
- data/app/assets/stylesheets/releaf/3rd_party/jquery-ui-timepicker-addon.css +0 -10
- data/app/assets/stylesheets/releaf/3rd_party/lightbox.css.erb +0 -157
- data/app/assets/stylesheets/releaf/application.css.erb +0 -122
- data/app/assets/stylesheets/releaf/controllers/base.css.erb +0 -205
- data/app/assets/stylesheets/releaf/controllers/releaf/content.css.erb +0 -422
- data/app/assets/stylesheets/releaf/controllers/releaf/sessions.css.scss.erb +0 -116
- data/app/assets/stylesheets/releaf/controllers/releaf/translations.css.erb +0 -205
- data/app/assets/stylesheets/releaf/include/button.css.erb +0 -176
- data/app/assets/stylesheets/releaf/include/field.css.erb +0 -281
- data/app/assets/stylesheets/releaf/include/input.css.erb +0 -40
- data/app/assets/stylesheets/releaf/include/main_menu.css.erb +0 -66
- data/app/assets/stylesheets/releaf/include/pagination.css.erb +0 -29
- data/app/assets/stylesheets/releaf/include/panel_layout.css.erb +0 -251
- data/app/assets/stylesheets/releaf/include/releaf_table.css.erb +0 -112
- data/app/assets/stylesheets/releaf/include/sortable.css.erb +0 -12
- data/app/controllers/releaf/admins_controller.rb +0 -55
- data/app/controllers/releaf/application_controller.rb +0 -11
- data/app/controllers/releaf/base_application_controller.rb +0 -18
- data/app/controllers/releaf/base_controller.rb +0 -571
- data/app/controllers/releaf/content_controller.rb +0 -183
- data/app/controllers/releaf/roles_controller.rb +0 -38
- data/app/controllers/releaf/sessions_controller.rb +0 -27
- data/app/controllers/releaf/tinymce_assets_controller.rb +0 -26
- data/app/controllers/releaf/translations_controller.rb +0 -117
- data/app/helpers/releaf/admin_helper.rb +0 -59
- data/app/helpers/releaf/application_helper.rb +0 -4
- data/app/helpers/releaf/pagination_renderer.rb +0 -44
- data/app/helpers/releaf/releaf_devise_helper.rb +0 -8
- data/app/models/releaf/admin.rb +0 -60
- data/app/models/releaf/blank_node_base.rb +0 -29
- data/app/models/releaf/node.rb +0 -222
- data/app/models/releaf/node_base.rb +0 -31
- data/app/models/releaf/role.rb +0 -126
- data/app/models/releaf/tinymce_asset.rb +0 -6
- data/app/views/layouts/releaf/admin.html.haml +0 -57
- data/app/views/layouts/releaf/devise.html.haml +0 -32
- data/app/views/releaf/aliases/_edit.body.html.haml +0 -50
- data/app/views/releaf/aliases/_edit.header.html.haml +0 -19
- data/app/views/releaf/aliases/_index.row.html.haml +0 -5
- data/app/views/releaf/aliases/_secondary_panel.html.haml +0 -13
- data/app/views/releaf/base/_edit.body.html.haml +0 -11
- data/app/views/releaf/base/_edit.field.html.haml +0 -23
- data/app/views/releaf/base/_edit.field_type_autocomplete.html.haml +0 -15
- data/app/views/releaf/base/_edit.field_type_boolean.html.haml +0 -5
- data/app/views/releaf/base/_edit.field_type_date.html.haml +0 -8
- data/app/views/releaf/base/_edit.field_type_datetime.html.haml +0 -8
- data/app/views/releaf/base/_edit.field_type_delete_nested.html.haml +0 -3
- data/app/views/releaf/base/_edit.field_type_file.html.haml +0 -10
- data/app/views/releaf/base/_edit.field_type_image.html.haml +0 -12
- data/app/views/releaf/base/_edit.field_type_item.html.haml +0 -31
- data/app/views/releaf/base/_edit.field_type_link.html.haml +0 -4
- data/app/views/releaf/base/_edit.field_type_link_i18n.html.haml +0 -26
- data/app/views/releaf/base/_edit.field_type_password.html.haml +0 -4
- data/app/views/releaf/base/_edit.field_type_richtext.html.haml +0 -4
- data/app/views/releaf/base/_edit.field_type_richtext_i18n.html.haml +0 -27
- data/app/views/releaf/base/_edit.field_type_text.html.haml +0 -4
- data/app/views/releaf/base/_edit.field_type_text_i18n.html.haml +0 -27
- data/app/views/releaf/base/_edit.field_type_textarea.html.haml +0 -4
- data/app/views/releaf/base/_edit.field_type_textarea_i18n.html.haml +0 -27
- data/app/views/releaf/base/_edit.field_type_time.html.haml +0 -8
- data/app/views/releaf/base/_edit.fields.association.html.haml +0 -48
- data/app/views/releaf/base/_edit.fields.has_many_template.html.haml +0 -15
- data/app/views/releaf/base/_edit.fields.html.haml +0 -20
- data/app/views/releaf/base/_edit.footer.html.haml +0 -14
- data/app/views/releaf/base/_edit.form.html.haml +0 -4
- data/app/views/releaf/base/_edit.header.html.haml +0 -3
- data/app/views/releaf/base/_index.body.html.haml +0 -6
- data/app/views/releaf/base/_index.cell.html.haml +0 -20
- data/app/views/releaf/base/_index.footer.html.haml +0 -28
- data/app/views/releaf/base/_index.header.html.haml +0 -4
- data/app/views/releaf/base/_index.row.html.haml +0 -6
- data/app/views/releaf/base/_index.search.html.haml +0 -5
- data/app/views/releaf/base/_index.table.html.haml +0 -24
- data/app/views/releaf/base/_secondary_panel.html.haml +0 -10
- data/app/views/releaf/base/_show.body.html.haml +0 -3
- data/app/views/releaf/base/_show.field.html.haml +0 -20
- data/app/views/releaf/base/_show.field_type_date.html.haml +0 -9
- data/app/views/releaf/base/_show.field_type_date_time.html.haml +0 -9
- data/app/views/releaf/base/_show.field_type_email.html.haml +0 -6
- data/app/views/releaf/base/_show.field_type_file.html.haml +0 -7
- data/app/views/releaf/base/_show.field_type_image.html.haml +0 -10
- data/app/views/releaf/base/_show.field_type_item.html.haml +0 -11
- data/app/views/releaf/base/_show.field_type_link.html.haml +0 -14
- data/app/views/releaf/base/_show.field_type_password.html.haml +0 -6
- data/app/views/releaf/base/_show.field_type_richtext.html.haml +0 -6
- data/app/views/releaf/base/_show.field_type_text.html.haml +0 -6
- data/app/views/releaf/base/_show.field_type_textarea.html.haml +0 -6
- data/app/views/releaf/base/_show.field_type_time.html.haml +0 -9
- data/app/views/releaf/base/_show.field_type_url.html.haml +0 -7
- data/app/views/releaf/base/_show.fields.association.html.haml +0 -36
- data/app/views/releaf/base/_show.fields.has_many_template.html.haml +0 -12
- data/app/views/releaf/base/_show.fields.html.haml +0 -17
- data/app/views/releaf/base/_show.footer.html.haml +0 -18
- data/app/views/releaf/base/_show.header.html.haml +0 -3
- data/app/views/releaf/base/confirm_destroy.html.haml +0 -17
- data/app/views/releaf/base/edit.html.haml +0 -1
- data/app/views/releaf/base/index.html.haml +0 -3
- data/app/views/releaf/base/new.html.haml +0 -1
- data/app/views/releaf/base/show.html.haml +0 -3
- data/app/views/releaf/content/_edit.body.html.haml +0 -46
- data/app/views/releaf/content/_edit.content_fields.html.haml +0 -11
- data/app/views/releaf/content/_edit.fields.html.haml +0 -17
- data/app/views/releaf/content/_edit.slug.html.haml +0 -12
- data/app/views/releaf/content/_get_content_form.html.haml +0 -7
- data/app/views/releaf/content/_secondary_panel.html.haml +0 -3
- data/app/views/releaf/content/_tree_level.html.haml +0 -16
- data/app/views/releaf/content/ajax.new.html.haml +0 -3
- data/app/views/releaf/content/index.html.haml +0 -0
- data/app/views/releaf/roles/_edit.field.permissions.html.haml +0 -5
- data/app/views/releaf/roles/_show.field.default.html.haml +0 -6
- data/app/views/releaf/roles/_show.field.permissions.html.haml +0 -11
- data/app/views/releaf/sessions/new.html.haml +0 -17
- data/app/views/releaf/translations/_edit.body.html.haml +0 -50
- data/app/views/releaf/translations/_edit.header.html.haml +0 -19
- data/app/views/releaf/translations/_index.row.html.haml +0 -5
- data/app/views/releaf/translations/_secondary_panel.html.haml +0 -13
- data/bin/releaf +0 -25
- data/lib/generators/releaf/install_generator.rb +0 -87
- data/lib/generators/releaf/templates/config/common_fields.yml.example +0 -17
- data/lib/generators/releaf/templates/controllers/home_controller.rb +0 -4
- 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 +0 -20
- data/lib/generators/releaf/templates/initializers/releaf_i18n.rb +0 -25
- data/lib/generators/releaf/templates/initializers/releaf_store_current_template.rb +0 -25
- data/lib/generators/releaf/templates/javascripts/3rd_party/jquery.jcarousel.js +0 -1058
- data/lib/generators/releaf/templates/javascripts/3rd_party/jquery_ui.js +0 -14850
- data/lib/generators/releaf/templates/javascripts/3rd_party/lightbox.js.erb +0 -379
- data/lib/generators/releaf/templates/javascripts/application.js +0 -15
- data/lib/generators/releaf/templates/javascripts/lib/init_jcarousel.js +0 -40
- data/lib/generators/releaf/templates/javascripts/lib/js_check.js +0 -8
- data/lib/generators/releaf/templates/javascripts/lib/request_url.js +0 -169
- data/lib/generators/releaf/templates/javascripts/lib/sortable.js +0 -29
- data/lib/generators/releaf/templates/migrations/create_releaf_admins.rb +0 -53
- data/lib/generators/releaf/templates/migrations/create_releaf_nodes.rb +0 -25
- data/lib/generators/releaf/templates/migrations/create_releaf_roles.rb +0 -12
- data/lib/generators/releaf/templates/migrations/create_releaf_tinymce_assets.rb +0 -11
- data/lib/generators/releaf/templates/migrations/create_releaf_translations.rb +0 -31
- data/lib/generators/releaf/templates/models/admin_ability.rb +0 -51
- data/lib/generators/releaf/templates/seeds.rb +0 -64
- data/lib/generators/releaf/templates/stylesheets/3rd_party/jquery_ui/smoothness.css.erb +0 -1174
- data/lib/generators/releaf/templates/stylesheets/3rd_party/lightbox.css.erb +0 -157
- data/lib/generators/releaf/templates/stylesheets/3rd_party/reset.css +0 -48
- data/lib/generators/releaf/templates/stylesheets/application.scss +0 -15
- data/lib/generators/releaf/templates/stylesheets/style.scss +0 -45
- data/lib/generators/releaf/templates/views/home/index.html.haml +0 -1
- data/lib/generators/releaf/templates/views/layouts/application.html.haml +0 -26
- data/lib/i18n/backend/releaf.rb +0 -97
- data/lib/i18n/backend/releaf/translation.rb +0 -61
- data/lib/i18n/backend/releaf/translation_data.rb +0 -39
- data/lib/i18n/backend/releaf/translation_group.rb +0 -34
- data/lib/i18n/releaf.rb +0 -1
- data/lib/releaf/boolean_at.rb +0 -77
- data/lib/releaf/engine.rb +0 -4
- data/lib/releaf/globalize3/fallbacks.rb +0 -19
- data/lib/releaf/resources.rb +0 -101
- data/lib/releaf/slug.rb +0 -118
- data/lib/releaf/version.rb +0 -3
- data/lib/tasks/releaf_tasks.rake +0 -4
- data/spec/factories/factories.rb +0 -24
- data/spec/features/admin_spec.rb +0 -41
- data/templates/releaf/installer.rb +0 -207
@@ -1,207 +0,0 @@
|
|
1
|
-
require 'rbconfig'
|
2
|
-
|
3
|
-
dummy = ( app_name == 'dummy' )
|
4
|
-
|
5
|
-
def ask_wizard(question, default_value)
|
6
|
-
value = ask (@current_recipe || "prompt").rjust(10) + " #{question}"
|
7
|
-
|
8
|
-
if value.blank?
|
9
|
-
value = default_value
|
10
|
-
end
|
11
|
-
|
12
|
-
return value
|
13
|
-
end
|
14
|
-
|
15
|
-
file 'Gemfile', <<-GEMFILE
|
16
|
-
if RUBY_VERSION =~ /1.9/
|
17
|
-
Encoding.default_external = Encoding::UTF_8
|
18
|
-
Encoding.default_internal = Encoding::UTF_8
|
19
|
-
end
|
20
|
-
|
21
|
-
source "https://rubygems.org"
|
22
|
-
|
23
|
-
gem "rails", "3.2.12"
|
24
|
-
|
25
|
-
# gems used by releaf
|
26
|
-
|
27
|
-
gem "jquery-rails"
|
28
|
-
gem "rack-cache", :require => "rack/cache"
|
29
|
-
gem 'acts_as_list'
|
30
|
-
gem 'awesome_nested_set'
|
31
|
-
gem 'cancan', '~> 1.6.8'
|
32
|
-
gem 'devise', '~> 2.1.2'
|
33
|
-
gem 'dragonfly', '~>0.9.12'
|
34
|
-
gem 'globalize3'
|
35
|
-
gem 'haml'
|
36
|
-
gem 'haml-rails'
|
37
|
-
gem 'jquery-rails'
|
38
|
-
gem 'releaf', :git => 'git@github.com:cubesystems/releaf.git'
|
39
|
-
gem 'mysql2'
|
40
|
-
gem 'rack-cache', :require => 'rack/cache'
|
41
|
-
gem 'rails-settings-cached', :git => 'https://github.com/graudeejs/rails-settings-cached'
|
42
|
-
gem 'stringex'
|
43
|
-
gem 'strong_parameters'
|
44
|
-
gem 'tinymce-rails', '~> 3.5.8'
|
45
|
-
gem 'tinymce-rails-imageupload'
|
46
|
-
gem 'will_paginate', '~> 3.0.4'
|
47
|
-
gem 'yui-rails', :git => 'https://github.com/ConnectCubed-Open/yui-rails'
|
48
|
-
|
49
|
-
gem "unicorn"
|
50
|
-
|
51
|
-
group :assets do
|
52
|
-
gem "sass-rails", "~> 3.2.5"
|
53
|
-
|
54
|
-
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
55
|
-
# gem 'therubyracer', :platforms => :ruby
|
56
|
-
|
57
|
-
gem "uglifier", ">= 1.0.3"
|
58
|
-
end
|
59
|
-
|
60
|
-
group :development do
|
61
|
-
gem "capistrano"
|
62
|
-
gem "capistrano-ext"
|
63
|
-
gem "rvm-capistrano"
|
64
|
-
gem "guard-spin"
|
65
|
-
gem "brakeman", ">= 1.9.2"
|
66
|
-
|
67
|
-
# gem 'debugger'
|
68
|
-
# gem 'ruby-debug19', :require => 'ruby-debug'
|
69
|
-
# gem 'better_errors'
|
70
|
-
## https://github.com/banister/binding_of_caller/issues/8
|
71
|
-
# gem 'binding_of_caller'
|
72
|
-
end
|
73
|
-
|
74
|
-
group :development, :test, :demo do
|
75
|
-
gem "rspec-rails"
|
76
|
-
gem "capybara"
|
77
|
-
gem "factory_girl_rails"
|
78
|
-
gem "simplecov", :require => false, :platforms => :mri_19
|
79
|
-
gem "database_cleaner"
|
80
|
-
end
|
81
|
-
|
82
|
-
GEMFILE
|
83
|
-
|
84
|
-
if dummy
|
85
|
-
if ENV['DUMMY_DATABASE_FILE']
|
86
|
-
run 'cp ' + ENV['DUMMY_DATABASE_FILE'] + ' config/database.yml'
|
87
|
-
end
|
88
|
-
else
|
89
|
-
@current_recipe = "database"
|
90
|
-
mysql_username = ask_wizard("Username for MySQL? (leave blank to use the 'root')", 'root')
|
91
|
-
gsub_file "config/database.yml", /username: .*/, "username: #{mysql_username}"
|
92
|
-
|
93
|
-
mysql_password = ask_wizard("Password for MySQL user #{mysql_username}?", '')
|
94
|
-
gsub_file "config/database.yml", /password:/, "password: #{mysql_password}"
|
95
|
-
|
96
|
-
run 'cp config/database.yml config/database.yml.example'
|
97
|
-
append_file '.gitignore', 'config/database.yml'
|
98
|
-
end
|
99
|
-
|
100
|
-
|
101
|
-
files_to_remove = %w[
|
102
|
-
db/seeds.rb
|
103
|
-
public/index.html
|
104
|
-
public/images/rails.png
|
105
|
-
app/views/layouts/application.html.erb
|
106
|
-
config/routes.rb
|
107
|
-
app/assets/stylesheets/application.css
|
108
|
-
app/assets/javascripts/application.js
|
109
|
-
]
|
110
|
-
run "rm -f #{files_to_remove.join(' ')}"
|
111
|
-
|
112
|
-
|
113
|
-
if dummy
|
114
|
-
run 'rm -f "Gemfile" "public/robots.txt" ".gitignore"'
|
115
|
-
|
116
|
-
# in "test" env "true" cause to fail on install generators
|
117
|
-
gsub_file 'config/environments/test.rb', 'config.cache_classes = true', 'config.cache_classes = false'
|
118
|
-
|
119
|
-
else
|
120
|
-
# load in RVM environment
|
121
|
-
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
|
122
|
-
begin
|
123
|
-
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
|
124
|
-
rvm_lib_path = File.join(rvm_path, 'lib')
|
125
|
-
|
126
|
-
rvm_version = Gem::Version.new(`rvm --version`[/rvm (\d\.\d+\.\d+)/, 1].to_s)
|
127
|
-
|
128
|
-
if rvm_version < Gem::Version.new('1.12.0')
|
129
|
-
# RVM's ruby drivers were factored out into a gem
|
130
|
-
# in 1.12.0, so you don't use this trick anymore.
|
131
|
-
$LOAD_PATH.unshift rvm_lib_path
|
132
|
-
end
|
133
|
-
|
134
|
-
require 'rvm'
|
135
|
-
rescue LoadError
|
136
|
-
# RVM is unavailable at this point.
|
137
|
-
raise "RVM ruby lib is currently unavailable."
|
138
|
-
end
|
139
|
-
else
|
140
|
-
raise "RVM ruby lib is currently unavailable."
|
141
|
-
end
|
142
|
-
|
143
|
-
rvm_env = "2.0.0@#{app_name}"
|
144
|
-
|
145
|
-
# create rvmrc file
|
146
|
-
file ".rvmrc", <<-END
|
147
|
-
rvm #{rvm_env}
|
148
|
-
END
|
149
|
-
|
150
|
-
say "Creating RVM gemset #{app_name}"
|
151
|
-
RVM.gemset_create app_name
|
152
|
-
|
153
|
-
say "Trusting project's .rvmrc"
|
154
|
-
run "rvm rvmrc trust"
|
155
|
-
|
156
|
-
say "Switching to use RVM gemset #{app_name}"
|
157
|
-
RVM.gemset_use! app_name
|
158
|
-
|
159
|
-
|
160
|
-
if run("gem list --installed bundler", :capture => true) =~ /false/
|
161
|
-
run "gem install bundler --no-rdoc --no-ri"
|
162
|
-
end
|
163
|
-
|
164
|
-
run 'bundle install'
|
165
|
-
end
|
166
|
-
rake 'db:create'
|
167
|
-
|
168
|
-
generate "settings settings"
|
169
|
-
generate "devise:install"
|
170
|
-
generate "releaf:install #{ARGV.join(' ')}"
|
171
|
-
rake 'db:migrate'
|
172
|
-
|
173
|
-
file 'config/initializers/dragonfly.rb', "require 'dragonfly/rails/images'"
|
174
|
-
gsub_file 'config/application.rb', 'config.active_record.whitelist_attributes = true', 'config.active_record.whitelist_attributes = false'
|
175
|
-
application "config.i18n.fallbacks = true"
|
176
|
-
|
177
|
-
file 'config/routes.rb', <<-ROUTES
|
178
|
-
#{app_name.capitalize}::Application.routes.draw do
|
179
|
-
mount_releaf_at '/admin'
|
180
|
-
|
181
|
-
namespace :admin do
|
182
|
-
resources :admins, :roles do
|
183
|
-
get :confirm_destroy, :on => :member
|
184
|
-
match :urls, :on => :collection
|
185
|
-
end
|
186
|
-
end
|
187
|
-
|
188
|
-
root :to => 'home#index'
|
189
|
-
|
190
|
-
end
|
191
|
-
ROUTES
|
192
|
-
|
193
|
-
if dummy
|
194
|
-
# in "test" env "true" cause to fail on install generators, revert to normall
|
195
|
-
gsub_file 'config/environments/test.rb', 'config.cache_classes = false', 'config.cache_classes = true'
|
196
|
-
else
|
197
|
-
rake 'db:seed'
|
198
|
-
run 'git init .'
|
199
|
-
run 'git add .'
|
200
|
-
run 'git commit -a -m "initialize project"'
|
201
|
-
|
202
|
-
say <<-SAY
|
203
|
-
===================================================================================
|
204
|
-
Your new Releaf application is now installed and admin interface mounts at '/admin'
|
205
|
-
===================================================================================
|
206
|
-
SAY
|
207
|
-
end
|