fat_free_crm 0.20.0 → 0.21.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 (286) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +170 -0
  3. data/README.md +3 -6
  4. data/app/assets/config/manifest.js +3 -0
  5. data/app/helpers/accounts_helper.rb +2 -0
  6. data/app/helpers/application_helper.rb +22 -3
  7. data/app/helpers/tasks_helper.rb +1 -2
  8. data/app/models/entities/account.rb +1 -1
  9. data/app/models/entities/campaign.rb +1 -1
  10. data/app/models/entities/contact.rb +1 -1
  11. data/app/models/entities/lead.rb +1 -1
  12. data/app/models/entities/opportunity.rb +1 -1
  13. data/app/models/polymorphic/avatar.rb +1 -30
  14. data/app/models/polymorphic/task.rb +2 -0
  15. data/app/views/home/index.xls.builder +1 -0
  16. data/app/views/shared/_address.html.haml +1 -1
  17. data/config/application.rb +13 -0
  18. data/config/environments/development.rb +3 -0
  19. data/config/puma.rb +2 -2
  20. data/config/storage.yml +34 -0
  21. data/db/migrate/20100928030617_drop_openid_tables.rb +2 -1
  22. data/db/migrate/20230526211831_create_active_storage_tables.active_storage.rb +51 -0
  23. data/db/migrate/20230526212613_convert_to_active_storage.rb +91 -0
  24. data/db/schema.rb +65 -35
  25. data/db/seeds/fields.rb +7 -21
  26. data/lib/development_tasks/license.rake +10 -10
  27. data/lib/fat_free_crm/errors.rb +2 -10
  28. data/lib/fat_free_crm/exceptions.rb +1 -0
  29. data/lib/fat_free_crm/fields.rb +4 -5
  30. data/lib/fat_free_crm/gem_dependencies.rb +0 -1
  31. data/lib/fat_free_crm/i18n.rb +1 -1
  32. data/lib/fat_free_crm/version.rb +2 -2
  33. metadata +16 -279
  34. data/.docker/nginx/sites-enabled/ffcrm.conf +0 -8
  35. data/.github/workflows/brakeman-analysis.yml +0 -46
  36. data/.github/workflows/rubocop-analysis.yml +0 -40
  37. data/.github/workflows/ruby.yml +0 -52
  38. data/.gitignore +0 -39
  39. data/.rubocop.yml +0 -73
  40. data/.rubocop_todo.yml +0 -286
  41. data/.teatro.yml +0 -3
  42. data/.travis.yml +0 -60
  43. data/CONTRIBUTORS.md +0 -135
  44. data/Capfile +0 -27
  45. data/Dockerfile +0 -51
  46. data/Gemfile +0 -106
  47. data/Gemfile.lock +0 -529
  48. data/Guardfile +0 -26
  49. data/Procfile +0 -1
  50. data/SECURITY.md +0 -11
  51. data/Vagrantfile +0 -92
  52. data/custom_plan.rb +0 -11
  53. data/docker-compose.yml +0 -27
  54. data/fat_free_crm.gemspec +0 -62
  55. data/lib/tasks/.gitkeep +0 -0
  56. data/lib/tasks/.gitkeep~master +0 -0
  57. data/script/rails +0 -8
  58. data/spec/controllers/admin/groups_controller_spec.rb +0 -11
  59. data/spec/controllers/admin/users_controller_spec.rb +0 -251
  60. data/spec/controllers/applications_controller_spec.rb +0 -43
  61. data/spec/controllers/comments_controller_spec.rb +0 -195
  62. data/spec/controllers/emails_controller_spec.rb +0 -37
  63. data/spec/controllers/entities/accounts_controller_spec.rb +0 -607
  64. data/spec/controllers/entities/campaigns_controller_spec.rb +0 -645
  65. data/spec/controllers/entities/contacts_controller_spec.rb +0 -705
  66. data/spec/controllers/entities/leads_controller_spec.rb +0 -1009
  67. data/spec/controllers/entities/opportunities_controller_spec.rb +0 -904
  68. data/spec/controllers/entities_controller_spec.rb +0 -47
  69. data/spec/controllers/home_controller_spec.rb +0 -235
  70. data/spec/controllers/lists_controller_spec.rb +0 -11
  71. data/spec/controllers/tasks_controller_spec.rb +0 -517
  72. data/spec/controllers/users_controller_spec.rb +0 -375
  73. data/spec/factories/account_factories.rb +0 -40
  74. data/spec/factories/campaign_factories.rb +0 -30
  75. data/spec/factories/contact_factories.rb +0 -45
  76. data/spec/factories/field_factories.rb +0 -40
  77. data/spec/factories/lead_factories.rb +0 -36
  78. data/spec/factories/list_factories.rb +0 -13
  79. data/spec/factories/opportunity_factories.rb +0 -39
  80. data/spec/factories/sequences.rb +0 -32
  81. data/spec/factories/setting_factories.rb +0 -15
  82. data/spec/factories/shared_factories.rb +0 -70
  83. data/spec/factories/subscription_factories.rb +0 -13
  84. data/spec/factories/tag_factories.rb +0 -12
  85. data/spec/factories/task_factories.rb +0 -29
  86. data/spec/factories/user_factories.rb +0 -66
  87. data/spec/features/acceptance_helper.rb +0 -11
  88. data/spec/features/accounts_spec.rb +0 -126
  89. data/spec/features/admin/groups_spec.rb +0 -31
  90. data/spec/features/admin/users_spec.rb +0 -40
  91. data/spec/features/campaigns_spec.rb +0 -104
  92. data/spec/features/contacts_spec.rb +0 -134
  93. data/spec/features/dashboard_spec.rb +0 -67
  94. data/spec/features/devise/sign_in_spec.rb +0 -58
  95. data/spec/features/devise/sign_up_spec.rb +0 -36
  96. data/spec/features/leads_spec.rb +0 -138
  97. data/spec/features/opportunities_overview_spec.rb +0 -88
  98. data/spec/features/opportunities_spec.rb +0 -132
  99. data/spec/features/support/autocomlete_helper.rb +0 -17
  100. data/spec/features/support/browser.rb +0 -28
  101. data/spec/features/support/headless.rb +0 -19
  102. data/spec/features/support/paths.rb +0 -48
  103. data/spec/features/support/selector_helpers.rb +0 -36
  104. data/spec/features/tasks_spec.rb +0 -94
  105. data/spec/fixtures/rails.png +0 -0
  106. data/spec/helpers/accounts_helper_spec.rb +0 -73
  107. data/spec/helpers/admin/field_groups_helper_spec.rb +0 -20
  108. data/spec/helpers/admin/plugins_helper_spec.rb +0 -11
  109. data/spec/helpers/admin/settings_helper_spec.rb +0 -11
  110. data/spec/helpers/admin/users_helper_spec.rb +0 -11
  111. data/spec/helpers/application_helper_spec.rb +0 -86
  112. data/spec/helpers/authentications_helper_spec.rb +0 -16
  113. data/spec/helpers/campaigns_helper_spec.rb +0 -16
  114. data/spec/helpers/comments_helper_spec.rb +0 -16
  115. data/spec/helpers/contacts_helper_spec.rb +0 -16
  116. data/spec/helpers/emails_helper_spec.rb +0 -11
  117. data/spec/helpers/fields_helper_spec.rb +0 -12
  118. data/spec/helpers/groups_helper_spec.rb +0 -21
  119. data/spec/helpers/home_helper_spec.rb +0 -16
  120. data/spec/helpers/leads_helper_spec.rb +0 -16
  121. data/spec/helpers/lists_helper_spec.rb +0 -21
  122. data/spec/helpers/opportunities_helper_spec.rb +0 -16
  123. data/spec/helpers/passwords_helper_spec.rb +0 -16
  124. data/spec/helpers/tasks_helper_spec.rb +0 -20
  125. data/spec/helpers/users_helper_spec.rb +0 -39
  126. data/spec/lib/comment_extensions_spec.rb +0 -42
  127. data/spec/lib/core_ext/string_spec.rb +0 -23
  128. data/spec/lib/errors_spec.rb +0 -32
  129. data/spec/lib/fields_spec.rb +0 -101
  130. data/spec/lib/mail_processor/base_spec.rb +0 -169
  131. data/spec/lib/mail_processor/comment_replies_spec.rb +0 -70
  132. data/spec/lib/mail_processor/dropbox_spec.rb +0 -306
  133. data/spec/lib/mail_processor/sample_emails/dropbox.rb +0 -173
  134. data/spec/lib/permissions_spec.rb +0 -155
  135. data/spec/lib/secret_token_generator_spec.rb +0 -69
  136. data/spec/lib/view_factory_spec.rb +0 -69
  137. data/spec/mailers/devise_mailer_spec.rb +0 -35
  138. data/spec/mailers/subscription_mailer_spec.rb +0 -48
  139. data/spec/mailers/user_mailer_spec.rb +0 -115
  140. data/spec/models/entities/account_contact_spec.rb +0 -34
  141. data/spec/models/entities/account_opportunity_spec.rb +0 -34
  142. data/spec/models/entities/account_spec.rb +0 -206
  143. data/spec/models/entities/campaign_spec.rb +0 -131
  144. data/spec/models/entities/contact_opportunity_spec.rb +0 -34
  145. data/spec/models/entities/contact_spec.rb +0 -314
  146. data/spec/models/entities/lead_spec.rb +0 -102
  147. data/spec/models/entities/opportunity_spec.rb +0 -299
  148. data/spec/models/fields/custom_field_date_pair_spec.rb +0 -92
  149. data/spec/models/fields/custom_field_pair_spec.rb +0 -76
  150. data/spec/models/fields/custom_field_spec.rb +0 -129
  151. data/spec/models/fields/field_group_spec.rb +0 -29
  152. data/spec/models/fields/field_spec.rb +0 -69
  153. data/spec/models/list_spec.rb +0 -19
  154. data/spec/models/observers/entity_observer_spec.rb +0 -74
  155. data/spec/models/polymorphic/address_spec.rb +0 -34
  156. data/spec/models/polymorphic/avatar_spec.rb +0 -46
  157. data/spec/models/polymorphic/comment_spec.rb +0 -45
  158. data/spec/models/polymorphic/email_spec.rb +0 -53
  159. data/spec/models/polymorphic/task_spec.rb +0 -395
  160. data/spec/models/polymorphic/version_spec.rb +0 -241
  161. data/spec/models/setting_spec.rb +0 -77
  162. data/spec/models/users/abilities/user_ability_spec.rb +0 -70
  163. data/spec/models/users/group_spec.rb +0 -11
  164. data/spec/models/users/permission_spec.rb +0 -58
  165. data/spec/models/users/preference_spec.rb +0 -71
  166. data/spec/models/users/user_spec.rb +0 -238
  167. data/spec/routing/accounts_routing_spec.rb +0 -60
  168. data/spec/routing/admin/users_routing_spec.rb +0 -40
  169. data/spec/routing/campaigns_routing_spec.rb +0 -64
  170. data/spec/routing/comments_routing_spec.rb +0 -32
  171. data/spec/routing/contacts_routing_spec.rb +0 -60
  172. data/spec/routing/emails_routing_spec.rb +0 -40
  173. data/spec/routing/leads_routing_spec.rb +0 -88
  174. data/spec/routing/opportunities_routing_spec.rb +0 -64
  175. data/spec/routing/tasks_routing_spec.rb +0 -68
  176. data/spec/routing/users_routing_spec.rb +0 -106
  177. data/spec/shared/controllers.rb +0 -99
  178. data/spec/shared/models.rb +0 -141
  179. data/spec/spec_helper.rb +0 -117
  180. data/spec/support/assert_select.rb +0 -167
  181. data/spec/support/devise_helpers.rb +0 -28
  182. data/spec/support/feature_helpers.rb +0 -32
  183. data/spec/support/macros.rb +0 -49
  184. data/spec/support/mail_processor_mocks.rb +0 -37
  185. data/spec/support/uploaded_file.rb +0 -10
  186. data/spec/views/accounts/_edit.haml_spec.rb +0 -43
  187. data/spec/views/accounts/_new.haml_spec.rb +0 -42
  188. data/spec/views/accounts/create.js.haml_spec.rb +0 -52
  189. data/spec/views/accounts/destroy.js.haml_spec.rb +0 -34
  190. data/spec/views/accounts/edit.js.haml_spec.rb +0 -66
  191. data/spec/views/accounts/index.haml_spec.rb +0 -43
  192. data/spec/views/accounts/index.js.haml_spec.rb +0 -34
  193. data/spec/views/accounts/new.js.haml_spec.rb +0 -44
  194. data/spec/views/accounts/show.haml_spec.rb +0 -38
  195. data/spec/views/accounts/update.js.haml_spec.rb +0 -93
  196. data/spec/views/admin/field_groups/create.js.haml_spec.rb +0 -30
  197. data/spec/views/admin/field_groups/destroy.js.haml_spec.rb +0 -31
  198. data/spec/views/admin/field_groups/edit.js.haml_spec.rb +0 -24
  199. data/spec/views/admin/field_groups/new.js.haml_spec.rb +0 -25
  200. data/spec/views/admin/field_groups/update.js.haml_spec.rb +0 -29
  201. data/spec/views/admin/users/_create.haml_spec.rb +0 -23
  202. data/spec/views/admin/users/create.js.haml_spec.rb +0 -41
  203. data/spec/views/admin/users/destroy.js.haml_spec.rb +0 -47
  204. data/spec/views/admin/users/edit.js.haml_spec.rb +0 -44
  205. data/spec/views/admin/users/index.haml_spec.rb +0 -22
  206. data/spec/views/admin/users/index.js.haml_spec.rb +0 -26
  207. data/spec/views/admin/users/new.js.haml_spec.rb +0 -34
  208. data/spec/views/admin/users/reactivate.js.haml_spec.rb +0 -22
  209. data/spec/views/admin/users/show.haml_spec.rb +0 -18
  210. data/spec/views/admin/users/suspend.js.haml_spec.rb +0 -22
  211. data/spec/views/admin/users/update.js.haml_spec.rb +0 -37
  212. data/spec/views/application/auto_complete.haml_spec.rb +0 -48
  213. data/spec/views/campaigns/_edit.haml_spec.rb +0 -44
  214. data/spec/views/campaigns/_new.haml_spec.rb +0 -41
  215. data/spec/views/campaigns/create.js.haml_spec.rb +0 -49
  216. data/spec/views/campaigns/destroy.js.haml_spec.rb +0 -31
  217. data/spec/views/campaigns/edit.js.haml_spec.rb +0 -66
  218. data/spec/views/campaigns/index.haml_spec.rb +0 -37
  219. data/spec/views/campaigns/index.js.haml_spec.rb +0 -34
  220. data/spec/views/campaigns/new.js.haml_spec.rb +0 -50
  221. data/spec/views/campaigns/show.haml_spec.rb +0 -38
  222. data/spec/views/campaigns/update.js.haml_spec.rb +0 -78
  223. data/spec/views/comments/edit.js.haml_spec.rb +0 -30
  224. data/spec/views/contacts/_edit.haml_spec.rb +0 -73
  225. data/spec/views/contacts/_new.haml_spec.rb +0 -52
  226. data/spec/views/contacts/create.js.haml_spec.rb +0 -65
  227. data/spec/views/contacts/destroy.js.haml_spec.rb +0 -45
  228. data/spec/views/contacts/edit.js.haml_spec.rb +0 -74
  229. data/spec/views/contacts/index.haml_spec.rb +0 -37
  230. data/spec/views/contacts/index.js.html_spec.rb +0 -34
  231. data/spec/views/contacts/new.js.haml_spec.rb +0 -47
  232. data/spec/views/contacts/show.haml_spec.rb +0 -35
  233. data/spec/views/contacts/update.js.haml_spec.rb +0 -128
  234. data/spec/views/home/index.haml_spec.rb +0 -36
  235. data/spec/views/home/index.js.haml_spec.rb +0 -33
  236. data/spec/views/home/options.js.haml_spec.rb +0 -53
  237. data/spec/views/leads/_convert.haml_spec.rb +0 -30
  238. data/spec/views/leads/_edit.haml_spec.rb +0 -47
  239. data/spec/views/leads/_new.haml_spec.rb +0 -45
  240. data/spec/views/leads/_sidebar_show.haml_spec.rb +0 -31
  241. data/spec/views/leads/convert.js.haml_spec.rb +0 -79
  242. data/spec/views/leads/create.js.haml_spec.rb +0 -67
  243. data/spec/views/leads/destroy.js.haml_spec.rb +0 -47
  244. data/spec/views/leads/edit.js.haml_spec.rb +0 -76
  245. data/spec/views/leads/index.haml_spec.rb +0 -37
  246. data/spec/views/leads/index.js.haml_spec.rb +0 -34
  247. data/spec/views/leads/new.js.haml_spec.rb +0 -47
  248. data/spec/views/leads/promote.js.haml_spec.rb +0 -135
  249. data/spec/views/leads/reject.js.haml_spec.rb +0 -45
  250. data/spec/views/leads/show.haml_spec.rb +0 -32
  251. data/spec/views/leads/update.js.haml_spec.rb +0 -118
  252. data/spec/views/opportunities/_edit.haml_spec.rb +0 -70
  253. data/spec/views/opportunities/_new.haml_spec.rb +0 -51
  254. data/spec/views/opportunities/create.js.haml_spec.rb +0 -86
  255. data/spec/views/opportunities/destroy.js.haml_spec.rb +0 -64
  256. data/spec/views/opportunities/edit.js.haml_spec.rb +0 -75
  257. data/spec/views/opportunities/index.haml_spec.rb +0 -38
  258. data/spec/views/opportunities/index.js.haml_spec.rb +0 -35
  259. data/spec/views/opportunities/new.js.haml_spec.rb +0 -54
  260. data/spec/views/opportunities/show.haml_spec.rb +0 -35
  261. data/spec/views/opportunities/update.js.haml_spec.rb +0 -143
  262. data/spec/views/tasks/_edit.haml_spec.rb +0 -50
  263. data/spec/views/tasks/complete.js.haml_spec.rb +0 -67
  264. data/spec/views/tasks/create.js.haml_spec.rb +0 -119
  265. data/spec/views/tasks/destroy.js.haml_spec.rb +0 -57
  266. data/spec/views/tasks/edit.js.haml_spec.rb +0 -76
  267. data/spec/views/tasks/index.haml_spec.rb +0 -46
  268. data/spec/views/tasks/new.js.haml_spec.rb +0 -49
  269. data/spec/views/tasks/uncomplete.js.haml_spec.rb +0 -45
  270. data/spec/views/tasks/update.js.haml_spec.rb +0 -140
  271. data/spec/views/users/avatar.js.haml_spec.rb +0 -35
  272. data/spec/views/users/change_password.js.haml_spec.rb +0 -51
  273. data/spec/views/users/edit.js.haml_spec.rb +0 -35
  274. data/spec/views/users/password.js.haml_spec.rb +0 -36
  275. data/spec/views/users/update.js.haml_spec.rb +0 -46
  276. data/spec/views/users/upload_avatar.js.haml_spec.rb +0 -45
  277. data/vendor/gems/globby-0.1.2/LICENSE.txt +0 -20
  278. data/vendor/gems/globby-0.1.2/README.md +0 -65
  279. data/vendor/gems/globby-0.1.2/Rakefile +0 -9
  280. data/vendor/gems/globby-0.1.2/lib/globby/glob.rb +0 -90
  281. data/vendor/gems/globby-0.1.2/lib/globby/globject.rb +0 -18
  282. data/vendor/gems/globby-0.1.2/lib/globby/result.rb +0 -20
  283. data/vendor/gems/globby-0.1.2/lib/globby.rb +0 -47
  284. data/vendor/gems/globby-0.1.2/spec/gitignore_spec.rb +0 -109
  285. data/vendor/gems/globby-0.1.2/spec/globby_spec.rb +0 -93
  286. data/zeus.json +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4b6418c618ec04984f8f8261e3121e915b57ce2b55c5787d3393a8acb47adb9
