fat_free_crm 0.18.2 → 0.19.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 (251) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +61 -160
  3. data/.travis.yml +27 -11
  4. data/CHANGELOG.md +40 -24
  5. data/CONTRIBUTORS.md +1 -0
  6. data/Dockerfile +45 -14
  7. data/Gemfile +16 -10
  8. data/Gemfile.lock +230 -222
  9. data/Procfile +1 -1
  10. data/README.md +2 -2
  11. data/Rakefile +1 -1
  12. data/app/assets/stylesheets/common.scss +1 -1
  13. data/app/controllers/admin/application_controller.rb +1 -1
  14. data/app/controllers/admin/field_groups_controller.rb +1 -3
  15. data/app/controllers/admin/tags_controller.rb +1 -3
  16. data/app/controllers/admin/users_controller.rb +5 -8
  17. data/app/controllers/application_controller.rb +11 -45
  18. data/app/controllers/comments_controller.rb +2 -5
  19. data/{config/initializers/authlogic.rb → app/controllers/confirmations_controller.rb} +4 -2
  20. data/app/controllers/emails_controller.rb +0 -2
  21. data/app/controllers/entities/accounts_controller.rb +1 -3
  22. data/app/controllers/entities/campaigns_controller.rb +1 -3
  23. data/app/controllers/entities/contacts_controller.rb +4 -24
  24. data/app/controllers/entities/leads_controller.rb +7 -10
  25. data/app/controllers/entities/opportunities_controller.rb +4 -14
  26. data/app/controllers/entities_controller.rb +21 -7
  27. data/app/controllers/home_controller.rb +2 -4
  28. data/app/controllers/passwords_controller.rb +3 -59
  29. data/{spec/features/support/maintain_sessions.rb → app/controllers/registrations_controller.rb} +12 -5
  30. data/{lib/development_tasks/gem.rake → app/controllers/sessions_controller.rb} +6 -6
  31. data/app/controllers/tasks_controller.rb +8 -17
  32. data/app/controllers/users_controller.rb +8 -29
  33. data/app/helpers/admin/users_helper.rb +1 -1
  34. data/app/helpers/application_helper.rb +27 -32
  35. data/app/helpers/campaigns_helper.rb +1 -1
  36. data/app/helpers/contacts_helper.rb +1 -3
  37. data/app/helpers/opportunities_helper.rb +4 -12
  38. data/app/helpers/tasks_helper.rb +1 -1
  39. data/app/helpers/users_helper.rb +1 -3
  40. data/{config/initializers/paper_trail.rb → app/mailers/devise_mailer.rb} +5 -1
  41. data/app/mailers/user_mailer.rb +0 -9
  42. data/app/models/entities/account.rb +10 -10
  43. data/app/models/entities/campaign.rb +4 -6
  44. data/app/models/entities/contact.rb +24 -12
  45. data/app/models/entities/lead.rb +7 -7
  46. data/app/models/entities/opportunity.rb +7 -9
  47. data/app/models/fields/custom_field.rb +1 -0
  48. data/app/models/fields/custom_field_date_pair.rb +2 -0
  49. data/app/models/fields/field.rb +1 -3
  50. data/app/models/list.rb +1 -1
  51. data/app/models/observers/entity_observer.rb +3 -7
  52. data/app/models/observers/lead_observer.rb +2 -4
  53. data/app/models/observers/opportunity_observer.rb +2 -4
  54. data/app/models/observers/task_observer.rb +1 -1
  55. data/app/models/polymorphic/email.rb +2 -2
  56. data/app/models/polymorphic/task.rb +13 -9
  57. data/app/models/polymorphic/version.rb +3 -2
  58. data/app/models/setting.rb +2 -0
  59. data/app/models/users/permission.rb +3 -3
  60. data/app/models/users/preference.rb +2 -1
  61. data/app/models/users/user.rb +67 -42
  62. data/app/views/accounts/_top_section.html.haml +1 -1
  63. data/app/views/accounts/edit.js.haml +1 -1
  64. data/app/views/accounts/update.js.haml +2 -2
  65. data/app/views/admin/users/_user.html.haml +4 -4
  66. data/app/views/contacts/_index_brief.html.haml +1 -1
  67. data/app/views/contacts/_index_full.html.haml +1 -1
  68. data/app/views/contacts/_index_long.html.haml +1 -1
  69. data/app/views/devise/confirmations/new.html.haml +9 -0
  70. data/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
  71. data/app/views/devise/mailer/password_change.html.haml +3 -0
  72. data/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
  73. data/app/views/devise/passwords/edit.html.haml +18 -0
  74. data/app/views/devise/passwords/new.html.haml +10 -0
  75. data/app/views/devise/registrations/new.html.haml +21 -0
  76. data/app/views/devise/sessions/new.html.haml +32 -0
  77. data/app/views/layouts/_about.html.haml +5 -5
  78. data/app/views/layouts/_header.html.haml +3 -3
  79. data/app/views/layouts/admin/_header.html.haml +1 -1
  80. data/app/views/shared/_address.html.haml +5 -5
  81. data/app/views/shared/_paginate_with_per_page.html.haml +1 -0
  82. data/app/views/users/_avatar.html.haml +1 -1
  83. data/bin/bundle +1 -1
  84. data/bin/rails +1 -1
  85. data/bin/setup +38 -0
  86. data/bin/update +33 -0
  87. data/bin/yarn +13 -0
  88. data/config/application.rb +8 -6
  89. data/config/boot.rb +1 -1
  90. data/config/brakeman.ignore +2 -2
  91. data/config/database.postgres.docker.yml +5 -5
  92. data/config/environment.rb +1 -1
  93. data/config/environments/development.rb +1 -0
  94. data/config/environments/test.rb +7 -0
  95. data/config/initializers/action_mailer.rb +1 -3
  96. data/config/initializers/application_controller_renderer.rb +9 -0
  97. data/config/initializers/assets.rb +6 -11
  98. data/config/initializers/backtrace_silencers.rb +0 -6
  99. data/config/initializers/content_security_policy.rb +26 -0
  100. data/config/initializers/cookies_serializer.rb +3 -6
  101. data/config/initializers/devise.rb +289 -0
  102. data/config/initializers/filter_parameter_logging.rb +0 -5
  103. data/config/initializers/gravatar.rb +0 -1
  104. data/config/initializers/inflections.rb +0 -6
  105. data/config/initializers/mime_types.rb +1 -9
  106. data/config/initializers/new_framework_defaults_5_2.rb +40 -0
  107. data/config/initializers/relative_url_root.rb +1 -3
  108. data/config/initializers/session_store.rb +1 -3
  109. data/config/initializers/wrap_parameters.rb +4 -9
  110. data/config/locales/fat_free_crm.en-GB.yml +5 -5
  111. data/config/locales/fat_free_crm.en-US.yml +5 -5
  112. data/config/locales/fat_free_crm.fr.yml +1 -1
  113. data/config/locales/fat_free_crm.ru.yml +1 -0
  114. data/config/routes.rb +20 -9
  115. data/db/demo/users.yml +62 -81
  116. data/db/migrate/20100928030620_remove_uuid.rb +1 -2
  117. data/db/migrate/20120316045804_activities_to_versions.rb +1 -0
  118. data/db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb +1 -0
  119. data/db/migrate/20180107082701_authlogic_to_devise.rb +58 -0
  120. data/db/schema.rb +48 -43
  121. data/docker-compose.yml +10 -0
  122. data/fat_free_crm.gemspec +11 -13
  123. data/lib/development_tasks/license.rake +2 -2
  124. data/lib/fat_free_crm/callback.rb +2 -2
  125. data/lib/fat_free_crm/comment_extensions.rb +2 -4
  126. data/lib/fat_free_crm/core_ext/string.rb +1 -1
  127. data/lib/fat_free_crm/engine.rb +1 -1
  128. data/lib/fat_free_crm/errors.rb +1 -1
  129. data/lib/fat_free_crm/export_csv.rb +1 -0
  130. data/lib/fat_free_crm/exportable.rb +1 -1
  131. data/lib/fat_free_crm/fields.rb +1 -1
  132. data/lib/fat_free_crm/gem_dependencies.rb +1 -1
  133. data/lib/fat_free_crm/gem_ext/simple_form/action_view_extensions/form_helper.rb +1 -3
  134. data/lib/fat_free_crm/i18n.rb +2 -2
  135. data/lib/fat_free_crm/mail_processor/base.rb +4 -10
  136. data/lib/fat_free_crm/mail_processor/dropbox.rb +5 -15
  137. data/lib/fat_free_crm/permissions.rb +7 -4
  138. data/lib/fat_free_crm/sortable.rb +1 -1
  139. data/lib/fat_free_crm/tabs.rb +2 -2
  140. data/lib/fat_free_crm/version.rb +2 -2
  141. data/lib/gravatar_image_tag.rb +7 -8
  142. data/lib/missing_translation_detector.rb +1 -0
  143. data/lib/tasks/ffcrm/missing_translations.rake +1 -0
  144. data/lib/tasks/ffcrm/setup.rake +10 -1
  145. data/lib/tasks/ffcrm/update_data.rake +2 -2
  146. data/script/rails +2 -2
  147. data/spec/controllers/admin/users_controller_spec.rb +0 -56
  148. data/spec/controllers/comments_controller_spec.rb +6 -6
  149. data/spec/controllers/entities/campaigns_controller_spec.rb +1 -1
  150. data/spec/controllers/entities/contacts_controller_spec.rb +2 -1
  151. data/spec/controllers/entities/leads_controller_spec.rb +2 -2
  152. data/spec/controllers/entities/opportunities_controller_spec.rb +1 -1
  153. data/spec/controllers/entities_controller_spec.rb +5 -0
  154. data/spec/controllers/home_controller_spec.rb +5 -5
  155. data/spec/controllers/tasks_controller_spec.rb +6 -4
  156. data/spec/controllers/users_controller_spec.rb +28 -98
  157. data/spec/factories/account_factories.rb +5 -5
  158. data/spec/factories/campaign_factories.rb +3 -3
  159. data/spec/factories/contact_factories.rb +8 -8
  160. data/spec/factories/field_factories.rb +4 -3
  161. data/spec/factories/lead_factories.rb +5 -5
  162. data/spec/factories/list_factories.rb +2 -2
  163. data/spec/factories/opportunity_factories.rb +3 -3
  164. data/spec/factories/setting_factories.rb +2 -2
  165. data/spec/factories/shared_factories.rb +11 -9
  166. data/spec/factories/task_factories.rb +7 -7
  167. data/spec/factories/user_factories.rb +16 -19
  168. data/spec/features/admin/groups_spec.rb +1 -1
  169. data/spec/features/admin/users_spec.rb +3 -1
  170. data/spec/features/campaigns_spec.rb +1 -1
  171. data/spec/features/contacts_spec.rb +1 -1
  172. data/spec/features/dashboard_spec.rb +1 -1
  173. data/spec/features/devise/sign_in_spec.rb +58 -0
  174. data/spec/features/devise/sign_up_spec.rb +36 -0
  175. data/spec/features/leads_spec.rb +1 -1
  176. data/spec/features/opportunities_overview_spec.rb +1 -1
  177. data/spec/features/opportunities_spec.rb +3 -3
  178. data/spec/features/support/browser.rb +2 -1
  179. data/spec/features/tasks_spec.rb +1 -1
  180. data/spec/helpers/admin/field_groups_helper_spec.rb +1 -1
  181. data/spec/helpers/users_helper_spec.rb +4 -4
  182. data/spec/lib/comment_extensions_spec.rb +10 -4
  183. data/spec/lib/errors_spec.rb +2 -2
  184. data/spec/lib/mail_processor/dropbox_spec.rb +1 -1
  185. data/spec/lib/mail_processor/sample_emails/dropbox.rb +8 -8
  186. data/spec/lib/permissions_spec.rb +8 -3
  187. data/spec/mailers/devise_mailer_spec.rb +35 -0
  188. data/spec/mailers/user_mailer_spec.rb +0 -26
  189. data/spec/models/entities/account_spec.rb +27 -0
  190. data/spec/models/entities/contact_spec.rb +96 -1
  191. data/spec/models/fields/custom_field_date_pair_spec.rb +4 -2
  192. data/spec/models/fields/custom_field_spec.rb +4 -2
  193. data/spec/models/observers/entity_observer_spec.rb +1 -1
  194. data/spec/models/polymorphic/version_spec.rb +7 -7
  195. data/spec/models/users/user_spec.rb +22 -26
  196. data/spec/routing/users_routing_spec.rb +30 -8
  197. data/spec/shared/controllers.rb +3 -9
  198. data/spec/spec_helper.rb +10 -2
  199. data/spec/support/assert_select.rb +1 -0
  200. data/spec/support/devise_helpers.rb +28 -0
  201. data/spec/{features/support/helpers.rb → support/feature_helpers.rb} +10 -10
  202. data/spec/support/macros.rb +4 -1
  203. data/spec/views/contacts/update.js.haml_spec.rb +1 -1
  204. data/spec/views/opportunities/update.js.haml_spec.rb +1 -1
  205. data/vendor/gems/ransack_ui-1.3.4/.gitignore +17 -0
  206. data/vendor/gems/ransack_ui-1.3.4/Gemfile +7 -0
  207. data/vendor/gems/ransack_ui-1.3.4/LICENSE.txt +22 -0
  208. data/vendor/gems/ransack_ui-1.3.4/README.md +57 -0
  209. data/vendor/gems/ransack_ui-1.3.4/Rakefile +1 -0
  210. data/vendor/gems/ransack_ui-1.3.4/app/assets/images/ransack_ui/calendar.png +0 -0
  211. data/vendor/gems/ransack_ui-1.3.4/app/assets/images/ransack_ui/delete.png +0 -0
  212. data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack/predicates.js.coffee +41 -0
  213. data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_bootstrap/button_group_select.js.coffee +26 -0
  214. data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_bootstrap/index.js.coffee +2 -0
  215. data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_jquery/index.js +2 -0
  216. data/vendor/gems/ransack_ui-1.3.4/app/assets/javascripts/ransack_ui_jquery/search_form.js.coffee.erb +499 -0
  217. data/vendor/gems/ransack_ui-1.3.4/app/assets/stylesheets/ransack_ui_bootstrap/index.css +3 -0
  218. data/vendor/gems/ransack_ui-1.3.4/app/assets/stylesheets/ransack_ui_bootstrap/search.css.scss +41 -0
  219. data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_condition_fields.html.erb +15 -0
  220. data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_grouping_fields.html.erb +16 -0
  221. data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_search.html.erb +29 -0
  222. data/vendor/gems/ransack_ui-1.3.4/app/views/ransack_ui/_sort_fields.html.erb +4 -0
  223. data/vendor/gems/ransack_ui-1.3.4/config/locales/en.yml +24 -0
  224. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui.rb +9 -0
  225. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/adapters/active_record.rb +6 -0
  226. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/adapters/active_record/base.rb +46 -0
  227. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/controller_helpers.rb +18 -0
  228. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/rails/engine.rb +21 -0
  229. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/adapters/active_record/base.rb +47 -0
  230. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/configuration.rb +15 -0
  231. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/context.rb +9 -0
  232. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/helpers/form_builder.rb +262 -0
  233. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/attribute.rb +13 -0
  234. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/condition.rb +13 -0
  235. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/ransack_overrides/nodes/grouping.rb +20 -0
  236. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/version.rb +3 -0
  237. data/vendor/gems/ransack_ui-1.3.4/lib/ransack_ui/view_helpers.rb +30 -0
  238. data/vendor/gems/ransack_ui-1.3.4/ransack_ui.gemspec +23 -0
  239. metadata +79 -67
  240. data/app/controllers/authentications_controller.rb +0 -53
  241. data/app/models/users/authentication.rb +0 -56
  242. data/app/views/authentications/new.html.haml +0 -19
  243. data/app/views/passwords/edit.html.haml +0 -15
  244. data/app/views/passwords/new.html.haml +0 -10
  245. data/app/views/user_mailer/password_reset_instructions.html.haml +0 -6
  246. data/app/views/users/new.html.haml +0 -19
  247. data/spec/controllers/authentications_controller_spec.rb +0 -150
  248. data/spec/controllers/passwords_controller_spec.rb +0 -32
  249. data/spec/models/users/authentication_spec.rb +0 -19
  250. data/spec/support/auth_macros.rb +0 -49
  251. 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: be99b1f95338b9b103c9f07cb7f81420fe6fda84a3dcd1bf98670041b20fbbae
