fat_free_crm 0.16.4 → 0.17.1
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 -5
- data/.gitignore +1 -0
- data/.rubocop.yml +44 -5
- data/.rubocop_todo.yml +23 -359
- data/.travis.yml +21 -21
- data/CHANGELOG.md +42 -9
- data/Capfile +2 -0
- data/Gemfile +4 -1
- data/Gemfile.lock +27 -25
- data/Guardfile +2 -0
- data/README.md +5 -5
- data/Rakefile +2 -0
- data/Vagrantfile +92 -0
- data/app/assets/javascripts/application.js.erb +0 -2
- data/app/assets/javascripts/crm.js.coffee +16 -20
- data/app/assets/stylesheets/application.css.erb +0 -2
- data/app/controllers/admin/application_controller.rb +3 -1
- data/app/controllers/admin/field_groups_controller.rb +2 -0
- data/app/controllers/admin/fields_controller.rb +4 -5
- data/app/controllers/admin/groups_controller.rb +2 -0
- data/app/controllers/admin/plugins_controller.rb +3 -7
- data/app/controllers/admin/settings_controller.rb +3 -5
- data/app/controllers/admin/tags_controller.rb +3 -5
- data/app/controllers/admin/users_controller.rb +4 -2
- data/app/controllers/application_controller.rb +16 -16
- data/app/controllers/authentications_controller.rb +4 -2
- data/app/controllers/comments_controller.rb +5 -4
- data/app/controllers/emails_controller.rb +2 -0
- data/app/controllers/entities/accounts_controller.rb +14 -7
- data/app/controllers/entities/campaigns_controller.rb +15 -8
- data/app/controllers/entities/contacts_controller.rb +28 -21
- data/app/controllers/entities/leads_controller.rb +33 -22
- data/app/controllers/entities/opportunities_controller.rb +33 -26
- data/app/controllers/entities_controller.rb +15 -1
- data/app/controllers/home_controller.rb +10 -5
- data/app/controllers/lists_controller.rb +3 -5
- data/app/controllers/passwords_controller.rb +3 -1
- data/app/controllers/tasks_controller.rb +11 -9
- data/app/controllers/users_controller.rb +4 -1
- data/app/helpers/accounts_helper.rb +14 -19
- data/app/helpers/addresses_helper.rb +2 -0
- data/app/helpers/admin/application_helper.rb +3 -2
- data/app/helpers/admin/field_groups_helper.rb +2 -0
- data/app/helpers/admin/fields_helper.rb +2 -0
- data/app/helpers/admin/plugins_helper.rb +2 -0
- data/app/helpers/admin/settings_helper.rb +2 -0
- data/app/helpers/admin/tags_helper.rb +2 -0
- data/app/helpers/admin/users_helper.rb +37 -17
- data/app/helpers/application_helper.rb +62 -68
- data/app/helpers/authentications_helper.rb +2 -0
- data/app/helpers/campaigns_helper.rb +3 -1
- data/app/helpers/comments_helper.rb +2 -0
- data/app/helpers/contacts_helper.rb +5 -3
- data/app/helpers/emails_helper.rb +2 -0
- data/app/helpers/fields_helper.rb +2 -0
- data/app/helpers/groups_helper.rb +2 -0
- data/app/helpers/home_helper.rb +2 -0
- data/app/helpers/javascript_helper.rb +2 -0
- data/app/helpers/leads_helper.rb +4 -3
- data/app/helpers/lists_helper.rb +2 -0
- data/app/helpers/opportunities_helper.rb +11 -11
- data/app/helpers/passwords_helper.rb +2 -0
- data/app/helpers/remote_link_pagination_helper.rb +2 -0
- data/app/helpers/tags_helper.rb +4 -2
- data/app/helpers/tasks_helper.rb +11 -10
- data/app/helpers/users_helper.rb +3 -1
- data/app/helpers/versions_helper.rb +2 -0
- data/app/inputs/date_pair_input.rb +2 -0
- data/app/inputs/date_time_input.rb +2 -0
- data/app/inputs/datetime_pair_input.rb +2 -0
- data/app/inputs/text_input.rb +2 -0
- data/app/mailers/dropbox_mailer.rb +2 -0
- data/app/mailers/subscription_mailer.rb +14 -8
- data/app/mailers/user_mailer.rb +3 -2
- data/app/models/entities/account.rb +17 -9
- data/app/models/entities/account_contact.rb +3 -1
- data/app/models/entities/account_opportunity.rb +3 -1
- data/app/models/entities/campaign.rb +3 -1
- data/app/models/entities/contact.rb +9 -7
- data/app/models/entities/contact_opportunity.rb +2 -0
- data/app/models/entities/lead.rb +3 -1
- data/app/models/entities/opportunity.rb +3 -1
- data/app/models/fields/core_field.rb +3 -0
- data/app/models/fields/custom_field.rb +8 -5
- data/app/models/fields/custom_field_date_pair.rb +3 -1
- data/app/models/fields/custom_field_datetime_pair.rb +3 -1
- data/app/models/fields/custom_field_pair.rb +2 -0
- data/app/models/fields/field.rb +9 -4
- data/app/models/fields/field_group.rb +3 -1
- data/app/models/list.rb +2 -0
- data/app/models/observers/entity_observer.rb +2 -0
- data/app/models/observers/lead_observer.rb +3 -1
- data/app/models/observers/opportunity_observer.rb +5 -3
- data/app/models/observers/task_observer.rb +2 -0
- data/app/models/polymorphic/address.rb +2 -0
- data/app/models/polymorphic/avatar.rb +2 -0
- data/app/models/polymorphic/comment.rb +2 -0
- data/app/models/polymorphic/email.rb +2 -0
- data/app/models/polymorphic/tag.rb +2 -0
- data/app/models/polymorphic/tagging.rb +2 -0
- data/app/models/polymorphic/task.rb +9 -8
- data/app/models/polymorphic/version.rb +3 -1
- data/app/models/setting.rb +16 -0
- data/app/models/users/ability.rb +2 -0
- data/app/models/users/authentication.rb +2 -0
- data/app/models/users/group.rb +2 -0
- data/app/models/users/permission.rb +2 -0
- data/app/models/users/preference.rb +2 -0
- data/app/models/users/user.rb +15 -15
- data/app/views/accounts/_account.html.haml +3 -3
- data/app/views/accounts/_contact_info.html.haml +7 -7
- data/app/views/accounts/_edit.html.haml +8 -8
- data/app/views/accounts/_index_brief.html.haml +11 -11
- data/app/views/accounts/_index_long.html.haml +12 -12
- data/app/views/accounts/_new.html.haml +9 -9
- data/app/views/accounts/_sidebar_index.html.haml +5 -5
- data/app/views/accounts/_sidebar_show.html.haml +11 -11
- data/app/views/accounts/_title_bar.html.haml +2 -2
- data/app/views/accounts/_top_section.html.haml +8 -8
- data/app/views/accounts/create.js.haml +3 -3
- data/app/views/accounts/destroy.js.haml +1 -1
- data/app/views/accounts/edit.js.haml +4 -4
- data/app/views/accounts/index.js.haml +4 -4
- data/app/views/accounts/index.xls.builder +3 -1
- data/app/views/accounts/new.js.haml +1 -1
- data/app/views/accounts/show.html.haml +8 -8
- data/app/views/accounts/show.js.haml +1 -1
- data/app/views/accounts/update.js.haml +2 -2
- data/app/views/admin/custom_fields/_base_field.html.haml +4 -2
- data/app/views/admin/custom_fields/_check_boxes_field.html.haml +2 -2
- data/app/views/admin/custom_fields/_date_field.html.haml +1 -1
- data/app/views/admin/custom_fields/_date_pair_field.html.haml +2 -2
- data/app/views/admin/custom_fields/_datetime_field.html.haml +1 -1
- data/app/views/admin/custom_fields/_datetime_pair_field.html.haml +2 -2
- data/app/views/admin/custom_fields/_radio_field.html.haml +2 -2
- data/app/views/admin/custom_fields/_select_field.html.haml +1 -1
- data/app/views/admin/custom_fields/_string_field.html.haml +1 -1
- data/app/views/admin/field_groups/_confirm.html.haml +1 -1
- data/app/views/admin/field_groups/_edit.html.haml +3 -3
- data/app/views/admin/field_groups/_field_group.html.haml +9 -9
- data/app/views/admin/field_groups/_new.html.haml +4 -4
- data/app/views/admin/field_groups/_top_section.html.haml +3 -3
- data/app/views/admin/field_groups/confirm.js.haml +1 -1
- data/app/views/admin/field_groups/create.js.haml +2 -2
- 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 +1 -1
- data/app/views/admin/fields/_field.html.haml +4 -4
- data/app/views/admin/fields/_form.html.haml +10 -10
- data/app/views/admin/fields/_subform.html.haml +2 -2
- data/app/views/admin/fields/create.js.haml +2 -2
- data/app/views/admin/fields/edit.js.haml +1 -1
- data/app/views/admin/fields/index.html.haml +6 -6
- data/app/views/admin/fields/show.html.haml +1 -1
- data/app/views/admin/fields/update.js.haml +2 -2
- data/app/views/admin/groups/_edit.html.haml +3 -3
- data/app/views/admin/groups/_form.html.haml +1 -1
- data/app/views/admin/groups/_group.html.haml +4 -4
- data/app/views/admin/groups/_new.html.haml +3 -3
- data/app/views/admin/groups/create.js.haml +2 -2
- data/app/views/admin/groups/edit.js.haml +2 -2
- data/app/views/admin/groups/index.html.haml +3 -3
- data/app/views/admin/groups/index.js.haml +2 -2
- data/app/views/admin/groups/new.js.haml +1 -1
- data/app/views/admin/groups/update.js.haml +2 -2
- data/app/views/admin/plugins/_plugin.html.haml +1 -1
- data/app/views/admin/tags/_confirm.html.haml +2 -2
- data/app/views/admin/tags/_edit.html.haml +3 -3
- data/app/views/admin/tags/_new.html.haml +3 -3
- data/app/views/admin/tags/_tag.html.haml +4 -4
- data/app/views/admin/tags/confirm.js.haml +1 -1
- data/app/views/admin/tags/create.js.haml +2 -2
- data/app/views/admin/tags/edit.js.haml +3 -3
- data/app/views/admin/tags/index.html.haml +3 -3
- data/app/views/admin/tags/new.js.haml +1 -1
- data/app/views/admin/tags/update.js.haml +2 -2
- data/app/views/admin/users/_confirm.html.haml +1 -1
- data/app/views/admin/users/_edit.html.haml +3 -3
- data/app/views/admin/users/_new.html.haml +3 -3
- data/app/views/admin/users/_profile.html.haml +3 -3
- data/app/views/admin/users/_user.html.haml +16 -16
- data/app/views/admin/users/confirm.js.haml +1 -1
- data/app/views/admin/users/create.js.haml +2 -2
- data/app/views/admin/users/edit.js.haml +3 -3
- data/app/views/admin/users/index.html.haml +3 -3
- data/app/views/admin/users/index.js.haml +2 -2
- data/app/views/admin/users/new.js.haml +1 -1
- data/app/views/admin/users/reactivate.js.haml +1 -1
- data/app/views/admin/users/suspend.js.haml +1 -1
- data/app/views/admin/users/update.js.haml +2 -2
- data/app/views/application/_auto_complete.html.haml +3 -3
- data/app/views/application/index.atom.builder +10 -6
- data/app/views/application/index.rss.builder +3 -1
- data/app/views/application/show.atom.builder +11 -7
- data/app/views/application/show.rss.builder +4 -2
- data/app/views/authentications/new.html.haml +1 -1
- data/app/views/campaigns/_campaign.html.haml +3 -3
- data/app/views/campaigns/_edit.html.haml +7 -7
- data/app/views/campaigns/_index_brief.html.haml +3 -3
- data/app/views/campaigns/_index_long.html.haml +5 -5
- data/app/views/campaigns/_metrics.html.haml +5 -5
- data/app/views/campaigns/_new.html.haml +8 -8
- data/app/views/campaigns/_objectives.html.haml +6 -6
- data/app/views/campaigns/_sidebar_index.html.haml +5 -5
- data/app/views/campaigns/_sidebar_show.html.haml +10 -10
- data/app/views/campaigns/_status.html.haml +1 -1
- data/app/views/campaigns/_title_bar.html.haml +2 -2
- data/app/views/campaigns/_top_section.html.haml +9 -9
- data/app/views/campaigns/create.js.haml +3 -3
- data/app/views/campaigns/destroy.js.haml +1 -1
- data/app/views/campaigns/edit.js.haml +4 -4
- data/app/views/campaigns/index.js.haml +4 -4
- data/app/views/campaigns/index.xls.builder +22 -20
- data/app/views/campaigns/new.js.haml +1 -1
- data/app/views/campaigns/show.html.haml +9 -9
- data/app/views/campaigns/show.js.haml +1 -1
- data/app/views/campaigns/update.js.haml +2 -2
- data/app/views/comments/_comment.html.haml +5 -5
- data/app/views/comments/_edit.html.haml +5 -5
- data/app/views/comments/_new.html.haml +15 -15
- data/app/views/comments/_subscription_links.html.haml +3 -3
- data/app/views/comments/create.js.haml +1 -1
- data/app/views/comments/edit.js.haml +2 -2
- data/app/views/comments/update.js.haml +2 -2
- data/app/views/contacts/_contact.html.haml +3 -3
- data/app/views/contacts/_contacts.html.haml +2 -2
- data/app/views/contacts/_edit.html.haml +9 -9
- data/app/views/contacts/_extra.html.haml +3 -3
- data/app/views/contacts/_index_brief.html.haml +3 -3
- data/app/views/contacts/_index_full.html.haml +11 -11
- data/app/views/contacts/_index_long.html.haml +5 -5
- data/app/views/contacts/_new.html.haml +10 -10
- data/app/views/contacts/_section_extra.html.haml +1 -1
- data/app/views/contacts/_section_general.html.haml +1 -1
- data/app/views/contacts/_sidebar_show.html.haml +8 -8
- data/app/views/contacts/_title_bar.html.haml +2 -2
- data/app/views/contacts/_top_section.html.haml +9 -9
- data/app/views/contacts/create.js.haml +4 -4
- data/app/views/contacts/destroy.js.haml +2 -2
- data/app/views/contacts/edit.js.haml +4 -4
- data/app/views/contacts/index.js.haml +4 -4
- data/app/views/contacts/index.xls.builder +3 -1
- data/app/views/contacts/new.js.haml +1 -1
- data/app/views/contacts/show.html.haml +7 -7
- data/app/views/contacts/show.js.haml +1 -1
- data/app/views/contacts/update.js.haml +3 -3
- data/app/views/emails/_email.html.haml +6 -6
- data/app/views/entities/_basic_search.html.haml +3 -3
- data/app/views/entities/_permissions.html.haml +10 -10
- data/app/views/entities/_search.html.haml +6 -6
- data/app/views/entities/_section_custom_fields.html.haml +3 -3
- data/app/views/entities/_title_bar.html.haml +3 -3
- data/app/views/entities/attach.js.haml +2 -2
- data/app/views/entities/contacts.js.haml +2 -2
- 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/_edit_custom_field_group.html.haml +2 -2
- data/app/views/fields/_group.html.haml +5 -5
- data/app/views/fields/_group_table.html.haml +2 -2
- data/app/views/fields/_groups.html.haml +1 -1
- data/app/views/fields/_sidebar_show.html.haml +1 -1
- data/app/views/fields/group.js.erb +1 -1
- data/app/views/home/_account.html.haml +11 -11
- data/app/views/home/_activity.html.haml +7 -7
- data/app/views/home/_assets_menu.html.haml +1 -1
- data/app/views/home/_opportunity.html.haml +8 -8
- data/app/views/home/_options.html.haml +2 -2
- data/app/views/home/_task.html.haml +7 -7
- data/app/views/home/index.atom.builder +5 -3
- data/app/views/home/index.html.haml +6 -6
- data/app/views/home/index.js.haml +3 -3
- data/app/views/home/index.rss.builder +2 -0
- data/app/views/home/options.js.haml +1 -1
- data/app/views/layouts/500.html.haml +2 -2
- data/app/views/layouts/_footer.html.haml +1 -1
- data/app/views/layouts/_header.html.haml +3 -3
- data/app/views/layouts/_jumpbox.html.haml +1 -1
- data/app/views/layouts/_tabbed.html.haml +4 -4
- data/app/views/layouts/_tabless.html.haml +1 -1
- data/app/views/layouts/admin/_header.html.haml +3 -3
- data/app/views/layouts/admin/application.html.haml +5 -5
- data/app/views/layouts/application.html.haml +3 -3
- data/app/views/layouts/header.xls.builder +2 -0
- data/app/views/leads/_contact.html.haml +2 -2
- data/app/views/leads/_convert.html.haml +2 -2
- data/app/views/leads/_convert_permissions.html.haml +10 -10
- data/app/views/leads/_edit.html.haml +10 -10
- data/app/views/leads/_index_brief.html.haml +6 -6
- data/app/views/leads/_index_long.html.haml +7 -7
- data/app/views/leads/_lead.html.haml +3 -3
- data/app/views/leads/_leads.html.haml +2 -2
- data/app/views/leads/_new.html.haml +11 -11
- data/app/views/leads/_opportunity.html.haml +6 -6
- data/app/views/leads/_sidebar_index.html.haml +5 -5
- data/app/views/leads/_sidebar_show.html.haml +13 -13
- data/app/views/leads/_status.html.haml +7 -7
- data/app/views/leads/_title_bar.html.haml +3 -3
- data/app/views/leads/_top_section.html.haml +8 -8
- data/app/views/leads/convert.js.haml +4 -4
- data/app/views/leads/create.js.haml +3 -3
- data/app/views/leads/destroy.js.haml +1 -1
- data/app/views/leads/edit.js.haml +4 -4
- data/app/views/leads/index.js.haml +4 -4
- data/app/views/leads/index.xls.builder +3 -1
- data/app/views/leads/new.js.haml +1 -1
- data/app/views/leads/promote.js.haml +4 -4
- data/app/views/leads/reject.js.haml +1 -1
- data/app/views/leads/show.html.haml +6 -6
- data/app/views/leads/show.js.haml +1 -1
- data/app/views/leads/update.js.haml +3 -3
- data/app/views/lists/_lists.html.haml +2 -2
- data/app/views/lists/_sidebar.html.haml +8 -8
- data/app/views/opportunities/_edit.html.haml +7 -7
- data/app/views/opportunities/_index_brief.html.haml +4 -4
- data/app/views/opportunities/_index_long.html.haml +11 -11
- data/app/views/opportunities/_new.html.haml +8 -8
- data/app/views/opportunities/_opportunities.html.haml +2 -2
- data/app/views/opportunities/_opportunity.html.haml +3 -3
- data/app/views/opportunities/_sidebar_index.html.haml +5 -5
- data/app/views/opportunities/_sidebar_show.html.haml +12 -12
- data/app/views/opportunities/_title_bar.html.haml +2 -2
- data/app/views/opportunities/_top_section.html.haml +14 -14
- data/app/views/opportunities/contacts.js.haml +2 -2
- data/app/views/opportunities/create.js.haml +4 -4
- data/app/views/opportunities/destroy.js.haml +2 -2
- data/app/views/opportunities/edit.js.haml +4 -4
- data/app/views/opportunities/index.js.haml +4 -4
- data/app/views/opportunities/index.xls.builder +3 -1
- data/app/views/opportunities/new.js.haml +1 -1
- data/app/views/opportunities/show.html.haml +7 -7
- data/app/views/opportunities/show.js.haml +1 -1
- data/app/views/opportunities/update.js.haml +3 -3
- data/app/views/passwords/edit.html.haml +2 -2
- data/app/views/passwords/new.html.haml +1 -1
- data/app/views/shared/_address.html.haml +3 -3
- data/app/views/shared/_comment.html.haml +1 -1
- data/app/views/shared/_edit_comment.html.haml +5 -5
- data/app/views/shared/_empty.html.haml +1 -1
- data/app/views/shared/_paginate_with_per_page.html.haml +1 -1
- data/app/views/shared/_recent.html.haml +2 -2
- data/app/views/shared/_recently.html.haml +1 -1
- data/app/views/shared/_search.html.haml +2 -2
- data/app/views/shared/_tags.html.haml +2 -2
- data/app/views/shared/_tasks.html.haml +5 -5
- data/app/views/subscription_mailer/comment_notification.text.erb +2 -2
- data/app/views/tasks/_assigned.html.haml +4 -4
- data/app/views/tasks/_completed.html.haml +2 -2
- data/app/views/tasks/_edit.html.haml +4 -4
- data/app/views/tasks/_empty.html.haml +1 -1
- data/app/views/tasks/_new.html.haml +3 -3
- data/app/views/tasks/_pending.html.haml +7 -7
- data/app/views/tasks/_related.html.haml +2 -2
- data/app/views/tasks/_selector.html.haml +4 -4
- data/app/views/tasks/_sidebar_index.html.haml +7 -7
- data/app/views/tasks/_title.html.haml +2 -2
- data/app/views/tasks/_top_section.html.haml +9 -9
- data/app/views/tasks/complete.js.haml +2 -2
- data/app/views/tasks/create.js.haml +6 -6
- data/app/views/tasks/edit.js.haml +3 -3
- data/app/views/tasks/index.html.haml +4 -4
- data/app/views/tasks/index.xls.builder +5 -3
- data/app/views/tasks/new.js.haml +1 -1
- data/app/views/tasks/update.js.haml +1 -1
- data/app/views/users/_avatar.html.haml +5 -5
- data/app/views/users/_password.html.haml +3 -3
- data/app/views/users/_profile.html.haml +10 -10
- data/app/views/users/_user.html.haml +3 -3
- data/app/views/users/_user_report.html.haml +2 -2
- data/app/views/users/avatar.js.haml +1 -1
- data/app/views/users/change_password.js.haml +1 -1
- data/app/views/users/edit.js.haml +1 -1
- data/app/views/users/new.html.haml +2 -2
- data/app/views/users/opportunities_overview.html.haml +2 -2
- data/app/views/users/password.js.haml +1 -1
- data/app/views/users/show.html.haml +4 -4
- data/app/views/users/update.js.haml +4 -2
- data/app/views/users/upload_avatar.js.haml +2 -2
- data/app/views/versions/_version.html.haml +3 -3
- data/app/views/versions/_version_item.html.haml +3 -3
- data/app/views/versions/_versions.html.haml +2 -2
- data/bin/bundle +2 -0
- data/bin/rails +3 -1
- data/bin/rake +2 -0
- data/config.ru +3 -1
- data/config/application.rb +2 -0
- data/config/boot.rb +2 -0
- data/config/brakeman.ignore +139 -0
- data/config/deploy.example.rb +2 -0
- data/config/environment.rb +2 -0
- data/config/environments/development.rb +2 -0
- data/config/environments/production.rb +2 -0
- data/config/environments/staging.rb +2 -0
- data/config/environments/test.rb +2 -0
- data/config/initializers/action_mailer.rb +2 -0
- data/config/initializers/assets.rb +3 -1
- data/config/initializers/authlogic.rb +2 -0
- data/config/initializers/backtrace_silencers.rb +2 -0
- data/config/initializers/constants.rb +2 -0
- data/config/initializers/cookies_serializer.rb +2 -0
- data/config/initializers/custom_field_ransack_translations.rb +2 -0
- data/config/initializers/filter_parameter_logging.rb +2 -0
- data/config/initializers/gravatar.rb +2 -0
- data/config/initializers/inflections.rb +2 -0
- data/config/initializers/locale.rb +2 -0
- data/config/initializers/mime_types.rb +2 -0
- data/config/initializers/paginate_arrays.rb +2 -0
- data/config/initializers/paper_trail.rb +2 -0
- data/config/initializers/ransack.rb +2 -0
- data/config/initializers/relative_url_root.rb +2 -0
- data/config/initializers/secret_token.rb +2 -0
- data/config/initializers/session_store.rb +2 -0
- data/config/initializers/simple_form.rb +2 -0
- data/config/initializers/views.rb +3 -2
- data/config/initializers/wrap_parameters.rb +2 -0
- data/config/locales/fat_free_crm.de.yml +1 -0
- data/config/locales/fat_free_crm.en-GB.yml +7 -5
- data/config/locales/fat_free_crm.en-US.yml +7 -5
- data/config/locales/fat_free_crm.es-CL.yml +2 -1
- data/config/locales/fat_free_crm.es.yml +17 -16
- data/config/locales/fat_free_crm.fr.yml +1 -0
- data/config/locales/fat_free_crm.ja.yml +555 -184
- data/config/locales/fat_free_crm.nl.yml +2 -1
- data/config/locales/fat_free_crm.pt-BR.yml +1 -0
- data/config/locales/fat_free_crm.ru.yml +1 -0
- data/config/puma.rb +2 -0
- data/config/routes.rb +3 -1
- data/custom_plan.rb +2 -0
- data/db/demo/accounts.yml +1 -1
- data/db/demo/emails.yml +1 -1
- data/db/migrate/20100928030598_create_sessions.rb +2 -0
- data/db/migrate/20100928030599_create_users.rb +3 -1
- data/db/migrate/20100928030600_create_openid_tables.rb +3 -1
- data/db/migrate/20100928030601_create_accounts.rb +2 -0
- data/db/migrate/20100928030602_create_permissions.rb +4 -2
- data/db/migrate/20100928030603_create_settings.rb +2 -0
- data/db/migrate/20100928030604_create_preferences.rb +2 -0
- data/db/migrate/20100928030605_create_campaigns.rb +3 -1
- data/db/migrate/20100928030606_create_leads.rb +3 -1
- data/db/migrate/20100928030607_create_contacts.rb +3 -1
- data/db/migrate/20100928030608_create_opportunities.rb +3 -1
- data/db/migrate/20100928030609_create_account_contacts.rb +2 -0
- data/db/migrate/20100928030610_create_account_opportunities.rb +2 -0
- data/db/migrate/20100928030611_create_contact_opportunities.rb +2 -0
- data/db/migrate/20100928030612_create_tasks.rb +2 -0
- data/db/migrate/20100928030613_create_comments.rb +4 -2
- data/db/migrate/20100928030614_create_activities.rb +7 -5
- data/db/migrate/20100928030615_create_avatars.rb +5 -3
- data/db/migrate/20100928030616_rename_remember_token.rb +2 -0
- data/db/migrate/20100928030617_drop_openid_tables.rb +3 -1
- data/db/migrate/20100928030618_add_admin_to_users.rb +3 -1
- data/db/migrate/20100928030619_add_suspended_to_users.rb +2 -0
- data/db/migrate/20100928030620_remove_uuid.rb +2 -0
- data/db/migrate/20100928030621_add_email_to_accounts.rb +2 -0
- data/db/migrate/20100928030622_add_background_info_to_models.rb +2 -0
- data/db/migrate/20100928030623_create_addresses.rb +2 -0
- data/db/migrate/20100928030624_add_index_on_permissions.rb +2 -0
- data/db/migrate/20100928030625_create_emails.rb +11 -9
- data/db/migrate/20100928030626_add_state_to_timeline_objects.rb +2 -0
- data/db/migrate/20100928030627_acts_as_taggable_on_migration.rb +2 -0
- data/db/migrate/20101221123456_add_single_access_token_to_users.rb +2 -0
- data/db/migrate/20101221345678_add_rating_and_category_to_accounts.rb +2 -0
- data/db/migrate/20110719082054_add_skype_to_contacts_and_leads.rb +2 -0
- data/db/migrate/20111101083437_create_fields.rb +2 -0
- data/db/migrate/20111101090312_create_field_groups.rb +2 -0
- data/db/migrate/20111116091952_add_field_groups_tag_id.rb +2 -0
- data/db/migrate/20111117041311_change_fields_collection_to_text.rb +2 -0
- data/db/migrate/20111201030535_add_field_groups_klass_name.rb +2 -0
- data/db/migrate/20120121054235_create_lists.rb +2 -0
- data/db/migrate/20120216031616_create_versions.rb +4 -2
- data/db/migrate/20120216042541_is_paranoid_to_paper_trail.rb +2 -0
- data/db/migrate/20120220233724_add_versions_object_changes.rb +2 -0
- data/db/migrate/20120224073107_remove_default_value_and_clear_settings.rb +2 -0
- data/db/migrate/20120309070209_add_versions_related.rb +2 -0
- data/db/migrate/20120314080441_add_subscribed_users_to_entities.rb +2 -0
- data/db/migrate/20120316045804_activities_to_versions.rb +13 -12
- data/db/migrate/20120405080727_change_subscribed_users_to_set.rb +2 -0
- data/db/migrate/20120405080742_change_further_subscribed_users_to_set.rb +2 -0
- data/db/migrate/20120406082136_create_groups.rb +2 -0
- data/db/migrate/20120413034923_add_index_on_versions_item_type.rb +2 -0
- data/db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb +5 -4
- data/db/migrate/20120528102124_increase_length_of_version_events.rb +2 -0
- data/db/migrate/20120801032706_add_pair_id_to_fields.rb +2 -0
- data/db/migrate/20121003063155_add_settings_to_custom_fields.rb +2 -0
- data/db/migrate/20121221033947_fix_country_mapping.rb +2 -0
- data/db/migrate/20131207033244_add_user_id_to_lists.rb +2 -0
- data/db/migrate/20140916011927_add_created_at_index_on_versions.rb +2 -0
- data/db/migrate/20140916012922_add_indexes_to_model_associations.rb +2 -0
- data/db/migrate/20141126031837_increase_email_to254_chars.rb +2 -0
- data/db/migrate/20141230021159_add_transaction_id_column_to_versions.rb +2 -0
- data/db/migrate/20141230205453_add_missing_unique_indices.acts_as_taggable_on_engine.rb +2 -0
- data/db/migrate/20141230205454_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +2 -0
- data/db/migrate/20141230205455_add_missing_taggable_index.acts_as_taggable_on_engine.rb +2 -0
- data/db/migrate/20150123060900_convert_radio_to_radio_buttons.rb +2 -0
- data/db/migrate/20150227123054_remove_last_request_at_from_users.rb +2 -0
- data/db/migrate/20150427131956_create_index_related_type.rb +2 -0
- data/db/migrate/20160511053730_add_account_contacts_index.rb +2 -0
- data/db/migrate/20180102075234_add_account_counter_caches.rb +24 -0
- data/db/migrate/20180103223438_add_minlength_to_field.rb +7 -0
- data/db/schema.rb +300 -316
- data/db/seeds.rb +1 -0
- data/db/seeds/fields.rb +2 -0
- data/fat_free_crm.gemspec +4 -4
- data/lib/development_tasks/gem.rake +2 -0
- data/lib/development_tasks/license.rake +2 -0
- data/lib/development_tasks/rdoc.rake +2 -0
- data/lib/development_tasks/rspec.rake +2 -0
- data/lib/fat_free_crm.rb +2 -0
- data/lib/fat_free_crm/callback.rb +2 -0
- data/lib/fat_free_crm/comment_extensions.rb +2 -0
- data/lib/fat_free_crm/core_ext.rb +2 -0
- data/lib/fat_free_crm/core_ext/alias_method_chain.rb +7 -6
- data/lib/fat_free_crm/core_ext/nil.rb +2 -0
- data/lib/fat_free_crm/core_ext/string.rb +4 -2
- data/lib/fat_free_crm/custom_fields.rb +2 -0
- data/lib/fat_free_crm/engine.rb +2 -0
- data/lib/fat_free_crm/errors.rb +2 -0
- data/lib/fat_free_crm/exceptions.rb +2 -0
- data/lib/fat_free_crm/export_csv.rb +3 -1
- data/lib/fat_free_crm/exportable.rb +2 -0
- data/lib/fat_free_crm/fields.rb +2 -0
- data/lib/fat_free_crm/gem_dependencies.rb +2 -0
- data/lib/fat_free_crm/gem_ext.rb +2 -0
- data/lib/fat_free_crm/gem_ext/action_controller/base.rb +2 -0
- data/lib/fat_free_crm/gem_ext/active_support/buffered_logger.rb +4 -2
- data/lib/fat_free_crm/gem_ext/rails/engine.rb +9 -8
- data/lib/fat_free_crm/gem_ext/rake/task.rb +2 -0
- data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +2 -0
- data/lib/fat_free_crm/i18n.rb +2 -0
- data/lib/fat_free_crm/load_settings.rb +2 -0
- data/lib/fat_free_crm/mail_processor/base.rb +11 -8
- data/lib/fat_free_crm/mail_processor/comment_replies.rb +2 -0
- data/lib/fat_free_crm/mail_processor/dropbox.rb +5 -3
- data/lib/fat_free_crm/permissions.rb +8 -9
- data/lib/fat_free_crm/renderers.rb +2 -0
- data/lib/fat_free_crm/secret_token_generator.rb +2 -0
- data/lib/fat_free_crm/sortable.rb +2 -0
- data/lib/fat_free_crm/tabs.rb +2 -0
- data/lib/fat_free_crm/version.rb +4 -2
- data/lib/fat_free_crm/view_factory.rb +3 -1
- data/lib/gravatar_image_tag.rb +2 -0
- data/lib/missing_translation_detector.rb +2 -0
- data/lib/tasks/ffcrm/comment_replies.rake +2 -0
- data/lib/tasks/ffcrm/config.rake +2 -0
- data/lib/tasks/ffcrm/demo.rake +3 -1
- data/lib/tasks/ffcrm/dropbox.rake +2 -0
- data/lib/tasks/ffcrm/missing_translations.rake +8 -7
- data/lib/tasks/ffcrm/secret.rake +2 -0
- data/lib/tasks/ffcrm/settings.rake +2 -0
- data/lib/tasks/ffcrm/setup.rake +2 -0
- data/lib/tasks/ffcrm/update_data.rake +98 -96
- data/script/rails +4 -2
- data/spec/controllers/admin/groups_controller_spec.rb +2 -0
- data/spec/controllers/admin/users_controller_spec.rb +3 -1
- data/spec/controllers/applications_controller_spec.rb +2 -0
- data/spec/controllers/authentications_controller_spec.rb +2 -0
- data/spec/controllers/comments_controller_spec.rb +3 -1
- data/spec/controllers/emails_controller_spec.rb +3 -1
- data/spec/controllers/entities/accounts_controller_spec.rb +4 -2
- data/spec/controllers/entities/campaigns_controller_spec.rb +4 -2
- data/spec/controllers/entities/contacts_controller_spec.rb +4 -2
- data/spec/controllers/entities/leads_controller_spec.rb +4 -2
- data/spec/controllers/entities/opportunities_controller_spec.rb +4 -2
- data/spec/controllers/entities_controller_spec.rb +2 -0
- data/spec/controllers/home_controller_spec.rb +14 -10
- data/spec/controllers/lists_controller_spec.rb +2 -0
- data/spec/controllers/passwords_controller_spec.rb +2 -0
- data/spec/controllers/tasks_controller_spec.rb +3 -1
- data/spec/controllers/users_controller_spec.rb +20 -18
- data/spec/factories/account_factories.rb +2 -0
- data/spec/factories/campaign_factories.rb +2 -0
- data/spec/factories/contact_factories.rb +2 -0
- data/spec/factories/field_factories.rb +2 -0
- data/spec/factories/lead_factories.rb +2 -0
- data/spec/factories/list_factories.rb +2 -0
- data/spec/factories/opportunity_factories.rb +2 -0
- data/spec/factories/sequences.rb +4 -2
- data/spec/factories/setting_factories.rb +2 -0
- data/spec/factories/shared_factories.rb +3 -1
- data/spec/factories/subscription_factories.rb +2 -0
- data/spec/factories/tag_factories.rb +2 -0
- data/spec/factories/task_factories.rb +2 -0
- data/spec/factories/user_factories.rb +3 -1
- data/spec/features/acceptance_helper.rb +2 -0
- data/spec/features/accounts_spec.rb +5 -1
- data/spec/features/admin/groups_spec.rb +4 -3
- data/spec/features/admin/users_spec.rb +4 -3
- data/spec/features/campaigns_spec.rb +2 -1
- data/spec/features/contacts_spec.rb +3 -1
- data/spec/features/dashboard_spec.rb +2 -1
- data/spec/features/leads_spec.rb +7 -2
- data/spec/features/opportunities_overview_spec.rb +2 -1
- data/spec/features/opportunities_spec.rb +3 -2
- data/spec/features/support/browser.rb +2 -0
- data/spec/features/support/headless.rb +2 -0
- data/spec/features/support/helpers.rb +2 -0
- data/spec/features/support/maintain_sessions.rb +2 -0
- data/spec/features/support/paths.rb +2 -0
- data/spec/features/support/selector_helpers.rb +2 -6
- data/spec/features/tasks_spec.rb +8 -7
- data/spec/helpers/accounts_helper_spec.rb +2 -0
- data/spec/helpers/admin/field_groups_helper_spec.rb +2 -0
- data/spec/helpers/admin/plugins_helper_spec.rb +2 -0
- data/spec/helpers/admin/settings_helper_spec.rb +2 -0
- data/spec/helpers/admin/users_helper_spec.rb +2 -0
- data/spec/helpers/application_helper_spec.rb +6 -3
- data/spec/helpers/authentications_helper_spec.rb +2 -0
- data/spec/helpers/campaigns_helper_spec.rb +2 -0
- data/spec/helpers/comments_helper_spec.rb +2 -0
- data/spec/helpers/contacts_helper_spec.rb +2 -0
- data/spec/helpers/emails_helper_spec.rb +2 -0
- data/spec/helpers/fields_helper_spec.rb +2 -0
- data/spec/helpers/groups_helper_spec.rb +2 -0
- data/spec/helpers/home_helper_spec.rb +2 -0
- data/spec/helpers/leads_helper_spec.rb +2 -0
- data/spec/helpers/lists_helper_spec.rb +2 -0
- data/spec/helpers/opportunities_helper_spec.rb +2 -0
- data/spec/helpers/passwords_helper_spec.rb +2 -0
- data/spec/helpers/tasks_helper_spec.rb +2 -0
- data/spec/helpers/users_helper_spec.rb +2 -0
- data/spec/lib/comment_extensions_spec.rb +2 -0
- data/spec/lib/core_ext/string_spec.rb +2 -0
- data/spec/lib/errors_spec.rb +2 -0
- data/spec/lib/fields_spec.rb +2 -0
- data/spec/lib/mail_processor/base_spec.rb +2 -0
- data/spec/lib/mail_processor/comment_replies_spec.rb +2 -0
- data/spec/lib/mail_processor/dropbox_spec.rb +2 -0
- data/spec/lib/mail_processor/sample_emails/dropbox.rb +166 -164
- data/spec/lib/permissions_spec.rb +2 -0
- data/spec/lib/secret_token_generator_spec.rb +2 -0
- data/spec/lib/view_factory_spec.rb +2 -0
- data/spec/mailers/subscription_mailer_spec.rb +15 -16
- data/spec/mailers/user_mailer_spec.rb +2 -0
- data/spec/models/entities/account_contact_spec.rb +3 -0
- data/spec/models/entities/account_opportunity_spec.rb +3 -0
- data/spec/models/entities/account_spec.rb +3 -1
- data/spec/models/entities/campaign_spec.rb +3 -1
- data/spec/models/entities/contact_opportunity_spec.rb +2 -0
- data/spec/models/entities/contact_spec.rb +35 -21
- data/spec/models/entities/lead_spec.rb +3 -1
- data/spec/models/entities/opportunity_spec.rb +39 -27
- data/spec/models/fields/custom_field_date_pair_spec.rb +2 -0
- data/spec/models/fields/custom_field_pair_spec.rb +2 -0
- data/spec/models/fields/custom_field_spec.rb +2 -0
- data/spec/models/fields/field_group_spec.rb +2 -0
- data/spec/models/fields/field_spec.rb +8 -4
- data/spec/models/list_spec.rb +2 -0
- data/spec/models/observers/entity_observer_spec.rb +2 -0
- data/spec/models/polymorphic/address_spec.rb +2 -4
- data/spec/models/polymorphic/avatar_spec.rb +2 -0
- data/spec/models/polymorphic/comment_spec.rb +2 -4
- data/spec/models/polymorphic/email_spec.rb +2 -0
- data/spec/models/polymorphic/task_spec.rb +6 -4
- data/spec/models/polymorphic/version_spec.rb +7 -10
- data/spec/models/setting_spec.rb +23 -0
- data/spec/models/users/abilities/user_ability_spec.rb +2 -0
- data/spec/models/users/authentication_spec.rb +2 -0
- data/spec/models/users/group_spec.rb +2 -0
- data/spec/models/users/permission_spec.rb +2 -0
- data/spec/models/users/preference_spec.rb +2 -0
- data/spec/models/users/user_spec.rb +11 -17
- data/spec/routing/accounts_routing_spec.rb +2 -0
- data/spec/routing/admin/users_routing_spec.rb +2 -0
- data/spec/routing/campaigns_routing_spec.rb +2 -0
- data/spec/routing/comments_routing_spec.rb +2 -0
- data/spec/routing/contacts_routing_spec.rb +2 -0
- data/spec/routing/emails_routing_spec.rb +2 -0
- data/spec/routing/leads_routing_spec.rb +2 -0
- data/spec/routing/opportunities_routing_spec.rb +2 -0
- data/spec/routing/tasks_routing_spec.rb +2 -0
- data/spec/routing/users_routing_spec.rb +2 -0
- data/spec/shared/controllers.rb +2 -0
- data/spec/shared/models.rb +2 -0
- data/spec/spec_helper.rb +7 -5
- data/spec/support/assert_select.rb +2 -0
- data/spec/support/auth_macros.rb +5 -12
- data/spec/support/macros.rb +9 -7
- data/spec/support/mail_processor_mocks.rb +2 -0
- data/spec/support/uploaded_file.rb +2 -0
- data/spec/views/accounts/_edit.haml_spec.rb +4 -3
- data/spec/views/accounts/_new.haml_spec.rb +3 -1
- data/spec/views/accounts/create.js.haml_spec.rb +3 -1
- data/spec/views/accounts/destroy.js.haml_spec.rb +3 -1
- data/spec/views/accounts/edit.js.haml_spec.rb +3 -1
- data/spec/views/accounts/index.haml_spec.rb +3 -1
- data/spec/views/accounts/index.js.haml_spec.rb +3 -1
- data/spec/views/accounts/new.js.haml_spec.rb +3 -1
- data/spec/views/accounts/show.haml_spec.rb +6 -1
- data/spec/views/accounts/update.js.haml_spec.rb +3 -1
- data/spec/views/admin/field_groups/create.js.haml_spec.rb +3 -1
- data/spec/views/admin/field_groups/destroy.js.haml_spec.rb +3 -1
- data/spec/views/admin/field_groups/edit.js.haml_spec.rb +3 -1
- data/spec/views/admin/field_groups/new.js.haml_spec.rb +3 -1
- data/spec/views/admin/field_groups/update.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/_create.haml_spec.rb +3 -1
- data/spec/views/admin/users/create.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/destroy.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/edit.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/index.haml_spec.rb +3 -1
- data/spec/views/admin/users/index.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/new.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/reactivate.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/show.haml_spec.rb +2 -0
- data/spec/views/admin/users/suspend.js.haml_spec.rb +3 -1
- data/spec/views/admin/users/update.js.haml_spec.rb +3 -1
- data/spec/views/application/auto_complete.haml_spec.rb +3 -1
- data/spec/views/authentications/new.haml_spec.rb +2 -0
- data/spec/views/campaigns/_edit.haml_spec.rb +3 -1
- data/spec/views/campaigns/_new.haml_spec.rb +3 -1
- data/spec/views/campaigns/create.js.haml_spec.rb +3 -1
- data/spec/views/campaigns/destroy.js.haml_spec.rb +3 -1
- data/spec/views/campaigns/edit.js.haml_spec.rb +3 -1
- data/spec/views/campaigns/index.haml_spec.rb +3 -1
- data/spec/views/campaigns/index.js.haml_spec.rb +3 -1
- data/spec/views/campaigns/new.js.haml_spec.rb +3 -1
- data/spec/views/campaigns/show.haml_spec.rb +6 -1
- data/spec/views/campaigns/update.js.haml_spec.rb +3 -1
- data/spec/views/comments/edit.js.haml_spec.rb +5 -4
- data/spec/views/contacts/_edit.haml_spec.rb +3 -1
- data/spec/views/contacts/_new.haml_spec.rb +3 -1
- data/spec/views/contacts/create.js.haml_spec.rb +3 -1
- data/spec/views/contacts/destroy.js.haml_spec.rb +3 -1
- data/spec/views/contacts/edit.js.haml_spec.rb +3 -1
- data/spec/views/contacts/index.haml_spec.rb +3 -1
- data/spec/views/contacts/index.js.html_spec.rb +3 -1
- data/spec/views/contacts/new.js.haml_spec.rb +3 -1
- data/spec/views/contacts/show.haml_spec.rb +6 -1
- data/spec/views/contacts/update.js.haml_spec.rb +3 -1
- data/spec/views/home/index.haml_spec.rb +3 -1
- data/spec/views/home/index.js.haml_spec.rb +3 -1
- data/spec/views/home/options.js.haml_spec.rb +4 -2
- data/spec/views/leads/_convert.haml_spec.rb +3 -1
- data/spec/views/leads/_edit.haml_spec.rb +3 -1
- data/spec/views/leads/_new.haml_spec.rb +3 -1
- data/spec/views/leads/_sidebar_show.haml_spec.rb +3 -1
- data/spec/views/leads/convert.js.haml_spec.rb +3 -1
- data/spec/views/leads/create.js.haml_spec.rb +3 -1
- data/spec/views/leads/destroy.js.haml_spec.rb +3 -1
- data/spec/views/leads/edit.js.haml_spec.rb +3 -1
- data/spec/views/leads/index.haml_spec.rb +3 -1
- data/spec/views/leads/index.js.haml_spec.rb +3 -1
- data/spec/views/leads/new.js.haml_spec.rb +3 -1
- data/spec/views/leads/promote.js.haml_spec.rb +3 -1
- data/spec/views/leads/reject.js.haml_spec.rb +3 -1
- data/spec/views/leads/show.haml_spec.rb +6 -1
- data/spec/views/leads/update.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/_edit.haml_spec.rb +3 -1
- data/spec/views/opportunities/_new.haml_spec.rb +3 -1
- data/spec/views/opportunities/create.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/destroy.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/edit.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/index.haml_spec.rb +3 -1
- data/spec/views/opportunities/index.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/new.js.haml_spec.rb +3 -1
- data/spec/views/opportunities/show.haml_spec.rb +6 -1
- data/spec/views/opportunities/update.js.haml_spec.rb +3 -1
- data/spec/views/tasks/_edit.haml_spec.rb +3 -1
- data/spec/views/tasks/complete.js.haml_spec.rb +3 -1
- data/spec/views/tasks/create.js.haml_spec.rb +3 -1
- data/spec/views/tasks/destroy.js.haml_spec.rb +3 -1
- data/spec/views/tasks/edit.js.haml_spec.rb +3 -1
- data/spec/views/tasks/index.haml_spec.rb +6 -4
- data/spec/views/tasks/new.js.haml_spec.rb +3 -1
- data/spec/views/tasks/uncomplete.js.haml_spec.rb +3 -1
- data/spec/views/tasks/update.js.haml_spec.rb +3 -1
- data/spec/views/users/avatar.js.haml_spec.rb +3 -1
- data/spec/views/users/change_password.js.haml_spec.rb +3 -1
- data/spec/views/users/edit.js.haml_spec.rb +3 -1
- data/spec/views/users/password.js.haml_spec.rb +3 -1
- data/spec/views/users/update.js.haml_spec.rb +3 -1
- data/spec/views/users/upload_avatar.js.haml_spec.rb +4 -2
- data/vendor/assets/javascripts/textarea_autocomplete.js +1 -1
- data/vendor/gems/globby-0.1.2/lib/globby/glob.rb +1 -1
- metadata +8 -12
- data/app/assets/javascripts/crm_chosen.js.coffee +0 -29
- data/app/assets/stylesheets/ffcrm_chosen.scss +0 -69
- data/vendor/assets/javascripts/ajax-chosen-jquery.js +0 -2
- data/vendor/assets/javascripts/ajax-chosen.jquery.coffee +0 -171
- data/vendor/assets/javascripts/chosen-jquery.js +0 -3
- data/vendor/assets/javascripts/chosen.jquery.coffee +0 -574
- data/vendor/assets/javascripts/lib/abstract-chosen.coffee +0 -110
- data/vendor/assets/stylesheets/chosen.css.sass +0 -361
data/.travis.yml
CHANGED
@@ -1,23 +1,32 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
- 2.3.
|
5
|
-
|
4
|
+
- 2.3.6
|
5
|
+
- 2.4.2
|
6
6
|
|
7
7
|
env:
|
8
8
|
global:
|
9
9
|
- BROWSER=chrome
|
10
10
|
matrix:
|
11
|
-
- DB=
|
12
|
-
- DB=postgres
|
13
|
-
- DB=
|
11
|
+
- DB=postgres TEST_SUITE=rubocop
|
12
|
+
- DB=postgres TEST_SUITE="rake spec:features"
|
13
|
+
- DB=postgres TEST_SUITE="rake spec:models"
|
14
|
+
- DB=postgres TEST_SUITE="rake spec:mailers"
|
15
|
+
- DB=postgres TEST_SUITE="rake spec:controllers"
|
16
|
+
- DB=postgres TEST_SUITE="rake spec:helpers"
|
17
|
+
- DB=postgres TEST_SUITE="rake spec:lib"
|
18
|
+
- DB=postgres TEST_SUITE="rake spec:routing"
|
19
|
+
- DB=postgres TEST_SUITE="rake spec:views"
|
20
|
+
- DB=mysql TEST_SUITE="rake spec:models"
|
21
|
+
- DB=sqlite TEST_SUITE="rake spec:models"
|
14
22
|
|
15
23
|
matrix:
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
24
|
+
fast_finish: true
|
25
|
+
allow_failures:
|
26
|
+
- rvm: 2.3.6
|
27
|
+
env: DB=sqlite TEST_SUITE="rake spec:models"
|
28
|
+
- rvm: 2.4.2
|
29
|
+
env: DB=sqlite TEST_SUITE="rake spec:models"
|
21
30
|
|
22
31
|
addons:
|
23
32
|
chrome: stable
|
@@ -37,17 +46,8 @@ before_script:
|
|
37
46
|
- "RAILS_ENV=test bundle exec rake spec:preparedb"
|
38
47
|
|
39
48
|
# Run specs
|
40
|
-
script:
|
41
|
-
- "RAILS_ENV=test bundle exec
|
42
|
-
- "RAILS_ENV=test bundle exec rake spec:mailers"
|
43
|
-
- "RAILS_ENV=test bundle exec rake spec:controllers"
|
44
|
-
- "RAILS_ENV=test bundle exec rake spec:helpers"
|
45
|
-
- "RAILS_ENV=test bundle exec rake spec:lib"
|
46
|
-
- "RAILS_ENV=test bundle exec rake spec:mailers"
|
47
|
-
- "RAILS_ENV=test bundle exec rake spec:routing"
|
48
|
-
- "RAILS_ENV=test bundle exec rake spec:views"
|
49
|
-
- "RAILS_ENV=test bundle exec rake spec:features"
|
50
|
-
- "RAILS_ENV=test bundle exec rubocop"
|
49
|
+
script:
|
50
|
+
- "RAILS_ENV=test bundle exec $TEST_SUITE"
|
51
51
|
|
52
52
|
notifications:
|
53
53
|
webhooks:
|
data/CHANGELOG.md
CHANGED
@@ -4,19 +4,49 @@ It does not matter how slowly you go as long as you do not stop.
|
|
4
4
|
First they ignore you, then they laugh at you, then they fight you,
|
5
5
|
then you win. –- Mahatma Gandhi
|
6
6
|
|
7
|
-
Sat
|
7
|
+
Sat Jan 20, 2018 (0.17.1)
|
8
8
|
---------------------------------------------------------------------
|
9
|
+
- #709 Revert accidental minimum ruby version 2.4 changes (#665)
|
9
10
|
|
10
|
-
#### Fixed XSS flaw in tags_helper
|
11
|
-
Credit Antonin Steinhauser (steinhause) for discovery and responsible disclosure.
|
12
11
|
|
13
|
-
|
12
|
+
Sat Jan 20, 2018 (0.17.0)
|
14
13
|
---------------------------------------------------------------------
|
15
|
-
CVE-2017-0889
|
16
14
|
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
### Important changes
|
16
|
+
#### Select2 for select boxes
|
17
|
+
This release replaces [Chozen](https://harvesthq.github.io/chosen/) with [Select2](https://select2.org/) consistently across the app.
|
18
|
+
This may break plugins which rely on Chozen. To fix any issues please
|
19
|
+
migrate to Select2 or add Chozen to your plugins.
|
20
|
+
|
21
|
+
#### Counter caches
|
22
|
+
To improve performance, a number of [counter caches](http://guides.rubyonrails.org/association_basics.html#options-for-belongs-to-counter-cache) have been added.
|
23
|
+
|
24
|
+
Users with large amounts of records may find certain [database migrations](https://github.com/fatfreecrm/fat_free_crm/blob/master/db/migrate/20180102075234_add_account_counter_caches.rb) taking a large amount of time, as each record is cached upfront.
|
25
|
+
|
26
|
+
#### Minimum ruby version is now Ruby 2.3
|
27
|
+
See #647 #654 Adopt min ruby version of 2.3.0 and apply safe navigiation rubocop rules
|
28
|
+
|
29
|
+
#### Other changes
|
30
|
+
- #691 Wording
|
31
|
+
- #688 Preparation for Devise
|
32
|
+
- #686 Bundle update
|
33
|
+
- #683 Rubocop: Refactoring
|
34
|
+
- #680 Alternative build setup
|
35
|
+
- #682 Rubocop: Hashrockets
|
36
|
+
- #693 Update Japanese translations
|
37
|
+
- #697 Minor security improvements
|
38
|
+
- #703 #696 Replace Chozen with select2
|
39
|
+
- #678 Find an account by name when name is in params (fixes #397)
|
40
|
+
- #673 Improve JS escaping
|
41
|
+
- #671 Devise Readiness (+ thread-safety): Refactor User.my scope
|
42
|
+
- #670 Fix #563 invalid default custom field minlength
|
43
|
+
- #668 Rubocop fixes for xls/rss builder classes
|
44
|
+
- #667 Rubocop: Autocorrect various assignment-if statements, case statements, etc.
|
45
|
+
- #666 Various rubocop corrected items
|
46
|
+
- #661 Bundle Update on 2018-01-06
|
47
|
+
- #655 Upgrade rubocop
|
48
|
+
|
49
|
+
- #658 Upgrade Bootsnap gem, fixing an issue with windows
|
20
50
|
|
21
51
|
Sat Jan 6, 2018 (0.16.1)
|
22
52
|
---------------------------------------------------------------------
|
@@ -31,7 +61,10 @@ Fri Jan 5, 2018 (0.16.0)
|
|
31
61
|
|
32
62
|
Thu Dec 14, 2017 (0.15.0)
|
33
63
|
---------------------------------------------------------------------
|
34
|
-
This release upgrades to rails 5.0.0
|
64
|
+
This release upgrades to rails 5.0.0.
|
65
|
+
|
66
|
+
Be aware of https://github.com/rails/sprockets/issues/426 if you were using FFCRM as an engine.
|
67
|
+
|
35
68
|
- #500 - Upgrade rails
|
36
69
|
- #554 - Upgrade authlogic
|
37
70
|
- #614 - Rails5 warnings
|
data/Capfile
CHANGED
data/Gemfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
# Uncomment the database that you have configured in config/database.yml
|
@@ -49,6 +51,7 @@ group :development do
|
|
49
51
|
gem 'rb-inotify', require: false
|
50
52
|
gem 'rb-fsevent', require: false
|
51
53
|
gem 'rb-fchange', require: false
|
54
|
+
gem 'brakeman', require: false
|
52
55
|
end
|
53
56
|
end
|
54
57
|
|
@@ -60,7 +63,7 @@ group :development, :test do
|
|
60
63
|
gem 'byebug'
|
61
64
|
gem 'pry-rails' unless ENV["CI"]
|
62
65
|
gem 'factory_girl_rails', '~> 4.7.0' # 4.8.0+ stubbed models are not allowed to access the database - User#destroyed?()
|
63
|
-
gem 'rubocop', '~> 0.
|
66
|
+
gem 'rubocop', '~> 0.52.0' # Pinned because upgrades require regenerating rubocop_todo.yml
|
64
67
|
gem 'rainbow'
|
65
68
|
end
|
66
69
|
|
data/Gemfile.lock
CHANGED
@@ -63,8 +63,9 @@ GEM
|
|
63
63
|
activesupport (>= 3.2, < 5.2)
|
64
64
|
request_store (~> 1.0)
|
65
65
|
scrypt (>= 1.2, < 4.0)
|
66
|
-
bootsnap (1.1.
|
66
|
+
bootsnap (1.1.8)
|
67
67
|
msgpack (~> 1.0)
|
68
|
+
brakeman (4.1.1)
|
68
69
|
builder (3.2.3)
|
69
70
|
byebug (9.1.0)
|
70
71
|
cancancan (2.1.2)
|
@@ -82,13 +83,13 @@ GEM
|
|
82
83
|
capistrano-rvm (0.1.2)
|
83
84
|
capistrano (~> 3.0)
|
84
85
|
sshkit (~> 1.2)
|
85
|
-
capybara (2.
|
86
|
+
capybara (2.17.0)
|
86
87
|
addressable
|
87
88
|
mini_mime (>= 0.1.3)
|
88
89
|
nokogiri (>= 1.3.3)
|
89
90
|
rack (>= 1.0.0)
|
90
91
|
rack-test (>= 0.5.4)
|
91
|
-
xpath (
|
92
|
+
xpath (>= 2.0, < 4.0)
|
92
93
|
childprocess (0.8.0)
|
93
94
|
ffi (~> 1.0, >= 1.0.11)
|
94
95
|
chromedriver-helper (1.1.0)
|
@@ -107,7 +108,7 @@ GEM
|
|
107
108
|
execjs
|
108
109
|
coffee-script-source (1.12.2)
|
109
110
|
concurrent-ruby (1.0.5)
|
110
|
-
countries (2.1.
|
111
|
+
countries (2.1.3)
|
111
112
|
i18n_data (~> 0.8.0)
|
112
113
|
money (~> 6.9)
|
113
114
|
sixarm_ruby_unaccent (~> 1.1)
|
@@ -129,20 +130,20 @@ GEM
|
|
129
130
|
factory_girl_rails (4.7.0)
|
130
131
|
factory_girl (~> 4.7.0)
|
131
132
|
railties (>= 3.0.0)
|
132
|
-
ffaker (2.
|
133
|
+
ffaker (2.8.0)
|
133
134
|
ffi (1.9.18)
|
134
135
|
ffi-compiler (1.0.1)
|
135
136
|
ffi (>= 1.0.0)
|
136
137
|
rake
|
137
|
-
font-awesome-rails (4.7.0.
|
138
|
+
font-awesome-rails (4.7.0.3)
|
138
139
|
railties (>= 3.2, < 5.2)
|
139
140
|
formatador (0.2.5)
|
140
141
|
globalid (0.4.1)
|
141
142
|
activesupport (>= 4.2.0)
|
142
|
-
guard (2.14.
|
143
|
+
guard (2.14.2)
|
143
144
|
formatador (>= 0.2.4)
|
144
145
|
listen (>= 2.7, < 4.0)
|
145
|
-
lumberjack (
|
146
|
+
lumberjack (>= 1.0.12, < 2.0)
|
146
147
|
nenv (~> 0.1)
|
147
148
|
notiffany (~> 0.0)
|
148
149
|
pry (>= 0.9.12)
|
@@ -161,7 +162,7 @@ GEM
|
|
161
162
|
tilt
|
162
163
|
headless (2.3.1)
|
163
164
|
htmlentities (4.3.4)
|
164
|
-
i18n (0.9.
|
165
|
+
i18n (0.9.1)
|
165
166
|
concurrent-ruby (~> 1.0)
|
166
167
|
i18n_data (0.8.0)
|
167
168
|
io-like (0.3.0)
|
@@ -198,7 +199,7 @@ GEM
|
|
198
199
|
net-scp (1.2.1)
|
199
200
|
net-ssh (>= 2.6.5)
|
200
201
|
net-ssh (4.2.0)
|
201
|
-
nio4r (2.
|
202
|
+
nio4r (2.2.0)
|
202
203
|
nokogiri (1.8.1)
|
203
204
|
mini_portile2 (~> 2.3.0)
|
204
205
|
notiffany (0.1.1)
|
@@ -207,7 +208,7 @@ GEM
|
|
207
208
|
paper_trail (6.0.2)
|
208
209
|
activerecord (>= 4.0, < 5.2)
|
209
210
|
request_store (~> 1.1)
|
210
|
-
paperclip (5.
|
211
|
+
paperclip (5.1.0)
|
211
212
|
activemodel (>= 4.2.0)
|
212
213
|
activesupport (>= 4.2.0)
|
213
214
|
cocaine (~> 0.5.5)
|
@@ -217,7 +218,7 @@ GEM
|
|
217
218
|
parser (2.4.0.2)
|
218
219
|
ast (~> 2.3)
|
219
220
|
pg (0.21.0)
|
220
|
-
polyamorous (1.3.
|
221
|
+
polyamorous (1.3.2)
|
221
222
|
activerecord (>= 3.0)
|
222
223
|
powerpack (0.1.1)
|
223
224
|
premailer (1.11.1)
|
@@ -275,8 +276,7 @@ GEM
|
|
275
276
|
method_source
|
276
277
|
rake (>= 0.8.7)
|
277
278
|
thor (>= 0.18.1, < 2.0)
|
278
|
-
rainbow (
|
279
|
-
rake
|
279
|
+
rainbow (3.0.0)
|
280
280
|
rake (12.3.0)
|
281
281
|
ransack (1.8.4)
|
282
282
|
actionpack (>= 3.0)
|
@@ -295,7 +295,8 @@ GEM
|
|
295
295
|
rb-inotify (0.9.10)
|
296
296
|
ffi (>= 0.5.0, < 2)
|
297
297
|
ref (2.0.0)
|
298
|
-
request_store (1.
|
298
|
+
request_store (1.4.0)
|
299
|
+
rack (>= 1.4)
|
299
300
|
responders (2.4.0)
|
300
301
|
actionpack (>= 4.2.0, < 5.3)
|
301
302
|
railties (>= 4.2.0, < 5.3)
|
@@ -308,7 +309,7 @@ GEM
|
|
308
309
|
activemodel (>= 3.0)
|
309
310
|
activesupport (>= 3.0)
|
310
311
|
rspec-mocks (>= 2.99, < 4.0)
|
311
|
-
rspec-core (3.7.
|
312
|
+
rspec-core (3.7.1)
|
312
313
|
rspec-support (~> 3.7.0)
|
313
314
|
rspec-expectations (3.7.0)
|
314
315
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -325,17 +326,17 @@ GEM
|
|
325
326
|
rspec-mocks (~> 3.7.0)
|
326
327
|
rspec-support (~> 3.7.0)
|
327
328
|
rspec-support (3.7.0)
|
328
|
-
rubocop (0.
|
329
|
+
rubocop (0.52.1)
|
329
330
|
parallel (~> 1.10)
|
330
|
-
parser (>= 2.
|
331
|
+
parser (>= 2.4.0.2, < 3.0)
|
331
332
|
powerpack (~> 0.1)
|
332
|
-
rainbow (>= 2.2.2, <
|
333
|
+
rainbow (>= 2.2.2, < 4.0)
|
333
334
|
ruby-progressbar (~> 1.7)
|
334
335
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
335
336
|
ruby-progressbar (1.9.0)
|
336
337
|
ruby_dep (1.5.0)
|
337
338
|
rubyzip (1.2.1)
|
338
|
-
sass (3.5.
|
339
|
+
sass (3.5.5)
|
339
340
|
sass-listen (~> 4.0.0)
|
340
341
|
sass-listen (4.0.0)
|
341
342
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
@@ -381,7 +382,7 @@ GEM
|
|
381
382
|
timecop (0.9.1)
|
382
383
|
tzinfo (1.2.4)
|
383
384
|
thread_safe (~> 0.1)
|
384
|
-
uglifier (4.
|
385
|
+
uglifier (4.1.3)
|
385
386
|
execjs (>= 0.3.0, < 3)
|
386
387
|
unicode-display_width (1.3.0)
|
387
388
|
unicode_utils (1.4.0)
|
@@ -389,8 +390,8 @@ GEM
|
|
389
390
|
websocket-extensions (>= 0.1.0)
|
390
391
|
websocket-extensions (0.1.3)
|
391
392
|
will_paginate (3.1.6)
|
392
|
-
xpath (
|
393
|
-
nokogiri (~> 1.
|
393
|
+
xpath (3.0.0)
|
394
|
+
nokogiri (~> 1.8)
|
394
395
|
zeus (0.15.14)
|
395
396
|
method_source (>= 0.6.7)
|
396
397
|
|
@@ -405,6 +406,7 @@ DEPENDENCIES
|
|
405
406
|
acts_as_list
|
406
407
|
authlogic (>= 3.4.4)
|
407
408
|
bootsnap
|
409
|
+
brakeman
|
408
410
|
byebug
|
409
411
|
cancancan
|
410
412
|
capistrano
|
@@ -456,7 +458,7 @@ DEPENDENCIES
|
|
456
458
|
responds_to_parent
|
457
459
|
rspec-activemodel-mocks
|
458
460
|
rspec-rails
|
459
|
-
rubocop (~> 0.
|
461
|
+
rubocop (~> 0.52.0)
|
460
462
|
sass
|
461
463
|
sass-rails
|
462
464
|
select2-rails
|
@@ -472,4 +474,4 @@ DEPENDENCIES
|
|
472
474
|
zeus
|
473
475
|
|
474
476
|
BUNDLED WITH
|
475
|
-
1.16.
|
477
|
+
1.16.0
|
data/Guardfile
CHANGED
data/README.md
CHANGED
@@ -64,19 +64,19 @@ Visit our website at http://www.fatfreecrm.com/
|
|
64
64
|
|
65
65
|
Please view one of the following installation guides:
|
66
66
|
|
67
|
-
### [Setup Linux or Mac OS](http://guides.fatfreecrm.com/Setup-Linux-or-Mac-OS
|
67
|
+
### [Setup Linux or Mac OS](http://guides.fatfreecrm.com/Setup-Linux-or-Mac-OS)
|
68
68
|
|
69
69
|
Installing Fat Free CRM on Linux or Mac OS X
|
70
70
|
|
71
|
-
### [Setup Heroku](http://guides.fatfreecrm.com/Setup-Heroku
|
71
|
+
### [Setup Heroku](http://guides.fatfreecrm.com/Setup-Heroku)
|
72
72
|
|
73
73
|
Setting up a Heroku instance for Fat Free CRM
|
74
74
|
|
75
|
-
### [Setup Microsoft Windows](http://guides.fatfreecrm.com/Setup-Microsoft-Windows
|
75
|
+
### [Setup Microsoft Windows](http://guides.fatfreecrm.com/Setup-Microsoft-Windows)
|
76
76
|
|
77
77
|
Installing Fat Free CRM on Microsoft Windows
|
78
78
|
|
79
|
-
### [Running Fat Free CRM as a Rails Engine](http://guides.fatfreecrm.com/Running-as-a-Rails-Engine
|
79
|
+
### [Running Fat Free CRM as a Rails Engine](http://guides.fatfreecrm.com/Running-as-a-Rails-Engine)
|
80
80
|
|
81
81
|
Run the Fat Free CRM gem within a separate Rails application.
|
82
82
|
This is the best way to deploy Fat Free CRM if you need to add plugins or make any customizations. Note that it is not yet simple to 'bolt' Fat Free CRM into your existing rails project, but we're heading in that direction.
|
@@ -84,7 +84,7 @@ This is the best way to deploy Fat Free CRM if you need to add plugins or make a
|
|
84
84
|
|
85
85
|
## Upgrading from previous versions of Fat Free CRM
|
86
86
|
|
87
|
-
Please read the [Release Notes](https://github.com/fatfreecrm/fat_free_crm/blob/master/CHANGELOG) document for more detailed information on upgrading from previous versions.
|
87
|
+
Please read the [Release Notes](https://github.com/fatfreecrm/fat_free_crm/blob/master/CHANGELOG.md) document for more detailed information on upgrading from previous versions.
|
88
88
|
|
89
89
|
|
90
90
|
## Resources
|
data/Rakefile
CHANGED
data/Vagrantfile
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# -*- mode: ruby -*-
|
4
|
+
# vi: set ft=ruby :
|
5
|
+
|
6
|
+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
7
|
+
# configures the configuration version (we support older styles for
|
8
|
+
# backwards compatibility). Please don't change it unless you know what
|
9
|
+
# you're doing.
|
10
|
+
Vagrant.configure("2") do |config|
|
11
|
+
# The most common configuration options are documented and commented below.
|
12
|
+
# For a complete reference, please see the online documentation at
|
13
|
+
# https://docs.vagrantup.com.
|
14
|
+
|
15
|
+
# Every Vagrant development environment requires a box. You can search for
|
16
|
+
# boxes at https://vagrantcloud.com/search.
|
17
|
+
config.vm.box = "ubuntu/xenial64"
|
18
|
+
|
19
|
+
# Disable automatic box update checking. If you disable this, then
|
20
|
+
# boxes will only be checked for updates when the user runs
|
21
|
+
# `vagrant box outdated`. This is not recommended.
|
22
|
+
# config.vm.box_check_update = false
|
23
|
+
|
24
|
+
# Create a forwarded port mapping which allows access to a specific port
|
25
|
+
# within the machine from a port on the host machine. In the example below,
|
26
|
+
# accessing "localhost:8080" will access port 80 on the guest machine.
|
27
|
+
# NOTE: This will enable public access to the opened port
|
28
|
+
config.vm.network "forwarded_port", guest: 80, host: 8080
|
29
|
+
|
30
|
+
# Create a forwarded port mapping which allows access to a specific port
|
31
|
+
# within the machine from a port on the host machine and only allow access
|
32
|
+
# via 127.0.0.1 to disable public access
|
33
|
+
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
|
34
|
+
|
35
|
+
# Create a private network, which allows host-only access to the machine
|
36
|
+
# using a specific IP.
|
37
|
+
config.vm.network "private_network", ip: "192.168.33.10"
|
38
|
+
|
39
|
+
# Create a public network, which generally matched to bridged network.
|
40
|
+
# Bridged networks make the machine appear as another physical device on
|
41
|
+
# your network.
|
42
|
+
# config.vm.network "public_network"
|
43
|
+
|
44
|
+
# Share an additional folder to the guest VM. The first argument is
|
45
|
+
# the path on the host to the actual folder. The second argument is
|
46
|
+
# the path on the guest to mount the folder. And the optional third
|
47
|
+
# argument is a set of non-required options.
|
48
|
+
# config.vm.synced_folder "../data", "/vagrant_data"
|
49
|
+
|
50
|
+
# Provider-specific configuration so you can fine-tune various
|
51
|
+
# backing providers for Vagrant. These expose provider-specific options.
|
52
|
+
# Example for VirtualBox:
|
53
|
+
#
|
54
|
+
# config.vm.provider "virtualbox" do |vb|
|
55
|
+
# # Display the VirtualBox GUI when booting the machine
|
56
|
+
# vb.gui = true
|
57
|
+
#
|
58
|
+
# # Customize the amount of memory on the VM:
|
59
|
+
# vb.memory = "1024"
|
60
|
+
# end
|
61
|
+
#
|
62
|
+
# View the documentation for the provider you are using for more
|
63
|
+
# information on available options.
|
64
|
+
|
65
|
+
# Enable provisioning with a shell script. Additional provisioners such as
|
66
|
+
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
|
67
|
+
# documentation for more information about their specific syntax and use.
|
68
|
+
|
69
|
+
config.vm.provision "shell", inline: <<-SHELL
|
70
|
+
apt-get update
|
71
|
+
git clone https://github.com/fatfreecrm/fat_free_crm.git
|
72
|
+
cd fat_free_crm
|
73
|
+
cp config/database.postgres.yml config/database.yml
|
74
|
+
apt-get install -y nginx-full postgresql ruby-all-dev ruby-bundler libmagick++-dev libxml2 libxml2-dev libxslt1.1 libxslt1-dev libyaml-dev libpq-dev libsqlite3-dev
|
75
|
+
bundle install
|
76
|
+
echo "ALTER USER postgres PASSWORD '123456';" | sudo -u postgres psql
|
77
|
+
sed -i 's/ username:/ username: postgres/g' 'config/database.yml'
|
78
|
+
sed -i 's/ password:/ password: '123456'/g' 'config/database.yml'
|
79
|
+
rake db:setup
|
80
|
+
rake ffcrm:setup:admin USERNAME=admin PASSWORD=password EMAIL=admin@example.com
|
81
|
+
rm -rf /etc/nginx/sites-available/default
|
82
|
+
echo "server {" > /etc/nginx/sites-available/default
|
83
|
+
echo " listen 80;" >> /etc/nginx/sites-available/default
|
84
|
+
echo " location / {" >> /etc/nginx/sites-available/default
|
85
|
+
echo " proxy_pass http://localhost:3000;" >> /etc/nginx/sites-available/default
|
86
|
+
echo " }" >> /etc/nginx/sites-available/default
|
87
|
+
echo "}" >> /etc/nginx/sites-available/default
|
88
|
+
sudo systemctl stop nginx
|
89
|
+
sudo systemctl start nginx
|
90
|
+
rails s
|
91
|
+
SHELL
|
92
|
+
end
|