fat_free_crm 0.18.1 → 0.20.0
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 +4 -4
- data/.github/workflows/brakeman-analysis.yml +46 -0
- data/.github/workflows/rubocop-analysis.yml +40 -0
- data/.github/workflows/ruby.yml +52 -0
- data/.rubocop_todo.yml +80 -173
- data/.travis.yml +17 -20
- data/CHANGELOG.md +63 -3
- data/CONTRIBUTORS.md +1 -0
- data/Dockerfile +45 -14
- data/Gemfile +21 -11
- data/Gemfile.lock +315 -263
- data/Procfile +1 -1
- data/README.md +6 -5
- data/Rakefile +1 -1
- data/SECURITY.md +11 -0
- data/app/assets/javascripts/application.js.erb +3 -0
- data/app/assets/stylesheets/application.css.erb +1 -0
- data/app/assets/stylesheets/base.scss +9 -2
- data/app/assets/stylesheets/bootstrap-custom.scss +206 -0
- data/app/assets/stylesheets/common.scss +88 -68
- data/app/assets/stylesheets/header.scss +0 -8
- data/app/controllers/admin/application_controller.rb +1 -1
- data/app/controllers/admin/field_groups_controller.rb +2 -4
- data/app/controllers/admin/fields_controller.rb +1 -1
- data/app/controllers/admin/groups_controller.rb +1 -1
- data/app/controllers/admin/tags_controller.rb +3 -5
- data/app/controllers/admin/users_controller.rb +7 -9
- data/app/controllers/application_controller.rb +21 -45
- data/app/controllers/comments_controller.rb +3 -6
- data/{config/initializers/authlogic.rb → app/controllers/confirmations_controller.rb} +4 -2
- data/app/controllers/emails_controller.rb +0 -2
- data/app/controllers/entities/accounts_controller.rb +2 -4
- data/app/controllers/entities/campaigns_controller.rb +2 -4
- data/app/controllers/entities/contacts_controller.rb +4 -24
- data/app/controllers/entities/leads_controller.rb +7 -10
- data/app/controllers/entities/opportunities_controller.rb +4 -14
- data/app/controllers/entities_controller.rb +21 -7
- data/app/controllers/home_controller.rb +5 -5
- data/app/controllers/lists_controller.rb +1 -1
- data/app/controllers/passwords_controller.rb +3 -59
- data/{spec/features/support/maintain_sessions.rb → app/controllers/registrations_controller.rb} +12 -5
- data/{lib/development_tasks/gem.rake → app/controllers/sessions_controller.rb} +6 -6
- data/app/controllers/tasks_controller.rb +11 -20
- data/app/controllers/users_controller.rb +11 -30
- data/app/helpers/accounts_helper.rb +12 -0
- data/app/helpers/admin/users_helper.rb +1 -1
- data/app/helpers/application_helper.rb +30 -37
- data/app/helpers/campaigns_helper.rb +1 -1
- data/app/helpers/contacts_helper.rb +1 -3
- data/app/helpers/opportunities_helper.rb +4 -12
- data/app/helpers/tasks_helper.rb +3 -3
- data/app/helpers/users_helper.rb +1 -3
- data/{config/initializers/paper_trail.rb → app/mailers/devise_mailer.rb} +5 -1
- data/app/mailers/user_mailer.rb +0 -9
- data/app/models/entities/account.rb +11 -11
- data/app/models/entities/account_contact.rb +1 -1
- data/app/models/entities/account_opportunity.rb +1 -1
- data/app/models/entities/campaign.rb +5 -7
- data/app/models/entities/contact.rb +25 -13
- data/app/models/entities/lead.rb +8 -8
- data/app/models/entities/opportunity.rb +8 -10
- data/app/models/fields/custom_field.rb +1 -0
- data/app/models/fields/custom_field_date_pair.rb +2 -0
- data/app/models/fields/custom_field_pair.rb +2 -2
- data/app/models/fields/field.rb +1 -3
- data/app/models/list.rb +1 -1
- data/app/models/observers/entity_observer.rb +3 -7
- data/app/models/observers/lead_observer.rb +2 -4
- data/app/models/observers/opportunity_observer.rb +3 -5
- data/app/models/observers/task_observer.rb +1 -1
- data/app/models/polymorphic/address.rb +1 -1
- data/app/models/polymorphic/comment.rb +1 -1
- data/app/models/polymorphic/email.rb +3 -3
- data/app/models/polymorphic/task.rb +14 -10
- data/app/models/polymorphic/version.rb +3 -2
- data/app/models/setting.rb +5 -1
- data/app/models/users/permission.rb +3 -3
- data/app/models/users/preference.rb +4 -3
- data/app/models/users/user.rb +67 -42
- data/app/views/accounts/_edit.html.haml +2 -2
- data/app/views/accounts/_new.html.haml +2 -2
- data/app/views/accounts/_sidebar_index.html.haml +2 -2
- data/app/views/accounts/_sidebar_show.html.haml +19 -19
- data/app/views/accounts/_top_section.html.haml +1 -1
- data/app/views/accounts/create.js.haml +1 -2
- data/app/views/accounts/destroy.js.haml +1 -1
- data/app/views/accounts/edit.js.haml +1 -1
- data/app/views/accounts/show.html.haml +1 -0
- data/app/views/accounts/update.js.haml +4 -5
- data/app/views/admin/field_groups/create.js.haml +0 -1
- data/app/views/admin/field_groups/destroy.js.haml +0 -1
- data/app/views/admin/field_groups/update.js.haml +0 -1
- data/app/views/admin/fields/create.js.haml +0 -1
- data/app/views/admin/fields/destroy.js.haml +0 -1
- data/app/views/admin/fields/update.js.haml +0 -1
- data/app/views/admin/groups/create.js.haml +0 -1
- data/app/views/admin/groups/destroy.js.haml +0 -1
- data/app/views/admin/groups/update.js.haml +0 -1
- data/app/views/admin/tags/create.js.haml +0 -1
- data/app/views/admin/tags/destroy.js.haml +0 -1
- data/app/views/admin/tags/update.js.haml +0 -1
- data/app/views/admin/users/_user.html.haml +4 -4
- data/app/views/admin/users/create.js.haml +0 -1
- data/app/views/admin/users/destroy.js.haml +0 -1
- data/app/views/admin/users/update.js.haml +0 -1
- data/app/views/campaigns/_edit.html.haml +1 -1
- data/app/views/campaigns/_new.html.haml +1 -1
- data/app/views/campaigns/_sidebar_index.html.haml +2 -2
- data/app/views/campaigns/_sidebar_show.html.haml +68 -67
- data/app/views/campaigns/create.js.haml +1 -2
- data/app/views/campaigns/destroy.js.haml +1 -1
- data/app/views/campaigns/show.html.haml +1 -0
- data/app/views/campaigns/update.js.haml +3 -4
- data/app/views/comments/_edit.html.haml +1 -1
- data/app/views/comments/_new.html.haml +1 -1
- data/app/views/comments/update.js.haml +0 -1
- data/app/views/contacts/_edit.html.haml +1 -1
- data/app/views/contacts/_index_brief.html.haml +1 -1
- data/app/views/contacts/_index_full.html.haml +1 -1
- data/app/views/contacts/_index_long.html.haml +1 -1
- data/app/views/contacts/_new.html.haml +1 -1
- data/app/views/contacts/_sidebar_show.html.haml +18 -18
- data/app/views/contacts/create.js.haml +0 -1
- data/app/views/contacts/destroy.js.haml +1 -1
- data/app/views/contacts/show.html.haml +1 -0
- data/app/views/contacts/update.js.haml +2 -3
- data/app/views/devise/confirmations/new.html.haml +9 -0
- data/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
- data/app/views/devise/mailer/password_change.html.haml +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
- data/app/views/devise/passwords/edit.html.haml +18 -0
- data/app/views/devise/passwords/new.html.haml +10 -0
- data/app/views/devise/registrations/new.html.haml +21 -0
- data/app/views/devise/sessions/new.html.haml +32 -0
- data/app/views/entities/_title_bar.html.haml +1 -1
- data/app/views/entities/attach.js.haml +2 -2
- data/app/views/entities/discard.js.haml +2 -2
- data/app/views/home/_opportunity.html.haml +1 -1
- data/app/views/home/_task.html.haml +1 -1
- data/app/views/home/index.xls.builder +51 -0
- data/app/views/layouts/_about.html.haml +5 -5
- data/app/views/layouts/_header.html.haml +3 -3
- data/app/views/layouts/_sidebar.html.haml +2 -2
- data/app/views/layouts/_tabbed.html.haml +14 -11
- data/app/views/layouts/admin/_header.html.haml +1 -1
- data/app/views/layouts/application.html.haml +2 -2
- data/app/views/leads/_edit.html.haml +2 -2
- data/app/views/leads/_new.html.haml +2 -2
- data/app/views/leads/_sidebar_index.html.haml +2 -2
- data/app/views/leads/_sidebar_show.html.haml +30 -30
- data/app/views/leads/create.js.haml +2 -3
- data/app/views/leads/destroy.js.haml +2 -2
- data/app/views/leads/promote.js.haml +3 -4
- data/app/views/leads/reject.js.haml +3 -3
- data/app/views/leads/show.html.haml +1 -1
- data/app/views/leads/update.js.haml +4 -5
- data/app/views/lists/create.js.haml +0 -1
- data/app/views/opportunities/_edit.html.haml +1 -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 +1 -1
- data/app/views/opportunities/_sidebar_index.html.haml +2 -2
- data/app/views/opportunities/_sidebar_show.html.haml +47 -46
- data/app/views/opportunities/create.js.haml +3 -4
- data/app/views/opportunities/destroy.js.haml +3 -3
- data/app/views/opportunities/show.html.haml +1 -0
- data/app/views/opportunities/update.js.haml +5 -6
- data/app/views/shared/_address.html.haml +5 -5
- data/app/views/shared/_empty.html.haml +1 -1
- data/app/views/shared/_inline_styles.html.haml +0 -26
- data/app/views/shared/_paginate_with_per_page.html.haml +1 -0
- data/app/views/tasks/_assigned.html.haml +1 -1
- data/app/views/tasks/_completed.html.haml +1 -1
- data/app/views/tasks/_edit.html.haml +1 -1
- data/app/views/tasks/_new.html.haml +1 -1
- data/app/views/tasks/_pending.html.haml +1 -1
- data/app/views/tasks/_related.html.haml +1 -1
- data/app/views/tasks/_selector.html.haml +7 -8
- data/app/views/tasks/_sidebar_index.html.haml +2 -2
- data/app/views/tasks/_title.html.haml +1 -1
- data/app/views/tasks/complete.js.haml +1 -1
- data/app/views/tasks/create.js.haml +1 -2
- data/app/views/tasks/destroy.js.haml +1 -1
- data/app/views/tasks/uncomplete.js.haml +1 -2
- data/app/views/tasks/update.js.haml +0 -1
- data/app/views/users/_avatar.html.haml +1 -1
- data/app/views/users/change_password.js.haml +0 -1
- data/app/views/users/update.js.haml +0 -1
- data/app/views/users/upload_avatar.js.haml +0 -1
- data/app/views/versions/_version_item.html.haml +1 -1
- data/bin/bundle +1 -1
- data/bin/rails +1 -1
- data/bin/setup +38 -0
- data/bin/update +33 -0
- data/bin/yarn +13 -0
- data/config/application.rb +8 -6
- data/config/boot.rb +1 -1
- data/config/brakeman.ignore +2 -2
- data/config/database.postgres.docker.yml +5 -5
- data/config/environment.rb +2 -2
- data/config/environments/development.rb +1 -0
- data/config/environments/test.rb +7 -0
- data/config/initializers/action_mailer.rb +1 -3
- data/config/initializers/application_controller_renderer.rb +9 -0
- data/config/initializers/assets.rb +6 -11
- data/config/initializers/backtrace_silencers.rb +0 -6
- data/config/initializers/content_security_policy.rb +31 -0
- data/config/initializers/cookies_serializer.rb +3 -6
- data/config/initializers/devise.rb +289 -0
- data/config/initializers/filter_parameter_logging.rb +0 -5
- data/config/initializers/gravatar.rb +0 -1
- data/config/initializers/inflections.rb +0 -6
- data/config/initializers/mime_types.rb +1 -9
- data/config/initializers/new_framework_defaults_6_0.rb +46 -0
- data/config/initializers/relative_url_root.rb +1 -3
- data/config/initializers/session_store.rb +1 -3
- data/config/initializers/simple_form.rb +135 -55
- data/config/initializers/simple_form_bootstrap.rb +433 -0
- data/config/initializers/wrap_parameters.rb +4 -9
- data/config/locales/fat_free_crm.cs.yml +86 -47
- data/config/locales/fat_free_crm.en-GB.yml +5 -5
- data/config/locales/fat_free_crm.en-US.yml +5 -5
- data/config/locales/fat_free_crm.fr.yml +1 -1
- data/config/locales/fat_free_crm.ru.yml +2 -0
- data/config/routes.rb +20 -9
- data/config/settings.default.yml +0 -41
- data/db/demo/users.yml +62 -81
- data/db/migrate/20100928030620_remove_uuid.rb +1 -2
- data/db/migrate/20120316045804_activities_to_versions.rb +1 -0
- data/db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb +1 -0
- data/db/migrate/20180107082701_authlogic_to_devise.rb +58 -0
- data/db/migrate/20200806004152_add_pattern_to_fields.rb +7 -0
- data/db/migrate/20200806004459_add_html5_to_fields.rb +10 -0
- data/db/schema.rb +58 -48
- data/docker-compose.yml +10 -0
- data/fat_free_crm.gemspec +13 -15
- data/lib/development_tasks/license.rake +2 -2
- data/lib/fat_free_crm/callback.rb +2 -2
- data/lib/fat_free_crm/comment_extensions.rb +2 -4
- data/lib/fat_free_crm/core_ext/string.rb +1 -1
- data/lib/fat_free_crm/core_ext.rb +1 -1
- data/lib/fat_free_crm/engine.rb +1 -1
- data/lib/fat_free_crm/errors.rb +1 -1
- data/lib/fat_free_crm/export_csv.rb +1 -0
- data/lib/fat_free_crm/exportable.rb +1 -1
- data/lib/fat_free_crm/fields.rb +1 -1
- data/lib/fat_free_crm/gem_dependencies.rb +1 -1
- data/lib/fat_free_crm/gem_ext.rb +0 -1
- data/lib/fat_free_crm/i18n.rb +2 -2
- data/lib/fat_free_crm/mail_processor/base.rb +4 -10
- data/lib/fat_free_crm/mail_processor/dropbox.rb +5 -15
- data/lib/fat_free_crm/permissions.rb +7 -4
- data/lib/fat_free_crm/sortable.rb +1 -1
- data/lib/fat_free_crm/tabs.rb +2 -2
- data/lib/fat_free_crm/version.rb +2 -2
- data/lib/gravatar_image_tag.rb +8 -9
- data/lib/missing_translation_detector.rb +1 -0
- data/lib/tasks/ffcrm/missing_translations.rake +1 -0
- data/lib/tasks/ffcrm/preference_update.rake +19 -0
- data/lib/tasks/ffcrm/setup.rake +11 -2
- data/lib/tasks/ffcrm/update_data.rake +2 -2
- data/lib/templates/erb/scaffold/_form.html.erb +4 -2
- data/script/rails +2 -2
- data/spec/controllers/admin/users_controller_spec.rb +0 -56
- data/spec/controllers/comments_controller_spec.rb +12 -12
- data/spec/controllers/entities/campaigns_controller_spec.rb +1 -1
- data/spec/controllers/entities/contacts_controller_spec.rb +2 -1
- data/spec/controllers/entities/leads_controller_spec.rb +2 -2
- data/spec/controllers/entities/opportunities_controller_spec.rb +1 -1
- data/spec/controllers/entities_controller_spec.rb +5 -0
- data/spec/controllers/home_controller_spec.rb +8 -8
- data/spec/controllers/tasks_controller_spec.rb +6 -4
- data/spec/controllers/users_controller_spec.rb +41 -99
- data/spec/factories/account_factories.rb +5 -5
- data/spec/factories/campaign_factories.rb +3 -3
- data/spec/factories/contact_factories.rb +8 -8
- data/spec/factories/field_factories.rb +4 -3
- data/spec/factories/lead_factories.rb +5 -5
- data/spec/factories/list_factories.rb +2 -2
- data/spec/factories/opportunity_factories.rb +3 -3
- data/spec/factories/setting_factories.rb +2 -2
- data/spec/factories/shared_factories.rb +11 -9
- data/spec/factories/task_factories.rb +7 -7
- data/spec/factories/user_factories.rb +21 -21
- data/spec/features/acceptance_helper.rb +1 -1
- data/spec/features/accounts_spec.rb +2 -2
- data/spec/features/admin/groups_spec.rb +2 -2
- data/spec/features/admin/users_spec.rb +4 -2
- data/spec/features/campaigns_spec.rb +3 -3
- data/spec/features/contacts_spec.rb +3 -6
- data/spec/features/dashboard_spec.rb +1 -1
- data/spec/features/devise/sign_in_spec.rb +58 -0
- data/spec/features/devise/sign_up_spec.rb +36 -0
- data/spec/features/leads_spec.rb +12 -8
- data/spec/features/opportunities_overview_spec.rb +1 -1
- data/spec/features/opportunities_spec.rb +7 -7
- data/spec/features/support/browser.rb +8 -3
- data/spec/features/support/selector_helpers.rb +10 -1
- data/spec/features/tasks_spec.rb +7 -7
- data/spec/helpers/accounts_helper_spec.rb +57 -0
- data/spec/helpers/admin/field_groups_helper_spec.rb +1 -1
- data/spec/helpers/users_helper_spec.rb +4 -4
- data/spec/lib/comment_extensions_spec.rb +10 -4
- data/spec/lib/errors_spec.rb +2 -2
- data/spec/lib/mail_processor/dropbox_spec.rb +1 -1
- data/spec/lib/mail_processor/sample_emails/dropbox.rb +8 -8
- data/spec/lib/permissions_spec.rb +8 -3
- data/spec/mailers/devise_mailer_spec.rb +35 -0
- data/spec/mailers/user_mailer_spec.rb +0 -26
- data/spec/models/entities/account_spec.rb +27 -0
- data/spec/models/entities/contact_spec.rb +96 -1
- data/spec/models/entities/opportunity_spec.rb +2 -2
- data/spec/models/fields/custom_field_date_pair_spec.rb +4 -2
- data/spec/models/fields/custom_field_pair_spec.rb +2 -2
- data/spec/models/fields/custom_field_spec.rb +4 -2
- data/spec/models/observers/entity_observer_spec.rb +4 -4
- data/spec/models/polymorphic/task_spec.rb +11 -11
- data/spec/models/polymorphic/version_spec.rb +9 -9
- data/spec/models/users/preference_spec.rb +1 -1
- data/spec/models/users/user_spec.rb +22 -26
- data/spec/routing/users_routing_spec.rb +30 -8
- data/spec/shared/controllers.rb +3 -9
- data/spec/spec_helper.rb +10 -2
- data/spec/support/assert_select.rb +1 -0
- data/spec/support/devise_helpers.rb +28 -0
- data/spec/{features/support/helpers.rb → support/feature_helpers.rb} +10 -10
- data/spec/support/macros.rb +4 -1
- data/spec/views/accounts/_edit.haml_spec.rb +1 -1
- data/spec/views/accounts/_new.haml_spec.rb +1 -1
- data/spec/views/accounts/create.js.haml_spec.rb +1 -2
- data/spec/views/accounts/update.js.haml_spec.rb +2 -5
- data/spec/views/admin/field_groups/create.js.haml_spec.rb +0 -1
- data/spec/views/admin/field_groups/update.js.haml_spec.rb +0 -1
- data/spec/views/admin/users/create.js.haml_spec.rb +0 -1
- data/spec/views/admin/users/destroy.js.haml_spec.rb +0 -6
- data/spec/views/admin/users/update.js.haml_spec.rb +1 -2
- data/spec/views/campaigns/_edit.haml_spec.rb +1 -1
- data/spec/views/campaigns/_new.haml_spec.rb +1 -1
- data/spec/views/campaigns/create.js.haml_spec.rb +1 -2
- data/spec/views/campaigns/destroy.js.haml_spec.rb +0 -1
- data/spec/views/campaigns/edit.js.haml_spec.rb +2 -2
- data/spec/views/campaigns/index.js.haml_spec.rb +1 -1
- data/spec/views/campaigns/update.js.haml_spec.rb +3 -7
- data/spec/views/contacts/_edit.haml_spec.rb +1 -1
- data/spec/views/contacts/_new.haml_spec.rb +1 -1
- data/spec/views/contacts/create.js.haml_spec.rb +1 -2
- data/spec/views/contacts/edit.js.haml_spec.rb +1 -1
- data/spec/views/contacts/index.js.html_spec.rb +1 -1
- data/spec/views/contacts/update.js.haml_spec.rb +6 -10
- data/spec/views/home/index.haml_spec.rb +2 -2
- data/spec/views/leads/_edit.haml_spec.rb +1 -1
- data/spec/views/leads/_new.haml_spec.rb +1 -1
- data/spec/views/leads/create.js.haml_spec.rb +0 -3
- data/spec/views/leads/destroy.js.haml_spec.rb +0 -2
- data/spec/views/leads/promote.js.haml_spec.rb +3 -11
- data/spec/views/leads/reject.js.haml_spec.rb +0 -3
- data/spec/views/leads/update.js.haml_spec.rb +3 -11
- data/spec/views/opportunities/_edit.haml_spec.rb +1 -1
- data/spec/views/opportunities/_new.haml_spec.rb +1 -1
- data/spec/views/opportunities/create.js.haml_spec.rb +0 -2
- data/spec/views/opportunities/destroy.js.haml_spec.rb +0 -3
- data/spec/views/opportunities/update.js.haml_spec.rb +4 -12
- data/spec/views/tasks/_edit.haml_spec.rb +1 -1
- data/spec/views/tasks/complete.js.haml_spec.rb +0 -1
- data/spec/views/tasks/create.js.haml_spec.rb +0 -2
- data/spec/views/tasks/destroy.js.haml_spec.rb +0 -1
- data/spec/views/tasks/uncomplete.js.haml_spec.rb +0 -1
- data/spec/views/tasks/update.js.haml_spec.rb +1 -4
- data/spec/views/users/change_password.js.haml_spec.rb +1 -2
- data/spec/views/users/update.js.haml_spec.rb +1 -2
- data/spec/views/users/upload_avatar.js.haml_spec.rb +1 -2
- metadata +63 -77
- data/app/controllers/authentications_controller.rb +0 -53
- data/app/models/users/authentication.rb +0 -56
- data/app/views/authentications/new.html.haml +0 -19
- data/app/views/passwords/edit.html.haml +0 -15
- data/app/views/passwords/new.html.haml +0 -10
- data/app/views/user_mailer/password_reset_instructions.html.haml +0 -6
- data/app/views/users/new.html.haml +0 -19
- data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +0 -26
- data/spec/controllers/authentications_controller_spec.rb +0 -150
- data/spec/controllers/passwords_controller_spec.rb +0 -32
- data/spec/models/users/authentication_spec.rb +0 -19
- data/spec/support/auth_macros.rb +0 -49
- data/spec/views/authentications/new.haml_spec.rb +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4b6418c618ec04984f8f8261e3121e915b57ce2b55c5787d3393a8acb47adb9
|
4
|
+
data.tar.gz: 362ffdc71d5d01450d0475758f794972ec77dc79755f92196f4f72917e789798
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a467bdd68e941d5c426a69fd07260ec11631163a8306c2d1b524fdd2c0e0f7f2d48ee78e2ad89e773010e2b0b17f386f90fe67f9388330bb07e53aba02344d0
|
7
|
+
data.tar.gz: 21943a700b302f3eb2f6544ebcba0ae6e70e50ecec337f94531f08ae16522c6d6d3cd49bf315f83963b597997ed7de38c11c17ace76495e346fed0b6a3f3f8a4
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# This workflow integrates Brakeman with GitHub's Code Scanning feature
|
2
|
+
# Brakeman is a static analysis security vulnerability scanner for Ruby on Rails applications
|
3
|
+
|
4
|
+
name: Brakeman Scan
|
5
|
+
|
6
|
+
on:
|
7
|
+
push:
|
8
|
+
branches: [ master ]
|
9
|
+
pull_request:
|
10
|
+
# The branches below must be a subset of the branches above
|
11
|
+
branches: [ master ]
|
12
|
+
schedule:
|
13
|
+
- cron: '20 13 * * 6'
|
14
|
+
|
15
|
+
jobs:
|
16
|
+
brakeman-scan:
|
17
|
+
name: Brakeman Scan
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
steps:
|
20
|
+
# Checkout the repository to the GitHub Actions runner
|
21
|
+
- name: Checkout
|
22
|
+
uses: actions/checkout@v2
|
23
|
+
|
24
|
+
# Customize the ruby version depending on your needs
|
25
|
+
- name: Setup Ruby
|
26
|
+
uses: actions/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: '2.7'
|
29
|
+
|
30
|
+
- name: Setup Brakeman
|
31
|
+
env:
|
32
|
+
BRAKEMAN_VERSION: '4.10' # SARIF support is provided in Brakeman version 4.10+
|
33
|
+
run: |
|
34
|
+
gem install brakeman --version $BRAKEMAN_VERSION
|
35
|
+
|
36
|
+
# Execute Brakeman CLI and generate a SARIF output with the security issues identified during the analysis
|
37
|
+
- name: Scan
|
38
|
+
continue-on-error: true
|
39
|
+
run: |
|
40
|
+
brakeman -f sarif -o output.sarif.json .
|
41
|
+
|
42
|
+
# Upload the SARIF file generated in the previous step
|
43
|
+
- name: Upload SARIF
|
44
|
+
uses: github/codeql-action/upload-sarif@v1
|
45
|
+
with:
|
46
|
+
sarif_file: output.sarif.json
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# pulled from repo
|
2
|
+
name: "Rubocop"
|
3
|
+
|
4
|
+
on: push
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
rubocop:
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- name: Checkout repository
|
14
|
+
uses: actions/checkout@v2
|
15
|
+
|
16
|
+
# If running on a self-hosted runner, check it meets the requirements
|
17
|
+
# listed at https://github.com/ruby/setup-ruby#using-self-hosted-runners
|
18
|
+
- name: Set up Ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: 2.6
|
22
|
+
|
23
|
+
# This step is not necessary if you add the gem to your Gemfile
|
24
|
+
- name: Install Code Scanning integration
|
25
|
+
run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install
|
26
|
+
|
27
|
+
- name: Install dependencies
|
28
|
+
run: bundle install
|
29
|
+
|
30
|
+
- name: Rubocop run
|
31
|
+
run: |
|
32
|
+
bash -c "
|
33
|
+
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
|
34
|
+
[[ $? -ne 2 ]]
|
35
|
+
"
|
36
|
+
|
37
|
+
- name: Upload Sarif output
|
38
|
+
uses: github/codeql-action/upload-sarif@v1
|
39
|
+
with:
|
40
|
+
sarif_file: rubocop.sarif
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Rspec
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
strategy:
|
21
|
+
matrix:
|
22
|
+
ruby-version: ['2.7'] # , '2.7', '3.0'
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby
|
27
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
28
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
29
|
+
# uses: ruby/setup-ruby@v1
|
30
|
+
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby-version }}
|
33
|
+
# bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
34
|
+
|
35
|
+
- name: Install dependencies
|
36
|
+
run: bundle install
|
37
|
+
- name: Prepare DB
|
38
|
+
run: DB=sqlite RAILS_ENV=test bundle exec rake spec:preparedb
|
39
|
+
- name: Run model tests
|
40
|
+
run: DB=sqlite bundle exec rake spec:models
|
41
|
+
- name: Run controller tests
|
42
|
+
run: bundle exec rake spec:controllers
|
43
|
+
- name: Run view tests
|
44
|
+
run: bundle exec rake spec:views
|
45
|
+
- name: Run helper tests
|
46
|
+
run: bundle exec rake spec:helpers
|
47
|
+
- name: Run route tests
|
48
|
+
run: bundle exec rake spec:routing
|
49
|
+
- name: Run mailer tests
|
50
|
+
run: bundle exec rake spec:mailers
|
51
|
+
- name: Run lib tests
|
52
|
+
run: bundle exec rake spec:lib
|
data/.rubocop_todo.yml
CHANGED
@@ -1,23 +1,33 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2021-05-09 11:26:41 +0930 using RuboCop version 0.82.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 3
|
10
10
|
# Configuration parameters: Include.
|
11
|
-
# Include: **/Gemfile, **/gems.rb
|
11
|
+
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
|
12
12
|
Bundler/DuplicatedGem:
|
13
13
|
Exclude:
|
14
14
|
- 'Gemfile'
|
15
15
|
|
16
|
-
# Offense count:
|
16
|
+
# Offense count: 21
|
17
17
|
# Cop supports --auto-correct.
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
|
19
|
+
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
20
|
+
Layout/EndAlignment:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
# Offense count: 95
|
24
|
+
# Cop supports --auto-correct.
|
25
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
26
|
+
# SupportedHashRocketStyles: key, separator, table
|
27
|
+
# SupportedColonStyles: key, separator, table
|
28
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
29
|
+
Layout/HashAlignment:
|
30
|
+
Enabled: false
|
21
31
|
|
22
32
|
# Offense count: 7
|
23
33
|
# Cop supports --auto-correct.
|
@@ -28,51 +38,28 @@ Layout/SpaceInsideArrayLiteralBrackets:
|
|
28
38
|
Exclude:
|
29
39
|
- 'db/seeds/fields.rb'
|
30
40
|
|
31
|
-
# Offense count:
|
41
|
+
# Offense count: 21
|
32
42
|
# Configuration parameters: AllowSafeAssignment.
|
33
43
|
Lint/AssignmentInCondition:
|
34
44
|
Enabled: false
|
35
45
|
|
36
46
|
# Offense count: 2
|
47
|
+
# Cop supports --auto-correct.
|
37
48
|
Lint/BooleanSymbol:
|
38
49
|
Exclude:
|
39
50
|
- 'config/initializers/ransack.rb'
|
40
51
|
|
41
|
-
# Offense count: 1
|
42
|
-
Lint/Debugger:
|
43
|
-
Exclude:
|
44
|
-
- 'app/controllers/entities/opportunities_controller.rb'
|
45
|
-
|
46
52
|
# Offense count: 1
|
47
53
|
Lint/DuplicateMethods:
|
48
54
|
Exclude:
|
49
55
|
- 'lib/gravatar_image_tag.rb'
|
50
56
|
|
51
|
-
# Offense count: 22
|
52
|
-
# Cop supports --auto-correct.
|
53
|
-
# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect.
|
54
|
-
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
55
|
-
Lint/EndAlignment:
|
56
|
-
Enabled: false
|
57
|
-
|
58
|
-
# Offense count: 2
|
59
|
-
Lint/HandleExceptions:
|
60
|
-
Exclude:
|
61
|
-
- 'config/environments/test.rb'
|
62
|
-
- 'lib/fat_free_crm/gem_dependencies.rb'
|
63
|
-
|
64
57
|
# Offense count: 4
|
65
58
|
Lint/ImplicitStringConcatenation:
|
66
59
|
Exclude:
|
67
60
|
- 'db/migrate/20121221033947_fix_country_mapping.rb'
|
68
61
|
- 'lib/tasks/ffcrm/update_data.rake'
|
69
62
|
|
70
|
-
# Offense count: 4
|
71
|
-
Lint/IneffectiveAccessModifier:
|
72
|
-
Exclude:
|
73
|
-
- 'db/migrate/20100928030620_remove_uuid.rb'
|
74
|
-
- 'lib/gravatar_image_tag.rb'
|
75
|
-
|
76
63
|
# Offense count: 5
|
77
64
|
Lint/RescueException:
|
78
65
|
Exclude:
|
@@ -85,31 +72,35 @@ Lint/ReturnInVoidContext:
|
|
85
72
|
- 'app/models/setting.rb'
|
86
73
|
- 'app/models/users/preference.rb'
|
87
74
|
|
88
|
-
# Offense count:
|
89
|
-
|
75
|
+
# Offense count: 2
|
76
|
+
# Configuration parameters: AllowComments.
|
77
|
+
Lint/SuppressedException:
|
90
78
|
Exclude:
|
91
|
-
- '
|
79
|
+
- 'config/environments/test.rb'
|
80
|
+
- 'lib/fat_free_crm/gem_dependencies.rb'
|
92
81
|
|
93
|
-
# Offense count:
|
94
|
-
|
95
|
-
Lint/UselessAccessModifier:
|
82
|
+
# Offense count: 1
|
83
|
+
Lint/UriEscapeUnescape:
|
96
84
|
Exclude:
|
97
|
-
- 'app/models/fields/field.rb'
|
98
|
-
- 'app/models/users/user.rb'
|
99
|
-
- 'db/migrate/20100928030620_remove_uuid.rb'
|
100
85
|
- 'lib/gravatar_image_tag.rb'
|
101
86
|
|
102
|
-
# Offense count:
|
87
|
+
# Offense count: 2
|
103
88
|
Lint/UselessAssignment:
|
104
89
|
Exclude:
|
105
|
-
- 'app/helpers/application_helper.rb'
|
106
90
|
- 'app/views/home/index.atom.builder'
|
107
91
|
|
108
|
-
# Offense count:
|
92
|
+
# Offense count: 134
|
93
|
+
# Configuration parameters: IgnoredMethods.
|
109
94
|
Metrics/AbcSize:
|
110
95
|
Max: 57
|
111
96
|
|
112
|
-
# Offense count:
|
97
|
+
# Offense count: 1
|
98
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
99
|
+
# ExcludedMethods: refine
|
100
|
+
Metrics/BlockLength:
|
101
|
+
Max: 298
|
102
|
+
|
103
|
+
# Offense count: 3
|
113
104
|
# Configuration parameters: CountBlocks.
|
114
105
|
Metrics/BlockNesting:
|
115
106
|
Max: 4
|
@@ -117,23 +108,25 @@ Metrics/BlockNesting:
|
|
117
108
|
# Offense count: 14
|
118
109
|
# Configuration parameters: CountComments.
|
119
110
|
Metrics/ClassLength:
|
120
|
-
Max:
|
111
|
+
Max: 184
|
121
112
|
|
122
113
|
# Offense count: 29
|
114
|
+
# Configuration parameters: IgnoredMethods.
|
123
115
|
Metrics/CyclomaticComplexity:
|
124
116
|
Max: 14
|
125
117
|
|
126
|
-
# Offense count:
|
127
|
-
# Configuration parameters: CountComments.
|
118
|
+
# Offense count: 99
|
119
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
128
120
|
Metrics/MethodLength:
|
129
|
-
Max:
|
121
|
+
Max: 36
|
130
122
|
|
131
123
|
# Offense count: 2
|
132
124
|
# Configuration parameters: CountComments.
|
133
125
|
Metrics/ModuleLength:
|
134
|
-
Max:
|
126
|
+
Max: 371
|
135
127
|
|
136
|
-
# Offense count:
|
128
|
+
# Offense count: 25
|
129
|
+
# Configuration parameters: IgnoredMethods.
|
137
130
|
Metrics/PerceivedComplexity:
|
138
131
|
Max: 15
|
139
132
|
|
@@ -153,28 +146,36 @@ Naming/AccessorMethodName:
|
|
153
146
|
- 'spec/controllers/entities/opportunities_controller_spec.rb'
|
154
147
|
- 'spec/support/macros.rb'
|
155
148
|
|
156
|
-
# Offense count:
|
157
|
-
# Configuration parameters:
|
158
|
-
#
|
159
|
-
Naming/
|
149
|
+
# Offense count: 3
|
150
|
+
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
151
|
+
# AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
|
152
|
+
Naming/MethodParameterName:
|
160
153
|
Exclude:
|
161
|
-
- 'app/
|
154
|
+
- 'app/models/fields/field.rb'
|
155
|
+
- 'app/models/polymorphic/comment.rb'
|
156
|
+
- 'lib/missing_translation_detector.rb'
|
162
157
|
|
163
|
-
# Offense count:
|
164
|
-
# Configuration parameters: NamePrefix,
|
158
|
+
# Offense count: 4
|
159
|
+
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
|
165
160
|
# NamePrefix: is_, has_, have_
|
166
|
-
#
|
167
|
-
#
|
161
|
+
# ForbiddenPrefixes: is_, has_, have_
|
162
|
+
# AllowedMethods: is_a?
|
168
163
|
# MethodDefinitionMacros: define_method, define_singleton_method
|
169
164
|
Naming/PredicateName:
|
170
165
|
Exclude:
|
171
166
|
- 'spec/**/*'
|
172
167
|
- 'app/inputs/date_time_input.rb'
|
173
|
-
- 'app/models/entities/opportunity.rb'
|
174
168
|
- 'app/models/users/user.rb'
|
175
169
|
- 'lib/fat_free_crm/fields.rb'
|
176
170
|
- 'lib/fat_free_crm/mail_processor/base.rb'
|
177
171
|
|
172
|
+
# Offense count: 2
|
173
|
+
# Cop supports --auto-correct.
|
174
|
+
# Configuration parameters: PreferredName.
|
175
|
+
Naming/RescuedExceptionsVariableName:
|
176
|
+
Exclude:
|
177
|
+
- 'spec/support/assert_select.rb'
|
178
|
+
|
178
179
|
# Offense count: 12
|
179
180
|
# Configuration parameters: EnforcedStyle.
|
180
181
|
# SupportedStyles: snake_case, normalcase, non_integer
|
@@ -182,32 +183,8 @@ Naming/VariableNumber:
|
|
182
183
|
Exclude:
|
183
184
|
- 'spec/controllers/home_controller_spec.rb'
|
184
185
|
|
185
|
-
# Offense count: 2
|
186
|
-
# Cop supports --auto-correct.
|
187
|
-
# Configuration parameters: AutoCorrect.
|
188
|
-
Performance/HashEachMethods:
|
189
|
-
Exclude:
|
190
|
-
- 'app/controllers/entities/opportunities_controller.rb'
|
191
|
-
- 'lib/fat_free_crm/errors.rb'
|
192
|
-
|
193
|
-
# Offense count: 1
|
194
|
-
# Cop supports --auto-correct.
|
195
|
-
# Configuration parameters: AutoCorrect.
|
196
|
-
Performance/StartWith:
|
197
|
-
Exclude:
|
198
|
-
- 'app/helpers/versions_helper.rb'
|
199
|
-
|
200
|
-
# Offense count: 1
|
201
|
-
Security/Eval:
|
202
|
-
Exclude:
|
203
|
-
- 'lib/development_tasks/gem.rake'
|
204
|
-
|
205
|
-
# Offense count: 1
|
206
|
-
Security/MarshalLoad:
|
207
|
-
Exclude:
|
208
|
-
- 'app/models/users/preference.rb'
|
209
|
-
|
210
186
|
# Offense count: 1
|
187
|
+
# Configuration parameters: AllowOnConstant.
|
211
188
|
Style/CaseEquality:
|
212
189
|
Exclude:
|
213
190
|
- 'app/models/fields/field.rb'
|
@@ -234,29 +211,28 @@ Style/ClassVars:
|
|
234
211
|
- 'lib/fat_free_crm/tabs.rb'
|
235
212
|
- 'lib/fat_free_crm/view_factory.rb'
|
236
213
|
|
237
|
-
# Offense count:
|
214
|
+
# Offense count: 1
|
238
215
|
Style/CommentedKeyword:
|
239
216
|
Exclude:
|
240
|
-
- 'app/models/users/authentication.rb'
|
241
217
|
- 'db/migrate/20100928030617_drop_openid_tables.rb'
|
242
218
|
|
243
|
-
# Offense count:
|
219
|
+
# Offense count: 2
|
244
220
|
Style/DoubleNegation:
|
245
221
|
Exclude:
|
246
222
|
- 'app/helpers/application_helper.rb'
|
247
|
-
- 'app/models/entities/opportunity.rb'
|
248
223
|
- 'app/models/polymorphic/task.rb'
|
249
|
-
- 'lib/gravatar_image_tag.rb'
|
250
224
|
|
251
225
|
# Offense count: 1
|
252
|
-
|
226
|
+
# Configuration parameters: EnforcedStyle.
|
227
|
+
# SupportedStyles: annotated, template, unannotated
|
228
|
+
Style/FormatStringToken:
|
253
229
|
Exclude:
|
254
|
-
- '
|
230
|
+
- 'spec/factories/shared_factories.rb'
|
255
231
|
|
256
232
|
# Offense count: 1
|
257
233
|
# Cop supports --auto-correct.
|
258
234
|
# Configuration parameters: EnforcedStyle.
|
259
|
-
# SupportedStyles:
|
235
|
+
# SupportedStyles: always, always_true, never
|
260
236
|
Style/FrozenStringLiteralComment:
|
261
237
|
Exclude:
|
262
238
|
- 'db/schema.rb'
|
@@ -268,44 +244,22 @@ Style/GlobalVars:
|
|
268
244
|
- 'db/migrate/20100928030598_create_sessions.rb'
|
269
245
|
- 'db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb'
|
270
246
|
|
271
|
-
# Offense count:
|
247
|
+
# Offense count: 33
|
272
248
|
# Configuration parameters: MinBodyLength.
|
273
249
|
Style/GuardClause:
|
274
250
|
Enabled: false
|
275
251
|
|
276
252
|
# Offense count: 2
|
277
|
-
Style/
|
278
|
-
Exclude:
|
279
|
-
- 'app/helpers/application_helper.rb'
|
280
|
-
|
281
|
-
# Offense count: 49
|
282
|
-
# Cop supports --auto-correct.
|
283
|
-
Style/IfUnlessModifier:
|
284
|
-
Enabled: false
|
285
|
-
|
286
|
-
# Offense count: 16
|
287
|
-
# Cop supports --auto-correct.
|
288
|
-
# Configuration parameters: EnforcedStyle.
|
289
|
-
# SupportedStyles: line_count_dependent, lambda, literal
|
290
|
-
Style/Lambda:
|
291
|
-
Exclude:
|
292
|
-
- 'app/models/entities/account.rb'
|
293
|
-
- 'app/models/entities/campaign.rb'
|
294
|
-
- 'app/models/entities/contact.rb'
|
295
|
-
- 'app/models/entities/lead.rb'
|
296
|
-
- 'app/models/entities/opportunity.rb'
|
297
|
-
- 'app/models/polymorphic/task.rb'
|
298
|
-
- 'app/models/users/user.rb'
|
299
|
-
|
300
|
-
# Offense count: 2
|
301
|
-
Style/MethodMissing:
|
253
|
+
Style/MissingRespondToMissing:
|
302
254
|
Exclude:
|
303
255
|
- 'app/models/setting.rb'
|
304
256
|
- 'lib/fat_free_crm/fields.rb'
|
305
257
|
|
306
|
-
# Offense count:
|
258
|
+
# Offense count: 3
|
307
259
|
Style/MixinUsage:
|
308
260
|
Exclude:
|
261
|
+
- 'bin/setup'
|
262
|
+
- 'bin/update'
|
309
263
|
- 'spec/helpers/fields_helper_spec.rb'
|
310
264
|
|
311
265
|
# Offense count: 2
|
@@ -314,66 +268,19 @@ Style/MultilineBlockChain:
|
|
314
268
|
- 'lib/fat_free_crm/core_ext/string.rb'
|
315
269
|
- 'lib/tasks/ffcrm/demo.rake'
|
316
270
|
|
317
|
-
# Offense count:
|
318
|
-
Style/
|
271
|
+
# Offense count: 1
|
272
|
+
Style/MultipleComparison:
|
319
273
|
Exclude:
|
320
|
-
- 'app/models/
|
274
|
+
- 'app/models/polymorphic/task.rb'
|
321
275
|
|
322
|
-
# Offense count:
|
276
|
+
# Offense count: 5
|
323
277
|
# Cop supports --auto-correct.
|
324
|
-
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
278
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
|
325
279
|
# SupportedStyles: predicate, comparison
|
326
280
|
Style/NumericPredicate:
|
327
281
|
Exclude:
|
328
282
|
- 'spec/**/*'
|
329
|
-
- 'app/helpers/admin/users_helper.rb'
|
330
|
-
- 'app/helpers/application_helper.rb'
|
331
|
-
- 'app/helpers/campaigns_helper.rb'
|
332
|
-
- 'app/helpers/tasks_helper.rb'
|
333
283
|
- 'app/models/fields/custom_field.rb'
|
334
284
|
- 'app/models/polymorphic/task.rb'
|
335
285
|
- 'app/models/users/user.rb'
|
336
286
|
- 'lib/tasks/ffcrm/demo.rake'
|
337
|
-
|
338
|
-
# Offense count: 16
|
339
|
-
# Cop supports --auto-correct.
|
340
|
-
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
|
341
|
-
# SupportedStyles: slashes, percent_r, mixed
|
342
|
-
Style/RegexpLiteral:
|
343
|
-
Exclude:
|
344
|
-
- 'app/controllers/entities/contacts_controller.rb'
|
345
|
-
- 'app/controllers/entities/opportunities_controller.rb'
|
346
|
-
- 'app/helpers/application_helper.rb'
|
347
|
-
- 'app/models/list.rb'
|
348
|
-
- 'lib/development_tasks/license.rake'
|
349
|
-
- 'lib/fat_free_crm/core_ext/string.rb'
|
350
|
-
- 'spec/helpers/users_helper_spec.rb'
|
351
|
-
- 'spec/lib/mail_processor/dropbox_spec.rb'
|
352
|
-
- 'spec/views/contacts/update.js.haml_spec.rb'
|
353
|
-
- 'spec/views/opportunities/update.js.haml_spec.rb'
|
354
|
-
|
355
|
-
# Offense count: 8
|
356
|
-
# Cop supports --auto-correct.
|
357
|
-
# Configuration parameters: AllowAsExpressionSeparator.
|
358
|
-
Style/Semicolon:
|
359
|
-
Exclude:
|
360
|
-
- 'app/controllers/entities/leads_controller.rb'
|
361
|
-
- 'lib/fat_free_crm/permissions.rb'
|
362
|
-
- 'lib/tasks/ffcrm/setup.rake'
|
363
|
-
- 'spec/models/fields/custom_field_date_pair_spec.rb'
|
364
|
-
- 'spec/models/fields/custom_field_spec.rb'
|
365
|
-
- 'spec/support/macros.rb'
|
366
|
-
|
367
|
-
# Offense count: 2
|
368
|
-
# Cop supports --auto-correct.
|
369
|
-
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
|
370
|
-
# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
|
371
|
-
Style/TrivialAccessors:
|
372
|
-
Exclude:
|
373
|
-
- 'spec/support/auth_macros.rb'
|
374
|
-
|
375
|
-
# Offense count: 1924
|
376
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
377
|
-
# URISchemes: http, https
|
378
|
-
Metrics/LineLength:
|
379
|
-
Max: 390
|
data/.travis.yml
CHANGED
@@ -1,35 +1,29 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
- 2.
|
5
|
-
- 2.
|
4
|
+
- 2.6.5
|
5
|
+
- 2.7.1
|
6
|
+
|
7
|
+
dist: bionic
|
6
8
|
|
7
9
|
env:
|
8
10
|
global:
|
9
11
|
- BROWSER=chrome
|
10
12
|
matrix:
|
11
|
-
- DB=postgres TEST_SUITE=rubocop
|
12
13
|
- DB=postgres TEST_SUITE="rake spec:features"
|
13
14
|
- DB=postgres TEST_SUITE="rake spec:models"
|
14
|
-
- DB=postgres TEST_SUITE="rake spec:controllers spec:lib spec:routing spec:mailers"
|
15
|
-
- DB=postgres TEST_SUITE="rake spec:views spec:helpers"
|
16
15
|
- DB=mysql TEST_SUITE="rake spec:models"
|
17
|
-
- DB=sqlite TEST_SUITE="rake spec:models"
|
18
16
|
|
19
17
|
matrix:
|
20
18
|
fast_finish: true
|
21
|
-
exclude:
|
22
|
-
- rvm: 2.5.0
|
23
|
-
env: DB=postgres TEST_SUITE=rubocop
|
24
19
|
allow_failures:
|
25
|
-
- rvm: 2.
|
26
|
-
env: DB=
|
27
|
-
- rvm: 2.
|
28
|
-
env: DB=
|
29
|
-
- rvm: 2.
|
20
|
+
- rvm: 2.6.5
|
21
|
+
env: DB=postgres TEST_SUITE="rake spec:features"
|
22
|
+
- rvm: 2.7.1
|
23
|
+
env: DB=postgres TEST_SUITE="rake spec:features"
|
24
|
+
- rvm: 2.7.1
|
30
25
|
env: DB=mysql TEST_SUITE="rake spec:models"
|
31
|
-
|
32
|
-
env: DB=sqlite TEST_SUITE="rake spec:models"
|
26
|
+
|
33
27
|
|
34
28
|
addons:
|
35
29
|
chrome: stable
|
@@ -38,13 +32,10 @@ bundler_args: --path=vendor/bundle --without heroku
|
|
38
32
|
|
39
33
|
cache: bundler
|
40
34
|
|
41
|
-
before_install:
|
42
|
-
- "export DISPLAY=:99.0"
|
43
|
-
- "sh -e /etc/init.d/xvfb start"
|
44
|
-
|
45
35
|
before_script:
|
46
36
|
# gem update --system is a workaround for travis-ci/travis-ci#8978
|
47
37
|
- "gem update --system"
|
38
|
+
- 'gem install bundler -v 1.17.3'
|
48
39
|
- sh -c "cp config/database.$DB.yml config/database.yml"
|
49
40
|
- sh -c "if [ \"$DB\" = 'postgres' ]; then psql -c 'create database fat_free_crm_test;' -U postgres; fi"
|
50
41
|
- sh -c "if [ \"$DB\" = 'mysql' ]; then mysql -e 'create database fat_free_crm_test;'; fi"
|
@@ -61,3 +52,9 @@ notifications:
|
|
61
52
|
on_success: change # options: [always|never|change] default: always
|
62
53
|
on_failure: always # options: [always|never|change] default: always
|
63
54
|
on_start: false # default: false
|
55
|
+
|
56
|
+
dist: xenial
|
57
|
+
services:
|
58
|
+
- xvfb
|
59
|
+
- postgresql
|
60
|
+
- mysql
|