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.

Files changed (385) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/brakeman-analysis.yml +46 -0
  3. data/.github/workflows/rubocop-analysis.yml +40 -0
  4. data/.github/workflows/ruby.yml +52 -0
  5. data/.rubocop_todo.yml +80 -173
  6. data/.travis.yml +17 -20
  7. data/CHANGELOG.md +63 -3
  8. data/CONTRIBUTORS.md +1 -0
  9. data/Dockerfile +45 -14
  10. data/Gemfile +21 -11
  11. data/Gemfile.lock +315 -263
  12. data/Procfile +1 -1
  13. data/README.md +6 -5
  14. data/Rakefile +1 -1
  15. data/SECURITY.md +11 -0
  16. data/app/assets/javascripts/application.js.erb +3 -0
  17. data/app/assets/stylesheets/application.css.erb +1 -0
  18. data/app/assets/stylesheets/base.scss +9 -2
  19. data/app/assets/stylesheets/bootstrap-custom.scss +206 -0
  20. data/app/assets/stylesheets/common.scss +88 -68
  21. data/app/assets/stylesheets/header.scss +0 -8
  22. data/app/controllers/admin/application_controller.rb +1 -1
  23. data/app/controllers/admin/field_groups_controller.rb +2 -4
  24. data/app/controllers/admin/fields_controller.rb +1 -1
  25. data/app/controllers/admin/groups_controller.rb +1 -1
  26. data/app/controllers/admin/tags_controller.rb +3 -5
  27. data/app/controllers/admin/users_controller.rb +7 -9
  28. data/app/controllers/application_controller.rb +21 -45
  29. data/app/controllers/comments_controller.rb +3 -6
  30. data/{config/initializers/authlogic.rb → app/controllers/confirmations_controller.rb} +4 -2
  31. data/app/controllers/emails_controller.rb +0 -2
  32. data/app/controllers/entities/accounts_controller.rb +2 -4
  33. data/app/controllers/entities/campaigns_controller.rb +2 -4
  34. data/app/controllers/entities/contacts_controller.rb +4 -24
  35. data/app/controllers/entities/leads_controller.rb +7 -10
  36. data/app/controllers/entities/opportunities_controller.rb +4 -14
  37. data/app/controllers/entities_controller.rb +21 -7
  38. data/app/controllers/home_controller.rb +5 -5
  39. data/app/controllers/lists_controller.rb +1 -1
  40. data/app/controllers/passwords_controller.rb +3 -59
  41. data/{spec/features/support/maintain_sessions.rb → app/controllers/registrations_controller.rb} +12 -5
  42. data/{lib/development_tasks/gem.rake → app/controllers/sessions_controller.rb} +6 -6
  43. data/app/controllers/tasks_controller.rb +11 -20
  44. data/app/controllers/users_controller.rb +11 -30
  45. data/app/helpers/accounts_helper.rb +12 -0
  46. data/app/helpers/admin/users_helper.rb +1 -1
  47. data/app/helpers/application_helper.rb +30 -37
  48. data/app/helpers/campaigns_helper.rb +1 -1
  49. data/app/helpers/contacts_helper.rb +1 -3
  50. data/app/helpers/opportunities_helper.rb +4 -12
  51. data/app/helpers/tasks_helper.rb +3 -3
  52. data/app/helpers/users_helper.rb +1 -3
  53. data/{config/initializers/paper_trail.rb → app/mailers/devise_mailer.rb} +5 -1
  54. data/app/mailers/user_mailer.rb +0 -9
  55. data/app/models/entities/account.rb +11 -11
  56. data/app/models/entities/account_contact.rb +1 -1
  57. data/app/models/entities/account_opportunity.rb +1 -1
  58. data/app/models/entities/campaign.rb +5 -7
  59. data/app/models/entities/contact.rb +25 -13
  60. data/app/models/entities/lead.rb +8 -8
  61. data/app/models/entities/opportunity.rb +8 -10
  62. data/app/models/fields/custom_field.rb +1 -0
  63. data/app/models/fields/custom_field_date_pair.rb +2 -0
  64. data/app/models/fields/custom_field_pair.rb +2 -2
  65. data/app/models/fields/field.rb +1 -3
  66. data/app/models/list.rb +1 -1
  67. data/app/models/observers/entity_observer.rb +3 -7
  68. data/app/models/observers/lead_observer.rb +2 -4
  69. data/app/models/observers/opportunity_observer.rb +3 -5
  70. data/app/models/observers/task_observer.rb +1 -1
  71. data/app/models/polymorphic/address.rb +1 -1
  72. data/app/models/polymorphic/comment.rb +1 -1
  73. data/app/models/polymorphic/email.rb +3 -3
  74. data/app/models/polymorphic/task.rb +14 -10
  75. data/app/models/polymorphic/version.rb +3 -2
  76. data/app/models/setting.rb +5 -1
  77. data/app/models/users/permission.rb +3 -3
  78. data/app/models/users/preference.rb +4 -3
  79. data/app/models/users/user.rb +67 -42
  80. data/app/views/accounts/_edit.html.haml +2 -2
  81. data/app/views/accounts/_new.html.haml +2 -2
  82. data/app/views/accounts/_sidebar_index.html.haml +2 -2
  83. data/app/views/accounts/_sidebar_show.html.haml +19 -19
  84. data/app/views/accounts/_top_section.html.haml +1 -1
  85. data/app/views/accounts/create.js.haml +1 -2
  86. data/app/views/accounts/destroy.js.haml +1 -1
  87. data/app/views/accounts/edit.js.haml +1 -1
  88. data/app/views/accounts/show.html.haml +1 -0
  89. data/app/views/accounts/update.js.haml +4 -5
  90. data/app/views/admin/field_groups/create.js.haml +0 -1
  91. data/app/views/admin/field_groups/destroy.js.haml +0 -1
  92. data/app/views/admin/field_groups/update.js.haml +0 -1
  93. data/app/views/admin/fields/create.js.haml +0 -1
  94. data/app/views/admin/fields/destroy.js.haml +0 -1
  95. data/app/views/admin/fields/update.js.haml +0 -1
  96. data/app/views/admin/groups/create.js.haml +0 -1
  97. data/app/views/admin/groups/destroy.js.haml +0 -1
  98. data/app/views/admin/groups/update.js.haml +0 -1
  99. data/app/views/admin/tags/create.js.haml +0 -1
  100. data/app/views/admin/tags/destroy.js.haml +0 -1
  101. data/app/views/admin/tags/update.js.haml +0 -1
  102. data/app/views/admin/users/_user.html.haml +4 -4
  103. data/app/views/admin/users/create.js.haml +0 -1
  104. data/app/views/admin/users/destroy.js.haml +0 -1
  105. data/app/views/admin/users/update.js.haml +0 -1
  106. data/app/views/campaigns/_edit.html.haml +1 -1
  107. data/app/views/campaigns/_new.html.haml +1 -1
  108. data/app/views/campaigns/_sidebar_index.html.haml +2 -2
  109. data/app/views/campaigns/_sidebar_show.html.haml +68 -67
  110. data/app/views/campaigns/create.js.haml +1 -2
  111. data/app/views/campaigns/destroy.js.haml +1 -1
  112. data/app/views/campaigns/show.html.haml +1 -0
  113. data/app/views/campaigns/update.js.haml +3 -4
  114. data/app/views/comments/_edit.html.haml +1 -1
  115. data/app/views/comments/_new.html.haml +1 -1
  116. data/app/views/comments/update.js.haml +0 -1
  117. data/app/views/contacts/_edit.html.haml +1 -1
  118. data/app/views/contacts/_index_brief.html.haml +1 -1
  119. data/app/views/contacts/_index_full.html.haml +1 -1
  120. data/app/views/contacts/_index_long.html.haml +1 -1
  121. data/app/views/contacts/_new.html.haml +1 -1
  122. data/app/views/contacts/_sidebar_show.html.haml +18 -18
  123. data/app/views/contacts/create.js.haml +0 -1
  124. data/app/views/contacts/destroy.js.haml +1 -1
  125. data/app/views/contacts/show.html.haml +1 -0
  126. data/app/views/contacts/update.js.haml +2 -3
  127. data/app/views/devise/confirmations/new.html.haml +9 -0
  128. data/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
  129. data/app/views/devise/mailer/password_change.html.haml +3 -0
  130. data/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
  131. data/app/views/devise/passwords/edit.html.haml +18 -0
  132. data/app/views/devise/passwords/new.html.haml +10 -0
  133. data/app/views/devise/registrations/new.html.haml +21 -0
  134. data/app/views/devise/sessions/new.html.haml +32 -0
  135. data/app/views/entities/_title_bar.html.haml +1 -1
  136. data/app/views/entities/attach.js.haml +2 -2
  137. data/app/views/entities/discard.js.haml +2 -2
  138. data/app/views/home/_opportunity.html.haml +1 -1
  139. data/app/views/home/_task.html.haml +1 -1
  140. data/app/views/home/index.xls.builder +51 -0
  141. data/app/views/layouts/_about.html.haml +5 -5
  142. data/app/views/layouts/_header.html.haml +3 -3
  143. data/app/views/layouts/_sidebar.html.haml +2 -2
  144. data/app/views/layouts/_tabbed.html.haml +14 -11
  145. data/app/views/layouts/admin/_header.html.haml +1 -1
  146. data/app/views/layouts/application.html.haml +2 -2
  147. data/app/views/leads/_edit.html.haml +2 -2
  148. data/app/views/leads/_new.html.haml +2 -2
  149. data/app/views/leads/_sidebar_index.html.haml +2 -2
  150. data/app/views/leads/_sidebar_show.html.haml +30 -30
  151. data/app/views/leads/create.js.haml +2 -3
  152. data/app/views/leads/destroy.js.haml +2 -2
  153. data/app/views/leads/promote.js.haml +3 -4
  154. data/app/views/leads/reject.js.haml +3 -3
  155. data/app/views/leads/show.html.haml +1 -1
  156. data/app/views/leads/update.js.haml +4 -5
  157. data/app/views/lists/create.js.haml +0 -1
  158. data/app/views/opportunities/_edit.html.haml +1 -1
  159. data/app/views/opportunities/_index_brief.html.haml +1 -1
  160. data/app/views/opportunities/_index_long.html.haml +1 -1
  161. data/app/views/opportunities/_new.html.haml +1 -1
  162. data/app/views/opportunities/_sidebar_index.html.haml +2 -2
  163. data/app/views/opportunities/_sidebar_show.html.haml +47 -46
  164. data/app/views/opportunities/create.js.haml +3 -4
  165. data/app/views/opportunities/destroy.js.haml +3 -3
  166. data/app/views/opportunities/show.html.haml +1 -0
  167. data/app/views/opportunities/update.js.haml +5 -6
  168. data/app/views/shared/_address.html.haml +5 -5
  169. data/app/views/shared/_empty.html.haml +1 -1
  170. data/app/views/shared/_inline_styles.html.haml +0 -26
  171. data/app/views/shared/_paginate_with_per_page.html.haml +1 -0
  172. data/app/views/tasks/_assigned.html.haml +1 -1
  173. data/app/views/tasks/_completed.html.haml +1 -1
  174. data/app/views/tasks/_edit.html.haml +1 -1
  175. data/app/views/tasks/_new.html.haml +1 -1
  176. data/app/views/tasks/_pending.html.haml +1 -1
  177. data/app/views/tasks/_related.html.haml +1 -1
  178. data/app/views/tasks/_selector.html.haml +7 -8
  179. data/app/views/tasks/_sidebar_index.html.haml +2 -2
  180. data/app/views/tasks/_title.html.haml +1 -1
  181. data/app/views/tasks/complete.js.haml +1 -1
  182. data/app/views/tasks/create.js.haml +1 -2
  183. data/app/views/tasks/destroy.js.haml +1 -1
  184. data/app/views/tasks/uncomplete.js.haml +1 -2
  185. data/app/views/tasks/update.js.haml +0 -1
  186. data/app/views/users/_avatar.html.haml +1 -1
  187. data/app/views/users/change_password.js.haml +0 -1
  188. data/app/views/users/update.js.haml +0 -1
  189. data/app/views/users/upload_avatar.js.haml +0 -1
  190. data/app/views/versions/_version_item.html.haml +1 -1
  191. data/bin/bundle +1 -1
  192. data/bin/rails +1 -1
  193. data/bin/setup +38 -0
  194. data/bin/update +33 -0
  195. data/bin/yarn +13 -0
  196. data/config/application.rb +8 -6
  197. data/config/boot.rb +1 -1
  198. data/config/brakeman.ignore +2 -2
  199. data/config/database.postgres.docker.yml +5 -5
  200. data/config/environment.rb +2 -2
  201. data/config/environments/development.rb +1 -0
  202. data/config/environments/test.rb +7 -0
  203. data/config/initializers/action_mailer.rb +1 -3
  204. data/config/initializers/application_controller_renderer.rb +9 -0
  205. data/config/initializers/assets.rb +6 -11
  206. data/config/initializers/backtrace_silencers.rb +0 -6
  207. data/config/initializers/content_security_policy.rb +31 -0
  208. data/config/initializers/cookies_serializer.rb +3 -6
  209. data/config/initializers/devise.rb +289 -0
  210. data/config/initializers/filter_parameter_logging.rb +0 -5
  211. data/config/initializers/gravatar.rb +0 -1
  212. data/config/initializers/inflections.rb +0 -6
  213. data/config/initializers/mime_types.rb +1 -9
  214. data/config/initializers/new_framework_defaults_6_0.rb +46 -0
  215. data/config/initializers/relative_url_root.rb +1 -3
  216. data/config/initializers/session_store.rb +1 -3
  217. data/config/initializers/simple_form.rb +135 -55
  218. data/config/initializers/simple_form_bootstrap.rb +433 -0
  219. data/config/initializers/wrap_parameters.rb +4 -9
  220. data/config/locales/fat_free_crm.cs.yml +86 -47
  221. data/config/locales/fat_free_crm.en-GB.yml +5 -5
  222. data/config/locales/fat_free_crm.en-US.yml +5 -5
  223. data/config/locales/fat_free_crm.fr.yml +1 -1
  224. data/config/locales/fat_free_crm.ru.yml +2 -0
  225. data/config/routes.rb +20 -9
  226. data/config/settings.default.yml +0 -41
  227. data/db/demo/users.yml +62 -81
  228. data/db/migrate/20100928030620_remove_uuid.rb +1 -2
  229. data/db/migrate/20120316045804_activities_to_versions.rb +1 -0
  230. data/db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb +1 -0
  231. data/db/migrate/20180107082701_authlogic_to_devise.rb +58 -0
  232. data/db/migrate/20200806004152_add_pattern_to_fields.rb +7 -0
  233. data/db/migrate/20200806004459_add_html5_to_fields.rb +10 -0
  234. data/db/schema.rb +58 -48
  235. data/docker-compose.yml +10 -0
  236. data/fat_free_crm.gemspec +13 -15
  237. data/lib/development_tasks/license.rake +2 -2
  238. data/lib/fat_free_crm/callback.rb +2 -2
  239. data/lib/fat_free_crm/comment_extensions.rb +2 -4
  240. data/lib/fat_free_crm/core_ext/string.rb +1 -1
  241. data/lib/fat_free_crm/core_ext.rb +1 -1
  242. data/lib/fat_free_crm/engine.rb +1 -1
  243. data/lib/fat_free_crm/errors.rb +1 -1
  244. data/lib/fat_free_crm/export_csv.rb +1 -0
  245. data/lib/fat_free_crm/exportable.rb +1 -1
  246. data/lib/fat_free_crm/fields.rb +1 -1
  247. data/lib/fat_free_crm/gem_dependencies.rb +1 -1
  248. data/lib/fat_free_crm/gem_ext.rb +0 -1
  249. data/lib/fat_free_crm/i18n.rb +2 -2
  250. data/lib/fat_free_crm/mail_processor/base.rb +4 -10
  251. data/lib/fat_free_crm/mail_processor/dropbox.rb +5 -15
  252. data/lib/fat_free_crm/permissions.rb +7 -4
  253. data/lib/fat_free_crm/sortable.rb +1 -1
  254. data/lib/fat_free_crm/tabs.rb +2 -2
  255. data/lib/fat_free_crm/version.rb +2 -2
  256. data/lib/gravatar_image_tag.rb +8 -9
  257. data/lib/missing_translation_detector.rb +1 -0
  258. data/lib/tasks/ffcrm/missing_translations.rake +1 -0
  259. data/lib/tasks/ffcrm/preference_update.rake +19 -0
  260. data/lib/tasks/ffcrm/setup.rake +11 -2
  261. data/lib/tasks/ffcrm/update_data.rake +2 -2
  262. data/lib/templates/erb/scaffold/_form.html.erb +4 -2
  263. data/script/rails +2 -2
  264. data/spec/controllers/admin/users_controller_spec.rb +0 -56
  265. data/spec/controllers/comments_controller_spec.rb +12 -12
  266. data/spec/controllers/entities/campaigns_controller_spec.rb +1 -1
  267. data/spec/controllers/entities/contacts_controller_spec.rb +2 -1
  268. data/spec/controllers/entities/leads_controller_spec.rb +2 -2
  269. data/spec/controllers/entities/opportunities_controller_spec.rb +1 -1
  270. data/spec/controllers/entities_controller_spec.rb +5 -0
  271. data/spec/controllers/home_controller_spec.rb +8 -8
  272. data/spec/controllers/tasks_controller_spec.rb +6 -4
  273. data/spec/controllers/users_controller_spec.rb +41 -99
  274. data/spec/factories/account_factories.rb +5 -5
  275. data/spec/factories/campaign_factories.rb +3 -3
  276. data/spec/factories/contact_factories.rb +8 -8
  277. data/spec/factories/field_factories.rb +4 -3
  278. data/spec/factories/lead_factories.rb +5 -5
  279. data/spec/factories/list_factories.rb +2 -2
  280. data/spec/factories/opportunity_factories.rb +3 -3
  281. data/spec/factories/setting_factories.rb +2 -2
  282. data/spec/factories/shared_factories.rb +11 -9
  283. data/spec/factories/task_factories.rb +7 -7
  284. data/spec/factories/user_factories.rb +21 -21
  285. data/spec/features/acceptance_helper.rb +1 -1
  286. data/spec/features/accounts_spec.rb +2 -2
  287. data/spec/features/admin/groups_spec.rb +2 -2
  288. data/spec/features/admin/users_spec.rb +4 -2
  289. data/spec/features/campaigns_spec.rb +3 -3
  290. data/spec/features/contacts_spec.rb +3 -6
  291. data/spec/features/dashboard_spec.rb +1 -1
  292. data/spec/features/devise/sign_in_spec.rb +58 -0
  293. data/spec/features/devise/sign_up_spec.rb +36 -0
  294. data/spec/features/leads_spec.rb +12 -8
  295. data/spec/features/opportunities_overview_spec.rb +1 -1
  296. data/spec/features/opportunities_spec.rb +7 -7
  297. data/spec/features/support/browser.rb +8 -3
  298. data/spec/features/support/selector_helpers.rb +10 -1
  299. data/spec/features/tasks_spec.rb +7 -7
  300. data/spec/helpers/accounts_helper_spec.rb +57 -0
  301. data/spec/helpers/admin/field_groups_helper_spec.rb +1 -1
  302. data/spec/helpers/users_helper_spec.rb +4 -4
  303. data/spec/lib/comment_extensions_spec.rb +10 -4
  304. data/spec/lib/errors_spec.rb +2 -2
  305. data/spec/lib/mail_processor/dropbox_spec.rb +1 -1
  306. data/spec/lib/mail_processor/sample_emails/dropbox.rb +8 -8
  307. data/spec/lib/permissions_spec.rb +8 -3
  308. data/spec/mailers/devise_mailer_spec.rb +35 -0
  309. data/spec/mailers/user_mailer_spec.rb +0 -26
  310. data/spec/models/entities/account_spec.rb +27 -0
  311. data/spec/models/entities/contact_spec.rb +96 -1
  312. data/spec/models/entities/opportunity_spec.rb +2 -2
  313. data/spec/models/fields/custom_field_date_pair_spec.rb +4 -2
  314. data/spec/models/fields/custom_field_pair_spec.rb +2 -2
  315. data/spec/models/fields/custom_field_spec.rb +4 -2
  316. data/spec/models/observers/entity_observer_spec.rb +4 -4
  317. data/spec/models/polymorphic/task_spec.rb +11 -11
  318. data/spec/models/polymorphic/version_spec.rb +9 -9
  319. data/spec/models/users/preference_spec.rb +1 -1
  320. data/spec/models/users/user_spec.rb +22 -26
  321. data/spec/routing/users_routing_spec.rb +30 -8
  322. data/spec/shared/controllers.rb +3 -9
  323. data/spec/spec_helper.rb +10 -2
  324. data/spec/support/assert_select.rb +1 -0
  325. data/spec/support/devise_helpers.rb +28 -0
  326. data/spec/{features/support/helpers.rb → support/feature_helpers.rb} +10 -10
  327. data/spec/support/macros.rb +4 -1
  328. data/spec/views/accounts/_edit.haml_spec.rb +1 -1
  329. data/spec/views/accounts/_new.haml_spec.rb +1 -1
  330. data/spec/views/accounts/create.js.haml_spec.rb +1 -2
  331. data/spec/views/accounts/update.js.haml_spec.rb +2 -5
  332. data/spec/views/admin/field_groups/create.js.haml_spec.rb +0 -1
  333. data/spec/views/admin/field_groups/update.js.haml_spec.rb +0 -1
  334. data/spec/views/admin/users/create.js.haml_spec.rb +0 -1
  335. data/spec/views/admin/users/destroy.js.haml_spec.rb +0 -6
  336. data/spec/views/admin/users/update.js.haml_spec.rb +1 -2
  337. data/spec/views/campaigns/_edit.haml_spec.rb +1 -1
  338. data/spec/views/campaigns/_new.haml_spec.rb +1 -1
  339. data/spec/views/campaigns/create.js.haml_spec.rb +1 -2
  340. data/spec/views/campaigns/destroy.js.haml_spec.rb +0 -1
  341. data/spec/views/campaigns/edit.js.haml_spec.rb +2 -2
  342. data/spec/views/campaigns/index.js.haml_spec.rb +1 -1
  343. data/spec/views/campaigns/update.js.haml_spec.rb +3 -7
  344. data/spec/views/contacts/_edit.haml_spec.rb +1 -1
  345. data/spec/views/contacts/_new.haml_spec.rb +1 -1
  346. data/spec/views/contacts/create.js.haml_spec.rb +1 -2
  347. data/spec/views/contacts/edit.js.haml_spec.rb +1 -1
  348. data/spec/views/contacts/index.js.html_spec.rb +1 -1
  349. data/spec/views/contacts/update.js.haml_spec.rb +6 -10
  350. data/spec/views/home/index.haml_spec.rb +2 -2
  351. data/spec/views/leads/_edit.haml_spec.rb +1 -1
  352. data/spec/views/leads/_new.haml_spec.rb +1 -1
  353. data/spec/views/leads/create.js.haml_spec.rb +0 -3
  354. data/spec/views/leads/destroy.js.haml_spec.rb +0 -2
  355. data/spec/views/leads/promote.js.haml_spec.rb +3 -11
  356. data/spec/views/leads/reject.js.haml_spec.rb +0 -3
  357. data/spec/views/leads/update.js.haml_spec.rb +3 -11
  358. data/spec/views/opportunities/_edit.haml_spec.rb +1 -1
  359. data/spec/views/opportunities/_new.haml_spec.rb +1 -1
  360. data/spec/views/opportunities/create.js.haml_spec.rb +0 -2
  361. data/spec/views/opportunities/destroy.js.haml_spec.rb +0 -3
  362. data/spec/views/opportunities/update.js.haml_spec.rb +4 -12
  363. data/spec/views/tasks/_edit.haml_spec.rb +1 -1
  364. data/spec/views/tasks/complete.js.haml_spec.rb +0 -1
  365. data/spec/views/tasks/create.js.haml_spec.rb +0 -2
  366. data/spec/views/tasks/destroy.js.haml_spec.rb +0 -1
  367. data/spec/views/tasks/uncomplete.js.haml_spec.rb +0 -1
  368. data/spec/views/tasks/update.js.haml_spec.rb +1 -4
  369. data/spec/views/users/change_password.js.haml_spec.rb +1 -2
  370. data/spec/views/users/update.js.haml_spec.rb +1 -2
  371. data/spec/views/users/upload_avatar.js.haml_spec.rb +1 -2
  372. metadata +63 -77
  373. data/app/controllers/authentications_controller.rb +0 -53
  374. data/app/models/users/authentication.rb +0 -56
  375. data/app/views/authentications/new.html.haml +0 -19
  376. data/app/views/passwords/edit.html.haml +0 -15
  377. data/app/views/passwords/new.html.haml +0 -10
  378. data/app/views/user_mailer/password_reset_instructions.html.haml +0 -6
  379. data/app/views/users/new.html.haml +0 -19
  380. data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +0 -26
  381. data/spec/controllers/authentications_controller_spec.rb +0 -150
  382. data/spec/controllers/passwords_controller_spec.rb +0 -32
  383. data/spec/models/users/authentication_spec.rb +0 -19
  384. data/spec/support/auth_macros.rb +0 -49
  385. 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: bb89ae97ee3b23e349affe50ca12d56cda21689f8bb317c7b877a48bd8fe4258