4
- data.tar.gz: 33f81c08dc06d2f2b620f653b766a15068698f01e5a11c7e2832d453680512fc
3
+ metadata.gz: c70ae137e3796004c207daf7a71731df62247a1e7c1ce014031bd9c7d2112efa
4
+ data.tar.gz: be5a75fe0f33b761b47b185265f770e69f85d1e31b7f3a68594772e425931feb
5
5
  SHA512:
6
- metadata.gz: 3921b7cf87bd7fb29ab36baa164a2149f1ca2a3f2fe55f9408de79e292bd0987b5667fdcc39bb21b6aac7b5c3c94129c380068703d1b54112790b9c9c8af7562
7
- data.tar.gz: 677116c75f3840e73bfcfa778836cdb2c6a205b4f087f9f81fa4a536ef329a9e92f584c01ae48b0b50dd1f8ca1cd5e7423d996370936afc2d2a3bdbdcee3b40e
6
+ metadata.gz: 8b6bdf7fdc54cbf917895c0ca6931d0206bb643c3250ab882002e731ca2f6845e25bdc23f7cf250c02a35c5eb2d735061384104640266617d60ed4d44a30f0a6
7
+ data.tar.gz: 307cb193b001c4e65f877bf50e5c9dd0bad7283b626877b7273c0ea984cbfbd996c868762fb74196ec56e7a1ab6bccbb46a8ee5e7f097e3c416ebad186dcf33a
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 2019-11-08 13:13:48 +1030 using RuboCop version 0.76.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: 2
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: 88
17
17
  # Cop supports --auto-correct.