4
- data.tar.gz: 362ffdc71d5d01450d0475758f794972ec77dc79755f92196f4f72917e789798
3
+ metadata.gz: 7da1fdcaaf08df0256e5075214129f236ce36d156c24cd8ae4a282f3430b1ecb
4
+ data.tar.gz: 255b0d61c8eb6d84bb94de174d075531c92c6b8dfb32826c6e304beafe578dc5
5
5
  SHA512:
6
- metadata.gz: 3a467bdd68e941d5c426a69fd07260ec11631163a8306c2d1b524fdd2c0e0f7f2d48ee78e2ad89e773010e2b0b17f386f90fe67f9388330bb07e53aba02344d0
7
- data.tar.gz: 21943a700b302f3eb2f6544ebcba0ae6e70e50ecec337f94531f08ae16522c6d6d3cd49bf315f83963b597997ed7de38c11c17ace76495e346fed0b6a3f3f8a4
6
+ metadata.gz: 95f133e5f454aad954dbb23ccb2da2fce1aa8dd5d6c9d9461b266b91f2339c4fed7db6b23ecb8199eab96473b183f5b492e55e60e0a60fcad574870e0f730ae2
7
+ data.tar.gz: f83fa46bbe3312262e9845690c8f40ce7625a4b6f67ed018a1e39fab3b10af381fe0a305b7a585f52abdfd5638ba7526be704571e0096b94544296a3ed917f77
data/CHANGELOG.md CHANGED
@@ -4,6 +4,168 @@ 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
+ Thu Aug 10, 2023 (0.21.0)
8
+ ======
9
+
10
+ #1114 Migrate from Paperclip to Active Storage.
11
+ Upgrade to Ruby 3.1
12
+
13
+ ## What's Changed
14
+ * Bump nokogiri by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/956
15
+ * Bump rails by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/957
16
+ * Bump puma by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/959
17
+ * Rubocop by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/960
18
+ * Rails 6.1 by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/954
19
+ * Bump by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/963
20
+ * Bump by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/964
21
+ * Remove globby by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/965
22
+ * Update Dockerfile Ruby Version by @doconnor-clintel in https://github.com/fatfreecrm/fat_free_crm/pull/962
23
+ * Bump rb-fsevent from 0.11.0 to 0.11.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/976
24
+ * Bump font-awesome-rails from 4.7.0.7 to 4.7.0.8 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/974
25
+ * Bump webdrivers from 4.6.1 to 4.7.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/973
26
+ * Bump capistrano from 3.16.0 to 3.17.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/969
27
+ * Bump devise-i18n from 1.10.0 to 1.10.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/968
28
+ * Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/966
29
+ * Bump ffaker from 2.19.0 to 2.21.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/970
30
+ * Bump acts-as-taggable-on from 8.1.0 to 9.0.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/972
31
+ * Bump rainbow from 3.0.0 to 3.1.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/967
32
+ * Bump brakeman from 5.1.1 to 5.2.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/979
33
+ * Bump ransack from 2.4.2 to 2.6.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/977
34
+ * Bump capybara from 3.35.3 to 3.36.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/980
35
+ * Bump rails-i18n from 6.0.0 to 7.0.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/978
36
+ * Bump rspec-rails from 5.0.2 to 5.1.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/981
37
+ * Bump capistrano-rails from 1.6.1 to 1.6.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/983
38
+ * Bump github/codeql-action from 1 to 2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/986
39
+ * Bump rubocop from 1.22.1 to 1.28.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/989
40
+ * Bump timecop from 0.9.4 to 0.9.5 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/984
41
+ * Bump bootsnap from 1.9.1 to 1.11.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/988
42
+ * Bump devise from 4.8.0 to 4.8.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/987
43
+ * Bump selenium-webdriver from 3.142.7 to 4.1.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/982
44
+ * Bump rails by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/992
45
+ * Bump bootsnap from 1.11.1 to 1.12.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/995
46
+ * Bump capistrano-bundler from 2.0.1 to 2.1.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/994
47
+ * Bump rack from 2.2.3 to 2.2.3.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/996
48
+ * Bump sqlite3 from 1.4.2 to 1.4.4 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/998
49
+ * Bump cancancan from 3.3.0 to 3.4.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1000
50
+ * Bump rails-html-sanitizer from 1.4.2 to 1.4.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1001
51
+ * Bump capistrano from 3.17.0 to 3.17.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1004
52
+ * Bump rb-fsevent from 0.11.1 to 0.11.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1006
53
+ * Bump puma from 5.6.4 to 5.6.5 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1005
54
+ * Bump mini_racer by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/1014
55
+ * Swap to sassc-rails by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/1013
56
+ * Bump country_select from 6.0.0 to 7.0.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/985
57
+ * Improve actions by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/1015
58
+ * Fixed issue with ActiveStorage missing storage.yml in production mode. by @steveyken in https://github.com/fatfreecrm/fat_free_crm/pull/1019
59
+ * Bump nokogiri from 1.13.8 to 1.13.10 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1020
60
+ * Bump brakeman from 5.2.2 to 5.4.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1022
61
+ * Bump bootsnap from 1.12.0 to 1.15.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1029
62
+ * Bump webdrivers from 4.7.0 to 5.2.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1021
63
+ * Bump rails-i18n from 7.0.3 to 7.0.6 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1028
64
+ * Bump rubocop from 1.28.2 to 1.40.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1025
65
+ * Bump timecop from 0.9.5 to 0.9.6 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1034
66
+ * Bump capybara from 3.36.0 to 3.38.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1033
67
+ * Bump premailer from 1.15.0 to 1.18.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1023
68
+ * Bump rspec-rails from 5.1.2 to 6.0.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1026
69
+ * Bump selenium-webdriver from 4.1.0 to 4.7.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1032
70
+ * Bump pg from 1.2.3 to 1.4.5 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1031
71
+ * Bump rails-html-sanitizer from 1.4.3 to 1.4.4 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1036
72
+ * Bump loofah from 2.19.0 to 2.19.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1035
73
+ * Bump rubocop from 1.40.0 to 1.41.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1038
74
+ * Bump puma from 5.6.5 to 6.0.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1037
75
+ * Bump rubocop from 1.41.0 to 1.42.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1042
76
+ * Bump puma from 6.0.1 to 6.0.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1041
77
+ * Bump country_select from 8.0.0 to 8.0.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1043
78
+ * Bump rack from 2.2.4 to 2.2.6.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1046
79
+ * Bump rubocop from 1.42.0 to 1.43.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1044
80
+ * Bump globalid from 1.0.0 to 1.0.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1047
81
+ * Bump nokogiri from 1.13.10 to 1.14.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1045
82
+ * Bump selenium-webdriver from 4.7.1 to 4.8.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1049
83
+ * Bump rubocop from 1.43.0 to 1.44.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1050
84
+ * Bump premailer from 1.18.0 to 1.19.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1051
85
+ * Bump rubocop from 1.44.0 to 1.44.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1053
86
+ * Bump bootsnap from 1.15.0 to 1.16.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1052
87
+ * Bump simple_form from 5.1.0 to 5.2.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1055
88
+ * Bump nokogiri from 1.14.0 to 1.14.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1056
89
+ * Bump acts_as_list from 1.0.4 to 1.1.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1057
90
+ * Bump responders from 3.0.1 to 3.1.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1058
91
+ * Bump rubocop from 1.44.1 to 1.45.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1060
92
+ * Bump puma from 6.0.2 to 6.1.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1061
93
+ * Bump nokogiri from 1.14.1 to 1.14.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1062
94
+ * Bump devise-i18n from 1.10.2 to 1.10.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1063
95
+ * Bump devise from 4.8.1 to 4.9.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1066
96
+ * Bump brakeman from 5.4.0 to 5.4.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1069
97
+ * Bump capistrano from 3.17.1 to 3.17.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1068
98
+ * Bump devise-i18n from 1.10.3 to 1.11.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1067
99
+ * Bump pg from 1.4.5 to 1.4.6 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1071
100
+ * Bump rubocop from 1.45.1 to 1.47.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1073
101
+ * Bump puma from 6.1.0 to 6.1.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1072
102
+ * Bump rack from 2.2.6.2 to 2.2.6.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1076
103
+ * Bump cancancan from 3.4.0 to 3.5.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1074
104
+ * Bump rubocop from 1.47.0 to 1.48.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1075
105
+ * Bump premailer from 1.19.0 to 1.20.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1077
106
+ * Bump selenium-webdriver from 4.8.0 to 4.8.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1065
107
+ * Bump database_cleaner from 2.0.1 to 2.0.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1078
108
+ * Bump rubocop from 1.48.0 to 1.48.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1079
109
+ * Bump rack from 2.2.6.3 to 2.2.6.4 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1080
110
+ * Bump premailer from 1.20.0 to 1.21.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1081
111
+ * Bump selenium-webdriver from 4.8.1 to 4.8.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1082
112
+ * Bump puma from 6.1.1 to 6.2.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1086
113
+ * Bump devise from 4.9.0 to 4.9.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1090
114
+ * Bump capybara from 3.38.0 to 3.39.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1087
115
+ * Bump rubocop from 1.48.1 to 1.49.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1089
116
+ * Bump selenium-webdriver from 4.8.3 to 4.8.6 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1085
117
+ * Bump rubocop from 1.49.0 to 1.50.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1092
118
+ * Bump selenium-webdriver from 4.8.6 to 4.9.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1097
119
+ * Bump puma from 6.2.1 to 6.2.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1096
120
+ * Bump nokogiri from 1.14.2 to 1.14.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1093
121
+ * Bump rubocop from 1.50.0 to 1.50.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1095
122
+ * Bump pg from 1.4.6 to 1.5.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1099
123
+ * Bump pg from 1.5.2 to 1.5.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1100
124
+ * Bump rspec-rails from 6.0.1 to 6.0.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1101
125
+ * Bump thor from 1.2.1 to 1.2.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1104
126
+ * Bump nokogiri from 1.14.3 to 1.14.4 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1103
127
+ * Bump rubocop from 1.50.2 to 1.51.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1107
128
+ * Bump rails-i18n from 7.0.6 to 7.0.7 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1106
129
+ * Bump capybara from 3.39.0 to 3.39.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1105
130
+ * Bump nokogiri from 1.14.4 to 1.15.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1108
131
+ * Bump nokogiri from 1.15.0 to 1.15.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1110
132
+ * Bump capistrano from 3.17.2 to 3.17.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1111
133
+ * Bump nokogiri from 1.15.1 to 1.15.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1112
134
+ * Bump mini_racer from 0.6.3 to 0.6.4 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1113
135
+ * Migrate from Paperclip (EOL) to Active Storage by @johnbumgardner in https://github.com/fatfreecrm/fat_free_crm/pull/1114
136
+ * Bump puma from 6.2.2 to 6.3.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1117
137
+ * Bump will_paginate from 3.3.1 to 4.0.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1116
138
+ * Bump rspec-rails from 6.0.2 to 6.0.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1118
139
+ * Bump rubocop from 1.51.0 to 1.52.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1119
140
+ * Bump capybara from 3.39.1 to 3.39.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1124
141
+ * Fixes #1120 error raised when running rake db:create db:migrate the first time by @steveyken in https://github.com/fatfreecrm/fat_free_crm/pull/1121
142
+ * Bump rubocop from 1.52.0 to 1.52.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1125
143
+ * Bump jquery-rails from 4.5.1 to 4.6.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1127
144
+ * Bump rubocop from 1.52.1 to 1.53.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1128
145
+ * Bump nokogiri from 1.15.2 to 1.15.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1132
146
+ * Bump capistrano-rails from 1.6.2 to 1.6.3 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1131
147
+ * Bump rubocop from 1.53.1 to 1.54.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1130
148
+ * Bump rails by @CloCkWeRX in https://github.com/fatfreecrm/fat_free_crm/pull/1059
149
+ * Bump rubocop from 1.54.1 to 1.54.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1133
150
+ * Bump rubocop from 1.54.2 to 1.55.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1136
151
+ * Bump country_select from 8.0.1 to 8.0.2 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1142
152
+ * Bump webdrivers from 5.2.0 to 5.3.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1141
153
+ * Bump rubocop from 1.55.0 to 1.55.1 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1140
154
+ * Support for hash arguments in i18n. Fixes #1102 by @ferrisoxide in https://github.com/fatfreecrm/fat_free_crm/pull/1144
155
+ * Bump rubocop from 1.55.1 to 1.56.0 by @dependabot in https://github.com/fatfreecrm/fat_free_crm/pull/1145
156
+ * App and specs working under Ruby 3.1.4 #1138 by @ferrisoxide in https://github.com/fatfreecrm/fat_free_crm/pull/1139
157
+
158
+ ## New Contributors
159
+ * @doconnor-clintel made their first contribution in https://github.com/fatfreecrm/fat_free_crm/pull/962
160
+ * @dependabot made their first contribution in https://github.com/fatfreecrm/fat_free_crm/pull/976
161
+ * @ferrisoxide made their first contribution in https://github.com/fatfreecrm/fat_free_crm/pull/1144
162
+
163
+ **Full Changelog**: https://github.com/fatfreecrm/fat_free_crm/compare/v0.20.0...v0.21.0
164
+
165
+ Fri Oct 07, 2022 (0.20.1)
166
+ ======
167
+ CVE-2022-39281
168
+
7
169
  Mon Oct 04, 2021 (0.20.0)
