refinerycms 0.9.9 → 0.9.9.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/.gitignore +1 -1
- data/Gemfile +8 -24
- data/Gemfile.lock +94 -69
- data/Rakefile +1 -1
- data/bin/refinerycms +118 -109
- data/changelog.md +13 -2
- data/config/cucumber.yml +3 -7
- data/config/settings.rb +0 -1
- data/lib/refinery.rb +14 -1
- data/lib/refinerycms.rb +2 -9
- data/refinerycms.gemspec +15 -855
- data/spec/spec_helper.rb +3 -2
- metadata +27 -907
- data/authentication/app/controllers/admin/users_controller.rb +0 -90
- data/authentication/app/controllers/passwords_controller.rb +0 -43
- data/authentication/app/controllers/registrations_controller.rb +0 -67
- data/authentication/app/controllers/sessions_controller.rb +0 -23
- data/authentication/app/helpers/sessions_helper.rb +0 -2
- data/authentication/app/helpers/users_helper.rb +0 -2
- data/authentication/app/mailers/user_mailer.rb +0 -20
- data/authentication/app/models/role.rb +0 -16
- data/authentication/app/models/roles_users.rb +0 -6
- data/authentication/app/models/user.rb +0 -58
- data/authentication/app/models/user_plugin.rb +0 -5
- data/authentication/app/views/admin/users/_form.html.erb +0 -92
- data/authentication/app/views/admin/users/_user.html.erb +0 -19
- data/authentication/app/views/admin/users/_users.html.erb +0 -4
- data/authentication/app/views/admin/users/edit.html.erb +0 -1
- data/authentication/app/views/admin/users/index.html.erb +0 -12
- data/authentication/app/views/admin/users/new.html.erb +0 -1
- data/authentication/app/views/layouts/login.html.erb +0 -21
- data/authentication/app/views/passwords/edit.html.erb +0 -31
- data/authentication/app/views/passwords/new.html.erb +0 -18
- data/authentication/app/views/registrations/new.html.erb +0 -41
- data/authentication/app/views/sessions/new.html.erb +0 -29
- data/authentication/app/views/user_mailer/reset_notification.html.erb +0 -12
- data/authentication/app/views/user_mailer/reset_notification.text.plain.erb +0 -7
- data/authentication/config/locales/cs.yml +0 -75
- data/authentication/config/locales/da.yml +0 -72
- data/authentication/config/locales/de.yml +0 -72
- data/authentication/config/locales/el.yml +0 -72
- data/authentication/config/locales/en.yml +0 -72
- data/authentication/config/locales/es.yml +0 -100
- data/authentication/config/locales/fr.yml +0 -72
- data/authentication/config/locales/it.yml +0 -97
- data/authentication/config/locales/lolcat.yml +0 -55
- data/authentication/config/locales/lt.yml +0 -55
- data/authentication/config/locales/lv.yml +0 -72
- data/authentication/config/locales/nb.yml +0 -72
- data/authentication/config/locales/nl.yml +0 -70
- data/authentication/config/locales/pl.yml +0 -100
- data/authentication/config/locales/pt-BR.yml +0 -68
- data/authentication/config/locales/rs.yml +0 -72
- data/authentication/config/locales/ru.yml +0 -97
- data/authentication/config/locales/sl.yml +0 -61
- data/authentication/config/locales/sv.yml +0 -64
- data/authentication/config/locales/zh-CN.yml +0 -72
- data/authentication/config/locales/zh-TW.yml +0 -72
- data/authentication/config/routes.rb +0 -31
- data/authentication/db/migrate/20100913234705_create_refinerycms_authentication_schema.rb +0 -43
- data/authentication/db/migrate/20100929035252_add_missing_indexes_to_roles_users.rb +0 -11
- data/authentication/db/migrate/20101206013505_change_to_devise_users_table.rb +0 -27
- data/authentication/db/migrate/20110106184757_add_remember_created_at_to_users.rb +0 -9
- data/authentication/features/lost_password.feature +0 -49
- data/authentication/features/manage_users.feature +0 -61
- data/authentication/features/step_definitions/lost_password.rb +0 -8
- data/authentication/features/step_definitions/user_steps.rb +0 -36
- data/authentication/features/support/factories.rb +0 -18
- data/authentication/features/support/paths.rb +0 -24
- data/authentication/lib/authenticated_system.rb +0 -29
- data/authentication/lib/authentication.rb +0 -30
- data/authentication/lib/generators/refinerycms_authentication_generator.rb +0 -8
- data/authentication/license.md +0 -21
- data/authentication/readme.md +0 -17
- data/authentication/refinerycms-authentication.gemspec +0 -20
- data/authentication/spec/models/user_spec.rb +0 -159
- data/base/db/migrate/20100913234706_create_refinerycms_core_schema.rb +0 -23
- data/base/db/migrate/20101217113424_add_locale_to_slugs.rb +0 -13
- data/base/features/step_definitions/web_steps.rb +0 -219
- data/base/features/support/env.rb +0 -84
- data/base/features/support/factories.rb +0 -1
- data/base/features/support/negative_expectations_helper.rb +0 -57
- data/base/features/support/paths.rb +0 -91
- data/base/lib/base.rb +0 -32
- data/base/lib/generators/refinerycms_base_generator.rb +0 -8
- data/base/lib/refinery.rb +0 -32
- data/base/lib/refinery/version.rb +0 -16
- data/base/license.md +0 -21
- data/base/refinerycms-base.gemspec +0 -18
- data/core/app/controllers/admin/base_controller.rb +0 -10
- data/core/app/controllers/admin/dialogs_controller.rb +0 -26
- data/core/app/controllers/admin/refinery_core_controller.rb +0 -12
- data/core/app/controllers/application_controller.rb +0 -6
- data/core/app/controllers/refinery/fast_controller.rb +0 -9
- data/core/app/controllers/sitemap_controller.rb +0 -14
- data/core/app/helpers/application_helper.rb +0 -5
- data/core/app/views/admin/_head.html.erb +0 -43
- data/core/app/views/admin/_javascripts.html.erb +0 -32
- data/core/app/views/admin/_menu.html.erb +0 -17
- data/core/app/views/admin/dialogs/show.html.erb +0 -19
- data/core/app/views/layouts/admin.html.erb +0 -24
- data/core/app/views/layouts/admin_dialog.html.erb +0 -14
- data/core/app/views/layouts/application.html.erb +0 -21
- data/core/app/views/shared/_content_page.html.erb +0 -63
- data/core/app/views/shared/_draft_page_message.html.erb +0 -3
- data/core/app/views/shared/_footer.html.erb +0 -4
- data/core/app/views/shared/_google_analytics.html.erb +0 -8
- data/core/app/views/shared/_head.html.erb +0 -42
- data/core/app/views/shared/_header.html.erb +0 -8
- data/core/app/views/shared/_html_tag.html.erb +0 -6
- data/core/app/views/shared/_ie6check.html.erb +0 -63
- data/core/app/views/shared/_javascripts.html.erb +0 -10
- data/core/app/views/shared/_menu.html.erb +0 -30
- data/core/app/views/shared/_menu_branch.html.erb +0 -26
- data/core/app/views/shared/_message.html.erb +0 -10
- data/core/app/views/shared/_no_script.html.erb +0 -9
- data/core/app/views/shared/_site_bar.html.erb +0 -25
- data/core/app/views/shared/admin/_continue_editing.html.erb +0 -3
- data/core/app/views/shared/admin/_error_messages.html.erb +0 -16
- data/core/app/views/shared/admin/_form_actions.html.erb +0 -77
- data/core/app/views/shared/admin/_image_picker.html.erb +0 -60
- data/core/app/views/shared/admin/_make_sortable.html.erb +0 -13
- data/core/app/views/shared/admin/_resource_picker.html.erb +0 -66
- data/core/app/views/shared/admin/_search.html.erb +0 -6
- data/core/app/views/shared/admin/_sortable_list.html.erb +0 -7
- data/core/app/views/shared/admin/_tabbed_fields.html.erb +0 -42
- data/core/app/views/welcome.html.erb +0 -17
- data/core/app/views/wymiframe.html.erb +0 -15
- data/core/config/locales/cs.yml +0 -77
- data/core/config/locales/da.yml +0 -75
- data/core/config/locales/de.yml +0 -75
- data/core/config/locales/el.yml +0 -75
- data/core/config/locales/en.yml +0 -75
- data/core/config/locales/es.yml +0 -68
- data/core/config/locales/fr.yml +0 -72
- data/core/config/locales/it.yml +0 -96
- data/core/config/locales/lolcat.yml +0 -68
- data/core/config/locales/lt.yml +0 -75
- data/core/config/locales/lv.yml +0 -72
- data/core/config/locales/nb.yml +0 -75
- data/core/config/locales/nl.yml +0 -75
- data/core/config/locales/pl.yml +0 -75
- data/core/config/locales/pt-BR.yml +0 -72
- data/core/config/locales/rs.yml +0 -76
- data/core/config/locales/ru.yml +0 -71
- data/core/config/locales/sl.yml +0 -72
- data/core/config/locales/sv.yml +0 -75
- data/core/config/locales/zh-CN.yml +0 -75
- data/core/config/locales/zh-TW.yml +0 -75
- data/core/config/routes.rb +0 -19
- data/core/crud.md +0 -197
- data/core/doc/included-jquery-ui-packages.jpg +0 -0
- data/core/engines.md +0 -179
- data/core/features/search.feature +0 -55
- data/core/features/site_bar.feature +0 -24
- data/core/features/step_definitions/core_steps.rb +0 -61
- data/core/features/support/paths.rb +0 -14
- data/core/features/uploads/beach.jpeg +0 -0
- data/core/features/uploads/refinery_is_awesome.txt +0 -1
- data/core/lib/core.rb +0 -143
- data/core/lib/generators/refinerycms_generator.rb +0 -107
- data/core/lib/generators/templates/.gitignore +0 -83
- data/core/lib/generators/templates/.rspec +0 -2
- data/core/lib/generators/templates/app/views/sitemap/index.xml.builder +0 -22
- data/core/lib/generators/templates/autotest/autotest.rb +0 -17
- data/core/lib/generators/templates/autotest/discover.rb +0 -2
- data/core/lib/generators/templates/config/cucumber.yml +0 -15
- data/core/lib/generators/templates/config/database.yml.mysql +0 -20
- data/core/lib/generators/templates/config/database.yml.postgresql +0 -57
- data/core/lib/generators/templates/config/database.yml.sqlite3 +0 -26
- data/core/lib/generators/templates/config/i18n-js.yml +0 -6
- data/core/lib/generators/templates/config/initializers/devise.rb +0 -142
- data/core/lib/generators/templates/config/settings.rb +0 -3
- data/core/lib/generators/templates/db/seeds.rb +0 -5
- data/core/lib/generators/templates/spec/rcov.opts +0 -2
- data/core/lib/generators/templates/spec/spec_helper.rb +0 -76
- data/core/lib/refinery/activity.rb +0 -45
- data/core/lib/refinery/admin/base_controller.rb +0 -111
- data/core/lib/refinery/admin_base_controller.rb +0 -5
- data/core/lib/refinery/application.rb +0 -76
- data/core/lib/refinery/application_controller.rb +0 -116
- data/core/lib/refinery/application_helper.rb +0 -19
- data/core/lib/refinery/base_presenter.rb +0 -27
- data/core/lib/refinery/catch_all_routes.rb +0 -11
- data/core/lib/refinery/crud.rb +0 -295
- data/core/lib/refinery/helpers/form_helper.rb +0 -66
- data/core/lib/refinery/helpers/head_helper.rb +0 -17
- data/core/lib/refinery/helpers/html_truncation_helper.rb +0 -25
- data/core/lib/refinery/helpers/image_helper.rb +0 -49
- data/core/lib/refinery/helpers/menu_helper.rb +0 -68
- data/core/lib/refinery/helpers/meta_helper.rb +0 -67
- data/core/lib/refinery/helpers/pagination_helper.rb +0 -16
- data/core/lib/refinery/helpers/script_helper.rb +0 -36
- data/core/lib/refinery/helpers/site_bar_helper.rb +0 -24
- data/core/lib/refinery/helpers/tag_helper.rb +0 -21
- data/core/lib/refinery/helpers/translation_helper.rb +0 -17
- data/core/lib/refinery/link_renderer.rb +0 -55
- data/core/lib/refinery/plugin.rb +0 -134
- data/core/lib/refinery/plugins.rb +0 -75
- data/core/lib/tasks/cucumber.rake +0 -53
- data/core/lib/tasks/doc.rake +0 -29
- data/core/lib/tasks/refinery.rake +0 -231
- data/core/lib/tasks/yard.rake +0 -30
- data/core/license.md +0 -21
- data/core/public/404.html +0 -26
- data/core/public/422.html +0 -26
- data/core/public/500.html +0 -26
- data/core/public/favicon.ico +0 -0
- data/core/public/images/refinery/add.png +0 -0
- data/core/public/images/refinery/admin_bg.png +0 -0
- data/core/public/images/refinery/ajax-loader.gif +0 -0
- data/core/public/images/refinery/branch-end.gif +0 -0
- data/core/public/images/refinery/branch-start.gif +0 -0
- data/core/public/images/refinery/branch.gif +0 -0
- data/core/public/images/refinery/carousel-left.png +0 -0
- data/core/public/images/refinery/carousel-right.png +0 -0
- data/core/public/images/refinery/cross.png +0 -0
- data/core/public/images/refinery/dialogLoadingAnimation.gif +0 -0
- data/core/public/images/refinery/header_background.png +0 -0
- data/core/public/images/refinery/hover-gradient.jpg +0 -0
- data/core/public/images/refinery/icons/accept.png +0 -0
- data/core/public/images/refinery/icons/add.png +0 -0
- data/core/public/images/refinery/icons/ajax-loader.gif +0 -0
- data/core/public/images/refinery/icons/application_edit.png +0 -0
- data/core/public/images/refinery/icons/application_go.png +0 -0
- data/core/public/images/refinery/icons/arrow_left.png +0 -0
- data/core/public/images/refinery/icons/arrow_switch.png +0 -0
- data/core/public/images/refinery/icons/arrow_up.png +0 -0
- data/core/public/images/refinery/icons/bin.png +0 -0
- data/core/public/images/refinery/icons/bin_closed.png +0 -0
- data/core/public/images/refinery/icons/cancel.png +0 -0
- data/core/public/images/refinery/icons/cog_add.png +0 -0
- data/core/public/images/refinery/icons/cog_edit.png +0 -0
- data/core/public/images/refinery/icons/cross.png +0 -0
- data/core/public/images/refinery/icons/delete.png +0 -0
- data/core/public/images/refinery/icons/doc.png +0 -0
- data/core/public/images/refinery/icons/down.gif +0 -0
- data/core/public/images/refinery/icons/edit.png +0 -0
- data/core/public/images/refinery/icons/email.png +0 -0
- data/core/public/images/refinery/icons/email_edit.png +0 -0
- data/core/public/images/refinery/icons/email_go.png +0 -0
- data/core/public/images/refinery/icons/email_open.png +0 -0
- data/core/public/images/refinery/icons/eye.png +0 -0
- data/core/public/images/refinery/icons/folder_page_white.png +0 -0
- data/core/public/images/refinery/icons/image_add.png +0 -0
- data/core/public/images/refinery/icons/image_edit.png +0 -0
- data/core/public/images/refinery/icons/img.png +0 -0
- data/core/public/images/refinery/icons/information.png +0 -0
- data/core/public/images/refinery/icons/layout_add.png +0 -0
- data/core/public/images/refinery/icons/layout_edit.png +0 -0
- data/core/public/images/refinery/icons/music.png +0 -0
- data/core/public/images/refinery/icons/page_add.png +0 -0
- data/core/public/images/refinery/icons/page_edit.png +0 -0
- data/core/public/images/refinery/icons/page_white_edit.png +0 -0
- data/core/public/images/refinery/icons/page_white_gear.png +0 -0
- data/core/public/images/refinery/icons/page_white_put.png +0 -0
- data/core/public/images/refinery/icons/pdf.png +0 -0
- data/core/public/images/refinery/icons/ppt.png +0 -0
- data/core/public/images/refinery/icons/star.png +0 -0
- data/core/public/images/refinery/icons/tick.png +0 -0
- data/core/public/images/refinery/icons/up.gif +0 -0
- data/core/public/images/refinery/icons/user_add.png +0 -0
- data/core/public/images/refinery/icons/user_comment.png +0 -0
- data/core/public/images/refinery/icons/user_edit.png +0 -0
- data/core/public/images/refinery/icons/xls.png +0 -0
- data/core/public/images/refinery/icons/zip.png +0 -0
- data/core/public/images/refinery/icons/zoom.png +0 -0
- data/core/public/images/refinery/logo-large.png +0 -0
- data/core/public/images/refinery/logo-medium.png +0 -0
- data/core/public/images/refinery/logo-site-bar.png +0 -0
- data/core/public/images/refinery/logo-small-medium.png +0 -0
- data/core/public/images/refinery/logo-small.png +0 -0
- data/core/public/images/refinery/logo-tiny.png +0 -0
- data/core/public/images/refinery/logo.png +0 -0
- data/core/public/images/refinery/nav-3-background.gif +0 -0
- data/core/public/images/refinery/nav_inactive_background.png +0 -0
- data/core/public/images/refinery/orange_button.png +0 -0
- data/core/public/images/refinery/page_bg.png +0 -0
- data/core/public/images/refinery/resolve_digital_footer_logo.png +0 -0
- data/core/public/images/refinery/text_field_background.png +0 -0
- data/core/public/images/refinery/tooltip-nib.gif +0 -0
- data/core/public/images/refinery/tooltip-nib.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/arrow_redo.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/arrow_undo.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/eye.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-blockquote.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h1.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h2.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h3.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h4.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h5.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-h6.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-p.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/iframe/lbl-pre.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/link_add.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/link_break.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/page_code.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/page_paste.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/photo_add.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/right.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/style.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/table_add.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_align_center.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_align_justify.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_align_left.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_align_right.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_bold.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_1.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_2.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_3.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_4.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_5.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_heading_6.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_indent.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_indent_remove.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_italic.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_list_bullets.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_list_numbers.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_paragraph.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_strikethrough.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_subscript.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_superscript.png +0 -0
- data/core/public/images/wymeditor/skins/refinery/text_underline.png +0 -0
- data/core/public/images/wymeditor/skins/wymeditor_icon.png +0 -0
- data/core/public/javascripts/admin.js +0 -7
- data/core/public/javascripts/application.js +0 -1
- data/core/public/javascripts/dd_belatedpng.js +0 -13
- data/core/public/javascripts/i18n-messages.js +0 -2
- data/core/public/javascripts/jquery-min.js +0 -154
- data/core/public/javascripts/jquery-ui-custom-min.js +0 -249
- data/core/public/javascripts/jquery.js +0 -6240
- data/core/public/javascripts/jquery/GPL-LICENSE.txt +0 -278
- data/core/public/javascripts/jquery/MIT-LICENSE.txt +0 -20
- data/core/public/javascripts/jquery/jquery.corner.js +0 -345
- data/core/public/javascripts/jquery/jquery.html5-placeholder-shim.js +0 -88
- data/core/public/javascripts/jquery/jquery.jcarousel.js +0 -900
- data/core/public/javascripts/jquery/jquery.textTruncate.js +0 -174
- data/core/public/javascripts/jquery/jquery.timers.js +0 -138
- data/core/public/javascripts/modernizr-min.js +0 -30
- data/core/public/javascripts/rails.js +0 -152
- data/core/public/javascripts/refinery/admin.js +0 -1114
- data/core/public/javascripts/refinery/boot_wym.js +0 -285
- data/core/public/javascripts/refinery/core.js +0 -18
- data/core/public/javascripts/refinery/i18n.js +0 -340
- data/core/public/javascripts/refinery/nestedsortables.js +0 -164
- data/core/public/javascripts/refinery/serializelist.js +0 -66
- data/core/public/javascripts/refinery/site_bar.js +0 -16
- data/core/public/javascripts/refinery/submenu.js +0 -49
- data/core/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +0 -5142
- data/core/public/javascripts/wymeditor/lang/ca.js +0 -45
- data/core/public/javascripts/wymeditor/lang/cs.js +0 -45
- data/core/public/javascripts/wymeditor/lang/da.js +0 -48
- data/core/public/javascripts/wymeditor/lang/de.js +0 -45
- data/core/public/javascripts/wymeditor/lang/en.js +0 -47
- data/core/public/javascripts/wymeditor/lang/es.js +0 -45
- data/core/public/javascripts/wymeditor/lang/fa.js +0 -46
- data/core/public/javascripts/wymeditor/lang/fr.js +0 -45
- data/core/public/javascripts/wymeditor/lang/he.js +0 -45
- data/core/public/javascripts/wymeditor/lang/hu.js +0 -45
- data/core/public/javascripts/wymeditor/lang/it.js +0 -45
- data/core/public/javascripts/wymeditor/lang/lv.js +0 -47
- data/core/public/javascripts/wymeditor/lang/nb.js +0 -48
- data/core/public/javascripts/wymeditor/lang/nl.js +0 -47
- data/core/public/javascripts/wymeditor/lang/nn.js +0 -45
- data/core/public/javascripts/wymeditor/lang/pl.js +0 -45
- data/core/public/javascripts/wymeditor/lang/pt-BR.js +0 -47
- data/core/public/javascripts/wymeditor/lang/pt.js +0 -45
- data/core/public/javascripts/wymeditor/lang/rs.js +0 -47
- data/core/public/javascripts/wymeditor/lang/ru.js +0 -45
- data/core/public/javascripts/wymeditor/lang/sl.js +0 -47
- data/core/public/javascripts/wymeditor/lang/sv.js +0 -45
- data/core/public/javascripts/wymeditor/lang/tr.js +0 -45
- data/core/public/javascripts/wymeditor/lang/zh_cn.js +0 -47
- data/core/public/javascripts/wymeditor/skins/refinery/skin.js +0 -48
- data/core/public/robots.txt +0 -3
- data/core/public/stylesheets/application.css +0 -4
- data/core/public/stylesheets/formatting.css +0 -4
- data/core/public/stylesheets/home.css +0 -4
- data/core/public/stylesheets/refinery/application.css +0 -72
- data/core/public/stylesheets/refinery/formatting.css +0 -57
- data/core/public/stylesheets/refinery/home.css +0 -0
- data/core/public/stylesheets/refinery/refinery.css +0 -1572
- data/core/public/stylesheets/refinery/site_bar.css +0 -87
- data/core/public/stylesheets/refinery/submenu.css +0 -22
- data/core/public/stylesheets/refinery/theme.css +0 -36
- data/core/public/stylesheets/refinery/tooltips.css +0 -34
- data/core/public/stylesheets/refinery/ui.css +0 -107
- data/core/public/stylesheets/theme.css +0 -4
- data/core/public/stylesheets/wymeditor/skins/refinery/skin.css +0 -528
- data/core/public/stylesheets/wymeditor/skins/refinery/wymiframe.css +0 -96
- data/core/public/wymeditor/GPL-license.txt +0 -278
- data/core/public/wymeditor/MIT-license.txt +0 -20
- data/core/public/wymeditor/README +0 -35
- data/core/refinerycms-core.gemspec +0 -20
- data/core/spec/lib/refinery/plugins_spec.rb +0 -90
- data/dashboard/app/controllers/admin/dashboard_controller.rb +0 -38
- data/dashboard/app/helpers/admin/dashboard_helper.rb +0 -24
- data/dashboard/app/views/admin/dashboard/_additional_dashboard_menu_items.html.erb +0 -1
- data/dashboard/app/views/admin/dashboard/_recent_activity.html.erb +0 -14
- data/dashboard/app/views/admin/dashboard/_recent_inquiries.html.erb +0 -11
- data/dashboard/app/views/admin/dashboard/index.html.erb +0 -70
- data/dashboard/app/views/admin/dashboard/index.rss.builder +0 -26
- data/dashboard/config/locales/cs.yml +0 -25
- data/dashboard/config/locales/da.yml +0 -25
- data/dashboard/config/locales/de.yml +0 -25
- data/dashboard/config/locales/el.yml +0 -25
- data/dashboard/config/locales/en.yml +0 -25
- data/dashboard/config/locales/es.yml +0 -28
- data/dashboard/config/locales/fr.yml +0 -25
- data/dashboard/config/locales/it.yml +0 -27
- data/dashboard/config/locales/lolcat.yml +0 -24
- data/dashboard/config/locales/lt.yml +0 -25
- data/dashboard/config/locales/lv.yml +0 -27
- data/dashboard/config/locales/nb.yml +0 -25
- data/dashboard/config/locales/nl.yml +0 -25
- data/dashboard/config/locales/pl.yml +0 -29
- data/dashboard/config/locales/pt-BR.yml +0 -29
- data/dashboard/config/locales/rs.yml +0 -26
- data/dashboard/config/locales/ru.yml +0 -29
- data/dashboard/config/locales/sl.yml +0 -24
- data/dashboard/config/locales/sv.yml +0 -25
- data/dashboard/config/locales/zh-CN.yml +0 -25
- data/dashboard/config/locales/zh-TW.yml +0 -25
- data/dashboard/config/routes.rb +0 -11
- data/dashboard/features/dashboard.feature +0 -35
- data/dashboard/features/support/paths.rb +0 -14
- data/dashboard/lib/dashboard.rb +0 -19
- data/dashboard/license.md +0 -21
- data/dashboard/readme.md +0 -22
- data/dashboard/refinerycms-dashboard.gemspec +0 -20
- data/images/app/controllers/admin/images_controller.rb +0 -108
- data/images/app/helpers/admin/images_helper.rb +0 -27
- data/images/app/models/image.rb +0 -72
- data/images/app/views/admin/images/_existing_image.html.erb +0 -73
- data/images/app/views/admin/images/_form.html.erb +0 -54
- data/images/app/views/admin/images/_grid_view.html.erb +0 -19
- data/images/app/views/admin/images/_images.html.erb +0 -2
- data/images/app/views/admin/images/_list_view.html.erb +0 -10
- data/images/app/views/admin/images/_list_view_image.html.erb +0 -17
- data/images/app/views/admin/images/edit.html.erb +0 -1
- data/images/app/views/admin/images/index.html.erb +0 -38
- data/images/app/views/admin/images/insert.html.erb +0 -47
- data/images/app/views/admin/images/new.html.erb +0 -1
- data/images/config/locales/cs.yml +0 -41
- data/images/config/locales/da.yml +0 -41
- data/images/config/locales/de.yml +0 -41
- data/images/config/locales/el.yml +0 -41
- data/images/config/locales/en.yml +0 -41
- data/images/config/locales/es.yml +0 -40
- data/images/config/locales/fr.yml +0 -41
- data/images/config/locales/it.yml +0 -47
- data/images/config/locales/lolcat.yml +0 -41
- data/images/config/locales/lt.yml +0 -41
- data/images/config/locales/lv.yml +0 -41
- data/images/config/locales/nb.yml +0 -42
- data/images/config/locales/nl.yml +0 -40
- data/images/config/locales/pl.yml +0 -42
- data/images/config/locales/pt-BR.yml +0 -42
- data/images/config/locales/rs.yml +0 -42
- data/images/config/locales/ru.yml +0 -41
- data/images/config/locales/sl.yml +0 -40
- data/images/config/locales/sv.yml +0 -41
- data/images/config/locales/zh-CN.yml +0 -41
- data/images/config/locales/zh-TW.yml +0 -41
- data/images/config/routes.rb +0 -11
- data/images/db/migrate/20100913234707_create_refinerycms_images_schema.rb +0 -23
- data/images/features/manage_images.feature +0 -49
- data/images/features/step_definitions/image_steps.rb +0 -40
- data/images/features/support/factories.rb +0 -5
- data/images/features/support/paths.rb +0 -17
- data/images/features/uploads/beach.jpeg +0 -0
- data/images/features/uploads/id-rather-be-here.jpg +0 -0
- data/images/features/uploads/refinery_is_awesome.txt +0 -1
- data/images/lib/generators/refinerycms_images_generator.rb +0 -8
- data/images/lib/images.rb +0 -59
- data/images/license.md +0 -21
- data/images/readme.md +0 -34
- data/images/refinerycms-images.gemspec +0 -20
- data/images/spec/models/image_spec.rb +0 -87
- data/images/spec/uploads/beach.jpeg +0 -0
- data/pages/app/controllers/admin/page_parts_controller.rb +0 -24
- data/pages/app/controllers/admin/pages_controller.rb +0 -37
- data/pages/app/controllers/admin/pages_dialogs_controller.rb +0 -87
- data/pages/app/controllers/pages_controller.rb +0 -32
- data/pages/app/helpers/pages_helper.rb +0 -2
- data/pages/app/models/page.rb +0 -290
- data/pages/app/models/page_part.rb +0 -23
- data/pages/app/presenters/page_presenter.rb +0 -7
- data/pages/app/views/admin/pages/_form.html.erb +0 -61
- data/pages/app/views/admin/pages/_form_advanced_options.html.erb +0 -79
- data/pages/app/views/admin/pages/_form_advanced_options_seo.html.erb +0 -24
- data/pages/app/views/admin/pages/_form_fields_after_title.html.erb +0 -1
- data/pages/app/views/admin/pages/_form_new_page_parts.html.erb +0 -14
- data/pages/app/views/admin/pages/_form_page_parts.html.erb +0 -47
- data/pages/app/views/admin/pages/_locale_picker.html.erb +0 -11
- data/pages/app/views/admin/pages/_page.html.erb +0 -33
- data/pages/app/views/admin/pages/_page_part_field.html.erb +0 -5
- data/pages/app/views/admin/pages/_sortable_list.html.erb +0 -5
- data/pages/app/views/admin/pages/edit.html.erb +0 -1
- data/pages/app/views/admin/pages/index.html.erb +0 -40
- data/pages/app/views/admin/pages/new.html.erb +0 -1
- data/pages/app/views/admin/pages_dialogs/_page_link.html.erb +0 -13
- data/pages/app/views/admin/pages_dialogs/link_to.html.erb +0 -141
- data/pages/app/views/pages/home.html.erb +0 -1
- data/pages/app/views/pages/show.html.erb +0 -1
- data/pages/config/locales/cs.yml +0 -84
- data/pages/config/locales/da.yml +0 -84
- data/pages/config/locales/de.yml +0 -84
- data/pages/config/locales/el.yml +0 -84
- data/pages/config/locales/en.yml +0 -84
- data/pages/config/locales/es.yml +0 -83
- data/pages/config/locales/fr.yml +0 -84
- data/pages/config/locales/it.yml +0 -98
- data/pages/config/locales/lolcat.yml +0 -83
- data/pages/config/locales/lt.yml +0 -85
- data/pages/config/locales/lv.yml +0 -86
- data/pages/config/locales/nb.yml +0 -85
- data/pages/config/locales/nl.yml +0 -81
- data/pages/config/locales/pl.yml +0 -85
- data/pages/config/locales/pt-BR.yml +0 -85
- data/pages/config/locales/rs.yml +0 -84
- data/pages/config/locales/ru.yml +0 -108
- data/pages/config/locales/sl.yml +0 -83
- data/pages/config/locales/sv.yml +0 -84
- data/pages/config/locales/zh-CN.yml +0 -84
- data/pages/config/locales/zh-TW.yml +0 -84
- data/pages/config/routes.rb +0 -21
- data/pages/db/migrate/20100913234708_create_refinerycms_pages_schema.rb +0 -53
- data/pages/db/migrate/20101214040815_translate_page_plugin.rb +0 -29
- data/pages/db/migrate/20101216194133_remove_cached_slug_from_pages.rb +0 -9
- data/pages/db/seeds/pages.rb +0 -43
- data/pages/features/manage_pages.feature +0 -47
- data/pages/features/step_definitions/page_steps.rb +0 -53
- data/pages/features/support/paths.rb +0 -26
- data/pages/features/visit_pages.feature +0 -47
- data/pages/lib/generators/refinerycms_pages_generator.rb +0 -8
- data/pages/lib/pages.rb +0 -36
- data/pages/lib/pages/marketable_routes.rb +0 -3
- data/pages/lib/pages/tabs.rb +0 -30
- data/pages/license.md +0 -21
- data/pages/readme.md +0 -156
- data/pages/refinerycms-pages.gemspec +0 -21
- data/pages/spec/models/page_spec.rb +0 -155
- data/resources/app/controllers/admin/resources_controller.rb +0 -89
- data/resources/app/models/resource.rb +0 -53
- data/resources/app/views/admin/resources/_existing_resource.html.erb +0 -32
- data/resources/app/views/admin/resources/_form.html.erb +0 -55
- data/resources/app/views/admin/resources/_resource.html.erb +0 -17
- data/resources/app/views/admin/resources/_resources.html.erb +0 -10
- data/resources/app/views/admin/resources/edit.html.erb +0 -1
- data/resources/app/views/admin/resources/index.html.erb +0 -31
- data/resources/app/views/admin/resources/insert.html.erb +0 -54
- data/resources/app/views/admin/resources/new.html.erb +0 -1
- data/resources/config/locales/cs.yml +0 -34
- data/resources/config/locales/da.yml +0 -34
- data/resources/config/locales/de.yml +0 -34
- data/resources/config/locales/el.yml +0 -34
- data/resources/config/locales/en.yml +0 -34
- data/resources/config/locales/es.yml +0 -33
- data/resources/config/locales/fr.yml +0 -34
- data/resources/config/locales/it.yml +0 -43
- data/resources/config/locales/lolcat.yml +0 -34
- data/resources/config/locales/lt.yml +0 -34
- data/resources/config/locales/lv.yml +0 -34
- data/resources/config/locales/nb.yml +0 -34
- data/resources/config/locales/nl.yml +0 -33
- data/resources/config/locales/pl.yml +0 -35
- data/resources/config/locales/pt-BR.yml +0 -34
- data/resources/config/locales/rs.yml +0 -35
- data/resources/config/locales/ru.yml +0 -34
- data/resources/config/locales/sl.yml +0 -33
- data/resources/config/locales/sv.yml +0 -34
- data/resources/config/locales/zh-CN.yml +0 -34
- data/resources/config/locales/zh-TW.yml +0 -34
- data/resources/config/routes.rb +0 -11
- data/resources/db/migrate/20100913234709_create_refinerycms_resources_schema.rb +0 -21
- data/resources/features/manage_files.feature +0 -43
- data/resources/features/step_definitions/file_steps.rb +0 -21
- data/resources/features/support/paths.rb +0 -17
- data/resources/features/uploads/beach.jpeg +0 -0
- data/resources/features/uploads/refinery_is_awesome.txt +0 -1
- data/resources/lib/generators/refinerycms_resources_generator.rb +0 -8
- data/resources/lib/resources.rb +0 -58
- data/resources/license.md +0 -21
- data/resources/readme.md +0 -9
- data/resources/refinerycms-resources.gemspec +0 -20
- data/resources/spec/models/resource_spec.rb +0 -91
- data/resources/spec/uploads/refinery_is_awesome.txt +0 -1
- data/settings/app/controllers/admin/refinery_settings_controller.rb +0 -77
- data/settings/app/helpers/refinery_settings_helper.rb +0 -25
- data/settings/app/models/refinery_setting.rb +0 -212
- data/settings/app/views/admin/refinery_settings/_form.html.erb +0 -62
- data/settings/app/views/admin/refinery_settings/_refinery_setting.html.erb +0 -23
- data/settings/app/views/admin/refinery_settings/_refinery_settings.html.erb +0 -5
- data/settings/app/views/admin/refinery_settings/edit.html.erb +0 -1
- data/settings/app/views/admin/refinery_settings/index.html.erb +0 -49
- data/settings/app/views/admin/refinery_settings/new.html.erb +0 -1
- data/settings/config/locales/cs.yml +0 -45
- data/settings/config/locales/da.yml +0 -46
- data/settings/config/locales/de.yml +0 -46
- data/settings/config/locales/el.yml +0 -46
- data/settings/config/locales/en.yml +0 -46
- data/settings/config/locales/es.yml +0 -43
- data/settings/config/locales/fr.yml +0 -44
- data/settings/config/locales/it.yml +0 -36
- data/settings/config/locales/lolcat.yml +0 -43
- data/settings/config/locales/lt.yml +0 -46
- data/settings/config/locales/lv.yml +0 -46
- data/settings/config/locales/nb.yml +0 -47
- data/settings/config/locales/nl.yml +0 -46
- data/settings/config/locales/pl.yml +0 -46
- data/settings/config/locales/pt-BR.yml +0 -44
- data/settings/config/locales/rs.yml +0 -46
- data/settings/config/locales/ru.yml +0 -43
- data/settings/config/locales/sl.yml +0 -25
- data/settings/config/locales/sv.yml +0 -45
- data/settings/config/locales/zh-CN.yml +0 -46
- data/settings/config/locales/zh-TW.yml +0 -46
- data/settings/config/routes.rb +0 -8
- data/settings/db/migrate/20100913234710_create_refinerycms_settings_schema.rb +0 -24
- data/settings/db/migrate/20100926142529_add_value_type_to_refinery_settings.rb +0 -9
- data/settings/features/manage_refinery_settings.feature +0 -5
- data/settings/features/step_definitions/setting_steps.rb +0 -9
- data/settings/features/support/paths.rb +0 -14
- data/settings/lib/generators/refinerycms_settings_generator.rb +0 -8
- data/settings/lib/settings.rb +0 -16
- data/settings/license.md +0 -21
- data/settings/readme.md +0 -55
- data/settings/refinerycms-settings.gemspec +0 -20
- data/settings/spec/models/refinery_setting_spec.rb +0 -101
data/.gitignore
CHANGED
data/Gemfile
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
source 'http://rubygems.org'
|
|
2
2
|
|
|
3
|
+
gemspec
|
|
4
|
+
|
|
3
5
|
# Bundle edge Rails instead:
|
|
4
6
|
# gem 'rails', :git => 'git://github.com/rails/rails'
|
|
5
7
|
|
|
@@ -25,29 +27,12 @@ end
|
|
|
25
27
|
# gem 'aws-s3', :require => 'aws/s3'
|
|
26
28
|
|
|
27
29
|
# REFINERY CMS ================================================================
|
|
30
|
+
# Anything you put in here will be overridden when the app gets updated.
|
|
28
31
|
|
|
29
|
-
#
|
|
30
|
-
gem 'refinerycms', :path => '.'
|
|
32
|
+
# gem 'refinerycms', '~> 0.9.9.1'
|
|
31
33
|
|
|
32
34
|
group :development, :test do
|
|
33
|
-
|
|
34
|
-
gem 'rspec-rails', '= 2.3'
|
|
35
|
-
# Cucumber
|
|
36
|
-
gem 'capybara'
|
|
37
|
-
gem 'database_cleaner'
|
|
38
|
-
gem 'cucumber-rails'
|
|
39
|
-
gem 'launchy'
|
|
40
|
-
gem 'gherkin'
|
|
41
|
-
gem 'spork' unless Bundler::WINDOWS
|
|
42
|
-
gem 'rack-test', '~> 0.5.6'
|
|
43
|
-
gem 'json_pure'
|
|
44
|
-
# Factory Girl
|
|
45
|
-
gem 'factory_girl'
|
|
46
|
-
gem "#{'j' if RUBY_PLATFORM == 'java'}ruby-prof" unless defined?(RUBY_ENGINE) and RUBY_ENGINE == 'rbx'
|
|
47
|
-
# Autotest
|
|
48
|
-
gem 'autotest'
|
|
49
|
-
gem 'autotest-rails'
|
|
50
|
-
gem 'autotest-notification'
|
|
35
|
+
gem 'refinerycms-testing', '~> 0.9.9.1'
|
|
51
36
|
end
|
|
52
37
|
|
|
53
38
|
# END REFINERY CMS ============================================================
|
|
@@ -59,15 +44,14 @@ end
|
|
|
59
44
|
# USER DEFINED
|
|
60
45
|
|
|
61
46
|
# Specify additional Refinery CMS Engines here (all optional):
|
|
62
|
-
gem 'refinerycms-
|
|
63
|
-
# gem 'refinerycms-inquiries', '~> 0.9.9.9'
|
|
47
|
+
# gem 'refinerycms-inquiries', '~> 0.9'
|
|
64
48
|
# gem 'refinerycms-news', '~> 1.0'
|
|
65
49
|
# gem 'refinerycms-portfolio', '~> 0.9.9'
|
|
66
50
|
# gem 'refinerycms-theming', '~> 0.9.9'
|
|
67
51
|
# gem 'refinerycms-search', '~> 0.9.8'
|
|
68
52
|
# gem 'refinerycms-blog', '~> 1.1'
|
|
53
|
+
# gem 'refinerycms-page-images, '~> 1.0
|
|
69
54
|
|
|
70
55
|
# Add i18n support (optional, you can remove this if you really want to).
|
|
71
|
-
gem 'refinerycms-i18n', '~> 0.9'
|
|
72
|
-
|
|
56
|
+
gem 'refinerycms-i18n', '~> 0.9.9.9'
|
|
73
57
|
# END USER DEFINED
|
data/Gemfile.lock
CHANGED
|
@@ -1,53 +1,95 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
refinerycms (0.9.9)
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
refinerycms (0.9.9.1)
|
|
5
|
+
bundler (~> 1.0.10)
|
|
6
|
+
refinerycms-authentication (~> 0.9.9.1)
|
|
7
|
+
refinerycms-base (~> 0.9.9.1)
|
|
8
|
+
refinerycms-core (~> 0.9.9.1)
|
|
9
|
+
refinerycms-dashboard (~> 0.9.9.1)
|
|
10
|
+
refinerycms-images (~> 0.9.9.1)
|
|
11
|
+
refinerycms-pages (~> 0.9.9.1)
|
|
12
|
+
refinerycms-resources (~> 0.9.9.1)
|
|
13
|
+
refinerycms-settings (~> 0.9.9.1)
|
|
14
|
+
refinerycms-authentication (0.9.9.1)
|
|
7
15
|
devise (~> 1.1)
|
|
8
|
-
|
|
16
|
+
refinerycms-core (~> 0.9.9.1)
|
|
17
|
+
refinerycms-base (0.9.9.1)
|
|
18
|
+
refinerycms-core (0.9.9.1)
|
|
19
|
+
acts_as_indexed (~> 0.7)
|
|
9
20
|
friendly_id_globalize3 (~> 3.2.0)
|
|
10
21
|
globalize3 (>= 0.1.0.beta)
|
|
11
22
|
moretea-awesome_nested_set (= 1.4.3.1)
|
|
12
|
-
rack-cache (~> 0.5.2)
|
|
13
23
|
rails (~> 3.0.3)
|
|
14
24
|
rdoc (>= 2.5.11)
|
|
25
|
+
refinerycms-base (~> 0.9.9.1)
|
|
26
|
+
refinerycms-generators (~> 0.9.9.3)
|
|
27
|
+
refinerycms-settings (~> 0.9.9.1)
|
|
15
28
|
truncate_html (~> 0.5)
|
|
16
29
|
will_paginate (~> 3.0.pre)
|
|
30
|
+
refinerycms-dashboard (0.9.9.1)
|
|
31
|
+
refinerycms-core (~> 0.9.9.1)
|
|
32
|
+
refinerycms-images (0.9.9.1)
|
|
33
|
+
dragonfly (~> 0.8.2)
|
|
34
|
+
rack-cache (~> 0.5.2)
|
|
35
|
+
refinerycms-core (~> 0.9.9.1)
|
|
36
|
+
refinerycms-pages (0.9.9.1)
|
|
37
|
+
refinerycms-core (~> 0.9.9.1)
|
|
38
|
+
refinerycms-resources (0.9.9.1)
|
|
39
|
+
dragonfly (~> 0.8.2)
|
|
40
|
+
rack-cache (~> 0.5.2)
|
|
41
|
+
refinerycms-core (~> 0.9.9.1)
|
|
42
|
+
refinerycms-settings (0.9.9.1)
|
|
43
|
+
refinerycms-base (~> 0.9.9.1)
|
|
44
|
+
refinerycms-testing (0.9.9.1)
|
|
45
|
+
autotest
|
|
46
|
+
autotest-notification
|
|
47
|
+
autotest-rails
|
|
48
|
+
capybara (>= 0.4.1.1)
|
|
49
|
+
cucumber
|
|
50
|
+
cucumber-rails
|
|
51
|
+
database_cleaner
|
|
52
|
+
factory_girl
|
|
53
|
+
gherkin
|
|
54
|
+
json_pure
|
|
55
|
+
launchy
|
|
56
|
+
rack-test (~> 0.5.6)
|
|
57
|
+
refinerycms-core (~> 0.9.9.1)
|
|
58
|
+
rspec-rails (~> 2.5)
|
|
17
59
|
|
|
18
60
|
GEM
|
|
19
61
|
remote: http://rubygems.org/
|
|
20
62
|
specs:
|
|
21
63
|
ZenTest (4.4.2)
|
|
22
64
|
abstract (1.0.0)
|
|
23
|
-
actionmailer (3.0.
|
|
24
|
-
actionpack (= 3.0.
|
|
25
|
-
mail (~> 2.2.
|
|
26
|
-
actionpack (3.0.
|
|
27
|
-
activemodel (= 3.0.
|
|
28
|
-
activesupport (= 3.0.
|
|
65
|
+
actionmailer (3.0.4)
|
|
66
|
+
actionpack (= 3.0.4)
|
|
67
|
+
mail (~> 2.2.15)
|
|
68
|
+
actionpack (3.0.4)
|
|
69
|
+
activemodel (= 3.0.4)
|
|
70
|
+
activesupport (= 3.0.4)
|
|
29
71
|
builder (~> 2.1.2)
|
|
30
72
|
erubis (~> 2.6.6)
|
|
31
73
|
i18n (~> 0.4)
|
|
32
74
|
rack (~> 1.2.1)
|
|
33
75
|
rack-mount (~> 0.6.13)
|
|
34
|
-
rack-test (~> 0.5.
|
|
76
|
+
rack-test (~> 0.5.7)
|
|
35
77
|
tzinfo (~> 0.3.23)
|
|
36
|
-
activemodel (3.0.
|
|
37
|
-
activesupport (= 3.0.
|
|
78
|
+
activemodel (3.0.4)
|
|
79
|
+
activesupport (= 3.0.4)
|
|
38
80
|
builder (~> 2.1.2)
|
|
39
81
|
i18n (~> 0.4)
|
|
40
|
-
activerecord (3.0.
|
|
41
|
-
activemodel (= 3.0.
|
|
42
|
-
activesupport (= 3.0.
|
|
82
|
+
activerecord (3.0.4)
|
|
83
|
+
activemodel (= 3.0.4)
|
|
84
|
+
activesupport (= 3.0.4)
|
|
43
85
|
arel (~> 2.0.2)
|
|
44
86
|
tzinfo (~> 0.3.23)
|
|
45
|
-
activeresource (3.0.
|
|
46
|
-
activemodel (= 3.0.
|
|
47
|
-
activesupport (= 3.0.
|
|
48
|
-
activesupport (3.0.
|
|
49
|
-
acts_as_indexed (0.
|
|
50
|
-
arel (2.0.
|
|
87
|
+
activeresource (3.0.4)
|
|
88
|
+
activemodel (= 3.0.4)
|
|
89
|
+
activesupport (= 3.0.4)
|
|
90
|
+
activesupport (3.0.4)
|
|
91
|
+
acts_as_indexed (0.7.0)
|
|
92
|
+
arel (2.0.8)
|
|
51
93
|
autotest (4.4.6)
|
|
52
94
|
ZenTest (>= 4.4.1)
|
|
53
95
|
autotest-notification (2.3.1)
|
|
@@ -57,7 +99,7 @@ GEM
|
|
|
57
99
|
babosa (0.2.2)
|
|
58
100
|
bcrypt-ruby (2.1.4)
|
|
59
101
|
builder (2.1.2)
|
|
60
|
-
capybara (0.4.1.
|
|
102
|
+
capybara (0.4.1.2)
|
|
61
103
|
celerity (>= 0.7.9)
|
|
62
104
|
culerity (>= 0.2.4)
|
|
63
105
|
mime-types (>= 1.16)
|
|
@@ -67,7 +109,7 @@ GEM
|
|
|
67
109
|
selenium-webdriver (>= 0.0.27)
|
|
68
110
|
xpath (~> 0.1.3)
|
|
69
111
|
celerity (0.8.7)
|
|
70
|
-
childprocess (0.1.
|
|
112
|
+
childprocess (0.1.7)
|
|
71
113
|
ffi (~> 0.6.3)
|
|
72
114
|
configuration (1.2.0)
|
|
73
115
|
cucumber (0.10.0)
|
|
@@ -79,7 +121,7 @@ GEM
|
|
|
79
121
|
cucumber-rails (0.3.2)
|
|
80
122
|
cucumber (>= 0.8.0)
|
|
81
123
|
culerity (0.2.15)
|
|
82
|
-
database_cleaner (0.6.
|
|
124
|
+
database_cleaner (0.6.3)
|
|
83
125
|
devise (1.1.5)
|
|
84
126
|
bcrypt-ruby (~> 2.1.2)
|
|
85
127
|
warden (~> 1.0.2)
|
|
@@ -91,7 +133,7 @@ GEM
|
|
|
91
133
|
factory_girl (1.3.3)
|
|
92
134
|
ffi (0.6.3)
|
|
93
135
|
rake (>= 0.8.7)
|
|
94
|
-
friendly_id_globalize3 (3.2.
|
|
136
|
+
friendly_id_globalize3 (3.2.1)
|
|
95
137
|
babosa (~> 0.2.1)
|
|
96
138
|
gherkin (2.3.3)
|
|
97
139
|
json (~> 1.4.6)
|
|
@@ -121,49 +163,46 @@ GEM
|
|
|
121
163
|
rack (>= 1.0.0)
|
|
122
164
|
rack-test (0.5.7)
|
|
123
165
|
rack (>= 1.0)
|
|
124
|
-
rails (3.0.
|
|
125
|
-
actionmailer (= 3.0.
|
|
126
|
-
actionpack (= 3.0.
|
|
127
|
-
activerecord (= 3.0.
|
|
128
|
-
activeresource (= 3.0.
|
|
129
|
-
activesupport (= 3.0.
|
|
166
|
+
rails (3.0.4)
|
|
167
|
+
actionmailer (= 3.0.4)
|
|
168
|
+
actionpack (= 3.0.4)
|
|
169
|
+
activerecord (= 3.0.4)
|
|
170
|
+
activeresource (= 3.0.4)
|
|
171
|
+
activesupport (= 3.0.4)
|
|
130
172
|
bundler (~> 1.0)
|
|
131
|
-
railties (= 3.0.
|
|
132
|
-
railties (3.0.
|
|
133
|
-
actionpack (= 3.0.
|
|
134
|
-
activesupport (= 3.0.
|
|
173
|
+
railties (= 3.0.4)
|
|
174
|
+
railties (3.0.4)
|
|
175
|
+
actionpack (= 3.0.4)
|
|
176
|
+
activesupport (= 3.0.4)
|
|
135
177
|
rake (>= 0.8.7)
|
|
136
178
|
thor (~> 0.14.4)
|
|
137
179
|
rake (0.8.7)
|
|
138
|
-
rdoc (3.
|
|
139
|
-
refinerycms-generators (0.9.9)
|
|
140
|
-
|
|
141
|
-
refinerycms-i18n (0.9.9.7)
|
|
180
|
+
rdoc (3.5.3)
|
|
181
|
+
refinerycms-generators (0.9.9.3)
|
|
182
|
+
refinerycms-i18n (0.9.9.9)
|
|
142
183
|
refinerycms (>= 0.9.8)
|
|
143
184
|
routing-filter (>= 0.2.3)
|
|
144
185
|
routing-filter (0.2.3)
|
|
145
186
|
actionpack
|
|
146
|
-
rspec (2.
|
|
147
|
-
rspec-core (~> 2.
|
|
148
|
-
rspec-expectations (~> 2.
|
|
149
|
-
rspec-mocks (~> 2.
|
|
150
|
-
rspec-core (2.
|
|
151
|
-
rspec-expectations (2.
|
|
187
|
+
rspec (2.5.0)
|
|
188
|
+
rspec-core (~> 2.5.0)
|
|
189
|
+
rspec-expectations (~> 2.5.0)
|
|
190
|
+
rspec-mocks (~> 2.5.0)
|
|
191
|
+
rspec-core (2.5.1)
|
|
192
|
+
rspec-expectations (2.5.0)
|
|
152
193
|
diff-lcs (~> 1.1.2)
|
|
153
|
-
rspec-mocks (2.
|
|
154
|
-
rspec-rails (2.
|
|
194
|
+
rspec-mocks (2.5.0)
|
|
195
|
+
rspec-rails (2.5.0)
|
|
155
196
|
actionpack (~> 3.0)
|
|
156
197
|
activesupport (~> 3.0)
|
|
157
198
|
railties (~> 3.0)
|
|
158
|
-
rspec (~> 2.
|
|
159
|
-
ruby-prof (0.9.2)
|
|
199
|
+
rspec (~> 2.5.0)
|
|
160
200
|
rubyzip (0.9.4)
|
|
161
|
-
selenium-webdriver (0.1.
|
|
201
|
+
selenium-webdriver (0.1.3)
|
|
162
202
|
childprocess (~> 0.1.5)
|
|
163
203
|
ffi (~> 0.6.3)
|
|
164
204
|
json_pure
|
|
165
205
|
rubyzip
|
|
166
|
-
spork (0.8.4)
|
|
167
206
|
sqlite3 (1.3.3)
|
|
168
207
|
term-ansicolor (1.0.5)
|
|
169
208
|
thor (0.14.6)
|
|
@@ -181,21 +220,7 @@ PLATFORMS
|
|
|
181
220
|
ruby
|
|
182
221
|
|
|
183
222
|
DEPENDENCIES
|
|
184
|
-
autotest
|
|
185
|
-
autotest-notification
|
|
186
|
-
autotest-rails
|
|
187
|
-
capybara
|
|
188
|
-
cucumber-rails
|
|
189
|
-
database_cleaner
|
|
190
|
-
factory_girl
|
|
191
|
-
gherkin
|
|
192
|
-
json_pure
|
|
193
|
-
launchy
|
|
194
|
-
rack-test (~> 0.5.6)
|
|
195
223
|
refinerycms!
|
|
196
|
-
refinerycms-
|
|
197
|
-
refinerycms-
|
|
198
|
-
rspec-rails (= 2.3)
|
|
199
|
-
ruby-prof
|
|
200
|
-
spork
|
|
224
|
+
refinerycms-i18n (~> 0.9.9.9)
|
|
225
|
+
refinerycms-testing (~> 0.9.9.1)
|
|
201
226
|
sqlite3
|
data/Rakefile
CHANGED
data/bin/refinerycms
CHANGED
|
@@ -7,27 +7,18 @@ rescue LoadError
|
|
|
7
7
|
puts "\n=== ACTION REQUIRED ===\n\n"
|
|
8
8
|
puts "Could not load the bundler gem. This is a required dependency of Refinery CMS."
|
|
9
9
|
puts "Please install it with `gem install bundler`.\n\n"
|
|
10
|
-
exit
|
|
10
|
+
exit(1)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# Load refinerycms
|
|
14
|
+
|
|
15
|
+
require Pathname.new(File.expand_path(File.dirname(__FILE__) << "/..")).join('lib', 'refinery')
|
|
16
|
+
|
|
13
17
|
# Load other required libraries
|
|
14
18
|
require 'pathname'
|
|
15
19
|
require 'fileutils'
|
|
16
20
|
require 'optparse'
|
|
17
|
-
|
|
18
|
-
# Load refinerycms
|
|
19
|
-
require Pathname.new(File.expand_path(File.dirname(__FILE__) << "/..")).join('lib', 'refinery')
|
|
20
|
-
|
|
21
|
-
class String
|
|
22
|
-
def blank?
|
|
23
|
-
self.nil? or self.length == 0
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
class NilClass
|
|
27
|
-
def blank?
|
|
28
|
-
true
|
|
29
|
-
end
|
|
30
|
-
end
|
|
21
|
+
require 'active_support'
|
|
31
22
|
|
|
32
23
|
module Refinery
|
|
33
24
|
class AppGenerator
|
|
@@ -72,7 +63,7 @@ module Refinery
|
|
|
72
63
|
end
|
|
73
64
|
|
|
74
65
|
opts.on("-g", "--gems gem1,gem2,gem3", Array, "Additional gems to install") do |gems|
|
|
75
|
-
@options[:gems] = gems.reject {|g| g.to_s =~ /^
|
|
66
|
+
@options[:gems] = gems.reject {|g| g.to_s =~ /^refinerycms/}.map {|g| "gem '#{g.to_s}'"}
|
|
76
67
|
end
|
|
77
68
|
|
|
78
69
|
opts.on("-f", "--force", "Force overwriting of directory") do
|
|
@@ -136,10 +127,13 @@ module Refinery
|
|
|
136
127
|
end
|
|
137
128
|
|
|
138
129
|
# Run the newly activated Refinery CMS generator.
|
|
139
|
-
run_command("rails generate refinerycms#{' --update' if @options[:update]}", {
|
|
130
|
+
run_command("rails generate refinerycms#{' --update' if @options[:update]}", {
|
|
131
|
+
:cd => true,
|
|
132
|
+
:fail => "Could not run the refinerycms generator successfully."
|
|
133
|
+
})
|
|
140
134
|
|
|
141
135
|
# Run the update task if we're updating
|
|
142
|
-
run_command("rake refinery:update", {:cd => true}) if @options[:update]
|
|
136
|
+
run_command("rake refinery:update", {:cd => true, :fail => "refinery:update rake task failed."}) if @options[:update]
|
|
143
137
|
|
|
144
138
|
# Output helpful messages to user
|
|
145
139
|
output!
|
|
@@ -153,7 +147,7 @@ module Refinery
|
|
|
153
147
|
puts pe
|
|
154
148
|
puts "\n"
|
|
155
149
|
puts @optparse
|
|
156
|
-
exit
|
|
150
|
+
exit(1)
|
|
157
151
|
end
|
|
158
152
|
|
|
159
153
|
# Ensure only one path is specified
|
|
@@ -161,43 +155,78 @@ module Refinery
|
|
|
161
155
|
puts "Please specify a single path to install Refinery CMS"
|
|
162
156
|
puts "\n"
|
|
163
157
|
puts @optparse
|
|
164
|
-
exit
|
|
158
|
+
exit(1)
|
|
165
159
|
end
|
|
166
160
|
|
|
167
161
|
# Get the name and path of the new application
|
|
168
162
|
@app_path = Pathname.new(File.expand_path(@input.first))
|
|
169
163
|
@app_name = @app_path.to_s.split(File::SEPARATOR).last
|
|
170
164
|
|
|
171
|
-
|
|
172
|
-
|
|
165
|
+
# Get the refinery path based on this file
|
|
166
|
+
@refinery_path = Pathname.new(File.expand_path('../../', __FILE__))
|
|
167
|
+
|
|
168
|
+
if @app_path == @refinery_path
|
|
169
|
+
puts "\nPlease generate your new project from outside the Refinery directory and any Rails directory."
|
|
170
|
+
puts "\n"
|
|
171
|
+
exit(1)
|
|
172
|
+
elsif %w(refinery test testing).include?(@input.first)
|
|
173
|
+
puts "\nYou can't use '#{@input.first}' as a name for your project, this is a reserved word that will cause conflicts."
|
|
174
|
+
puts "Please choose another name for your new project."
|
|
175
|
+
puts "\n"
|
|
176
|
+
exit(1)
|
|
177
|
+
elsif @app_path.directory? && !@options[:force] && !@options[:update]
|
|
178
|
+
puts "\nThe directory '#{@app_path}' that you specified already exists."
|
|
173
179
|
puts "Use --force to overwrite an existing directory."
|
|
174
180
|
puts "Use --update to replace any Refinery CMS files in an existing installation."
|
|
175
|
-
|
|
181
|
+
puts "\n"
|
|
182
|
+
exit(1)
|
|
183
|
+
elsif @options[:heroku]
|
|
184
|
+
if @options[:heroku].to_s.include?('_') or @options[:heroku].to_s.length > 30
|
|
185
|
+
message = ["\nThe application name '#{@options[:heroku]}' that you specified is invalid for Heroku."]
|
|
186
|
+
suggested_name = @options[:heroku].to_s
|
|
187
|
+
if suggested_name.include?('_')
|
|
188
|
+
message << "This is because it contains underscores which Heroku does not allow."
|
|
189
|
+
suggested_name.gsub!(/_/, '-')
|
|
190
|
+
end
|
|
191
|
+
if suggested_name.length > 30
|
|
192
|
+
message << "This is#{" also" unless suggested_name.nil?} because it is longer than 30 characters."
|
|
193
|
+
suggested_name = suggested_name[0..29]
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if @options[:force] or @options[:confirm]
|
|
197
|
+
@options[:heroku] = suggested_name
|
|
198
|
+
else
|
|
199
|
+
message << "Please choose another name like '#{suggested_name}'"
|
|
200
|
+
message << "Or use --confirm to automatically use '#{suggested_name}'"
|
|
201
|
+
message << "\n"
|
|
202
|
+
puts message.join("\n")
|
|
203
|
+
exit(1)
|
|
204
|
+
end
|
|
205
|
+
end
|
|
176
206
|
elsif @app_path.join('.git').directory? && @options[:update] && !@options[:confirm]
|
|
177
207
|
git_status = run_command('git status --porcelain', :puts => false)
|
|
178
208
|
if git_status.to_s.strip.length > 0
|
|
179
209
|
puts "\nYou have uncommitted changes or untracked files. Please remove or commit them, or:"
|
|
180
210
|
puts "Use --confirm to have Refinery proceed anyway. "
|
|
181
|
-
puts "Untracked files will be removed, and uncommitted changes may be lost
|
|
211
|
+
puts "Untracked files will be removed, and uncommitted changes may be lost."
|
|
212
|
+
puts "\n"
|
|
213
|
+
exit(1)
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if @options[:update]
|
|
218
|
+
puts "Please ensure you have a backup of your project and its database."
|
|
219
|
+
puts "Type 'yes' to continue (anything other than 'yes' will cancel)"
|
|
220
|
+
unless $stdin.gets.strip == 'yes'
|
|
221
|
+
puts "Cancelling..."
|
|
182
222
|
exit
|
|
183
223
|
end
|
|
184
224
|
end
|
|
185
225
|
end
|
|
186
226
|
|
|
187
227
|
def update!
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
rails_command << " --database #{@options[:database][:adapter]}"
|
|
191
|
-
skips = %w(active-record gemfile git javascript prototype test-unit)
|
|
192
|
-
skips.each do |skip|
|
|
193
|
-
rails_command << " --skip-#{skip}"
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
# Generate a new rails application in this directory
|
|
197
|
-
generate!(rails_command)
|
|
198
|
-
|
|
199
|
-
# Clean the directory of all new files from rails that we don't want
|
|
200
|
-
run_command('git clean -f -d') if @app_path.join('.git').directory?
|
|
228
|
+
# Handle acts_as_indexed changes.
|
|
229
|
+
FileUtils::rm_r @app_path.join('tmp', 'index') if @app_path.join('tmp', 'index').directory?
|
|
201
230
|
end
|
|
202
231
|
|
|
203
232
|
def generate!(rails_command = nil)
|
|
@@ -207,20 +236,36 @@ module Refinery
|
|
|
207
236
|
rails_command << " --database #{@options[:database][:adapter]}"
|
|
208
237
|
rails_command << " --force" if @options[:force]
|
|
209
238
|
rails_command << " --skip-test-unit --skip-prototype"
|
|
239
|
+
rails_command << " -m http://jruby.org" if defined? JRUBY_VERSION
|
|
240
|
+
end
|
|
241
|
+
rails_output = run_command(rails_command, {:cd => false})
|
|
242
|
+
# Detect non-success or a blank rails output or starting with "Can't initialize" or "Error"
|
|
243
|
+
if !$?.success? or rails_output.blank? or rails_output =~ /^(Can't\ initialize|Error)/
|
|
244
|
+
puts "Generating Rails application failed. Exiting..."
|
|
245
|
+
exit(1)
|
|
246
|
+
elsif defined? JRUBY_VERSION
|
|
247
|
+
find_and_replace(@app_path.join('Gemfile'), /['|"]sqlite3['|"]/, "'activerecord-jdbcsqlite3-adapter'")
|
|
248
|
+
|
|
249
|
+
# Override username and password
|
|
250
|
+
find_and_replace('config/database.yml', %r{username:.*}, "username: #{@options[:database][:username]}")
|
|
251
|
+
find_and_replace('config/database.yml', %r{password:.*}, "password: #{@options[:database][:password]}")
|
|
252
|
+
|
|
253
|
+
puts "\n---------"
|
|
254
|
+
puts "Refinery successfully installed in '#{@app_path}'!\n\n"
|
|
210
255
|
end
|
|
211
|
-
run_command(rails_command, {:cd => false})
|
|
212
|
-
abort "Generating Rails application failed. Exiting..." unless $?.success?
|
|
213
256
|
end
|
|
214
257
|
|
|
215
258
|
def bundle!
|
|
216
|
-
#
|
|
217
|
-
|
|
218
|
-
refinery_gems =
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
app_gemfile = @app_path.join('Gemfile')
|
|
222
|
-
FileUtils::cp app_gemfile, "#{app_gemfile}.backup"
|
|
259
|
+
# Insert the current REFINERY CMS section (you shouldn't put anything in here).
|
|
260
|
+
refinery_gemfile_contents = Refinery.root.join('Gemfile').read
|
|
261
|
+
refinery_gems = refinery_gemfile_contents.match(/# REFINERY CMS =+.*# END REFINERY CMS =+/m)[0]
|
|
262
|
+
refinery_gems.gsub!("# gem 'refinerycms'", "gem 'refinerycms'") # Enable refinerycms
|
|
263
|
+
refinery_gems.gsub!("gem 'refinerycms-testing'", "# gem 'refinerycms-testing'") # Disable testing
|
|
223
264
|
unless @options[:update]
|
|
265
|
+
app_gemfile = @app_path.join('Gemfile')
|
|
266
|
+
FileUtils::cp app_gemfile, "#{app_gemfile}.backup"
|
|
267
|
+
refinery_user_defined_gems = refinery_gemfile_contents.match(/# USER DEFINED(.*)# END USER DEFINED/m)
|
|
268
|
+
refinery_user_defined_gems = refinery_user_defined_gems[1] unless refinery_user_defined_gems.nil?
|
|
224
269
|
app_gemfile.open('a') do |f|
|
|
225
270
|
f.write "\n#{refinery_gems}\n"
|
|
226
271
|
@options[:gems] = ([refinery_user_defined_gems] | [@options[:gems]]).flatten.compact
|
|
@@ -228,63 +273,9 @@ module Refinery
|
|
|
228
273
|
f.write "\n# USER DEFINED\n#{@options[:gems].join("\n")}\n# END USER DEFINED" if @options[:gems].any?
|
|
229
274
|
end
|
|
230
275
|
else
|
|
231
|
-
|
|
232
|
-
user_defined_gems = app_gemfile.read.match(/# USER DEFINED(.*)# END USER DEFINED/m)
|
|
233
|
-
user_defined_gems = user_defined_gems[1].to_s.strip unless user_defined_gems.nil?
|
|
234
|
-
|
|
235
|
-
# If the user is updating to this version from a version that defined user defined gems
|
|
236
|
-
# in the "# REFINERY CMS " section then we need to salvage them.
|
|
237
|
-
incorrectly_core_gems = app_gemfile.read.match(/# REFINERY CMS =+.*(# Specify additional Refinery.*)# END REFINERY CMS =+/m)
|
|
238
|
-
unless incorrectly_core_gems.nil?
|
|
239
|
-
incorrectly_core_gems = incorrectly_core_gems[1].to_s.strip
|
|
240
|
-
# stop before any new groups appear.
|
|
241
|
-
incorrectly_core_gems_take_two = incorrectly_core_gems.match(/(# Specify additional Refinery.*)group ?:?/m)
|
|
242
|
-
incorrectly_core_gems = incorrectly_core_gems_take_two[1].to_s.strip unless incorrectly_core_gems_take_two.nil?
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
unless incorrectly_core_gems.blank?
|
|
246
|
-
# wipe the gems from the gemfile in their current position
|
|
247
|
-
# they will be reintroduced in the next step.
|
|
248
|
-
find_and_replace(app_gemfile, incorrectly_core_gems, '')
|
|
249
|
-
end
|
|
250
|
-
|
|
251
|
-
# If the user hasn't defined any gems then use the refinery ones.
|
|
252
|
-
refinery_user_defined_gems = user_defined_gems.to_s.strip.blank? ? [refinery_user_defined_gems] : []
|
|
253
|
-
refinery_user_defined_gems |= [user_defined_gems, incorrectly_core_gems].reject{|g| g.to_s.strip.blank?}.compact.flatten
|
|
254
|
-
|
|
255
|
-
# Unless all sets of gems are blank we want to overwrite the section.
|
|
256
|
-
unless refinery_user_defined_gems.length == 0
|
|
257
|
-
# Manage double ups so that earlier rules are kept (can't use uniq because it strips blank lines)
|
|
258
|
-
# sorted by order of precedence (so we have to reverse the array)
|
|
259
|
-
refinery_user_defined_gems = refinery_user_defined_gems.join('').split("\n").reverse
|
|
260
|
-
refinery_user_defined_gems.reject! do |g|
|
|
261
|
-
# Ignoring blank lines because we want to keep them,
|
|
262
|
-
g != '' && (
|
|
263
|
-
(refinery_user_defined_gems.count{|line| line == g} > 1) || # Delete where there's another line like this.
|
|
264
|
-
(g =~ %r{^(# +)?( +)?gem} && (refinery_user_defined_gems.count{|line| line.split(',').first == g.split(',').first} > 1))
|
|
265
|
-
)
|
|
266
|
-
end
|
|
267
|
-
|
|
268
|
-
# Use any gems specified, too, ensuring we restore the sort order of refinery_user_defined_gems.
|
|
269
|
-
@options[:gems] = refinery_user_defined_gems.reverse + @options[:gems]
|
|
270
|
-
gems_to_insert = "# USER DEFINED\n#{@options[:gems].join("\n")}\n\n# END USER DEFINED"
|
|
271
|
-
unless user_defined_gems.nil?
|
|
272
|
-
find_and_replace(app_gemfile, /# USER DEFINED.*# END USER DEFINED/m, gems_to_insert)
|
|
273
|
-
else
|
|
274
|
-
app_gemfile.open('a') {|f| f.write "\n\n#{gems_to_insert}" }
|
|
275
|
-
end
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
# replace existing core dependencies with the current set of dependencies.
|
|
279
|
-
find_and_replace(app_gemfile, /# REFINERY CMS =+.*# END REFINERY CMS =+/m, refinery_gems)
|
|
276
|
+
find_and_replace(@app_path.join('Gemfile'), /# REFINERY CMS =+.*# END REFINERY CMS =+/m, refinery_gems)
|
|
280
277
|
end
|
|
281
278
|
|
|
282
|
-
# Override database username and password
|
|
283
|
-
unless @options[:update]
|
|
284
|
-
# Override username and password
|
|
285
|
-
find_and_replace('config/database.yml', %r{username:.*}, "username: #{@options[:database][:username]}")
|
|
286
|
-
find_and_replace('config/database.yml', %r{password:.*}, "password: #{@options[:database][:password]}")
|
|
287
|
-
end
|
|
288
279
|
|
|
289
280
|
# Specify the correct version of the Refinery CMS gem (may be git source).
|
|
290
281
|
src = Refinery.version !~ /\.pre$/ ? "'= #{Refinery.version}'" : ":git => 'git://github.com/resolve/refinerycms'"
|
|
@@ -294,18 +285,17 @@ module Refinery
|
|
|
294
285
|
find_and_replace('Gemfile', "# gem 'aws-s3', :require => 'aws/s3'",
|
|
295
286
|
"gem 'aws-s3', :require => 'aws/s3'") if @options[:heroku]
|
|
296
287
|
|
|
297
|
-
puts "\n---------"
|
|
298
|
-
puts "Refinery successfully installed in '#{@app_path}'!\n\n"
|
|
299
|
-
|
|
300
288
|
# Automate
|
|
301
289
|
# TODO: Check exit codes to see whether or not these worked
|
|
302
290
|
puts "Installing gem requirements using bundler..\n"
|
|
303
291
|
|
|
304
292
|
# Ensure RefineryCMS is up to date if we're updating
|
|
305
|
-
|
|
293
|
+
if @options[:update]
|
|
294
|
+
run_command("bundle update refinerycms refinerycms-generators", {:fail => "Unable to update core gems"})
|
|
295
|
+
end
|
|
306
296
|
|
|
307
297
|
# Install!
|
|
308
|
-
run_command("bundle install")
|
|
298
|
+
run_command("bundle install", {:fail => "Unable to install necessary gems"})
|
|
309
299
|
end
|
|
310
300
|
|
|
311
301
|
def output!
|
|
@@ -349,6 +339,16 @@ module Refinery
|
|
|
349
339
|
puts "heroku config:add S3_BUCKET=XXXXXXXXX S3_KEY=XXXXXXXXX S3_SECRET=XXXXXXXXXX"
|
|
350
340
|
end
|
|
351
341
|
|
|
342
|
+
puts "\n--- Refinery CMS 0.9.9.1 note ---"
|
|
343
|
+
puts "New 'core' engine called 'refinerycms-testing' which handles RSpec and Cucumber support."
|
|
344
|
+
puts "You will see this disabled in your Gemfile in the '# REFINERY CMS' section."
|
|
345
|
+
puts "To enable it, uncomment the gem line in your Gemfile and run:"
|
|
346
|
+
puts "\nbundle install"
|
|
347
|
+
puts "rails generate refinerycms_testing"
|
|
348
|
+
puts "\nIf it prompts you about whether you want to overwrite any files that conflict, choose yes."
|
|
349
|
+
puts "\nNow, to run the specs and features you can just type 'rake'."
|
|
350
|
+
puts "--- End upgrade note ---\n"
|
|
351
|
+
|
|
352
352
|
puts "\nThanks for installing Refinery, enjoy creating your new application!"
|
|
353
353
|
puts "---------\n\n"
|
|
354
354
|
end
|
|
@@ -356,10 +356,12 @@ module Refinery
|
|
|
356
356
|
private :validate!, :generate!, :bundle!, :output!
|
|
357
357
|
|
|
358
358
|
def run_command(command, options = {})
|
|
359
|
-
|
|
359
|
+
require 'rbconfig'
|
|
360
|
+
exe = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['RUBY_INSTALL_NAME'])
|
|
361
|
+
options = {:cd => true, :puts => true, :fail => nil}.merge(options)
|
|
360
362
|
to_run = %w()
|
|
361
363
|
to_run << "cd \"#{@app_path}\" &&" if options[:cd]
|
|
362
|
-
to_run << command
|
|
364
|
+
to_run << "#{exe} -S " << command
|
|
363
365
|
|
|
364
366
|
if Refinery::WINDOWS
|
|
365
367
|
to_run = %w(cmd /c) | to_run.map{|c| c.gsub(/\//m, '\\')}
|
|
@@ -380,7 +382,14 @@ module Refinery
|
|
|
380
382
|
output << `#{to_run}`
|
|
381
383
|
end
|
|
382
384
|
|
|
383
|
-
|
|
385
|
+
if $?.success? or options[:fail].nil?
|
|
386
|
+
output.join("\n")
|
|
387
|
+
else
|
|
388
|
+
puts "\nFailed to generate application."
|
|
389
|
+
puts "Message: #{options[:fail]}" unless options[:fail].nil?
|
|
390
|
+
puts "Exiting...\n\n"
|
|
391
|
+
exit(1)
|
|
392
|
+
end
|
|
384
393
|
end
|
|
385
394
|
|
|
386
395
|
def find_and_replace(file, find, replace)
|