18
- Layout/EmptyLinesAroundArguments:
19
- Exclude:
20
- - 'lib/fat_free_crm/permissions.rb'
18
+ # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
19
+ # SupportedHashRocketStyles: key, separator, table
20
+ # SupportedColonStyles: key, separator, table
21
+ # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
22
+ Layout/AlignHash:
23
+ Enabled: false
24
+
25
+ # Offense count: 22
26
+ # Cop supports --auto-correct.
27
+ # Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
28
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
29
+ Layout/EndAlignment:
30
+ Enabled: false
21
31
 
22
32
  # Offense count: 7
23
33
  # Cop supports --auto-correct.
@@ -28,7 +38,7 @@ 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
@@ -38,24 +48,13 @@ Lint/BooleanSymbol:
38
48
  Exclude:
39
49
  - 'config/initializers/ransack.rb'
40
50
 
41
- # Offense count: 1
42
- Lint/Debugger:
43
- Exclude:
44
- - 'app/controllers/entities/opportunities_controller.rb'
45
-
46
51
  # Offense count: 1
47
52
  Lint/DuplicateMethods:
48
53
  Exclude:
49
54
  - 'lib/gravatar_image_tag.rb'
50
55
 
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
56
  # Offense count: 2
57
+ # Configuration parameters: AllowComments.
59
58
  Lint/HandleExceptions:
60
59
  Exclude:
61
60
  - 'config/environments/test.rb'
@@ -67,12 +66,6 @@ Lint/ImplicitStringConcatenation:
67
66
  - 'db/migrate/20121221033947_fix_country_mapping.rb'
68
67
  - 'lib/tasks/ffcrm/update_data.rake'
69
68
 
70
- # Offense count: 4
71
- Lint/IneffectiveAccessModifier:
72
- Exclude:
73
- - 'db/migrate/20100928030620_remove_uuid.rb'
74
- - 'lib/gravatar_image_tag.rb'
75
-
76
69
  # Offense count: 5
77
70
  Lint/RescueException:
78
71
  Exclude:
@@ -90,22 +83,12 @@ Lint/UriEscapeUnescape:
90
83
  Exclude:
91
84
  - 'lib/gravatar_image_tag.rb'
92
85
 
93
- # Offense count: 4
94
- # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
95
- Lint/UselessAccessModifier:
96
- Exclude:
97
- - 'app/models/fields/field.rb'
98
- - 'app/models/users/user.rb'
99
- - 'db/migrate/20100928030620_remove_uuid.rb'
100
- - 'lib/gravatar_image_tag.rb'
101
-
102
- # Offense count: 3
86
+ # Offense count: 2
103
87
  Lint/UselessAssignment:
104
88
  Exclude:
105
- - 'app/helpers/application_helper.rb'
106
89
  - 'app/views/home/index.atom.builder'
107
90
 
108
- # Offense count: 131
91
+ # Offense count: 133
109
92
  Metrics/AbcSize:
110
93
  Max: 57
111
94
 
@@ -117,23 +100,23 @@ Metrics/BlockNesting:
117
100
  # Offense count: 14
118
101
  # Configuration parameters: CountComments.
119
102
  Metrics/ClassLength:
120
- Max: 209
103
+ Max: 184
121
104
 
122
- # Offense count: 29
105
+ # Offense count: 30
123
106
  Metrics/CyclomaticComplexity:
124
107
  Max: 14
125
108
 
126
- # Offense count: 102
127
- # Configuration parameters: CountComments.
109
+ # Offense count: 100
110
+ # Configuration parameters: CountComments, ExcludedMethods.
128
111
  Metrics/MethodLength:
129
- Max: 38
112
+ Max: 36
130
113
 
131
114
  # Offense count: 2
132
115
  # Configuration parameters: CountComments.
133
116
  Metrics/ModuleLength:
134
- Max: 382
117
+ Max: 373
135
118
 
136
- # Offense count: 27
119
+ # Offense count: 26
137
120
  Metrics/PerceivedComplexity:
138
121
  Max: 15
139
122
 
@@ -153,14 +136,7 @@ Naming/AccessorMethodName:
153
136
  - 'spec/controllers/entities/opportunities_controller_spec.rb'
154
137
  - 'spec/support/macros.rb'
155
138
 