8
170
  ======
9
171
  #905 Swap from Marshal.load. Be sure to run `bundle exec rake ffcrm:preference_update` to migrate your users from old to new format
@@ -16,6 +178,14 @@ Drop ruby 2.5 support
16
178
 
17
179
  Upgrade to rails 6, papertail 12, devise 4.8
18
180
 
181
+ A variety of minor bug fixes and security updates
182
+
183
+ #946
184
+ #947
185
+ #950
186
+ #951
187
+ #952
188
+
19
189
  Wed May 09, 2021 (0.19.2)
20
190
  ======
21
191
  CVE-2021-22885
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
- # Fat Free CRM [![TravisCI][travis-img-url]][travis-ci-url] [![Code Climate][codeclimate-img-url]][codeclimate-url] [![Discord][discord-img-url]][discord-url]
1
+ # Fat Free CRM [![Code Climate][codeclimate-img-url]][codeclimate-url] [![Discord][discord-img-url]][discord-url]
2
2
 
3
- [travis-img-url]: https://secure.travis-ci.org/fatfreecrm/fat_free_crm.svg?branch=master
4
- [travis-ci-url]: https://travis-ci.org/fatfreecrm/fat_free_crm
5
3
  [codeclimate-img-url]: https://codeclimate.com/github/fatfreecrm/fat_free_crm.svg
