fat_free_crm 0.20.1 → 0.22.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 (352) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +170 -0
  3. data/README.md +3 -6
  4. data/app/assets/config/fat_free_crm.js +3 -0
  5. data/app/assets/config/manifest.js +1 -0
  6. data/app/controllers/admin/field_groups_controller.rb +0 -2
  7. data/app/controllers/admin/tags_controller.rb +1 -1
  8. data/app/controllers/admin/users_controller.rb +1 -1
  9. data/app/controllers/application_controller.rb +11 -0
  10. data/app/controllers/comments_controller.rb +2 -0
  11. data/app/controllers/emails_controller.rb +2 -0
  12. data/app/controllers/entities/accounts_controller.rb +3 -1
  13. data/app/controllers/entities/campaigns_controller.rb +3 -1
  14. data/app/controllers/entities/contacts_controller.rb +3 -1
  15. data/app/controllers/entities/leads_controller.rb +4 -2
  16. data/app/controllers/entities/opportunities_controller.rb +3 -1
  17. data/app/controllers/entities_controller.rb +2 -0
  18. data/app/controllers/home_controller.rb +2 -0
  19. data/app/controllers/lists_controller.rb +2 -0
  20. data/app/controllers/tasks_controller.rb +3 -1
  21. data/app/controllers/users_controller.rb +2 -0
  22. data/app/helpers/accounts_helper.rb +2 -0
  23. data/app/helpers/application_helper.rb +22 -3
  24. data/app/helpers/tasks_helper.rb +1 -2
  25. data/app/models/entities/account.rb +1 -1
  26. data/app/models/entities/campaign.rb +1 -1
  27. data/app/models/entities/contact.rb +1 -1
  28. data/app/models/entities/lead.rb +1 -1
  29. data/app/models/entities/opportunity.rb +1 -1
  30. data/app/models/fields/custom_field.rb +2 -2
  31. data/app/models/observers/entity_observer.rb +1 -1
  32. data/app/models/polymorphic/avatar.rb +1 -30
  33. data/app/models/polymorphic/comment.rb +1 -1
  34. data/app/models/polymorphic/task.rb +1 -0
  35. data/app/models/setting.rb +4 -5
  36. data/app/models/users/user.rb +1 -1
  37. data/app/views/home/index.xls.builder +1 -0
  38. data/app/views/shared/_address.html.haml +1 -1
  39. data/bin/bundle +108 -2
  40. data/bin/rails +3 -3
  41. data/bin/rake +2 -2
  42. data/bin/setup +12 -15
  43. data/config/application.rb +22 -4
  44. data/config/boot.rb +3 -5
  45. data/config/cable.yml +10 -0
  46. data/config/database.yml +26 -0
  47. data/config/environment.rb +4 -3
  48. data/config/environments/development.rb +47 -11
  49. data/config/environments/production.rb +17 -15
  50. data/config/environments/test.rb +19 -9
  51. data/config/initializers/action_mailer.rb +1 -0
  52. data/config/initializers/content_security_policy.rb +21 -26
  53. data/config/initializers/custom_field_ransack_translations.rb +1 -0
  54. data/config/initializers/filter_parameter_logging.rb +6 -2
  55. data/config/initializers/inflections.rb +4 -4
  56. data/config/initializers/permissions_policy.rb +12 -0
  57. data/config/puma.rb +2 -2
  58. data/config/storage.yml +34 -0
  59. data/db/demo/field_groups.yml +2 -1
  60. data/db/migrate/20100928030617_drop_openid_tables.rb +2 -1
  61. data/db/migrate/20230526211831_create_active_storage_tables.active_storage.rb +51 -0
  62. data/db/migrate/20230526212613_convert_to_active_storage.rb +107 -0
  63. data/db/schema.rb +108 -76
  64. data/db/seeds/fields.rb +7 -21
  65. data/lib/development_tasks/license.rake +10 -10
  66. data/lib/fat_free_crm/callback.rb +2 -3
  67. data/lib/fat_free_crm/errors.rb +2 -10
  68. data/lib/fat_free_crm/exceptions.rb +1 -0
  69. data/lib/fat_free_crm/fields.rb +4 -5
  70. data/lib/fat_free_crm/gem_dependencies.rb +0 -1
  71. data/lib/fat_free_crm/i18n.rb +1 -1
  72. data/lib/fat_free_crm/mail_processor/dropbox.rb +1 -1
  73. data/lib/fat_free_crm/version.rb +3 -3
  74. data/public/avatars/User/2/large_rails.png +0 -0
  75. data/public/avatars/User/2/medium_rails.png +0 -0
  76. data/public/avatars/User/2/small_rails.png +0 -0
  77. data/public/avatars/User/2/thumb_rails.png +0 -0
  78. data/public/avatars/User/3/large_rails.png +0 -0
  79. data/public/avatars/User/3/medium_rails.png +0 -0
  80. data/public/avatars/User/3/original_rails.png +0 -0
  81. data/public/avatars/User/3/small_rails.png +0 -0
  82. data/public/avatars/User/3/thumb_rails.png +0 -0
  83. data/public/avatars/User/4/large_rails.png +0 -0
  84. data/public/avatars/User/4/medium_rails.png +0 -0
  85. data/public/avatars/User/4/original_rails.png +0 -0
  86. data/public/avatars/User/4/small_rails.png +0 -0
  87. data/public/avatars/User/4/thumb_rails.png +0 -0
  88. data/public/avatars/User/6/large_rails.png +0 -0
  89. data/public/avatars/User/6/medium_rails.png +0 -0
  90. data/public/avatars/User/6/original_rails.png +0 -0
  91. data/public/avatars/User/6/small_rails.png +0 -0
  92. data/public/avatars/User/6/thumb_rails.png +0 -0
  93. data/public/avatars/User/7/large_rails.png +0 -0
  94. data/public/avatars/User/7/medium_rails.png +0 -0
  95. data/public/avatars/User/7/original_rails.png +0 -0
  96. data/public/avatars/User/7/small_rails.png +0 -0
  97. data/public/avatars/User/7/thumb_rails.png +0 -0
  98. metadata +73 -288
  99. data/.docker/nginx/sites-enabled/ffcrm.conf +0 -8
  100. data/.github/workflows/brakeman-analysis.yml +0 -46
  101. data/.github/workflows/rubocop-analysis.yml +0 -40
  102. data/.github/workflows/ruby.yml +0 -52
  103. data/.gitignore +0 -39
  104. data/.rubocop.yml +0 -73
  105. data/.rubocop_todo.yml +0 -286
  106. data/.teatro.yml +0 -3
  107. data/.travis.yml +0 -60
  108. data/CONTRIBUTORS.md +0 -135
  109. data/Capfile +0 -27
  110. data/Dockerfile +0 -51
  111. data/Gemfile +0 -106
  112. data/Gemfile.lock +0 -529
  113. data/Guardfile +0 -26
  114. data/Procfile +0 -1
  115. data/SECURITY.md +0 -11
  116. data/Vagrantfile +0 -92
  117. data/config/initializers/new_framework_defaults_6_0.rb +0 -46
  118. data/custom_plan.rb +0 -11
  119. data/docker-compose.yml +0 -27
  120. data/fat_free_crm.gemspec +0 -62
  121. data/lib/tasks/.gitkeep +0 -0
  122. data/lib/tasks/.gitkeep~master +0 -0
  123. data/script/rails +0 -8
  124. data/spec/controllers/admin/groups_controller_spec.rb +0 -11
  125. data/spec/controllers/admin/users_controller_spec.rb +0 -251
  126. data/spec/controllers/applications_controller_spec.rb +0 -43
  127. data/spec/controllers/comments_controller_spec.rb +0 -195
  128. data/spec/controllers/emails_controller_spec.rb +0 -37
  129. data/spec/controllers/entities/accounts_controller_spec.rb +0 -607
  130. data/spec/controllers/entities/campaigns_controller_spec.rb +0 -645
  131. data/spec/controllers/entities/contacts_controller_spec.rb +0 -705
  132. data/spec/controllers/entities/leads_controller_spec.rb +0 -1009
  133. data/spec/controllers/entities/opportunities_controller_spec.rb +0 -904
  134. data/spec/controllers/entities_controller_spec.rb +0 -47
  135. data/spec/controllers/home_controller_spec.rb +0 -235
  136. data/spec/controllers/lists_controller_spec.rb +0 -11
  137. data/spec/controllers/tasks_controller_spec.rb +0 -517
  138. data/spec/controllers/users_controller_spec.rb +0 -375
  139. data/spec/factories/account_factories.rb +0 -40
  140. data/spec/factories/campaign_factories.rb +0 -30
  141. data/spec/factories/contact_factories.rb +0 -45
  142. data/spec/factories/field_factories.rb +0 -40
  143. data/spec/factories/lead_factories.rb +0 -36
  144. data/spec/factories/list_factories.rb +0 -13
  145. data/spec/factories/opportunity_factories.rb +0 -39
  146. data/spec/factories/sequences.rb +0 -32
  147. data/spec/factories/setting_factories.rb +0 -15
  148. data/spec/factories/shared_factories.rb +0 -70
  149. data/spec/factories/subscription_factories.rb +0 -13
  150. data/spec/factories/tag_factories.rb +0 -12
  151. data/spec/factories/task_factories.rb +0 -29
  152. data/spec/factories/user_factories.rb +0 -66
  153. data/spec/features/acceptance_helper.rb +0 -11
  154. data/spec/features/accounts_spec.rb +0 -126
  155. data/spec/features/admin/groups_spec.rb +0 -31
  156. data/spec/features/admin/users_spec.rb +0 -40
  157. data/spec/features/campaigns_spec.rb +0 -104
  158. data/spec/features/contacts_spec.rb +0 -134
  159. data/spec/features/dashboard_spec.rb +0 -67
  160. data/spec/features/devise/sign_in_spec.rb +0 -58
  161. data/spec/features/devise/sign_up_spec.rb +0 -36
  162. data/spec/features/leads_spec.rb +0 -138
  163. data/spec/features/opportunities_overview_spec.rb +0 -88
  164. data/spec/features/opportunities_spec.rb +0 -132
  165. data/spec/features/support/autocomlete_helper.rb +0 -17
  166. data/spec/features/support/browser.rb +0 -28
  167. data/spec/features/support/headless.rb +0 -19
  168. data/spec/features/support/paths.rb +0 -48
  169. data/spec/features/support/selector_helpers.rb +0 -36
  170. data/spec/features/tasks_spec.rb +0 -94
  171. data/spec/helpers/accounts_helper_spec.rb +0 -73
  172. data/spec/helpers/admin/field_groups_helper_spec.rb +0 -20
  173. data/spec/helpers/admin/plugins_helper_spec.rb +0 -11
  174. data/spec/helpers/admin/settings_helper_spec.rb +0 -11
  175. data/spec/helpers/admin/users_helper_spec.rb +0 -11
  176. data/spec/helpers/application_helper_spec.rb +0 -86
  177. data/spec/helpers/authentications_helper_spec.rb +0 -16
  178. data/spec/helpers/campaigns_helper_spec.rb +0 -16
  179. data/spec/helpers/comments_helper_spec.rb +0 -16
  180. data/spec/helpers/contacts_helper_spec.rb +0 -16
  181. data/spec/helpers/emails_helper_spec.rb +0 -11
  182. data/spec/helpers/fields_helper_spec.rb +0 -12
  183. data/spec/helpers/groups_helper_spec.rb +0 -21
  184. data/spec/helpers/home_helper_spec.rb +0 -16
  185. data/spec/helpers/leads_helper_spec.rb +0 -16
  186. data/spec/helpers/lists_helper_spec.rb +0 -21
  187. data/spec/helpers/opportunities_helper_spec.rb +0 -16
  188. data/spec/helpers/passwords_helper_spec.rb +0 -16
  189. data/spec/helpers/tasks_helper_spec.rb +0 -20
  190. data/spec/helpers/users_helper_spec.rb +0 -39
  191. data/spec/lib/comment_extensions_spec.rb +0 -42
  192. data/spec/lib/core_ext/string_spec.rb +0 -23
  193. data/spec/lib/errors_spec.rb +0 -32
  194. data/spec/lib/fields_spec.rb +0 -101
  195. data/spec/lib/mail_processor/base_spec.rb +0 -169
  196. data/spec/lib/mail_processor/comment_replies_spec.rb +0 -70
  197. data/spec/lib/mail_processor/dropbox_spec.rb +0 -306
  198. data/spec/lib/mail_processor/sample_emails/dropbox.rb +0 -173
  199. data/spec/lib/permissions_spec.rb +0 -155
  200. data/spec/lib/secret_token_generator_spec.rb +0 -69
  201. data/spec/lib/view_factory_spec.rb +0 -69
  202. data/spec/mailers/devise_mailer_spec.rb +0 -35
  203. data/spec/mailers/subscription_mailer_spec.rb +0 -48
  204. data/spec/mailers/user_mailer_spec.rb +0 -115
  205. data/spec/models/entities/account_contact_spec.rb +0 -34
  206. data/spec/models/entities/account_opportunity_spec.rb +0 -34
  207. data/spec/models/entities/account_spec.rb +0 -206
  208. data/spec/models/entities/campaign_spec.rb +0 -131
  209. data/spec/models/entities/contact_opportunity_spec.rb +0 -34
  210. data/spec/models/entities/contact_spec.rb +0 -314
  211. data/spec/models/entities/lead_spec.rb +0 -102
  212. data/spec/models/entities/opportunity_spec.rb +0 -299
  213. data/spec/models/fields/custom_field_date_pair_spec.rb +0 -92
  214. data/spec/models/fields/custom_field_pair_spec.rb +0 -76
  215. data/spec/models/fields/custom_field_spec.rb +0 -129
  216. data/spec/models/fields/field_group_spec.rb +0 -29
  217. data/spec/models/fields/field_spec.rb +0 -69
  218. data/spec/models/list_spec.rb +0 -19
  219. data/spec/models/observers/entity_observer_spec.rb +0 -74
  220. data/spec/models/polymorphic/address_spec.rb +0 -34
  221. data/spec/models/polymorphic/avatar_spec.rb +0 -46
  222. data/spec/models/polymorphic/comment_spec.rb +0 -45
  223. data/spec/models/polymorphic/email_spec.rb +0 -53
  224. data/spec/models/polymorphic/task_spec.rb +0 -395
  225. data/spec/models/polymorphic/version_spec.rb +0 -241
  226. data/spec/models/setting_spec.rb +0 -77
  227. data/spec/models/users/abilities/user_ability_spec.rb +0 -70
  228. data/spec/models/users/group_spec.rb +0 -11
  229. data/spec/models/users/permission_spec.rb +0 -58
  230. data/spec/models/users/preference_spec.rb +0 -71
  231. data/spec/models/users/user_spec.rb +0 -238
  232. data/spec/routing/accounts_routing_spec.rb +0 -60
  233. data/spec/routing/admin/users_routing_spec.rb +0 -40
  234. data/spec/routing/campaigns_routing_spec.rb +0 -64
  235. data/spec/routing/comments_routing_spec.rb +0 -32
  236. data/spec/routing/contacts_routing_spec.rb +0 -60
  237. data/spec/routing/emails_routing_spec.rb +0 -40
  238. data/spec/routing/leads_routing_spec.rb +0 -88
  239. data/spec/routing/opportunities_routing_spec.rb +0 -64
  240. data/spec/routing/tasks_routing_spec.rb +0 -68
  241. data/spec/routing/users_routing_spec.rb +0 -106
  242. data/spec/shared/controllers.rb +0 -99
  243. data/spec/shared/models.rb +0 -141
  244. data/spec/spec_helper.rb +0 -117
  245. data/spec/support/assert_select.rb +0 -167
  246. data/spec/support/devise_helpers.rb +0 -28
  247. data/spec/support/feature_helpers.rb +0 -32
  248. data/spec/support/macros.rb +0 -49
  249. data/spec/support/mail_processor_mocks.rb +0 -37
  250. data/spec/support/uploaded_file.rb +0 -10
  251. data/spec/views/accounts/_edit.haml_spec.rb +0 -43
  252. data/spec/views/accounts/_new.haml_spec.rb +0 -42
  253. data/spec/views/accounts/create.js.haml_spec.rb +0 -52
  254. data/spec/views/accounts/destroy.js.haml_spec.rb +0 -34
  255. data/spec/views/accounts/edit.js.haml_spec.rb +0 -66
  256. data/spec/views/accounts/index.haml_spec.rb +0 -43
  257. data/spec/views/accounts/index.js.haml_spec.rb +0 -34
  258. data/spec/views/accounts/new.js.haml_spec.rb +0 -44
  259. data/spec/views/accounts/show.haml_spec.rb +0 -38
  260. data/spec/views/accounts/update.js.haml_spec.rb +0 -93
  261. data/spec/views/admin/field_groups/create.js.haml_spec.rb +0 -30
  262. data/spec/views/admin/field_groups/destroy.js.haml_spec.rb +0 -31
  263. data/spec/views/admin/field_groups/edit.js.haml_spec.rb +0 -24
  264. data/spec/views/admin/field_groups/new.js.haml_spec.rb +0 -25
  265. data/spec/views/admin/field_groups/update.js.haml_spec.rb +0 -29
  266. data/spec/views/admin/users/_create.haml_spec.rb +0 -23
  267. data/spec/views/admin/users/create.js.haml_spec.rb +0 -41
  268. data/spec/views/admin/users/destroy.js.haml_spec.rb +0 -47
  269. data/spec/views/admin/users/edit.js.haml_spec.rb +0 -44
  270. data/spec/views/admin/users/index.haml_spec.rb +0 -22
  271. data/spec/views/admin/users/index.js.haml_spec.rb +0 -26
  272. data/spec/views/admin/users/new.js.haml_spec.rb +0 -34
  273. data/spec/views/admin/users/reactivate.js.haml_spec.rb +0 -22
  274. data/spec/views/admin/users/show.haml_spec.rb +0 -18
  275. data/spec/views/admin/users/suspend.js.haml_spec.rb +0 -22
  276. data/spec/views/admin/users/update.js.haml_spec.rb +0 -37
  277. data/spec/views/application/auto_complete.haml_spec.rb +0 -48
  278. data/spec/views/campaigns/_edit.haml_spec.rb +0 -44
  279. data/spec/views/campaigns/_new.haml_spec.rb +0 -41
  280. data/spec/views/campaigns/create.js.haml_spec.rb +0 -49
  281. data/spec/views/campaigns/destroy.js.haml_spec.rb +0 -31
  282. data/spec/views/campaigns/edit.js.haml_spec.rb +0 -66
  283. data/spec/views/campaigns/index.haml_spec.rb +0 -37
  284. data/spec/views/campaigns/index.js.haml_spec.rb +0 -34
  285. data/spec/views/campaigns/new.js.haml_spec.rb +0 -50
  286. data/spec/views/campaigns/show.haml_spec.rb +0 -38
  287. data/spec/views/campaigns/update.js.haml_spec.rb +0 -78
  288. data/spec/views/comments/edit.js.haml_spec.rb +0 -30
  289. data/spec/views/contacts/_edit.haml_spec.rb +0 -73
  290. data/spec/views/contacts/_new.haml_spec.rb +0 -52
  291. data/spec/views/contacts/create.js.haml_spec.rb +0 -65
  292. data/spec/views/contacts/destroy.js.haml_spec.rb +0 -45
  293. data/spec/views/contacts/edit.js.haml_spec.rb +0 -74
  294. data/spec/views/contacts/index.haml_spec.rb +0 -37
  295. data/spec/views/contacts/index.js.html_spec.rb +0 -34
  296. data/spec/views/contacts/new.js.haml_spec.rb +0 -47
  297. data/spec/views/contacts/show.haml_spec.rb +0 -35
  298. data/spec/views/contacts/update.js.haml_spec.rb +0 -128
  299. data/spec/views/home/index.haml_spec.rb +0 -36
  300. data/spec/views/home/index.js.haml_spec.rb +0 -33
  301. data/spec/views/home/options.js.haml_spec.rb +0 -53
  302. data/spec/views/leads/_convert.haml_spec.rb +0 -30
  303. data/spec/views/leads/_edit.haml_spec.rb +0 -47
  304. data/spec/views/leads/_new.haml_spec.rb +0 -45
  305. data/spec/views/leads/_sidebar_show.haml_spec.rb +0 -31
  306. data/spec/views/leads/convert.js.haml_spec.rb +0 -79
  307. data/spec/views/leads/create.js.haml_spec.rb +0 -67
  308. data/spec/views/leads/destroy.js.haml_spec.rb +0 -47
  309. data/spec/views/leads/edit.js.haml_spec.rb +0 -76
  310. data/spec/views/leads/index.haml_spec.rb +0 -37
  311. data/spec/views/leads/index.js.haml_spec.rb +0 -34
  312. data/spec/views/leads/new.js.haml_spec.rb +0 -47
  313. data/spec/views/leads/promote.js.haml_spec.rb +0 -135
  314. data/spec/views/leads/reject.js.haml_spec.rb +0 -45
  315. data/spec/views/leads/show.haml_spec.rb +0 -32
  316. data/spec/views/leads/update.js.haml_spec.rb +0 -118
  317. data/spec/views/opportunities/_edit.haml_spec.rb +0 -70
  318. data/spec/views/opportunities/_new.haml_spec.rb +0 -51
  319. data/spec/views/opportunities/create.js.haml_spec.rb +0 -86
  320. data/spec/views/opportunities/destroy.js.haml_spec.rb +0 -64
  321. data/spec/views/opportunities/edit.js.haml_spec.rb +0 -75
  322. data/spec/views/opportunities/index.haml_spec.rb +0 -38
  323. data/spec/views/opportunities/index.js.haml_spec.rb +0 -35
  324. data/spec/views/opportunities/new.js.haml_spec.rb +0 -54
  325. data/spec/views/opportunities/show.haml_spec.rb +0 -35
  326. data/spec/views/opportunities/update.js.haml_spec.rb +0 -143
  327. data/spec/views/tasks/_edit.haml_spec.rb +0 -50
  328. data/spec/views/tasks/complete.js.haml_spec.rb +0 -67
  329. data/spec/views/tasks/create.js.haml_spec.rb +0 -119
  330. data/spec/views/tasks/destroy.js.haml_spec.rb +0 -57
  331. data/spec/views/tasks/edit.js.haml_spec.rb +0 -76
  332. data/spec/views/tasks/index.haml_spec.rb +0 -46
  333. data/spec/views/tasks/new.js.haml_spec.rb +0 -49
  334. data/spec/views/tasks/uncomplete.js.haml_spec.rb +0 -45
  335. data/spec/views/tasks/update.js.haml_spec.rb +0 -140
  336. data/spec/views/users/avatar.js.haml_spec.rb +0 -35
  337. data/spec/views/users/change_password.js.haml_spec.rb +0 -51
  338. data/spec/views/users/edit.js.haml_spec.rb +0 -35
  339. data/spec/views/users/password.js.haml_spec.rb +0 -36
  340. data/spec/views/users/update.js.haml_spec.rb +0 -46
  341. data/spec/views/users/upload_avatar.js.haml_spec.rb +0 -45
  342. data/vendor/gems/globby-0.1.2/LICENSE.txt +0 -20
  343. data/vendor/gems/globby-0.1.2/README.md +0 -65
  344. data/vendor/gems/globby-0.1.2/Rakefile +0 -9
  345. data/vendor/gems/globby-0.1.2/lib/globby/glob.rb +0 -90
  346. data/vendor/gems/globby-0.1.2/lib/globby/globject.rb +0 -18
  347. data/vendor/gems/globby-0.1.2/lib/globby/result.rb +0 -20
  348. data/vendor/gems/globby-0.1.2/lib/globby.rb +0 -47
  349. data/vendor/gems/globby-0.1.2/spec/gitignore_spec.rb +0 -109
  350. data/vendor/gems/globby-0.1.2/spec/globby_spec.rb +0 -93
  351. data/zeus.json +0 -22
  352. /data/{spec/fixtures/rails.png → public/avatars/User/2/original_rails.png} +0 -0
