fat_free_crm 0.13.2 → 0.13.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fat_free_crm might be problematic. Click here for more details.
- checksums.yaml +5 -13
- data/.travis.yml +3 -3
- data/Gemfile +5 -2
- data/Gemfile.lock +137 -119
- data/MIT-LICENSE +1 -1
- data/README.md +5 -3
- data/app/assets/javascripts/admin/fields.js.coffee +31 -8
- data/app/assets/javascripts/application.js.erb +6 -10
- data/app/assets/javascripts/crm.js.coffee +426 -0
- data/app/assets/javascripts/crm_chosen.js.coffee +19 -38
- data/app/assets/javascripts/crm_classes.js.coffee +215 -0
- data/app/assets/javascripts/crm_comments.js.coffee +20 -58
- data/app/assets/javascripts/crm_loginout.js.coffee +27 -0
- data/app/assets/javascripts/crm_select2.js.coffee +29 -0
- data/app/assets/javascripts/crm_sortable.js.coffee +32 -0
- data/app/assets/javascripts/crm_tags.js.coffee +22 -0
- data/app/assets/javascripts/crm_textarea_autocomplete.js.coffee +33 -0
- data/app/assets/javascripts/datepicker.js.coffee +2 -2
- data/app/assets/javascripts/format_buttons.js.coffee +23 -24
- data/app/assets/javascripts/lists.js.coffee +45 -76
- data/app/assets/javascripts/pagination.js.coffee +16 -0
- data/app/assets/javascripts/search.js.coffee +6 -22
- data/app/assets/javascripts/timeago.js.coffee +21 -0
- data/app/assets/stylesheets/application.css.erb +0 -1
- data/app/assets/stylesheets/common.scss +36 -29
- data/app/assets/stylesheets/lists.css.scss +17 -3
- data/app/controllers/admin/groups_controller.rb +2 -1
- data/app/controllers/application_controller.rb +5 -5
- data/app/controllers/entities/accounts_controller.rb +1 -1
- data/app/controllers/entities/campaigns_controller.rb +1 -1
- data/app/controllers/entities/contacts_controller.rb +1 -1
- data/app/controllers/entities/leads_controller.rb +1 -1
- data/app/controllers/entities/opportunities_controller.rb +1 -1
- data/app/controllers/home_controller.rb +10 -7
- data/app/controllers/tasks_controller.rb +15 -0
- data/app/controllers/users_controller.rb +6 -4
- data/app/helpers/accounts_helper.rb +8 -5
- data/app/helpers/application_helper.rb +53 -39
- data/app/helpers/campaigns_helper.rb +1 -0
- data/app/helpers/leads_helper.rb +3 -3
- data/app/helpers/opportunities_helper.rb +15 -0
- data/app/helpers/remote_link_pagination_helper.rb +8 -0
- data/app/helpers/tags_helper.rb +2 -2
- data/app/helpers/tasks_helper.rb +22 -15
- data/app/helpers/users_helper.rb +3 -2
- data/app/mailers/user_mailer.rb +9 -3
- data/app/models/entities/account_contact.rb +1 -1
- data/app/models/fields/custom_field.rb +1 -1
- data/app/models/list.rb +1 -0
- data/app/models/observers/entity_observer.rb +10 -1
- data/app/models/observers/lead_observer.rb +2 -0
- data/app/models/observers/opportunity_observer.rb +2 -0
- data/app/models/observers/task_observer.rb +2 -0
- data/app/models/polymorphic/avatar.rb +2 -0
- data/app/models/polymorphic/comment.rb +0 -1
- data/app/models/polymorphic/task.rb +41 -9
- data/app/models/users/ability.rb +1 -0
- data/app/models/users/group.rb +0 -5
- data/app/models/users/user.rb +0 -7
- data/app/views/accounts/_edit.html.haml +1 -0
- data/app/views/accounts/_index_brief.html.haml +2 -2
- data/app/views/accounts/_index_long.html.haml +2 -2
- data/app/views/accounts/_new.html.haml +1 -0
- data/app/views/accounts/_sidebar_index.html.haml +1 -1
- data/app/views/accounts/_sidebar_show.html.haml +1 -1
- data/app/views/accounts/_top_section.html.haml +1 -1
- data/app/views/accounts/create.js.haml +9 -9
- data/app/views/accounts/destroy.js.haml +2 -2
- data/app/views/accounts/edit.js.haml +5 -5
- data/app/views/accounts/index.js.haml +5 -5
- data/app/views/accounts/new.js.haml +1 -1
- data/app/views/accounts/show.html.haml +1 -1
- data/app/views/accounts/show.js.haml +1 -1
- data/app/views/accounts/update.js.haml +7 -5
- data/app/views/admin/field_groups/_field_group.html.haml +4 -5
- data/app/views/admin/field_groups/confirm.js.haml +2 -2
- data/app/views/admin/field_groups/create.js.haml +6 -12
- data/app/views/admin/field_groups/destroy.js.haml +3 -3
- data/app/views/admin/field_groups/edit.js.haml +1 -1
- data/app/views/admin/field_groups/new.js.haml +1 -1
- data/app/views/admin/field_groups/update.js.haml +2 -2
- data/app/views/admin/fields/_field.html.haml +1 -1
- data/app/views/admin/fields/_sort_by.html.haml +3 -3
- data/app/views/admin/fields/create.js.haml +9 -9
- data/app/views/admin/fields/destroy.js.haml +4 -4
- data/app/views/admin/fields/edit.js.haml +2 -2
- data/app/views/admin/fields/index.html.haml +1 -8
- data/app/views/admin/fields/show.html.haml +1 -1
- data/app/views/admin/fields/update.js.haml +8 -8
- data/app/views/admin/groups/_form.html.haml +1 -3
- data/app/views/admin/groups/create.js.haml +8 -8
- data/app/views/admin/groups/destroy.js.haml +3 -3
- data/app/views/admin/groups/edit.js.haml +3 -3
- data/app/views/admin/groups/index.js.haml +2 -2
- data/app/views/admin/groups/new.js.haml +2 -2
- data/app/views/admin/groups/update.js.haml +5 -5
- data/app/views/admin/tags/confirm.js.haml +2 -2
- data/app/views/admin/tags/create.js.haml +8 -8
- data/app/views/admin/tags/destroy.js.haml +3 -3
- data/app/views/admin/tags/edit.js.haml +4 -4
- data/app/views/admin/tags/new.js.haml +1 -1
- data/app/views/admin/tags/update.js.haml +5 -5
- data/app/views/admin/users/_profile.html.haml +3 -4
- data/app/views/admin/users/confirm.js.haml +2 -2
- data/app/views/admin/users/create.js.haml +8 -8
- data/app/views/admin/users/destroy.js.haml +3 -3
- data/app/views/admin/users/edit.js.haml +4 -4
- data/app/views/admin/users/index.js.haml +2 -2
- data/app/views/admin/users/new.js.haml +2 -2
- data/app/views/admin/users/reactivate.js.haml +2 -2
- data/app/views/admin/users/suspend.js.haml +2 -2
- data/app/views/admin/users/update.js.haml +5 -5
- data/app/views/campaigns/_edit.html.haml +1 -0
- data/app/views/campaigns/_index_brief.html.haml +1 -1
- data/app/views/campaigns/_index_long.html.haml +1 -1
- data/app/views/campaigns/_new.html.haml +1 -0
- data/app/views/campaigns/_sidebar_index.html.haml +1 -1
- data/app/views/campaigns/_sidebar_show.html.haml +1 -1
- data/app/views/campaigns/_status.html.haml +1 -1
- data/app/views/campaigns/_top_section.html.haml +1 -1
- data/app/views/campaigns/create.js.haml +10 -10
- data/app/views/campaigns/destroy.js.haml +2 -2
- data/app/views/campaigns/edit.js.haml +6 -6
- data/app/views/campaigns/index.js.haml +5 -5
- data/app/views/campaigns/new.js.haml +1 -1
- data/app/views/campaigns/show.html.haml +1 -1
- data/app/views/campaigns/show.js.haml +1 -1
- data/app/views/campaigns/update.js.haml +8 -6
- data/app/views/comments/_edit.html.haml +1 -1
- data/app/views/comments/_new.html.haml +1 -1
- data/app/views/comments/create.js.haml +9 -9
- data/app/views/comments/destroy.js.haml +2 -2
- data/app/views/comments/edit.js.haml +3 -3
- data/app/views/comments/update.js.haml +5 -5
- data/app/views/contacts/_contacts.html.haml +1 -1
- data/app/views/contacts/_edit.html.haml +1 -0
- data/app/views/contacts/_index_brief.html.haml +2 -2
- data/app/views/contacts/_index_full.html.haml +2 -2
- data/app/views/contacts/_index_long.html.haml +2 -2
- data/app/views/contacts/_new.html.haml +1 -0
- data/app/views/contacts/_section_general.html.haml +4 -3
- data/app/views/contacts/_sidebar_show.html.haml +1 -1
- data/app/views/contacts/_top_section.html.haml +1 -1
- data/app/views/contacts/create.js.haml +10 -10
- data/app/views/contacts/destroy.js.haml +3 -3
- data/app/views/contacts/edit.js.haml +5 -5
- data/app/views/contacts/index.js.haml +5 -5
- data/app/views/contacts/new.js.haml +1 -1
- data/app/views/contacts/show.html.haml +1 -1
- data/app/views/contacts/show.js.haml +1 -1
- data/app/views/contacts/update.js.haml +8 -6
- data/app/views/emails/destroy.js.haml +2 -2
- data/app/views/entities/_basic_search.html.haml +15 -12
- data/app/views/entities/_permissions.html.haml +6 -11
- data/app/views/entities/attach.js.haml +3 -3
- data/app/views/entities/contacts.js.haml +2 -2
- data/app/views/entities/discard.js.haml +1 -1
- data/app/views/entities/leads.js.haml +2 -2
- data/app/views/entities/opportunities.js.haml +2 -2
- data/app/views/entities/subscription_update.js.haml +1 -1
- data/app/views/entities/versions.js.haml +2 -2
- data/app/views/fields/group.js.erb +1 -1
- data/app/views/home/_account.html.haml +2 -2
- data/app/views/home/_assets_menu.html.haml +3 -3
- data/app/views/home/_duration_menu.html.haml +3 -3
- data/app/views/home/_events_menu.html.haml +3 -3
- data/app/views/home/_opportunity.html.haml +2 -2
- data/app/views/home/_options.html.haml +0 -1
- data/app/views/home/_users_menu.html.haml +3 -3
- data/app/views/home/index.js.haml +4 -4
- data/app/views/home/options.js.haml +1 -1
- data/app/views/layouts/_about.html.haml +3 -3
- data/app/views/layouts/_footer.html.haml +1 -1
- data/app/views/layouts/_header.html.haml +1 -1
- data/app/views/layouts/_jumpbox.html.haml +23 -21
- data/app/views/layouts/_sidebar.html.haml +1 -2
- data/app/views/layouts/admin/application.html.haml +1 -1
- data/app/views/layouts/application.html.haml +3 -3
- data/app/views/leads/_convert.html.haml +1 -11
- data/app/views/leads/_convert_permissions.html.haml +4 -9
- data/app/views/leads/_edit.html.haml +1 -0
- data/app/views/leads/_index_brief.html.haml +1 -1
- data/app/views/leads/_index_long.html.haml +1 -1
- data/app/views/leads/_leads.html.haml +1 -1
- data/app/views/leads/_new.html.haml +1 -0
- data/app/views/leads/_sidebar_index.html.haml +1 -1
- data/app/views/leads/_sidebar_show.html.haml +1 -1
- data/app/views/leads/_top_section.html.haml +1 -1
- data/app/views/leads/convert.js.haml +5 -5
- data/app/views/leads/create.js.haml +9 -9
- data/app/views/leads/destroy.js.haml +2 -2
- data/app/views/leads/edit.js.haml +5 -5
- data/app/views/leads/index.js.haml +5 -5
- data/app/views/leads/new.js.haml +1 -1
- data/app/views/leads/promote.js.haml +7 -7
- data/app/views/leads/reject.js.haml +2 -2
- data/app/views/leads/show.html.haml +1 -1
- data/app/views/leads/show.js.haml +1 -1
- data/app/views/leads/update.js.haml +9 -7
- data/app/views/lists/_lists.html.haml +6 -0
- data/app/views/lists/_sidebar.html.haml +18 -17
- data/app/views/lists/create.js.haml +6 -7
- data/app/views/lists/destroy.js.haml +1 -1
- data/app/views/opportunities/_edit.html.haml +2 -1
- data/app/views/opportunities/_index_brief.html.haml +1 -1
- data/app/views/opportunities/_index_long.html.haml +1 -1
- data/app/views/opportunities/_new.html.haml +2 -1
- data/app/views/opportunities/_opportunities.html.haml +1 -1
- data/app/views/opportunities/_sidebar_index.html.haml +1 -1
- data/app/views/opportunities/_sidebar_show.html.haml +1 -1
- data/app/views/opportunities/_top_section.html.haml +2 -2
- data/app/views/opportunities/contacts.js.haml +2 -2
- data/app/views/opportunities/create.js.haml +10 -10
- data/app/views/opportunities/destroy.js.haml +3 -3
- data/app/views/opportunities/edit.js.haml +5 -5
- data/app/views/opportunities/index.html.haml +1 -1
- data/app/views/opportunities/index.js.haml +5 -5
- data/app/views/opportunities/new.js.haml +1 -1
- data/app/views/opportunities/show.html.haml +1 -1
- data/app/views/opportunities/show.js.haml +1 -1
- data/app/views/opportunities/update.js.haml +8 -6
- data/app/views/shared/_address.html.haml +1 -1
- data/app/views/shared/_inline_styles.html.haml +1 -1
- data/app/views/shared/_naming.html.haml +3 -3
- data/app/views/shared/_paginate.haml +2 -1
- data/app/views/shared/_paginate_with_per_page.html.haml +10 -12
- data/app/views/shared/_search.html.haml +7 -3
- data/app/views/shared/_select_popup.html.haml +9 -11
- data/app/views/shared/_tags.html.haml +5 -4
- data/app/views/tasks/_completed.html.haml +3 -1
- data/app/views/tasks/_selector.html.haml +1 -1
- data/app/views/tasks/_top_section.html.haml +1 -1
- data/app/views/tasks/complete.js.haml +7 -7
- data/app/views/tasks/create.js.haml +17 -17
- data/app/views/tasks/destroy.js.haml +2 -2
- data/app/views/tasks/discard.js.haml +1 -1
- data/app/views/tasks/edit.js.haml +4 -4
- data/app/views/tasks/filter.js.haml +2 -2
- data/app/views/tasks/new.js.haml +1 -1
- data/app/views/tasks/uncomplete.js.haml +12 -0
- data/app/views/tasks/update.js.haml +4 -4
- data/app/views/users/_avatar.html.haml +1 -1
- data/app/views/users/_languages.html.haml +3 -3
- data/app/views/users/_profile.html.haml +1 -1
- data/app/views/users/avatar.js.haml +1 -1
- data/app/views/users/change_password.js.haml +5 -5
- data/app/views/users/edit.js.haml +1 -1
- data/app/views/users/password.js.haml +2 -2
- data/app/views/users/show.html.haml +1 -1
- data/app/views/users/update.js.haml +5 -5
- data/app/views/users/upload_avatar.js.haml +3 -3
- data/app/views/versions/_versions.html.haml +1 -1
- data/config/application.rb +3 -0
- data/config/environments/production.rb +1 -1
- data/config/environments/staging.rb +58 -13
- data/config/initializers/locale.rb +2 -0
- data/config/locales/cz_fat_free_crm.yml +1 -0
- data/config/locales/de_fat_free_crm.yml +1 -0
- data/config/locales/en-GB_fat_free_crm.yml +1 -0
- data/config/locales/en-US_fat_free_crm.yml +2 -0
- data/config/locales/es_fat_free_crm.yml +1 -0
- data/config/locales/fr-CA_fat_free_crm.yml +1 -0
- data/config/locales/fr_fat_free_crm.yml +1 -0
- data/config/locales/it_fat_free_crm.yml +1 -0
- data/config/locales/ja_fat_free_crm.yml +1 -0
- data/config/locales/pl_fat_free_crm.yml +1 -0
- data/config/locales/pt-BR_fat_free_crm.yml +1 -0
- data/config/locales/ru_fat_free_crm.yml +444 -61
- data/config/locales/sv-SE_fat_free_crm.yml +1 -0
- data/config/locales/th_fat_free_crm.yml +1 -0
- data/config/locales/zh-CN_fat_free_crm.yml +1 -0
- data/config/routes.rb +20 -19
- data/config/settings.default.yml +11 -10
- data/fat_free_crm.gemspec +5 -4
- data/lib/{plugins/country_select/lib/country_select.rb → country_select.rb} +0 -0
- data/lib/fat_free_crm.rb +3 -1
- data/lib/fat_free_crm/engine.rb +2 -4
- data/lib/fat_free_crm/gem_dependencies.rb +1 -1
- data/lib/fat_free_crm/gem_ext.rb +0 -2
- data/lib/fat_free_crm/permissions.rb +2 -3
- data/lib/fat_free_crm/version.rb +1 -1
- data/lib/{plugins/gravatar_image_tag/lib/gravatar_image_tag.rb → gravatar_image_tag.rb} +0 -0
- data/lib/tasks/ffcrm/settings.rake +4 -16
- data/public/favicon.ico +0 -0
- data/spec/controllers/entities/accounts_controller_spec.rb +5 -5
- data/spec/controllers/entities/campaigns_controller_spec.rb +5 -5
- data/spec/controllers/entities/contacts_controller_spec.rb +42 -5
- data/spec/controllers/entities/leads_controller_spec.rb +7 -7
- data/spec/controllers/entities/opportunities_controller_spec.rb +5 -5
- data/spec/controllers/home_controller_spec.rb +3 -3
- data/spec/controllers/tasks_controller_spec.rb +29 -0
- data/spec/factories/shared_factories.rb +1 -3
- data/spec/features/support/selector_helpers.rb +4 -4
- data/spec/helpers/tasks_helper_spec.rb +10 -5
- data/spec/lib/permissions_spec.rb +10 -22
- data/spec/mailers/user_mailer_spec.rb +5 -4
- data/spec/models/observers/entity_observer_spec.rb +13 -8
- data/spec/models/polymorphic/task_spec.rb +111 -32
- data/spec/routing/accounts_routing_spec.rb +1 -1
- data/spec/routing/campaigns_routing_spec.rb +1 -1
- data/spec/routing/contacts_routing_spec.rb +1 -1
- data/spec/routing/leads_routing_spec.rb +1 -1
- data/spec/routing/opportunities_routing_spec.rb +1 -1
- data/spec/shared/controllers.rb +2 -2
- data/spec/spec_helper.rb +1 -0
- data/spec/views/accounts/create.js.haml_spec.rb +3 -3
- data/spec/views/accounts/index.js.haml_spec.rb +4 -4
- data/spec/views/accounts/update.js.haml_spec.rb +5 -5
- data/spec/views/admin/field_groups/create.js.haml_spec.rb +2 -2
- data/spec/views/admin/field_groups/edit.js.haml_spec.rb +1 -1
- data/spec/views/admin/field_groups/new.js.haml_spec.rb +1 -1
- data/spec/views/admin/field_groups/update.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/create.js.haml_spec.rb +2 -2
- data/spec/views/admin/users/destroy.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/edit.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/index.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/new.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/reactivate.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/suspend.js.haml_spec.rb +1 -1
- data/spec/views/admin/users/update.js.haml_spec.rb +3 -3
- data/spec/views/campaigns/create.js.haml_spec.rb +4 -4
- data/spec/views/campaigns/destroy.js.haml_spec.rb +1 -1
- data/spec/views/campaigns/edit.js.haml_spec.rb +4 -4
- data/spec/views/campaigns/index.js.haml_spec.rb +2 -2
- data/spec/views/campaigns/new.js.haml_spec.rb +1 -1
- data/spec/views/campaigns/update.js.haml_spec.rb +7 -7
- data/spec/views/contacts/create.js.haml_spec.rb +4 -4
- data/spec/views/contacts/edit.js.haml_spec.rb +4 -4
- data/spec/views/contacts/index.js.html_spec.rb +2 -2
- data/spec/views/contacts/new.js.haml_spec.rb +2 -2
- data/spec/views/contacts/update.js.haml_spec.rb +11 -11
- data/spec/views/home/index.js.haml_spec.rb +1 -1
- data/spec/views/home/options.js.haml_spec.rb +3 -3
- data/spec/views/leads/convert.js.haml_spec.rb +3 -3
- data/spec/views/leads/create.js.haml_spec.rb +5 -5
- data/spec/views/leads/destroy.js.haml_spec.rb +1 -1
- data/spec/views/leads/edit.js.haml_spec.rb +4 -4
- data/spec/views/leads/index.js.haml_spec.rb +2 -2
- data/spec/views/leads/new.js.haml_spec.rb +1 -1
- data/spec/views/leads/promote.js.haml_spec.rb +13 -13
- data/spec/views/leads/reject.js.haml_spec.rb +6 -6
- data/spec/views/leads/update.js.haml_spec.rb +11 -11
- data/spec/views/opportunities/create.js.haml_spec.rb +4 -4
- data/spec/views/opportunities/destroy.js.haml_spec.rb +1 -1
- data/spec/views/opportunities/edit.js.haml_spec.rb +4 -4
- data/spec/views/opportunities/index.js.haml_spec.rb +2 -2
- data/spec/views/opportunities/update.js.haml_spec.rb +11 -11
- data/spec/views/tasks/complete.js.haml_spec.rb +5 -5
- data/spec/views/tasks/create.js.haml_spec.rb +13 -13
- data/spec/views/tasks/destroy.js.haml_spec.rb +3 -3
- data/spec/views/tasks/edit.js.haml_spec.rb +4 -4
- data/spec/views/tasks/new.js.haml_spec.rb +2 -2
- data/spec/views/tasks/uncomplete.js.haml_spec.rb +44 -0
- data/spec/views/tasks/update.js.haml_spec.rb +17 -17
- data/spec/views/users/avatar.js.haml_spec.rb +1 -1
- data/spec/views/users/change_password.js.haml_spec.rb +4 -4
- data/spec/views/users/edit.js.haml_spec.rb +1 -1
- data/spec/views/users/password.js.haml_spec.rb +2 -2
- data/spec/views/users/update.js.haml_spec.rb +5 -5
- data/spec/views/users/upload_avatar.js.haml_spec.rb +2 -2
- data/vendor/assets/javascripts/ajax-chosen.jquery.coffee +166 -76
- data/vendor/assets/javascripts/chosen.jquery.coffee +2 -2
- data/vendor/assets/javascripts/jquery_ui_datepicker/jquery-ui-timepicker-pt-BR.js +22 -0
- data/vendor/assets/javascripts/jquery_ui_datepicker/{jquery-ui-timepicker-sv.js → jquery-ui-timepicker-sv-SE.js} +0 -0
- data/vendor/assets/javascripts/jquery_ui_datepicker/jquery-ui-timepicker-th.js +19 -0
- data/vendor/assets/javascripts/jquery_ui_datepicker/jquery.ui.datepicker-fr-CA.js +21 -0
- data/vendor/assets/javascripts/jquery_ui_datepicker/jquery.ui.datepicker-pt.js +21 -0
- data/vendor/assets/javascripts/rating.js +2 -2
- metadata +101 -122
- data/app/assets/images/facebook-close.gif +0 -0
- data/app/assets/javascripts/crm.js +0 -495
- data/app/assets/javascripts/crm_classes.js +0 -218
- data/app/assets/javascripts/crm_fields.js +0 -34
- data/app/assets/javascripts/crm_loginout.js +0 -29
- data/app/assets/javascripts/crm_textarea_autocomplete.js +0 -32
- data/app/assets/javascripts/groups.js.coffee +0 -8
- data/app/assets/javascripts/jquery-noconflict.js +0 -6
- data/app/assets/javascripts/timeago.js +0 -17
- data/app/views/lists/_personal_sidebar.html.haml +0 -28
- data/lib/fat_free_crm/gem_ext/active_model/serializers/xml/serializer/attribute.rb +0 -17
- data/lib/fat_free_crm/gem_ext/authlogic/session/cookies.rb +0 -16
- data/lib/fat_free_crm/plugin_dependencies.rb +0 -12
- data/lib/plugins/country_select/MIT-LICENSE +0 -20
- data/lib/plugins/country_select/README +0 -14
- data/lib/plugins/country_select/init.rb +0 -1
- data/lib/plugins/country_select/install.rb +0 -2
- data/lib/plugins/country_select/uninstall.rb +0 -2
- data/lib/plugins/gravatar_image_tag/Gemfile +0 -8
- data/lib/plugins/gravatar_image_tag/README.textile +0 -108
- data/lib/plugins/gravatar_image_tag/ROADMAP.textile +0 -33
- data/lib/plugins/gravatar_image_tag/Rakefile +0 -50
- data/lib/plugins/gravatar_image_tag/VERSION +0 -1
- data/lib/plugins/gravatar_image_tag/gravatar_image_tag.gemspec +0 -45
- data/lib/plugins/gravatar_image_tag/init.rb +0 -2
- data/lib/plugins/gravatar_image_tag/spec/gravatar_image_tag_spec.rb +0 -83
- data/lib/plugins/gravatar_image_tag/spec/test_helper.rb +0 -12
- data/lib/tasks/db/migrate.rake +0 -66
- data/lib/tasks/db/schema.rake +0 -20
- data/vendor/assets/javascripts/ajax-chosen-prototype.js +0 -2
- data/vendor/assets/javascripts/ajax-chosen.proto.coffee +0 -98
- data/vendor/assets/javascripts/chosen-prototype.js +0 -3
- data/vendor/assets/javascripts/chosen.proto.coffee +0 -580
- data/vendor/assets/javascripts/event.simulate.js +0 -64
- data/vendor/assets/javascripts/facebooklist.js +0 -548
- data/vendor/assets/javascripts/facebooklist.simulate.js +0 -28
- data/vendor/assets/javascripts/modalbox.js +0 -506
- data/vendor/assets/stylesheets/facebooklist.css +0 -47
@@ -1,14 +0,0 @@
|
|
1
|
-
CountrySelect
|
2
|
-
=============
|
3
|
-
|
4
|
-
Provides a simple helper to get an HTML select list of countries. The list of countries comes from the ISO 3166 standard. While it is a relatively neutral source of country names, it will still offend some users.
|
5
|
-
|
6
|
-
Users are strongly advised to evaluate the suitability of this list given their user base.
|
7
|
-
|
8
|
-
Example
|
9
|
-
=======
|
10
|
-
|
11
|
-
country_select("user", "country_name")
|
12
|
-
|
13
|
-
|
14
|
-
Copyright (c) 2008 Michael Koziarski, released under the MIT license
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'country_select'
|
@@ -1,108 +0,0 @@
|
|
1
|
-
!http://s.gravatar.com/images/logo.png(Gravatar Logo)!
|
2
|
-
|
3
|
-
h1. Gravatar Image Tag Plugin
|
4
|
-
|
5
|
-
Rails view helper for grabbing "Gravatar":http://en.gravatar.com/ images. The goal here is to be configurable and have those configuration points documented!
|
6
|
-
|
7
|
-
h2. Install as a Ruby Gem
|
8
|
-
|
9
|
-
h3. Rails 2
|
10
|
-
|
11
|
-
p. Include the following line in your Rails environment
|
12
|
-
|
13
|
-
<pre># config/environment
|
14
|
-
config.gem 'gravatar_image_tag'</pre>
|
15
|
-
|
16
|
-
p. Then ensure the gem is installed by running the following rake task from the your application root.
|
17
|
-
|
18
|
-
<pre>rake gems:install</pre>
|
19
|
-
|
20
|
-
h3. Rails 3
|
21
|
-
|
22
|
-
p. Include the following line in your Rails environment
|
23
|
-
|
24
|
-
<pre># Gemfile
|
25
|
-
gem 'gravatar_image_tag'</pre>
|
26
|
-
|
27
|
-
p. Then ensure the gem is installed by running the following command from the your application root.
|
28
|
-
|
29
|
-
<pre>bundle install</pre>
|
30
|
-
|
31
|
-
h2. Install as a Ruby on Rails Plugin
|
32
|
-
|
33
|
-
<pre>./script/plugin install git://github.com/mdeering/gravatar_image_tag.git</pre>
|
34
|
-
|
35
|
-
h2. Usage
|
36
|
-
|
37
|
-
Once you have installed it as a plugin for your rails app usage is simple.
|
38
|
-
|
39
|
-
<pre>gravatar_image_tag('spam@spam.com'.gsub('spam', 'mdeering'), :alt => 'Michael Deering')</pre>
|
40
|
-
|
41
|
-
*Boom* here is my gravatar !http://www.gravatar.com/avatar/4da9ad2bd4a2d1ce3c428e32c423588a(Michael Deering)!
|
42
|
-
|
43
|
-
h2. Configuration
|
44
|
-
|
45
|
-
h3. Global configuration points
|
46
|
-
|
47
|
-
<pre># config/initializers/gravatar_image_tag.rb
|
48
|
-
GravatarImageTag.configure do |config|
|
49
|
-
config.default_image = nil # Set this to use your own default gravatar image rather then serving up Gravatar's default image [ 'http://example.com/images/default_gravitar.jpg', :identicon, :monsterid, :wavatar, 404 ].
|
50
|
-
config.filetype = nil # Set this if you require a specific image file format ['gif', 'jpg' or 'png']. Gravatar's default is png
|
51
|
-
config.rating = nil # Set this if you change the rating of the images that will be returned ['G', 'PG', 'R', 'X']. Gravatar's default is G
|
52
|
-
config.size = nil # Set this to globally set the size of the gravatar image returned (1..512). Gravatar's default is 80
|
53
|
-
config.secure = false # Set this to true if you require secure images on your pages.
|
54
|
-
end
|
55
|
-
</pre>
|
56
|
-
|
57
|
-
h3. Setting the default image inline
|
58
|
-
|
59
|
-
p. *Splat* the default gravatar image !http://www.gravatar.com/avatar/0c821f675f132d790b3f25e79da739a7(Default Gravatar Image)!
|
60
|
-
|
61
|
-
p. You can set the default gravatar image inline as follows:
|
62
|
-
|
63
|
-
<pre>gravatar_image_tag('junk', :alt => 'Github Default Gravatar', :gravatar => { :default => 'http://github.com/images/gravatars/gravatar-80.png' })</pre>
|
64
|
-
|
65
|
-
p. *Ka-Pow* !http://www.gravatar.com/avatar/0c821f675f132d790b3f25e79da739a7?default=http%3A%2F%2Fgithub.com%2Fimages%2Fgravatars%2Fgravatar-80.png(Github Default Gravatar)!
|
66
|
-
|
67
|
-
p. Other options supported besides an image url to fall back on include the following:
|
68
|
-
|
69
|
-
* :identicon !http://www.gravatar.com/avatar/0c821f675f132d790b3f25e79da739a7?default=identicon(Identicon Avatar)!
|
70
|
-
* :monsterid !http://www.gravatar.com/avatar/0c821f675f132d790b3f25e79da739a7?default=monsterid(Monster Id Avatar)!
|
71
|
-
* :wavatar !http://www.gravatar.com/avatar/0c821f675f132d790b3f25e79da739a7?default=wavatar(Wavatar Avatar)!
|
72
|
-
* 404: !http://www.gravatar.com/avatar/0c821f675f132d790b3f25e79da739a7?default=404(Not Found)!
|
73
|
-
|
74
|
-
h3. Setting the default image size
|
75
|
-
|
76
|
-
p. You can set the gravatar image size inline as follows:
|
77
|
-
|
78
|
-
<pre>gravatar_image_tag('spam@spam.com'.gsub('spam', 'mdeering'), :alt => 'Michael Deering', :class => 'some-class', :gravatar => { :size => 15 })</pre>
|
79
|
-
|
80
|
-
*Mini Me!* !(some-class)http://www.gravatar.com/avatar/4da9ad2bd4a2d1ce3c428e32c423588a?size=15(Michael Deering)!
|
81
|
-
|
82
|
-
h3. Grabbing gravatars from the secure gravatar server.
|
83
|
-
|
84
|
-
p. You can make a request for a gravatar from the secure server at https://secure.gravatar.com by passing the _:gravatar => { :secure => true }_ option to the gravatar_image_tag call.
|
85
|
-
|
86
|
-
<pre>gravatar_image_tag('spam@spam.com'.gsub('spam', 'mdeering'), :alt => 'Michael Deering', :gravatar => { :secure => true } )</pre>
|
87
|
-
|
88
|
-
Delivered by a secure url! !https://secure.gravatar.com/avatar/4da9ad2bd4a2d1ce3c428e32c423588a(Michael Deering)!
|
89
|
-
|
90
|
-
h3. Using Gravatar's built in rating system
|
91
|
-
|
92
|
-
p. You can set the gravatar rating inline as follows:
|
93
|
-
|
94
|
-
<pre>gravatar_image_tag('spam@spam.com'.gsub('spam', 'mdeering'), :alt => 'Michael Deering', :gravatar => { :rating => 'pg' } )</pre>
|
95
|
-
|
96
|
-
|
97
|
-
h3. Specifying a filetype
|
98
|
-
|
99
|
-
p. You can set the gravatar filetype inline as follows:
|
100
|
-
|
101
|
-
<pre>gravatar_image_tag('spam@spam.com'.gsub('spam', 'mdeering'), :alt => 'Michael Deering', :gravatar => { :filetype => :gif } )</pre>
|
102
|
-
|
103
|
-
|
104
|
-
h2. Credits
|
105
|
-
|
106
|
-
The ideas an methods for this plugin are from expanding upon my original blog post "Adding Gravatar To Your Website Or Blog (Gravatar Rails)":http://mdeering.com/posts/005-adding-gravitar-to-your-website-or-blog
|
107
|
-
|
108
|
-
Copyright (c) 2009-2010 "Michael Deering(Ruby on Rails Development Edmonton)":http://mdeering.com, released under the MIT license
|
@@ -1,33 +0,0 @@
|
|
1
|
-
h1. 1.1.0
|
2
|
-
|
3
|
-
* Add model helpers for ActiveRecord/ActiveModel
|
4
|
-
|
5
|
-
<pre>class Comment < ActiveRecord::Base
|
6
|
-
has_gravatar :author, :size => 120
|
7
|
-
end</pre>
|
8
|
-
|
9
|
-
<pre>Comment.first.gravatar_url</pre>
|
10
|
-
|
11
|
-
h1. 1.0.0
|
12
|
-
|
13
|
-
* -Block Configuration DSL support-
|
14
|
-
|
15
|
-
<pre># config/initializers/gravatar_image_tag.rb
|
16
|
-
GravatarImageTag.configure do |config|
|
17
|
-
config.default_image = nil # Set this to use your own default gravatar image rather then serving up Gravatar's default image [ 'http://example.com/images/default_gravitar.jpg', :identicon, :monsterid, :wavatar, 404 ].
|
18
|
-
config.filetype = nil # Set this if you require a specific image file format ['gif', 'jpg' or 'png']. Gravatar's default is png
|
19
|
-
config.rating = nil # Set this if you change the rating of the images that will be returned ['G', 'PG', 'R', 'X']. Gravatar's default is G
|
20
|
-
config.size = nil # Set this to globally set the size of the gravatar image returned (1..512). Gravatar's default is 80
|
21
|
-
config.secure = false # Set this to true if you require secure images on your pages.
|
22
|
-
end
|
23
|
-
</pre>
|
24
|
-
|
25
|
-
h1. 0.1.0
|
26
|
-
|
27
|
-
* -Add support for https calls to Gravatar-
|
28
|
-
* -Add support the different ratings call to Gravatar-
|
29
|
-
* -Add support for the filetype call to Gravatar-
|
30
|
-
|
31
|
-
h1. 0.0.1
|
32
|
-
|
33
|
-
* -package things up into a gem.- "Hosted on Gemcutter now(Gravatar Image Tag Ruby Gem)":http://rubygems.org/gems/gravatar_image_tag
|
@@ -1,50 +0,0 @@
|
|
1
|
-
require 'rake'
|
2
|
-
require 'rake/rdoctask'
|
3
|
-
require 'spec/rake/spectask'
|
4
|
-
|
5
|
-
begin
|
6
|
-
AUTHOR = "Michael Deering"
|
7
|
-
EMAIL = "mdeering@mdeering.com"
|
8
|
-
GEM = "gravatar_image_tag"
|
9
|
-
HOMEPAGE = "http://github.com/mdeering/gravatar_image_tag"
|
10
|
-
SUMMARY = "A configurable and documented Rails view helper for adding gravatars into your Rails application."
|
11
|
-
|
12
|
-
require 'jeweler'
|
13
|
-
Jeweler::Tasks.new do |s|
|
14
|
-
s.author = AUTHOR
|
15
|
-
s.email = EMAIL
|
16
|
-
s.files = %w(install.rb install.txt MIT-LICENSE README.textile Rakefile) + Dir.glob("{rails,lib,spec}/**/*")
|
17
|
-
s.homepage = HOMEPAGE
|
18
|
-
s.name = GEM
|
19
|
-
s.require_path = 'lib'
|
20
|
-
s.summary = SUMMARY
|
21
|
-
end
|
22
|
-
Jeweler::GemcutterTasks.new
|
23
|
-
rescue LoadError
|
24
|
-
puts "Jeweler, or one of its dependencies, is not available. Install it with: gem install jeweler"
|
25
|
-
end
|
26
|
-
|
27
|
-
desc 'Default: spec tests.'
|
28
|
-
task :default => :spec
|
29
|
-
|
30
|
-
desc 'Test the gravatar_image_tag gem.'
|
31
|
-
Spec::Rake::SpecTask.new('spec') do |t|
|
32
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
33
|
-
t.spec_opts = ["-c"]
|
34
|
-
end
|
35
|
-
|
36
|
-
desc "Run all examples with RCov"
|
37
|
-
Spec::Rake::SpecTask.new('examples_with_rcov') do |t|
|
38
|
-
t.spec_files = FileList['spec/**/*_spec.rb']
|
39
|
-
t.rcov = true
|
40
|
-
t.rcov_opts = ['--exclude', '/opt,spec,Library']
|
41
|
-
end
|
42
|
-
|
43
|
-
desc 'Generate documentation for the gravatar_image_tag plugin.'
|
44
|
-
Rake::RDocTask.new(:rdoc) do |rdoc|
|
45
|
-
rdoc.rdoc_dir = 'rdoc'
|
46
|
-
rdoc.title = 'GravatarImageTag'
|
47
|
-
rdoc.options << '--line-numbers' << '--inline-source'
|
48
|
-
rdoc.rdoc_files.include('README.textile')
|
49
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
50
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
1.0.0.pre2
|
@@ -1,45 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{gravatar_image_tag}
|
8
|
-
s.version = "1.0.0.pre2"
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Michael Deering"]
|
12
|
-
s.date = %q{2010-09-08}
|
13
|
-
s.email = %q{mdeering@mdeering.com}
|
14
|
-
s.extra_rdoc_files = [
|
15
|
-
"README.textile"
|
16
|
-
]
|
17
|
-
s.files = [
|
18
|
-
"MIT-LICENSE",
|
19
|
-
"README.textile",
|
20
|
-
"Rakefile",
|
21
|
-
"lib/gravatar_image_tag.rb",
|
22
|
-
"spec/gravatar_image_tag_spec.rb",
|
23
|
-
"spec/test_helper.rb"
|
24
|
-
]
|
25
|
-
s.homepage = %q{http://github.com/mdeering/gravatar_image_tag}
|
26
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
27
|
-
s.require_paths = ["lib"]
|
28
|
-
s.rubygems_version = %q{1.3.7}
|
29
|
-
s.summary = %q{A configurable and documented Rails view helper for adding gravatars into your Rails application.}
|
30
|
-
s.test_files = [
|
31
|
-
"spec/gravatar_image_tag_spec.rb",
|
32
|
-
"spec/test_helper.rb"
|
33
|
-
]
|
34
|
-
|
35
|
-
if s.respond_to? :specification_version then
|
36
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
37
|
-
s.specification_version = 3
|
38
|
-
|
39
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
40
|
-
else
|
41
|
-
end
|
42
|
-
else
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
@@ -1,83 +0,0 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/test_helper'
|
2
|
-
|
3
|
-
require 'gravatar_image_tag'
|
4
|
-
|
5
|
-
ActionView::Base.send(:include, GravatarImageTag)
|
6
|
-
|
7
|
-
describe GravatarImageTag do
|
8
|
-
|
9
|
-
email = 'mdeering@mdeering.com'
|
10
|
-
md5 = '4da9ad2bd4a2d1ce3c428e32c423588a'
|
11
|
-
default_filetype = :gif
|
12
|
-
default_image = 'http://mdeering.com/images/default_gravatar.png'
|
13
|
-
default_image_escaped = 'http%3A%2F%2Fmdeering.com%2Fimages%2Fdefault_gravatar.png'
|
14
|
-
default_rating = 'x'
|
15
|
-
default_size = 50
|
16
|
-
other_image = 'http://mdeering.com/images/other_gravatar.png'
|
17
|
-
other_image_escaped = 'http%3A%2F%2Fmdeering.com%2Fimages%2Fother_gravatar.png'
|
18
|
-
secure = false
|
19
|
-
|
20
|
-
view = ActionView::Base.new
|
21
|
-
|
22
|
-
{
|
23
|
-
{ :gravatar_id => md5 } => {},
|
24
|
-
{ :gravatar_id => md5 } => { :gravatar => { :rating => 'x' } },
|
25
|
-
{ :gravatar_id => md5, :size => 30 } => { :gravatar => {:size => 30 } },
|
26
|
-
{ :gravatar_id => md5, :default => other_image_escaped } => { :gravatar => {:default => other_image } },
|
27
|
-
{ :gravatar_id => md5, :default => other_image_escaped, :size => 30 } => { :gravatar => {:default => other_image, :size => 30 } }
|
28
|
-
}.each do |params, options|
|
29
|
-
it "#gravatar_image_tag should create the provided url with the provided options #{options}" do
|
30
|
-
view = ActionView::Base.new
|
31
|
-
image_tag = view.gravatar_image_tag(email, options)
|
32
|
-
image_tag.include?("#{params.delete(:gravatar_id)}").should be_true
|
33
|
-
params.all? {|key, value| image_tag.include?("#{key}=#{value}")}.should be_true
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
{
|
38
|
-
:default_gravatar_image => default_image,
|
39
|
-
:default_gravatar_filetype => default_filetype,
|
40
|
-
:default_gravatar_rating => default_rating,
|
41
|
-
:default_gravatar_size => default_size,
|
42
|
-
:secure_gravatar => secure
|
43
|
-
}.each do |singleton_variable, value|
|
44
|
-
it "should give a deprication warning for assigning to #{singleton_variable} and passthrough to set the new variable" do
|
45
|
-
ActionView::Base.should_receive(:warn)
|
46
|
-
ActionView::Base.send("#{singleton_variable}=", value)
|
47
|
-
GravatarImageTag.configuration.default_image == value if singleton_variable == :default_gravatar_image
|
48
|
-
GravatarImageTag.configuration.filetype == value if singleton_variable == :default_gravatar_filetype
|
49
|
-
GravatarImageTag.configuration.rating == value if singleton_variable == :default_gravatar_rating
|
50
|
-
GravatarImageTag.configuration.size == value if singleton_variable == :default_gravatar_size
|
51
|
-
GravatarImageTag.configuration.secure == value if singleton_variable == :secure_gravatar
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
# Now that the defaults are set...
|
56
|
-
{
|
57
|
-
{ :gravatar_id => md5, :size => default_size, :default => default_image_escaped } => {},
|
58
|
-
{ :gravatar_id => md5, :size => 30, :default => default_image_escaped } => { :gravatar => { :size => 30 } },
|
59
|
-
{ :gravatar_id => md5, :size => default_size, :default => other_image_escaped } => { :gravatar => {:default => other_image } },
|
60
|
-
{ :gravatar_id => md5, :size => 30, :default => other_image_escaped } => { :gravatar => { :default => other_image, :size => 30 } },
|
61
|
-
}.each do |params, options|
|
62
|
-
it "#gravatar_image_tag #{params} should create the provided url when defaults have been set with the provided options #{options}" do
|
63
|
-
view = ActionView::Base.new
|
64
|
-
image_tag = view.gravatar_image_tag(email, options)
|
65
|
-
image_tag.include?("#{params.delete(:gravatar_id)}.#{default_filetype}").should be_true
|
66
|
-
params.all? {|key, value| image_tag.include?("#{key}=#{value}")}.should be_true
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
it 'should request the gravatar image from the non-secure server if the https => false option is given' do
|
71
|
-
(!!view.gravatar_image_tag(email, { :gravatar => { :secure => false } }).match(/^https:\/\/secure.gravatar.com\/avatar\//)).should be_false
|
72
|
-
end
|
73
|
-
|
74
|
-
it 'should request the gravatar image from the secure server if the https => true option is given' do
|
75
|
-
(!!view.gravatar_image_tag(email, { :gravatar => { :secure => true } }).match(/src="https:\/\/secure.gravatar.com\/avatar\//)).should be_true
|
76
|
-
end
|
77
|
-
|
78
|
-
it 'GravatarImageTag#gravitar_id should not error out when email is nil' do
|
79
|
-
lambda { GravatarImageTag::gravatar_id(nil) }.should_not raise_error(TypeError)
|
80
|
-
end
|
81
|
-
|
82
|
-
end
|
83
|
-
|
data/lib/tasks/db/migrate.rake
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
# Copyright (c) 2008-2013 Michael Dvorkin and contributors.
|
2
|
-
#
|
3
|
-
# Fat Free CRM is freely distributable under the terms of MIT license.
|
4
|
-
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
5
|
-
#------------------------------------------------------------------------------
|
6
|
-
Rake::Task.remove("db:migrate:status") # (Clears task so that it can be extended)
|
7
|
-
|
8
|
-
namespace :db do
|
9
|
-
namespace :migrate do
|
10
|
-
|
11
|
-
desc "Display status of migrations, including plugins"
|
12
|
-
task :status => :environment do
|
13
|
-
def find_migrations(path)
|
14
|
-
Dir.glob(path).each do |file|
|
15
|
-
# only files matching "20091231235959_some_name.rb" pattern
|
16
|
-
if match_data = /(\d{14})_(.+)\.rb/.match(file)
|
17
|
-
status = @db_list.delete(match_data[1]) ? 'up' : 'down'
|
18
|
-
@file_list << [status, match_data[1], match_data[2]]
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
config = ActiveRecord::Base.configurations[Rails.env || 'development']
|
24
|
-
@db_list = ActiveRecord::Base.connection.select_values("SELECT version FROM schema_migrations")
|
25
|
-
@file_list = []
|
26
|
-
|
27
|
-
# Find main migrations & plugin migrations
|
28
|
-
find_migrations(File.join(Rails.root, 'db', 'migrate', '*'))
|
29
|
-
find_migrations(File.join(Rails.root, 'vendor', 'plugins', '**', 'db', 'migrate', '*'))
|
30
|
-
|
31
|
-
# output
|
32
|
-
puts "\ndatabase: #{config['database']}\n\n"
|
33
|
-
puts "#{"Status".center(8)} #{"Migration ID".ljust(14)} Migration Name"
|
34
|
-
puts "-" * 50
|
35
|
-
@file_list.each do |file|
|
36
|
-
puts "#{file[0].center(8)} #{file[1].ljust(14)} #{file[2].humanize}"
|
37
|
-
end
|
38
|
-
@db_list.each do |version|
|
39
|
-
puts "#{'up'.center(8)} #{version.ljust(14)} *** NO FILE ***"
|
40
|
-
end
|
41
|
-
puts
|
42
|
-
end
|
43
|
-
|
44
|
-
desc "Run plugin migrations"
|
45
|
-
task :plugins => :environment do
|
46
|
-
if Dir.glob("#{Rails.root}/vendor/plugins/*/db/migrate/*.rb").any?
|
47
|
-
ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
|
48
|
-
|
49
|
-
# The following tweak becomes necessary when plugins start to depend
|
50
|
-
# on each others migrations.
|
51
|
-
# ------------------------------------------------------------------------------
|
52
|
-
|
53
|
-
# Copy all plugin migrations to temp directory
|
54
|
-
system("mkdir -p /tmp/plugin_migrations && rm -rf /tmp/plugin_migrations/* && \
|
55
|
-
cp #{Rails.root}/vendor/plugins/*/db/migrate/*.rb /tmp/plugin_migrations")
|
56
|
-
# Run all plugin migrations, ordered by timestamp
|
57
|
-
ActiveRecord::Migrator.migrate("/tmp/plugin_migrations", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
|
58
|
-
# Remove temp migration directory
|
59
|
-
system("rm -rf /tmp/plugin_migrations")
|
60
|
-
|
61
|
-
Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
end
|
66
|
-
end
|