6
4
  [codeclimate-url]: https://codeclimate.com/github/fatfreecrm/fat_free_crm
7
5
  [discord-img-url]: https://img.shields.io/badge/chat-on%20discord-7289da.svg?sanitize=true
@@ -54,7 +52,7 @@ Visit our website at http://www.fatfreecrm.com/
54
52
 
55
53
  ## System Requirements
56
54
 
57
- * Ruby 2.6+ recommended
55
+ * Ruby 3.1+ recommended
58
56
  * MySQL v4.1.1 or later (v5+ is recommended), SQLite v3.4 or later, or Postgres 8.4.8 or later.
59
57
  * ImageMagick (optional, only needed if you would like to use avatars)
60
58
 
@@ -94,7 +92,6 @@ Please read the [Changelog](https://github.com/fatfreecrm/fat_free_crm/blob/mast
94
92
  |-----------------------------------:|:--------------------------|
95
93
  | **Home Page**: | http://www.fatfreecrm.com |
96
94
  | **Guides**: | http://guides.fatfreecrm.com |
97
- | **Online Demo**: | http://demo.fatfreecrm.com |
98
95
  | **Github Project Page**: | http://github.com/fatfreecrm/fat_free_crm |
99
96
  | **Feature Requests and Bugs**: | http://support.fatfreecrm.com/ |
100
97
  | **RDoc API**: | http://api.fatfreecrm.com |
@@ -111,7 +108,7 @@ Fat Free CRM is released under the MIT license and is freely available for you t
111
108
 
112
109
  Specific features that are not 'Fat Free' in nature, can be added by creating Rails Engines. See the [wiki](http://github.com/fatfreecrm/fat_free_crm/wiki) for information on how to do this.
113
110
 
114
- Tests can easily be run by typing 'rake' but please note that they do take a while to run! Alternatively, you can see the test build status over at our [travis page](http://travis-ci.org/fatfreecrm/fat_free_crm)
111
+ Tests can easily be run by typing 'rake' but please note that they do take a while to run!
115
112
 
116
113
 
117
114
  ## Main contributors
@@ -0,0 +1,3 @@
1
+ //= link_tree ../images
2
+ //= link_directory ../javascripts .js
3
+ //= link_directory ../stylesheets .css
@@ -109,11 +109,13 @@ module AccountsHelper
109
109
  # - a helper that abstracts the logic to the backend
110
110
  def display_value(value)
111
111
  return "N/A" if value.zero?
112
+
112
113
  number_to_currency(value, precision: 0)
113
114
  end
114
115
 
115
116
  def display_assigned(account)
116
117
  return truncate(account.assignee.full_name, length: 16) if account.assigned_to
118
+
117
119
  nil
118
120
  end
119
121
  end
@@ -300,18 +300,37 @@ module ApplicationHelper
300
300
  raw "$.get('#{timezone_path}', {offset: (new Date()).getTimezoneOffset()});" unless session[:timezone_offset]
301
301
  end
302
302
 
303
+ STYLES = { large: "75x75#", medium: "50x50#", small: "25x25#", thumb: "16x16#" }.freeze
304
+
305
+ # Convert STYLE symbols to 'w x h' format for Gravatar and Rails
306
+ # e.g. size_from_style(:size => :large) -> '75x75'
307
+ # Allow options to contain :width and :height override keys
308
+ #----------------------------------------------------------------------------
309
+ def size_from_style!(options)
310
+ if options[:width] && options[:height]
311
+ options[:size] = %i[width height].map { |d| options[d] }.join("x")
312
+ options.delete(:width)
313
+ options.delete(:height)
314
+ elsif STYLES.keys.include?(options[:size])
315
+ options[:size] = STYLES[options[:size]].sub(/\#\z/, '')
316
+ end
317
+ options
318
+ end
319
+
303
320
  # Entities can have associated avatars or gravatars. Only calls Gravatar
304
321
  # in production env. Gravatar won't serve default images if they are not
305
322
  # publically available: https://en.gravatar.com/site/implement/images
306
323
  #----------------------------------------------------------------------------
307
324
  def avatar_for(model, args = {})
308
325
  args = { class: 'gravatar', size: :large }.merge(args)
326
+ args = size_from_style!(args)
309
327
  if model.respond_to?(:avatar) && model.avatar.present?
310
- image_tag(model.avatar.image.url(args.delete(:size)), args)
328
+ size = args[:size].split('x').map(&:to_i) # convert '75x75' into [75, 75]
329
+
330
+ image_tag model.avatar.image.variant(resize_to_limit: size)
311
331
  else
312
- args = Avatar.size_from_style!(args) # convert size format :large => '75x75'
313
332
  gravatar_image_tag(model.email, args)
314
- end
333
+ end
315
334
  end
316
335
 
317
336
  # Returns default permissions intro.
@@ -96,8 +96,7 @@ module TasksHelper
96
96
  def replace_content(task, bucket = nil)
97
97
  partial = task.assigned_to && task.assigned_to != current_user.id ? "assigned" : "pending"
98
98
  html = render(partial: "tasks/#{partial}", collection: [task], locals: { bucket: bucket })
99
- text = "$('##{dom_id(task)}').html('#{j html}');\n".html_safe
100
- text
99
+ "$('##{dom_id(task)}').html('#{j html}');\n".html_safe
101
100
  end
102
101
 
103
102
  #----------------------------------------------------------------------------
@@ -41,7 +41,7 @@ class Account < ActiveRecord::Base
41
41
  has_many :addresses, dependent: :destroy, as: :addressable, class_name: "Address" # advanced search uses this
42
42
  has_many :emails, as: :mediator
43
43
 
44
- serialize :subscribed_users, Set
44
+ serialize :subscribed_users, Array
45
45
 
46
46
  accepts_nested_attributes_for :billing_address, allow_destroy: true, reject_if: proc { |attributes| Address.reject_address(attributes) }
47
47
  accepts_nested_attributes_for :shipping_address, allow_destroy: true, reject_if: proc { |attributes| Address.reject_address(attributes) }
@@ -39,7 +39,7 @@ class Campaign < ActiveRecord::Base
39
39
  has_many :opportunities, -> { order "id DESC" }, dependent: :destroy
40
40
  has_many :emails, as: :mediator
41
41
 
42
- serialize :subscribed_users, Set
42
+ serialize :subscribed_users, Array
43
43
 
44
44
  scope :state, lambda { |filters|
45
45
  where('status IN (?)' + (filters.delete('other') ? ' OR status IS NULL' : ''), filters)
@@ -57,7 +57,7 @@ class Contact < ActiveRecord::Base
57
57
  has_ransackable_associations %w[account opportunities tags activities emails addresses comments tasks]
58
58
  ransack_can_autocomplete
59
59
 
60
- serialize :subscribed_users, Set
60
+ serialize :subscribed_users, Array
61
61
 
62
62
  accepts_nested_attributes_for :business_address, allow_destroy: true, reject_if: proc { |attributes| Address.reject_address(attributes) }
63
63
 
@@ -48,7 +48,7 @@ class Lead < ActiveRecord::Base
48
48
  has_many :addresses, dependent: :destroy, as: :addressable, class_name: "Address" # advanced search uses this
49
49
  has_many :emails, as: :mediator
50
50
 
51
- serialize :subscribed_users, Set
51
+ serialize :subscribed_users, Array
52
52
 
53
53
  accepts_nested_attributes_for :business_address, allow_destroy: true, reject_if: proc { |attributes| Address.reject_address(attributes) }
54
54
 
@@ -38,7 +38,7 @@ class Opportunity < ActiveRecord::Base
38
38
  has_many :tasks, as: :asset, dependent: :destroy # , :order => 'created_at DESC'
39
39
  has_many :emails, as: :mediator
40
40
 
41
- serialize :subscribed_users, Set
41
+ serialize :subscribed_users, Array
42
42
 
43
43
  scope :state, lambda { |filters|
44
44
  where('stage IN (?)' + (filters.delete('other') ? ' OR stage IS NULL' : ''), filters)
@@ -21,39 +21,10 @@
21
21
  #
22
22
 
23
23
  class Avatar < ActiveRecord::Base
24
- STYLES = { large: "75x75#", medium: "50x50#", small: "25x25#", thumb: "16x16#" }.freeze
25
-
26
24
  belongs_to :user
27
25
  belongs_to :entity, polymorphic: true
28
26
 
29
- # We want to store avatars in separate directories based on entity type
30
- # (i.e. /avatar/User/, /avatars/Lead/, etc.), so we are adding :entity_type
31
- # interpolation to the Paperclip::Interpolations module. Also, Paperclip
32
- # doesn't seem to care preserving styles hash so we must use STYLES.dup.
33
- #----------------------------------------------------------------------------
34
- Paperclip::Interpolations.module_eval do
35
- def entity_type(attachment, _style_name = nil)
36
- attachment.instance.entity_type
37
- end
38
- end
39
- has_attached_file :image, styles: STYLES.dup, url: "/avatars/:entity_type/:id/:style_:filename", default_url: "/assets/avatar.jpg"
40
- validates_attachment :image, presence: true,
41
- content_type: { content_type: ['image/jpeg', 'image/jpg', 'image/png', 'image/gif'] }
42
-
43
- # Convert STYLE symbols to 'w x h' format for Gravatar and Rails
44
- # e.g. Avatar.size_from_style(:size => :large) -> '75x75'
45
- # Allow options to contain :width and :height override keys
46
- #----------------------------------------------------------------------------
47
- def self.size_from_style!(options)
48
- if options[:width] && options[:height]
49
- options[:size] = %i[width height].map { |d| options[d] }.join("x")
50
- options.delete(:width)
51
- options.delete(:height)
52
- elsif Avatar::STYLES.keys.include?(options[:size])
53
- options[:size] = Avatar::STYLES[options[:size]].sub(/\#\z/, '')
54
- end
55
- options
56
- end
27
+ has_one_attached :image
57
28
 
58
29
  ActiveSupport.run_load_hooks(:fat_free_crm_avatar, self)
59
30
  end
@@ -31,6 +31,7 @@ class Task < ActiveRecord::Base
31
31
  include ActiveModel::Serializers::Xml
32
32
 
33
33
  attr_accessor :calendar
34
+
34
35
  ALLOWED_VIEWS = %w[pending assigned completed]
35
36
 
36
37
  belongs_to :user
@@ -188,6 +189,7 @@ class Task < ActiveRecord::Base
188
189
  #----------------------------------------------------------------------------
189
190
  def self.bucket_empty?(bucket, user, view = "pending")
190
191
  return false if bucket.blank? || !ALLOWED_VIEWS.include?(view)
192
+ return false unless Setting.task_bucket.map(&:to_s).include?(bucket.to_s)
191
193
 
192
194
  if view == "assigned"
193
195
  assigned_by(user).send(bucket).pending.count
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  xml.Worksheet 'ss:Name' => I18n.t(:tab_dashboard) do
3
4
  xml.Table do
4
5
  unless @activities.empty?
@@ -41,4 +41,4 @@
41
41
  = address_field(a, :zipcode, "width:80px;")
42
42
  %td= spacer
43
43
  %td
44
- = a.country_select(:country, priority_countries, { include_blank: "" }, {:"data-placeholder" => t(:select_a_country), style: "width:150px; margin-top:6px", class: 'select2'})
44
+ = a.country_select(:country, priority_countries: priority_countries, include_blank: "", :"data-placeholder" => t(:select_a_country), style: "width:150px; margin-top:6px", class: 'select2')
@@ -12,6 +12,7 @@ require 'rails/all'
12
12
 
13
13
  # Pick the frameworks you want:
14
14
  require "active_record/railtie"
15
+ require "active_storage/engine"
15
16
  require "action_controller/railtie"
16
17
  require "action_mailer/railtie"
17
18
  require "sprockets/railtie"
@@ -72,6 +73,18 @@ module FatFreeCRM
72
73
 
73
74
  # Configure sensitive parameters which will be filtered from the log file.
74
75
  config.filter_parameters += %i[password encrypted_password password_salt password_confirmation]
76
+
77
+ # Enable support for loading via Psych, required by PaperTrail
78
+ config.active_record.use_yaml_unsafe_load = false
79
+ config.active_record.yaml_column_permitted_classes = [
80
+ ::ActiveRecord::Type::Time::Value,
81
+ ::ActiveSupport::TimeWithZone,
82
+ ::ActiveSupport::TimeZone,
83
+ ::BigDecimal,
84
+ ::Date,
85
+ ::Symbol,
86
+ ::Time
87
+ ]
75
88
  end
76
89
  end
77
90
 
@@ -47,5 +47,8 @@ if defined?(FatFreeCRM::Application)
47
47
  # Checks for improperly declared sprockets dependencies.
48
48
  # Raises helpful error messages.
49
49
  config.assets.raise_runtime_errors = true
50
+
51
+ # Store files locally.
52
+ config.active_storage.service = :local
50
53
  end
51
54
  end
data/config/puma.rb CHANGED
@@ -9,9 +9,9 @@
9
9
  threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
10
10
  threads threads_count, threads_count
11
11
 
12
- rails_env = ENV.fetch('RAILS_ENV') { 'development' }
12
+ rails_env = ENV.fetch('RAILS_ENV', 'development')
13
13
  environment rails_env
14
- port ENV.fetch('PORT') { 3000 }
14
+ port ENV.fetch('PORT', 3000)
15
15
 
16
16
  preload_app! unless rails_env == 'development'
17
17
 
@@ -0,0 +1,34 @@
1
+ test:
2
+ service: Disk
3
+ root: <%= Rails.root.join("tmp/storage") %>
4
+
5
+ local:
6
+ service: Disk
7
+ root: <%= Rails.root.join("storage") %>
8
+
9
+ # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10
+ # amazon:
11
+ # service: S3
12
+ # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13
+ # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14
+ # region: us-east-1
15
+ # bucket: your_own_bucket
16
+
17
+ # Remember not to checkin your GCS keyfile to a repository
18
+ # google:
19
+ # service: GCS
20
+ # project: your_project
21
+ # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22
+ # bucket: your_own_bucket
23
+
24
+ # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25
+ # microsoft:
26
+ # service: AzureStorage
27
+ # storage_account_name: your_account_name
28
+ # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29
+ # container: your_container_name
30
+
31
+ # mirror:
32
+ # service: Mirror
33
+ # primary: local
34
+ # mirrors: [ amazon, google, microsoft ]
@@ -6,7 +6,8 @@ class DropOpenidTables < ActiveRecord::Migration[4.2]
6
6
  drop_table :open_id_authentication_nonces
7
7
  end
8
8
 
9
- def self.down # see 003_create_openid_tables.rb
9
+ # see 003_create_openid_tables.rb
10
+ def self.down
10
11
  create_table :open_id_authentication_associations, force: true do |t|
11
12
  t.integer :issued
12
13
  t.integer :lifetime
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This migration comes from active_storage (originally 20170806125915)
4
+ class CreateActiveStorageTables < ActiveRecord::Migration[5.2]
5
+ def change
6
+ # Use Active Record's configured type for primary and foreign keys
7
+ primary_key_type, foreign_key_type = primary_and_foreign_key_types
8
+
9
+ create_table :active_storage_blobs, id: primary_key_type do |t|
10
+ t.string :key, null: false
11
+ t.string :filename, null: false
12
+ t.string :content_type
13
+ t.text :metadata
14
+ t.string :service_name, null: false
15
+ t.bigint :byte_size, null: false
16
+ t.string :checksum, null: false
17
+ t.datetime :created_at, null: false
18
+
19
+ t.index [:key], unique: true
20
+ end
21
+
22
+ create_table :active_storage_attachments, id: primary_key_type do |t|
23
+ t.string :name, null: false
24
+ t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type
25
+ t.references :blob, null: false, type: foreign_key_type
26
+
27
+ t.datetime :created_at, null: false
28
+
29
+ t.index %i[record_type record_id name blob_id], name: "index_active_storage_attachments_uniqueness", unique: true
30
+ t.foreign_key :active_storage_blobs, column: :blob_id
31
+ end
32
+
33
+ create_table :active_storage_variant_records, id: primary_key_type do |t|
34
+ t.belongs_to :blob, null: false, index: false, type: foreign_key_type
35
+ t.string :variation_digest, null: false
36
+
37
+ t.index %i[blob_id variation_digest], name: "index_active_storage_variant_records_uniqueness", unique: true
38
+ t.foreign_key :active_storage_blobs, column: :blob_id
39
+ end
40
+ end
41
+
42
+ private
43
+
44
+ def primary_and_foreign_key_types
45
+ config = Rails.configuration.generators
46
+ setting = config.options[config.orm][:primary_key_type]
47
+ primary_key_type = setting || :primary_key
48
+ foreign_key_type = setting || :bigint
49
+ [primary_key_type, foreign_key_type]
50
+ end
51
+ end