156
- # Offense count: 1
157
- # Configuration parameters: Blacklist.
158
- # Blacklist: END, (?-mix:EO[A-Z]{1})
159
- Naming/HeredocDelimiterNaming:
160
- Exclude:
161
- - 'app/controllers/passwords_controller.rb'
162
-
163
- # Offense count: 5
139
+ # Offense count: 4
164
140
  # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
165
141
  # NamePrefix: is_, has_, have_
166
142
  # NamePrefixBlacklist: is_, has_, have_
@@ -170,37 +146,32 @@ Naming/PredicateName:
170
146
  Exclude:
171
147
  - 'spec/**/*'
172
148
  - 'app/inputs/date_time_input.rb'
173
- - 'app/models/entities/opportunity.rb'
174
149
  - 'app/models/users/user.rb'
175
150
  - 'lib/fat_free_crm/fields.rb'
176
151
  - 'lib/fat_free_crm/mail_processor/base.rb'
177
152
 
178
- # Offense count: 12
179
- # Configuration parameters: EnforcedStyle.
180
- # SupportedStyles: snake_case, normalcase, non_integer
181
- Naming/VariableNumber:
182
- Exclude:
183
- - 'spec/controllers/home_controller_spec.rb'
184
-
185
153
  # Offense count: 2
186
154
  # Cop supports --auto-correct.
187
- # Configuration parameters: AutoCorrect.
188
- Performance/HashEachMethods:
155
+ # Configuration parameters: PreferredName.
156
+ Naming/RescuedExceptionsVariableName:
189
157
  Exclude:
190
- - 'app/controllers/entities/opportunities_controller.rb'
191
- - 'lib/fat_free_crm/errors.rb'
158
+ - 'spec/support/assert_select.rb'
192
159
 
193
- # Offense count: 1
194
- # Cop supports --auto-correct.
195
- # Configuration parameters: AutoCorrect.
196
- Performance/StartWith:
160
+ # Offense count: 3
161
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
162
+ # AllowedNames: io, id, to, by, on, in, at, ip, db, os
163
+ Naming/UncommunicativeMethodParamName:
197
164
  Exclude:
198
- - 'app/helpers/versions_helper.rb'
165
+ - 'app/models/fields/field.rb'
166
+ - 'app/models/polymorphic/comment.rb'
167
+ - 'lib/missing_translation_detector.rb'
199
168
 
200
- # Offense count: 1
201
- Security/Eval:
169
+ # Offense count: 12
170
+ # Configuration parameters: EnforcedStyle.
171
+ # SupportedStyles: snake_case, normalcase, non_integer
172
+ Naming/VariableNumber:
202
173
  Exclude:
203
- - 'lib/development_tasks/gem.rake'
174
+ - 'spec/controllers/home_controller_spec.rb'
204
175
 
205
176
  # Offense count: 1
206
177
  Security/MarshalLoad:
@@ -234,29 +205,28 @@ Style/ClassVars:
234
205
  - 'lib/fat_free_crm/tabs.rb'
235
206
  - 'lib/fat_free_crm/view_factory.rb'
236
207
 
237
- # Offense count: 2
208
+ # Offense count: 1
238
209
  Style/CommentedKeyword:
239
210
  Exclude:
240
- - 'app/models/users/authentication.rb'
241
211
  - 'db/migrate/20100928030617_drop_openid_tables.rb'
242
212
 
243
- # Offense count: 4
213
+ # Offense count: 2
244
214
  Style/DoubleNegation:
245
215
  Exclude:
246
216
  - 'app/helpers/application_helper.rb'
247
- - 'app/models/entities/opportunity.rb'
248
217
  - 'app/models/polymorphic/task.rb'
249
- - 'lib/gravatar_image_tag.rb'
250
218
 
251
219
  # Offense count: 1
252
- Style/EvalWithLocation:
220
+ # Configuration parameters: EnforcedStyle.
221
+ # SupportedStyles: annotated, template, unannotated
222
+ Style/FormatStringToken:
253
223
  Exclude:
254
- - 'lib/fat_free_crm/permissions.rb'
224
+ - 'spec/factories/shared_factories.rb'
255
225
 
256
226
  # Offense count: 1
257
227
  # Cop supports --auto-correct.
258
228
  # Configuration parameters: EnforcedStyle.
259
- # SupportedStyles: when_needed, always, never
229
+ # SupportedStyles: always, never
260
230
  Style/FrozenStringLiteralComment:
261
231
  Exclude:
262
232
  - 'db/schema.rb'
@@ -268,44 +238,22 @@ Style/GlobalVars:
268
238
  - 'db/migrate/20100928030598_create_sessions.rb'