4
- data.tar.gz: e548f576324a2c75e7daa6fd12997880ef295a82b353a500542c33f6ac064a78
3
+ metadata.gz: a4b6418c618ec04984f8f8261e3121e915b57ce2b55c5787d3393a8acb47adb9
4
+ data.tar.gz: 362ffdc71d5d01450d0475758f794972ec77dc79755f92196f4f72917e789798
5
5
  SHA512:
6
- metadata.gz: 663ff8b5e566c482cc8f9e05b4b89ed04f9567df1409593ac6de0d99305029583f1943bcf9dd616b5a00cd16ca533c1f04a421535a773db57cabfa1b3ee778a2
7
- data.tar.gz: 3f95330ec40b1dbb86d25c19d3ab66f9303115668318e9a074f95e05600a448b75810d751e83acd41c827b92476c2a6f413c9843bef44e4a1f7669d3067caf25
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 2018-02-02 11:21:41 +0300 using RuboCop version 0.52.1.
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: 1
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: 1
16
+ # Offense count: 21
17
17
  # Cop supports --auto-correct.
18
- Layout/EmptyLinesAroundArguments:
19
- Exclude:
20
- - 'lib/fat_free_crm/permissions.rb'
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: 20
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: 1
89
- Lint/UriEscapeUnescape:
75
+ # Offense count: 2
76
+ # Configuration parameters: AllowComments.
77
+ Lint/SuppressedException:
90
78
  Exclude:
91
- - 'lib/gravatar_image_tag.rb'
79
+ - 'config/environments/test.rb'
80
+ - 'lib/fat_free_crm/gem_dependencies.rb'
92
81
 
93
- # Offense count: 4
94
- # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
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: 3
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: 131
92
+ # Offense count: 134
93
+ # Configuration parameters: IgnoredMethods.
109
94
  Metrics/AbcSize:
110
95
  Max: 57
111
96
 
112
- # Offense count: 4
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: 209
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: 102
127
- # Configuration parameters: CountComments.
118
+ # Offense count: 99
119
+ # Configuration parameters: CountComments, ExcludedMethods.
128
120
  Metrics/MethodLength:
129
- Max: 38
121
+ Max: 36
130
122
 
131
123
  # Offense count: 2
132
124
  # Configuration parameters: CountComments.
133
125
  Metrics/ModuleLength:
134
- Max: 382
126
+ Max: 371
135
127
 
136
- # Offense count: 27
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: 1
157
- # Configuration parameters: Blacklist.
158
- # Blacklist: END, (?-mix:EO[A-Z]{1})
159
- Naming/HeredocDelimiterNaming:
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/controllers/passwords_controller.rb'
154
+ - 'app/models/fields/field.rb'
155
+ - 'app/models/polymorphic/comment.rb'
156
+ - 'lib/missing_translation_detector.rb'
162
157
 