data/Vagrantfile DELETED
@@ -1,92 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # -*- mode: ruby -*-
4
- # vi: set ft=ruby :
5
-
6
- # All Vagrant configuration is done below. The "2" in Vagrant.configure
7
- # configures the configuration version (we support older styles for
8
- # backwards compatibility). Please don't change it unless you know what
9
- # you're doing.
10
- Vagrant.configure("2") do |config|
11
- # The most common configuration options are documented and commented below.
12
- # For a complete reference, please see the online documentation at
13
- # https://docs.vagrantup.com.
14
-
15
- # Every Vagrant development environment requires a box. You can search for
16
- # boxes at https://vagrantcloud.com/search.
17
- config.vm.box = "ubuntu/xenial64"
18
-
19
- # Disable automatic box update checking. If you disable this, then
20
- # boxes will only be checked for updates when the user runs
21
- # `vagrant box outdated`. This is not recommended.
22
- # config.vm.box_check_update = false
23
-
24
- # Create a forwarded port mapping which allows access to a specific port
25
- # within the machine from a port on the host machine. In the example below,
26
- # accessing "localhost:8080" will access port 80 on the guest machine.
27
- # NOTE: This will enable public access to the opened port
28
- config.vm.network "forwarded_port", guest: 80, host: 8080
29
-
30
- # Create a forwarded port mapping which allows access to a specific port
31
- # within the machine from a port on the host machine and only allow access
32
- # via 127.0.0.1 to disable public access
33
- # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
34
-
35
- # Create a private network, which allows host-only access to the machine
36
- # using a specific IP.
37
- config.vm.network "private_network", ip: "192.168.33.10"
38
-
39
- # Create a public network, which generally matched to bridged network.
40
- # Bridged networks make the machine appear as another physical device on
41
- # your network.
42
- # config.vm.network "public_network"
43
-
44
- # Share an additional folder to the guest VM. The first argument is
45
- # the path on the host to the actual folder. The second argument is
46
- # the path on the guest to mount the folder. And the optional third
47
- # argument is a set of non-required options.
48
- # config.vm.synced_folder "../data", "/vagrant_data"
49
-
50
- # Provider-specific configuration so you can fine-tune various
51
- # backing providers for Vagrant. These expose provider-specific options.
52
- # Example for VirtualBox:
53
- #
54
- # config.vm.provider "virtualbox" do |vb|
55
- # # Display the VirtualBox GUI when booting the machine
56
- # vb.gui = true
57
- #
58
- # # Customize the amount of memory on the VM:
59
- # vb.memory = "1024"
60
- # end
61
- #
62
- # View the documentation for the provider you are using for more
63
- # information on available options.
64
-
65
- # Enable provisioning with a shell script. Additional provisioners such as
66
- # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
67
- # documentation for more information about their specific syntax and use.
68
-
69
- config.vm.provision "shell", inline: <<-SHELL
70
- apt-get update
71
- git clone https://github.com/fatfreecrm/fat_free_crm.git
72
- cd fat_free_crm
73
- cp config/database.postgres.yml config/database.yml
74
- apt-get install -y nginx-full postgresql ruby-all-dev ruby-bundler libmagick++-dev libxml2 libxml2-dev libxslt1.1 libxslt1-dev libyaml-dev libpq-dev libsqlite3-dev
75
- bundle install
76
- echo "ALTER USER postgres PASSWORD '123456';" | sudo -u postgres psql
77
- sed -i 's/ username:/ username: postgres/g' 'config/database.yml'
78
- sed -i 's/ password:/ password: '123456'/g' 'config/database.yml'
79
- rake db:setup
80
- rake ffcrm:setup:admin USERNAME=admin PASSWORD=password EMAIL=admin@example.com
81
- rm -rf /etc/nginx/sites-available/default
82
- echo "server {" > /etc/nginx/sites-available/default
83
- echo " listen 80;" >> /etc/nginx/sites-available/default
84
- echo " location / {" >> /etc/nginx/sites-available/default
85
- echo " proxy_pass http://localhost:3000;" >> /etc/nginx/sites-available/default
86
- echo " }" >> /etc/nginx/sites-available/default
87
- echo "}" >> /etc/nginx/sites-available/default
88
- sudo systemctl stop nginx
89
- sudo systemctl start nginx
90
- rails s
91
- SHELL
92
- end
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
- # Be sure to restart your server when you modify this file.
3
- #
4
- # This file contains migration options to ease your Rails 6.0 upgrade.
5
- #
6
- # Once upgraded flip defaults one by one to migrate to the new default.
7
- #
8
- # Read the Guide for Upgrading Ruby on Rails for more info on each option.
9
-
10
- # Don't force requests from old versions of IE to be UTF-8 encoded.
11
- # Rails.application.config.action_view.default_enforce_utf8 = false
12
-
13
- # Embed purpose and expiry metadata inside signed and encrypted
14
- # cookies for increased security.
15
- #
16
- # This option is not backwards compatible with earlier Rails versions.
17
- # It's best enabled when your entire app is migrated and stable on 6.0.
18
- # Rails.application.config.action_dispatch.use_cookies_with_metadata = true
19
-
20
- # Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification.
21
- # Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false
22
-
23
- # Return false instead of self when enqueuing is aborted from a callback.
24
- # Rails.application.config.active_job.return_false_on_aborted_enqueue = true
25
-
26
- # Send Active Storage analysis and purge jobs to dedicated queues.
27
- # Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
28
- # Rails.application.config.active_storage.queues.purge = :active_storage_purge
29
-
30
- # When assigning to a collection of attachments declared via `has_many_attached`, replace existing
31
- # attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
32
- # Rails.application.config.active_storage.replace_on_assign_to_many = true
33
-
34
- # Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
35
- #
36
- # The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob),
37
- # will be removed in Rails 6.1. This setting is not backwards compatible with earlier Rails versions.
38
- # If you send mail in the background, job workers need to have a copy of
39
- # MailDeliveryJob to ensure all delivery jobs are processed properly.
40
- # Make sure your entire app is migrated and stable on 6.0 before using this setting.
41
- # Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
42
-
43
- # Enable the same cache key to be reused when the object being cached of type
44
- # `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count)
45
- # of the relation's cache key into the cache version to support recycling cache key.
46
- # Rails.application.config.active_record.collection_cache_versioning = true
data/custom_plan.rb DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'zeus/rails'
4
-
5
- class CustomPlan < Zeus::Rails
6
- # def my_custom_command
7
- # # see https://github.com/burke/zeus/blob/master/docs/ruby/modifying.md
8
- # end
9
- end
10
-
11
- Zeus.plan = CustomPlan.new
data/docker-compose.yml DELETED
@@ -1,27 +0,0 @@
1
- version: '3'
2
- services:
3
- web:
4
- build: .
5
- links:
6
- - db
7
- ports:
8
- - "3000:3000"
9
- - "80:80"
10
- volumes:
11
- - gems:/usr/local/rvm/gems
12
- environment:
13
- RAILS_ENV: 'production'
14
- PASSENGER_APP_ENV: 'production'
15
- DB_DATABASE: 'fat_free_crm_production'
16
- DB_USERNAME: 'postgres'
17
- DB_PASSWORD: ''
18
- DB_HOST: 'db'
19
- DB_PORT: 5432
20
- db:
21
- image: postgres:9.5
22
- restart: always
23
- volumes:
24
- - pgdata:/var/lib/postgresql/data
25
- volumes:
26
- pgdata: {}
27
- gems: {}
data/fat_free_crm.gemspec DELETED
@@ -1,62 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- $LOAD_PATH.push File.expand_path('vendor/gems/globby-0.1.2/lib', __dir__)
4
- require 'globby'
5
- rules = File.read("#{File.expand_path(__dir__)}/.gitignore").split("\n")
6
- rules << '.git'
7
- files = Globby.reject(rules)
8
-
9
- $LOAD_PATH.push File.expand_path('lib', __dir__)
10
- require 'fat_free_crm/version'
11
-
12
- Gem::Specification.new do |gem|
13
- gem.name = 'fat_free_crm'
14
- gem.authors = ['Michael Dvorkin', 'Stephen Kenworthy', "Daniel O'Connor"]
15
- gem.summary = 'Fat Free CRM'
16
- gem.description = 'An open source, Ruby on Rails customer relationship management platform'
17
- gem.homepage = 'http://fatfreecrm.com'
18
- gem.email = ['mike@fatfreecrm.com', 'steveyken@gmail.com', 'daniel.oconnor@gmail.com']
19
- gem.files = files
20
- gem.version = FatFreeCRM::VERSION::STRING
21
- gem.required_ruby_version = '>= 2.4.0'
22
- gem.license = 'MIT'
23
-
24
- gem.add_dependency 'rails', '~> 6.0.0'
25
- gem.add_dependency 'rails-i18n'
26
- gem.add_dependency 'rails-observers'
27
- gem.add_dependency 'activemodel-serializers-xml'
28
- gem.add_dependency 'sprockets-rails', '>= 3.0.0'
29
- gem.add_dependency 'responders', '~> 3.0'
30
- gem.add_dependency 'jquery-rails'
31
- gem.add_dependency 'jquery-migrate-rails'
32
- gem.add_dependency 'jquery-ui-rails'
33
- gem.add_dependency 'select2-rails'
34
- gem.add_dependency 'simple_form'
35
- gem.add_dependency 'will_paginate'
36
- gem.add_dependency 'paperclip'
37
- gem.add_dependency 'paper_trail', '~> 12.0.0'
38
- gem.add_dependency 'devise', '~> 4.6'
39
- gem.add_dependency 'devise-encryptable', '~> 0.2.0'
40
- gem.add_dependency 'acts_as_commentable', '~> 6.0.0'
41
- gem.add_dependency 'acts-as-taggable-on', '>= 3.4.3'
42
- gem.add_dependency 'dynamic_form'
43
- gem.add_dependency 'haml'
44
- gem.add_dependency 'sass'
45
- gem.add_dependency 'acts_as_list'
46
- gem.add_dependency 'ffaker', '>= 2'
47
- gem.add_dependency 'cancancan', '~> 3.0.0'
48
- gem.add_dependency 'font-awesome-rails'
49
- gem.add_dependency 'premailer'
50
- gem.add_dependency 'nokogiri'
51
- gem.add_dependency 'responds_to_parent'
52
- gem.add_dependency 'rails3-jquery-autocomplete'
53
- gem.add_dependency 'thor'
54
- gem.add_dependency 'rails_autolink'
55
- gem.add_dependency 'coffee-script-source', '~> 1.8', '>= 1.8.0' # pegged until https://github.com/jashkenas/coffeescript/issues/3829 is resolved
56
- gem.add_dependency 'country_select'
57
-
58
- # FatFreeCRM has released it's own versions of the following gems:
59
- #-----------------------------------------------------------------
60
- gem.add_dependency 'ransack', '>= 1.6.2'
61
- gem.add_dependency 'email_reply_parser_ffcrm'
62
- end
data/lib/tasks/.gitkeep DELETED
File without changes
File without changes
data/script/rails DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
5
-
6
- APP_PATH = File.expand_path('../config/application', __dir__)
7
- require File.expand_path('../config/boot', __dir__)
8
- require 'rails/commands'
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (c) 2008-2013 Michael Dvorkin and contributors.
4
- #
5
- # Fat Free CRM is freely distributable under the terms of MIT license.
6
- # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
7
- #------------------------------------------------------------------------------
8
- require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
9
-
10
- describe Admin::GroupsController do
11
- end
@@ -1,251 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (c) 2008-2013 Michael Dvorkin and contributors.
4
- #
5
- # Fat Free CRM is freely distributable under the terms of MIT license.
6
- # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
7
- #------------------------------------------------------------------------------
8
- require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
9
-
10
- describe Admin::UsersController do
11
- before(:each) do
12
- login_admin
13
- set_current_tab(:users)
14
- end
15
-
16
- # GET /admin/users
17
- # GET /admin/users.xml HTML
18
- #----------------------------------------------------------------------------
19
- describe "GET index" do
20
- it "assigns all users as @users and renders [index] template" do
21
- @users = [current_user, create(:user)]
22
-
23
- get :index
24
- expect(assigns[:users].first).to eq(@users.last) # get_users() sorts by id DESC
25
- expect(assigns[:users].last).to eq(@users.first)
26
- expect(response).to render_template("admin/users/index")
27
- end
28
-
29
- it "performs lookup using query string" do
30
- @amy = create(:user, username: "amy_anderson")
31
- @bob = create(:user, username: "bob_builder")
32
-
33
- get :index, params: { query: "amy_anderson" }
34
- expect(assigns[:users]).to eq([@amy])
35
- expect(assigns[:current_query]).to eq("amy_anderson")
36
- expect(session[:users_current_query]).to eq("amy_anderson")
37
- end
38
- end
39
-
40
- # GET /admin/users/1
41
- # GET /admin/users/1.xml
42
- #----------------------------------------------------------------------------
43
- describe "GET show" do
44
- it "assigns the requested user as @user and renders [show] template" do
45
- @user = create(:user)
46
-
47
- get :show, params: { id: @user.id }
48
- expect(assigns[:user]).to eq(@user)
49
- expect(response).to render_template("admin/users/show")
50
- end
51
- end
52
-
53
- # GET /admin/users/1/edit AJAX
54
- #----------------------------------------------------------------------------
55
- describe "GET edit" do
56
- it "assigns the requested user as @user and renders [edit] template" do
57
- @user = create(:user)
58
-
59
- get :edit, params: { id: @user.id }, xhr: true
60
- expect(assigns[:user]).to eq(@user)
61
- expect(assigns[:previous]).to eq(nil)
62
- expect(response).to render_template("admin/users/edit")
63
- end
64
-
65
- it "assigns the previous user as @previous when necessary" do
66
- @user = create(:user)
67
- @previous = create(:user)
68
-
69
- get :edit, params: { id: @user.id, previous: @previous.id }, xhr: true
70
- expect(assigns[:previous]).to eq(@previous)
71
- end
72
-
73
- it "reloads current page with the flash message if user got deleted" do
74
- @user = create(:user)
75
- @user.destroy
76
-
77
- get :edit, params: { id: @user.id }, xhr: true
78
- expect(flash[:warning]).not_to eq(nil)
79
- expect(response.body).to eq("window.location.reload();")
80
- end
81
-
82
- it "notifies the view if previous user got deleted" do
83
- @user = create(:user)
84
- @previous = create(:user)
85
- @previous.destroy
86
-
87
- get :edit, params: { id: @user.id, previous: @previous.id }, xhr: true
88
- expect(flash[:warning]).to eq(nil) # no warning, just silently remove the div
89
- expect(assigns[:previous]).to eq(@previous.id)
90
- expect(response).to render_template("admin/users/edit")
91
- end
92
- end
93
-
94
- # PUT /admin/users/1
95
- # PUT /admin/users/1.xml AJAX
96
- #----------------------------------------------------------------------------
97
- describe "PUT update" do
98
- describe "with valid params" do
99
- it "updates the requested user, assigns it to @user, and renders [update] template" do
100
- @user = create(:user, username: "flip", email: "flip@example.com")
101
-
102
- put :update, params: { id: @user.id, user: { username: "flop", email: "flop@example.com" } }, xhr: true
103
- expect(assigns[:user]).to eq(@user.reload)
104
- expect(assigns[:user].username).to eq("flop")
105
- expect(response).to render_template("admin/users/update")
106
- end
107
-
108
- it "reloads current page is the user got deleted" do
109
- @user = create(:user)
110
- @user.destroy
111
-
112
- put :update, params: { id: @user.id, user: { username: "flop", email: "flop@example.com" } }, xhr: true
113
- expect(flash[:warning]).not_to eq(nil)
114
- expect(response.body).to eq("window.location.reload();")
115
- end
116
-
117
- it "assigns admin rights when requested so" do
118
- @user = create(:user, admin: false)
119
- put :update, params: { id: @user.id, user: { admin: "1", username: @user.username, email: @user.email } }, xhr: true
120
- expect(assigns[:user]).to eq(@user.reload)
121
- expect(assigns[:user].admin).to eq(true)
122
- expect(response).to render_template("admin/users/update")
123
- end
124
-
125
- it "revokes admin rights when requested so" do
126
- @user = create(:user, admin: true)
127
- put :update, params: { id: @user.id, user: { admin: "0", username: @user.username, email: @user.email } }, xhr: true
128
- expect(assigns[:user]).to eq(@user.reload)
129
- expect(assigns[:user].admin).to eq(false)
130
- expect(response).to render_template("admin/users/update")
131
- end
132
- end
133
-
134
- describe "with invalid params" do
135
- it "doesn't update the requested user, but assigns it to @user and renders [update] template" do
136
- @user = create(:user, username: "flip", email: "flip@example.com")
137
-
138
- put :update, params: { id: @user.id, user: {} }, xhr: true
139
- expect(assigns[:user]).to eq(@user.reload)
140
- expect(assigns[:user].username).to eq("flip")
141
- expect(response).to render_template("admin/users/update")
142
- end
143
- end
144
- end
145
-
146
- # GET /admin/users/1/confirm AJAX
147
- #----------------------------------------------------------------------------
148
- describe "GET confirm" do
149
- it "assigns the requested user as @user and renders [confirm] template" do
150
- @user = create(:user)
151
-
152
- get :confirm, params: { id: @user.id }, xhr: true
153
- expect(assigns[:user]).to eq(@user)
154
- expect(response).to render_template("admin/users/confirm")
155
- end
156
-
157
- it "reloads current page is the user got deleted" do
158
- @user = create(:user)
159
- @user.destroy
160
-
161
- get :confirm, params: { id: @user.id }, xhr: true
162
- expect(flash[:warning]).not_to eq(nil)
163
- expect(response.body).to eq("window.location.reload();")
164
- end
165
- end
166
-
167
- # DELETE /admin/users/1
168
- # DELETE /admin/users/1.xml AJAX
169
- #----------------------------------------------------------------------------
170
- describe "DELETE destroy" do
171
- it "destroys the requested user and renders [destroy] template" do
172
- @user = create(:user)
173
-
174
- delete :destroy, params: { id: @user.id }, xhr: true
175
- expect { User.find(@user.id) }.to raise_error(ActiveRecord::RecordNotFound)
176
- expect(response).to render_template("admin/users/destroy")
177
- end
178
-
179
- it "handles the case when the requested user can't be deleted" do
180
- @user = create(:user)
181
- @account = create(:account, user: @user) # Plant artifact to prevent the user from being deleted.
182
-
183
- delete :destroy, params: { id: @user.id }, xhr: true
184
- expect(flash[:warning]).not_to eq(nil)
185
- expect { User.find(@user.id) }.not_to raise_error
186
- expect(response).to render_template("admin/users/destroy")
187
- end
188
- end
189
-
190
- # POST /users/auto_complete/query AJAX
191
- #----------------------------------------------------------------------------
192
- describe "POST auto_complete" do
193
- before(:each) do
194
- @auto_complete_matches = [create(:user, first_name: "Hello")]
195
- end
196
-
197
- it_should_behave_like("auto complete")
198
- end
199
-
200
- # PUT /admin/users/1/suspend
201
- # PUT /admin/users/1/suspend.xml AJAX
202
- #----------------------------------------------------------------------------
203
- describe "PUT suspend" do
204
- it "suspends the requested user" do
205
- @user = create(:user)
206
-
207
- put :suspend, params: { id: @user.id }, xhr: true
208
- expect(assigns[:user].suspended?).to eq(true)
209
- expect(response).to render_template("admin/users/suspend")
210
- end
211
-
212
- it "doesn't suspend current user" do
213
- @user = current_user
214
-
215
- put :suspend, params: { id: @user.id }, xhr: true
216
- expect(assigns[:user].suspended?).to eq(false)
217
- expect(response).to render_template("admin/users/suspend")
218
- end
219
-
220
- it "reloads current page is the user got deleted" do
221
- @user = create(:user)
222
- @user.destroy
223
-
224
- put :suspend, params: { id: @user.id }, xhr: true
225
- expect(flash[:warning]).not_to eq(nil)
226
- expect(response.body).to eq("window.location.reload();")
227
- end
228
- end
229
-
230
- # PUT /admin/users/1/reactivate
231
- # PUT /admin/users/1/reactivate.xml AJAX
232
- #----------------------------------------------------------------------------
233
- describe "PUT reactivate" do
234
- it "re-activates the requested user" do
235
- @user = create(:user, suspended_at: Time.now.yesterday)
236
-
237
- put :reactivate, params: { id: @user.id }, xhr: true
238
- expect(assigns[:user].suspended?).to eq(false)
239
- expect(response).to render_template("admin/users/reactivate")
240
- end
241
-
242
- it "reloads current page is the user got deleted" do
243
- @user = create(:user)
244
- @user.destroy
245
-
246
- put :reactivate, params: { id: @user.id }, xhr: true
247
- expect(flash[:warning]).not_to eq(nil)
248
- expect(response.body).to eq("window.location.reload();")
249
- end
250
- end
251
- end
@@ -1,43 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Copyright (c) 2008-2013 Michael Dvorkin and contributors.
4
- #
5
- # Fat Free CRM is freely distributable under the terms of MIT license.
6
- # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
7
- #------------------------------------------------------------------------------
8
- require 'spec_helper'
9
-
10
- describe ApplicationController do
11
- describe "auto_complete_ids_to_exclude" do
12
- it "should return [] when related is nil" do
13
- expect(controller.send(:auto_complete_ids_to_exclude, nil)).to eq([])
14
- end
15
-
16
- it "should return [] when related is ''" do
17
- expect(controller.send(:auto_complete_ids_to_exclude, '')).to eq([])
18
- end
19
-
20
- it "should return campaign id 5 when related is '5' and controller is campaigns" do
21
- expect(controller.send(:auto_complete_ids_to_exclude, '5').sort).to eq([5])
22
- end
23
-
24
- it "should return [6, 9] when related is 'campaigns/7'" do
25
- allow(controller).to receive(:controller_name).and_return('opportunities')
26
- campaign = double(Campaign, opportunities: [double(id: 6), double(id: 9)])
27
- expect(Campaign).to receive(:find_by_id).with('7').and_return(campaign)
28
- expect(controller.send(:auto_complete_ids_to_exclude, 'campaigns/7').sort).to eq([6, 9])
29
- end
30
-
31
- it "should return [] when related object is not found" do
32
- expect(Campaign).to receive(:find_by_id).with('7').and_return(nil)
33
- expect(controller.send(:auto_complete_ids_to_exclude, 'campaigns/7')).to eq([])
34
- end
35
-
36
- it "should return [] when related object association is not found" do
37
- allow(controller).to receive(:controller_name).and_return('not_a_method_that_exists')
38
- campaign = double(Campaign)
39
- expect(Campaign).to receive(:find_by_id).with('7').and_return(campaign)
40
- expect(controller.send(:auto_complete_ids_to_exclude, 'campaigns/7')).to eq([])
41
- end
42
- end
43
- end