269
239
  - 'db/migrate/20120510025219_add_not_null_constraints_for_timestamp_columns.rb'
270
240
 
271
- # Offense count: 46
241
+ # Offense count: 28
272
242
  # Configuration parameters: MinBodyLength.
273
243
  Style/GuardClause:
274
244
  Enabled: false
275
245
 
276
246
  # 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:
247
+ Style/MissingRespondToMissing:
302
248
  Exclude:
303
249
  - 'app/models/setting.rb'
304
250
  - 'lib/fat_free_crm/fields.rb'
305
251
 
306
- # Offense count: 1
252
+ # Offense count: 3
307
253
  Style/MixinUsage:
308
254
  Exclude:
255
+ - 'bin/setup'
256
+ - 'bin/update'
309
257
  - 'spec/helpers/fields_helper_spec.rb'
310
258
 
311
259
  # Offense count: 2
@@ -314,66 +262,19 @@ Style/MultilineBlockChain:
314
262
  - 'lib/fat_free_crm/core_ext/string.rb'
315
263
  - 'lib/tasks/ffcrm/demo.rake'
316
264
 
317
- # Offense count: 2
318
- Style/MultilineTernaryOperator:
265
+ # Offense count: 1
266
+ Style/MultipleComparison:
319
267
  Exclude:
320
- - 'app/models/users/authentication.rb'
268
+ - 'app/models/polymorphic/task.rb'
321
269
 
322
- # Offense count: 11
270
+ # Offense count: 5
323
271
  # Cop supports --auto-correct.
324
- # Configuration parameters: AutoCorrect, EnforcedStyle.
272
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
325
273
  # SupportedStyles: predicate, comparison
326
274
  Style/NumericPredicate:
327
275
  Exclude:
328
276
  - '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
277
  - 'app/models/fields/custom_field.rb'
334
278
  - 'app/models/polymorphic/task.rb'
335
279
  - 'app/models/users/user.rb'
336
280
  - '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,8 +1,11 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4.2
5
- - 2.5.0
4
+ - 2.5.7
5
+ - 2.6.5
6
+ - 2.7.1
7
+
8
+ dist: bionic
6
9
 
7
10
  env:
8
11
  global:
@@ -19,16 +22,26 @@ env:
19
22
  matrix:
20
23
  fast_finish: true
21
24
  exclude:
22
- - rvm: 2.5.0
25
+ - rvm: 2.5.7
26
+ env: DB=postgres TEST_SUITE=rubocop
27
+ - rvm: 2.6.5
23
28
  env: DB=postgres TEST_SUITE=rubocop
24
29
  allow_failures:
25
- - rvm: 2.4.2
30
+ - rvm: 2.5.7
31
+ env: DB=postgres TEST_SUITE="rake spec:features"
32
+ - rvm: 2.6.5
33
+ env: DB=postgres TEST_SUITE="rake spec:features"
34
+ - rvm: 2.7.1
35
+ env: DB=postgres TEST_SUITE="rake spec:features"
36
+ - rvm: 2.5.7
26
37
  env: DB=mysql TEST_SUITE="rake spec:models"
27
- - rvm: 2.4.2
38
+ - rvm: 2.5.7
39
+ env: DB=sqlite TEST_SUITE="rake spec:models"
40
+ - rvm: 2.6.5
28
41
  env: DB=sqlite TEST_SUITE="rake spec:models"
29
- - rvm: 2.5.0
42
+ - rvm: 2.7.1
30
43
  env: DB=mysql TEST_SUITE="rake spec:models"
31
- - rvm: 2.5.0
44
+ - rvm: 2.7.1
32
45
  env: DB=sqlite TEST_SUITE="rake spec:models"
33
46
 
34
47
  addons:
@@ -38,13 +51,10 @@ bundler_args: --path=vendor/bundle --without heroku
38
51
 
39
52
  cache: bundler
40
53
 
41
- before_install:
42
- - "export DISPLAY=:99.0"
43
- - "sh -e /etc/init.d/xvfb start"
44
-
45
54
  before_script:
46
55
  # gem update --system is a workaround for travis-ci/travis-ci#8978
47
56
  - "gem update --system"
57
+ - 'gem install bundler -v 1.17.3'
48
58
  - sh -c "cp config/database.$DB.yml config/database.yml"
49
59
  - sh -c "if [ \"$DB\" = 'postgres' ]; then psql -c 'create database fat_free_crm_test;' -U postgres; fi"
50
60
  - sh -c "if [ \"$DB\" = 'mysql' ]; then mysql -e 'create database fat_free_crm_test;'; fi"