163
- # Offense count: 5
164
- # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
158
+ # Offense count: 4
159
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
165
160
  # NamePrefix: is_, has_, have_
166
- # NamePrefixBlacklist: is_, has_, have_
167
- # NameWhitelist: is_a?
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: 2
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: 4
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
- Style/EvalWithLocation:
226
+ # Configuration parameters: EnforcedStyle.
227
+ # SupportedStyles: annotated, template, unannotated
228
+ Style/FormatStringToken:
253
229
  Exclude:
254
- - 'lib/fat_free_crm/permissions.rb'
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: when_needed, always, never
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: 46
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/IdenticalConditionalBranches:
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: 1
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: 2
318
- Style/MultilineTernaryOperator:
271
+ # Offense count: 1
272
+ Style/MultipleComparison:
319
273
  Exclude:
320
- - 'app/models/users/authentication.rb'
274
+ - 'app/models/polymorphic/task.rb'
321
275
 
322
- # Offense count: 11
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.4.2
5
- - 2.5.0
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.4.2
26
- env: DB=mysql TEST_SUITE="rake spec:models"
27
- - rvm: 2.4.2
28
- env: DB=sqlite TEST_SUITE="rake spec:models"
29
- - rvm: 2.5.0
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
- - rvm: 2.5.0
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