@@ -61,3 +71,9 @@ notifications:
61
71
  on_success: change # options: [always|never|change] default: always
62
72
  on_failure: always # options: [always|never|change] default: always
63
73
  on_start: false # default: false
74
+
75
+ dist: xenial
76
+ services:
77
+ - xvfb
78
+ - postgresql
79
+ - mysql
data/CHANGELOG.md CHANGED
@@ -4,40 +4,55 @@ 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 Apr 7, 2021 (0.18.2)
8
- ---------------------------------------------------------------------
9
-
10
- #### Security fixes
11
- CVE-2018-1000544
12
- CVE-2019-16892
13
- CVE-2018-16470
14
- CVE-2018-16471
15
- CVE-2018-3760
16
- CVE-2018-8048
17
- CVE-2019-11068
18
- CVE-2019-5477
19
- CVE-2018-14404
20
- CVE-2018-1000201
21
- CVE-2018-16476
22
- CVE-2019-5418
23
- CVE-2019-5419
24
- CVE-2019-15587
25
- CVE-2018-16468
26
- CVE-2019-16676
7
+ Wed Apr 04, 2021 (0.19.0)
8
+ ======
27
9
 
28
-
29
- Sat Oct 27, 2018 (0.18.1)
30
- ---------------------------------------------------------------------
10
+ ### Important changes
31
11
 
32
12
  #### Fixed XSS flaw in tags_helper
33
13
  Credit Antonin Steinhauser (asteinhauser) for discovery and responsible disclosure.
34
14
 
15
+ #### Devise replaces Authlogic for user authentication
16
+ Ticket #742 replaces Authlogic with the latest Devise (4.3.0) which has wider adoption.
17
+ This change requires a database migration on the User model. Please note:
18
+ - Most User fields are renamed and can hence be rolled back. Existing Authlogic passwords will continue to work.
19
+ - Users will be forced logged out. Existing user sessions will not be kept and the fields `persistence_token, single_access_token, perishable_token` will be dropped from the database.
20
+ - Though the migration is generally safe **we recommend to make a backup of your database** before migrating.
21
+
22
+ #### Existing OAuth broken
23
+ The Devise change will break any OAuth login plugins which depend on Authlogic.
24
+ You can [configure OAuth for Devise using the guides here](https://github.com/plataformatec/devise/wiki/omniauth:-overview).
25
+
26
+ #### Login and user-related routes changed
27
+ The login URL routes have been changed to use the defaults of Devise.
28
+
29
+ #### User mailers changed
30
+ Mailers related to user password reset, etc. are changed to use the defaults of Devise.
31
+
32
+ #### PaperClip version updated from 5.2.1 to 6.0.0
33
+ PaperClip now only depends on `aws-sdk-s3` instead of `aws-sdk`. For more info see https://github.com/thoughtbot/paperclip/pull/2481.
34
+ Replace the Cocaine gem with Terrapin. https://github.com/thoughtbot/terrapin/ Apart from the namespace change, this is a drop in replacement.
35
+
36
+ #### Rails 5.2
37
+ The underlying framework is now rails 5.2.*
38
+
39
+ #### Ruby 2.4 deprecated
40
+ Ruby 2.4 has reached end of life and is no longer activity tested against.
41
+
42
+ #### Other changes
43
+ * #794 Fix defect with unpermitted params in advanced search
44
+ * 2bc6184779a26070496e6f4caefa0cc9ba555d7b Remove broken support for delete links on arrays.
45
+ * #851 upgrade paper_trail
46
+ * Security fixes CVE-2019-16109, CVE-2019-16676, CVE-2019-5477, CVE-2019-16892
47
+ * Dependency updates
48
+
35
49
 
36
50
  Sat Apr 21, 2018 (0.18.0)
37
51
  ---------------------------------------------------------------------
38
52
 
39
53
  ### Important changes
40
- #### Mininium ruby version
54
+
55
+ #### Minimum Ruby version
41
56
  #665 Support for Ruby 2.3 has been dropped, with test coverage for 2.4 and 2.5 enabled.
42
57
 
43
58
  #### Swap to FactoryBot
@@ -88,6 +103,7 @@ Sat Jan 20, 2018 (0.17.0)
88
103
  ---------------------------------------------------------------------
89
104
 
90
105
  ### Important changes
106
+
91
107
  #### Select2 for select boxes
92
108
  This release replaces [Chozen](https://harvesthq.github.io/chosen/) with [Select2](https://select2.org/) consistently across the app.
93
109
  This may break plugins which rely on Chozen. To fix any issues please