gdpr_rails 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -1
- data/app/controllers/policy_manager/application_controller.rb +1 -1
- data/app/controllers/policy_manager/categories_controller.rb +1 -1
- data/app/helpers/policy_manager/terms_helper.rb +6 -0
- data/app/jobs/policy_manager/exporter_job.rb +7 -2
- data/app/mailers/policy_manager/portability_mailer.rb +19 -11
- data/app/models/policy_manager/concerns/user_behavior.rb +3 -3
- data/app/models/policy_manager/portability_request.rb +3 -3
- data/app/models/policy_manager/user_term.rb +1 -1
- data/app/views/policy_manager/shared/_header.erb +5 -5
- data/config/locales/en.yml +2 -0
- data/config/locales/es.yml +2 -0
- data/config/locales/fr.yml +2 -0
- data/config/locales/tr.yml +126 -0
- data/lib/policy_manager/config.rb +4 -4
- data/lib/policy_manager/exporter/handler.rb +27 -23
- data/lib/policy_manager/exporter.rb +9 -9
- data/lib/policy_manager/version.rb +1 -1
- data/spec/controllers/policy_manager/portability_requests_controller_spec.rb +6 -6
- data/spec/dummy/config/database.yml +1 -1
- data/spec/models/policy_manager/exporter_spec.rb +14 -14
- data/spec/models/policy_manager/portability_request_spec.rb +13 -13
- metadata +59 -406
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -326
- data/spec/dummy/log/test.log +0 -206891
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/--/--mfnHuBeUWp4S0t5Gy9k8VFIhwH9_LeypHDTu0Tr_Y.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-N/-NoFiyuUvy7n3K1PxiEyF7_ntONf3urTihjqgwKchcg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-X/-XFR33TgzW2uZ8FmmS1qlvD_wt-ox_qSWUqkuGQ6bNY.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-Y/-YgMOSbIN0nMswWct7su9H9L0ICRZaRq34uti66AccM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-j/-joLD6bGYWbwr7m8lbVykq-N3VlbwjsslJhFpvIO1M0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0D/0DLlhyih7JQM6a36xn80gBEsL2G82TErD8Dj_whhN-U.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0g/0gU8kGXleEoducYsLkjy0I4rqnsgoWaK8lr0kAj6bp8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1v/1vjyDvVwQZlnzxWly1brkoOTCuyetgHeuvD_e6dGKyM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/27/27CLtUz28kIcg6tIfaI14dpsrgCp7ic4eWUty-oq-sU.cache +0 -3
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2F/2FM4u0wEV34qcad5bAQ22XooiME80Q0nmdLaov7r7rE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2y/2Y306WtiuaczRMe98h_Ef4LsZ7wmIC8iaa8c8EJinbs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2y/2yX2unfUzEDiZ4-YOag_nKmTGmuMxpM11mKaJOvfOlQ.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3M/3Me2fKJpLVszUwxPRDsRAmn-4i9xo32wikeSt4U2wP8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/45/45ictadc7ZQCwBtuyUUnDphpgBJ7TJ6pcfxw3Rm8Vrs.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4P/4PwXz69YXiFINqI_IN8j6RKuEt3OdudXYYLnaUq7rjo.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4h/4hzVRVCmNzCaipE8Gr5-DBLrbCGbWpjcyBY9LdEj3jo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4x/4xpoeWRviufHh_q5whnyBr0pk8UQxCZPYQ6ftOStGLU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/54/54rewMnifJtcFqBk72TyTygb95Ttwy9bKfBZExpc-C0.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/58/58sAgzwP4eFt7yuB9XYB1mxdOz0FJEh-xIOdTwXXE2Y.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5A/5AIrhjjjXhTfhDPF_yhVxN6qDlH7W7my02uwW-21MjE.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5h/5hHJvRWBp2bv5Ree05fgFaFaPqfaRhMLTEdkG-O6aVM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5m/5mO5S2MfbEUVxkXH46amJgMg-T2BHvPkW-PHDU1kP68.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/5r/5rJJjxkhn8Z92_UbvZfgoL5BcowL6nZNszQvsginLnk.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6B/6B2r6p0vt9YHgITkhKEgJagg9pCZvP28XC8UOVcbLSQ.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6s/6svTyA-_cLrryEIxjCg2dFwGFJQhPSq8bfl7NHX-6S8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7d/7dwWkcsTuGWyWtwftKHD_gXp9W4odm_5You_aKR4fsg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7g/7gQSNgL-2DO1ds5Jv0PIG150XXV5HrGgSE1_9Y9lTGw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/87/87l8g48DzMElacGqDKT2Tw4SN-vPuWe-87l1WVSGGSU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8M/8MYgLnjJJ3blsJWL9xRH67td4kEWctoW8vYSPk16D4E.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8r/8rGgH_J5ehLhHbE7cWWoP9Zec-2rlNUjBS9UFF-2ZIM.cache +0 -3
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9j/9j6v9HXgAkMtDkZYoqP7GOaorSZsL5Rj7hbAazvTOzc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/A0/A0XqQCJjWHzYPT5e9-HBsso43aW4FSEDl0k6e4VGR2k.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AZ/AZG0LaS8wP07WA8vP7N6xGcOT1q-p2jPeab90NjvW10.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Aw/AwefclPt5cLFlWCSECVgQvodBrq_1V9JWkOGvfpoVe0.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Bm/Bm3fgDgbZDpu1Tg8RWJNvhqP_EtKfEUezpd5RtvfnVY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/C_/C_P5dY0UXIhjEA7OrFQd1aofpQ-_F7rDisjiNerCFeE.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/DU/DUUFwyjNig6oW4WouEVhntJB_JYYRXhEnvXjUhz2SS8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ex/ExToesB1w5_4dhyfTB7w2rnEW3JYsyiDCwQS5YryS6c.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/FG/FGTqZQ-ICnWRw_FIx5roRi8IATSdS5OkwrMtS3XtXBY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Fi/Fi7XjszeLrn8TVUuJQRwrmmVolcJXedDZtlfXb0e0_8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gk/GkeSNzAIKac6T0REp80cIYHQW869pVVY8_jS7YbxfXQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gk/gkajaBT4J0v708PEXfi7rmWyPyXGbFTU0rbt28hhuCU.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/H0/H0IluIpOXOr2BxNlpAjzwArc75w56IB4mlScIpBdQ24.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/H1/H1LhaUgwIO1D2k0RMMo2na3l-Elc5xpQKK5iBOp4F5I.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ht/HtqVv_OtFVLOaqSfS6SFC1-xHJcXV16Htu4GXJS7Ge8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/JU/JUxqlgeXXBppIjEN9UyWuqzr4PfBPsUj011p_oO71do.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/JX/JXUoRCJSB2Hqb7r8dj7NjeH3GmkBCMgZiXLlDitT9_8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/KT/KT-nMmPKXvwiFzLexhvO9mK4-Z16Uy2lgSh-C_2tl2A.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/K_/K_D8m4e3tDZRmnK3CKTP8bP5kmay4w-Td9Cu5U-ED-I.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Kb/KbL79CL_ql47tz33zx6iBjdGneWja5vKKEEAkW_w7NM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Kb/KbZGMmB8DJ2BA4mcdSXN4bebOMd0j8s4PkB0S-23XfE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/L3/L31_eyjOuFh92q-RAafvpnxszCNW9HoObtWVS4gpQHo.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/LL/LLlnPIuN7QMIMMQ5nRnTNtLtkMx1LXfhg6fs2tDYaSk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lm/LmnZza-YSYZY-dEHFm3EWLFVvsxsIOnCKJ5-3zlrOKk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Lu/LuFRHx4qb0l1K_A0pjAOQO8llKL2WaJRMKuH9JMNVw0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ly/Lype9QbYtOa9M-u3fcbKpnwunSd0vsgm4kC_Ljy3ei8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/OA/OAtvFgJJQnarYrhlAK-vSgn9egwT1NDz78YqjstXCBA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/OY/OYj0e5ox1ill6KB0XxgjT7dpx88kd1ow52UsaJwSHtE.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Oc/OcrdvWm5dtFEHIomtrRuAU5SquzymBRnNyRpx-cEWvw.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/QL/QLwCOHeeYbzWHu9pvmWf9zGaIVz7Jr8aJqETzRVhj2g.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qo/QoIXukdcQouQLyMkre-k41LX_pHd0kKo57VZ79D9GS8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Qp/QpwXeqd_RNMk--6i6e5jHxRvn5PaARBKDucD5In1F-s.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/TN/TN4TNVw5nI_0WW6X9CsSG4eDr1LJQclFhQNHtGOb2QA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/U0/U0FxO18TfrZeRQx8V4zoWPSskXIA2s9MHtP3lJfONWs.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/UC/UCvPD9uXZwJeEm-1pmKEMfgj4DjvUOf4dx2jhhhlv6k.cache +0 -3
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ue/UeAHhO5lBiMllQvT8e5iL1ddSRsZxH0BHjYjHdjcSTY.cache +0 -3
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ui/UiRXGeBaY88moPjIjUguzeNSGWaRyVS8tSCNjnwfwy8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Us/Us-RVGQ4-a94Pu0yyugJVYf4RxGXf-xlPqYtAiwYWjU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ut/UtGzFRo4wbBgA2fF_MZ8krZa159Z1A6aoxGAXDPmZVw.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VG/VGChoLzfgrn9FobW4pun_Jde-mQ3MgDloMfYR8m6drM.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/VO/VOMqAX4P5jY9p79SxqoDgMhcwyV3Ji7NH4ZBRN2C4Eg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vk/VkQUb2zhn-uTclXve3ha-oUJAN9l-rmuxFVuNSz9KYk.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Vm/VmFxkBmoolMrxZI2hEaFfp8wPGc33_oxQoGyaFsh70M.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/W-/W-pTadlsf_Vpkn5yWhaLXUV1aKGLvP0nhxewZnwjGBc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/W3/W3Hibs-2ZXTSO00vDV2YhmzHjmvegpc-rARFtZTgyy8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/X-/X-RlCEy2cN8eQ1d2pqsNwUZ4H4ej8ztuZ0MvZKgKmkk.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/X8/X8wS5wYKKTutqBv6YpD5Gpm2s_wyBehAQww9qxgE96Q.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/X_/X_IvNiCc17UkQfT5hGGeSgXOXQd1jvf9mqLtwgfVBoE.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yc/Yc2cY6cLNXFppCCbQSm3-FiGXtBtRa3Tq1RKxgARljA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yo/YoZWJS_zeJGl5xpGe-YaWy9J3RRNaVwVnMLNbrWN6oM.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZI/ZIsNAJOrG64AKjeXnqm0vARAqYLKq6PVhiiYDZXsuCg.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZX/ZX7fzX0ySlnLNNqdDO5sM6XA_ajPzRgqPCnLt8hVYcA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zy/Zy0_Bbsl6EQYVutKT0oH9YCq2Cl53wPVkZn0dqjK4xk.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_G/_GWVUnXr5EcwMXjUvdA1DwSGUKeBIFN8_3HqLUuQ2bc.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_K/_KRxFH5M3jnffTGbv8MMa9F35zU5K18JLkjYWb8n4K4.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/_c/_c__nkkVWonX6jTabzOJ1VjpZtlO8F43EC-KB4ZaIZg.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/a5/A5zisQ1zyxFgISw9mztcz0XbHTdurklNjleMx1aUA5U.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/a5/a5O3NIdzPl0cdbCdVkYA9P9lpNRPjyMCViolW9XhLVo.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/aS/aS6nnaCaO7L6EkZaEVpCmd8KMTcB7_Z2RzKYn9y4EQ0.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/am/amrEpszeLKtdRNJO_wvfR4CrCz0Ir06_TX8B7pq1cBg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bD/bD1YRW0nGSZSi6Yjf72ndpk0mSsnE2bIqF9HFpuQvJQ.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bL/bLTJSRS-mPPtzb3ADwW73pG5RKqBMNyRSzmSykFI4aE.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bL/bLpXenoWnkxKfzeQ13hl4RPrP7Bz-CtaezkMzIQlza8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/b_/b_Itlk9QZZd7Rvf8kcA4yLP1R5Acu7jB-m1xQiSU0qE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dG/Dg4KPTfNIbu-ZWN3w-oz6AOGW2Tnl6wiGMof---xBwM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dG/dGSOHXa2AZ0InnD5tvsjuust4kitbUMQ2Sl_m8wAyf8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dk/dkEweQBtw4njrs6iVJnj7ETQ4TymXPZEco06LxR-GkU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dt/dtAVvVgzfd4QVeFVwgVQEqfOZHSLv31NAGS--_AFFbk.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dv/DvhTH0zff-ovDk0WuxtJVX52w1Dsj8mpTrlu13gFZLk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/dv/dvFJw0JQySkre2qTOuLi3LGVG3Ph4EZAlO6DGxv-NnU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eE/eEuAk0x0P4OKjqc5gajF3htm7mCKzyqIXg6J12bCC3I.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ef/efZTW0s76NnPeT2AOVM0HzsJS1xLONNJUHYE1zdCwGY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/el/elst6LxDf6uiVQqncFBRktiesQ9v596iWdTQYZawHEM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eu/euKy5W1SAHGCFuJPKmIrFquEdTMDPZUo6cDEhrPTLls.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fA/fAViRsSZA5XPpdMKXZISeo6pwTqQvSbgV3DwDIabGNo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fD/fDLaGMMGspyWygH8LlU0lxLyilp70uVzb4RCmhjbnhM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fP/FPY6pMfBVF2ZZFxjkNoHy-pIX28YUKhYxeA3NetoKcc.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fP/fPpdI9YznBUi8ANFCN5U-ZVmPliuf4NEJVoXO51WvJc.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fP/fpQeY6CbAun98ZHomPg7-bNYZhRLvsamvuecQS5LMBU.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/g0/g0330d9boKb5chcX02AeoulsGjVEEjZJWdlpD_XpJY4.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/gD/gD6ot5sYgE-WBfmqQ7IaCYuSjtyIndn5s8O2MW6o8GU.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/hf/hfbBpe8z0eauhajpHgM1LKCGRdXHNCfPKmAJG6PziWw.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/iH/iH-iP8fWBpiKteXxHSgWYNCTvH3PoKU3j9HU7N1beK8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/im/im-Ko494HDK7aTzKHqKNowN3DyIBJn4TiHUm2mn2dhM.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/j6/j65tprlPKeR-CehSzEgLSiUFS3AaYIJuzAKEk61ZA1Y.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/j8/j8dyiExD2nG1_gMxpZvzzwB0yaR1R5ENefU2luvhl7Y.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jH/jHf-4aOYfA7SkTW8_sIcQXMi26wGt-lhJPOpLrsXitI.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jP/jPNHfJkhkye_m0cM-YrVn04QupctcHRhUu8iwOOqhtw.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/k9/k9YLRLSeoYGPd6U7HVdzqbKDoJ-kHVlHpqDh3yxctjk.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/kc/kcFhYA0d3emrDxUmud7c48o5u6yQwyeOVtMmwORgpBw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lD/lDyaaMV05ckGoGvz03Cr_FziEutVI5z8XmGZwSV2ZpY.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lk/lk9QnvV0ljxlBsK_QCOrLY03_QjoK5h_pKjjxNEd3SA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lr/lrTlK4TrzHJzJlyneDsyErO7wWUWPDmftoHVW7Rgj-0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lt/lty3VRZktpe4UVJ4_zXLYxW4_kA4BxdzbEJsDuzd2B0.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mE/mESJqSh3IknWVtFxGBdjfQ7ucP3Qr3AnX_VN5XI8H9E.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mN/mNRYoOqJlB5Q4bgxmEEBCwKWfK7rMHv78T86bTHR--Q.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mX/mX1nlsL_SWOB4y22W5FheRX0YEONKyOY7xUeIvRiHco.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nB/nBZaod2TAg-SCCdhqam2NT8yByjFoYKRNsrK2yYoQh8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nU/nUx82NupskukOpC2x2UWPfPZYfcqn_YiCdpx9zoDLSA.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/n_/n_xYqQYhwEMQknb3jFQnjlxxBE9TzMNHCdJ-bEyZFIw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/nx/nxTv3sKVUQZADJyM3dPaVmUA78MIsMLD_K279yN_GsI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/o1/o14kRWbYMyhU0inykrB0P9jKoKHqRF0SwhpubuX6taU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oQ/oQLnX-2tNalupH2T660cx2Bv3YARzSKu8JZKCLp0j20.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oQ/oQcpLerwTeJdicTzkZbtuTnmEkICELpCDAJS7ItOd7U.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ob/obVCEvP8Mw6ENSbPK7wgHTWZpqyjoex_URTP6dey67g.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/oz/ozRNsKle-0dkVv9TVQv2L4j0KHKVorNn-Y1ZoqeH23k.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pG/pGx8dgb85gcQO3XOrNlHmvafHPF-lL3uSCNTdhqPX18.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/p_/p_PWUDJLQf1atvZhhoyb-0AaUsrtHK8KU7kagZ2zyRM.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pm/pmbWi2btd3KtBAF8CYhiLr2-ukFXxId0ylowGfqydkY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/q2/q2K0N7MblONWdUKKS4c9bfwNHDWuRkYadJCjok9UCXI.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qu/qu7l1v4I55NHtTUGNIuAM2wJ3QBOQhANIRUwle_j1Y4.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rP/rPeQ8umAkR6JSXEzQ6m6oqhlQVPkbF4_C9Rikas9Ziw.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rV/rVSAQ3sTHbGs4UPCwZRbSQjlbfOm8AzJqR4k2gkf9hM.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sD/sD_kmbR8U3xvyAe4HyDRvQjP0YD47jZyEbmhEbMFgWE.cache +0 -3
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sH/sHXKrc5B3KBol-bEZM0XIznn6_BQVCPF7hasOTXNyO8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sM/sMKpdRSlEcVRbOqSsc__aw5mVMuXK3ZEPZCvViYNda8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sc/scdDaFuy71mZQ2arS0dSZNmPLSmiIMZa0swBAmPyiU8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/se/seYQsoLihjxVNHqBL3F_R5iyDgAdEYJpmMe2BhlMkeo.cache +0 -3
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sg/sgDzGRWafDZfwXDyiKhxxXXMYcwJd-72HeJTMbEpb3E.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uU/uUt5sf6NA2ya1M2MpCcLhrhyUw4WeEGEa8vsf7cekBQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ug/ug5RHgJJ200_4orxQv-xqHnZDyPiPjgRhTVz7vgzWY4.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/v6/v6_ojZlJ1QDYoLVNY2SApvICGklrej1fxYJxFWb8IM4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/va/Vad7m3FUgOsZS7pl3DgNAPEvfAqBAG1_WKjqpGlJTG8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/va/va5poKCjsL5Wp3j5hL7wFbD7TcPBzheI2tiSnBh_3tM.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xs/xsgBreUPfNwnblzhAkGChr7kJbU7PqO8PWyEW-CfEQY.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/y4/y4-yGJgEeIDCoxA20rsfXeJYRakmtzwIxmHZLMmAutM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/y7/y7F3_2-J_Arx_AkD0P3mAkqOjZ9JiMlGaxpmSM7lsRc.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/yF/yFPchNl88oBAJTCBwi9H9eL9EV2D7fNcEM7JjPpgg_k.cache +0 -2
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/z4/z4D0MyZoHMzE_XiqOnR-a9JLt4SpmpFAFHiFUNIKEV8.cache +0 -1
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zP/zPFxDYRLW-AMnp9IbPtHKk_--8Iy8dluhgknBCcqZcA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zZ/zZiuImW-YlPd_8deyKGG-Wku7gzX-sxgPRUJTBOpO0U.cache +0 -1
- data/spec/dummy/tmp/portability/1/build.zip +0 -0
- data/spec/dummy/tmp/portability/11/build.zip +0 -0
- data/spec/dummy/tmp/portability/14/build.zip +0 -0
- data/spec/dummy/tmp/portability/15/build.zip +0 -0
- data/spec/dummy/tmp/portability/17/build.zip +0 -0
- data/spec/dummy/tmp/portability/2/build.zip +0 -0
- data/spec/dummy/tmp/portability/4/build.zip +0 -0
- data/spec/dummy/tmp/portability/8/build.zip +0 -0
- data/spec/dummy/tmp/portability/9/build.zip +0 -0
- data/spec/dummy/tmp/restart.txt +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 81060ded3e832230b6f4536bdfc1eacf0df6bfc2f4e812ed0efde3f0c926c91b
|
4
|
+
data.tar.gz: d42e46f8f425c30855ea979d1e8add10ef65b0415b836da61411d563c1df7383
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8341015bf4175df39f8ef6e5a82f48c6ae6f0c0478cf78ef0132302d7c1b4f4fe06e638cd85c6f97e3804cadf7cc3870efde6ddfe9c008c58d11a2a5b437dbaa
|
7
|
+
data.tar.gz: 1f0af3c64fd15593aa1627674e19a4c46501f886dd4f0afd9ce530e702e5f1415cf0d35a85766b43cab07dac123ea08a85bb38853d8bfffdf0e7f87bd6d14daf
|
data/README.md
CHANGED
@@ -3,8 +3,13 @@ module PolicyManager
|
|
3
3
|
queue_as :default
|
4
4
|
|
5
5
|
def perform(user_id)
|
6
|
-
|
6
|
+
user_model = if Config.user_resource.is_a?(String)
|
7
|
+
Config.user_resource.constantize
|
8
|
+
else
|
9
|
+
Config.user_resource
|
10
|
+
end
|
11
|
+
user = user_model.find(user_id)
|
7
12
|
Config.exporter.perform(user)
|
8
13
|
end
|
9
14
|
end
|
10
|
-
end
|
15
|
+
end
|
@@ -3,14 +3,14 @@ module PolicyManager
|
|
3
3
|
|
4
4
|
def progress_notification(portability_request_id)
|
5
5
|
@portability_request = PortabilityRequest.find(portability_request_id)
|
6
|
-
@user =
|
7
|
-
|
6
|
+
@user = find_user_resource(@portability_request.user_id)
|
7
|
+
|
8
8
|
opts = { from: Config.from_email, to: @user.email, subject: I18n.t("terms_app.mails.progress.subject") }
|
9
9
|
opts.merge!({
|
10
|
-
template_path: PolicyManager::Config.exporter.mailer_templates[:path].to_s,
|
10
|
+
template_path: PolicyManager::Config.exporter.mailer_templates[:path].to_s,
|
11
11
|
template_name: PolicyManager::Config.exporter.mailer_templates[:progress]
|
12
12
|
}) if has_custom_template?(:progress)
|
13
|
-
|
13
|
+
|
14
14
|
set_mail_lang
|
15
15
|
|
16
16
|
mail(opts)
|
@@ -18,26 +18,26 @@ module PolicyManager
|
|
18
18
|
|
19
19
|
def completed_notification(portability_request_id)
|
20
20
|
@portability_request = PortabilityRequest.find(portability_request_id)
|
21
|
-
@user =
|
21
|
+
@user = find_user_resource(@portability_request.user_id)
|
22
22
|
@link = @portability_request.download_link
|
23
|
-
|
23
|
+
|
24
24
|
opts = { from: Config.from_email, to: @user.email, subject: I18n.t("terms_app.mails.completed.subject") }
|
25
25
|
opts.merge!({
|
26
|
-
template_path: PolicyManager::Config.exporter.mailer_templates[:path].to_s,
|
26
|
+
template_path: PolicyManager::Config.exporter.mailer_templates[:path].to_s,
|
27
27
|
template_name: PolicyManager::Config.exporter.mailer_templates[:complete]
|
28
28
|
}) if has_custom_template?(:complete)
|
29
|
-
|
29
|
+
|
30
30
|
set_mail_lang
|
31
31
|
|
32
32
|
mail(opts)
|
33
33
|
end
|
34
34
|
|
35
35
|
def admin_notification(user_id)
|
36
|
-
@user =
|
37
|
-
|
36
|
+
@user = find_user_resource(user_id)
|
37
|
+
|
38
38
|
opts = { from: Config.from_email, to: Config.admin_email(@user), subject: I18n.t("terms_app.mails.admin.subject", email: @user.email) }
|
39
39
|
opts.merge!({
|
40
|
-
template_path: PolicyManager::Config.exporter.mailer_templates[:path].to_s,
|
40
|
+
template_path: PolicyManager::Config.exporter.mailer_templates[:path].to_s,
|
41
41
|
template_name: PolicyManager::Config.exporter.mailer_templates[:admin]
|
42
42
|
}) if has_custom_template?(:admin)
|
43
43
|
|
@@ -57,5 +57,13 @@ module PolicyManager
|
|
57
57
|
PolicyManager::Config.exporter.mailer_templates[template].present? && PolicyManager::Config.exporter.mailer_templates[:path].to_s.present?
|
58
58
|
end
|
59
59
|
|
60
|
+
def find_user_resource(user_id)
|
61
|
+
user_model = if Config.user_resource.is_a?(String)
|
62
|
+
Config.user_resource.constantize
|
63
|
+
else
|
64
|
+
Config.user_resource
|
65
|
+
end
|
66
|
+
user_model.find(user_id)
|
67
|
+
end
|
60
68
|
end
|
61
69
|
end
|
@@ -4,7 +4,7 @@ module PolicyManager::Concerns::UserBehavior
|
|
4
4
|
|
5
5
|
included do
|
6
6
|
has_many :user_terms, class_name: "PolicyManager::UserTerm", autosave: true
|
7
|
-
has_many :terms, through: :user_terms
|
7
|
+
has_many :terms, through: :user_terms, class_name: "PolicyManager::Term"
|
8
8
|
has_many :portability_requests, class_name: "PolicyManager::PortabilityRequest"
|
9
9
|
|
10
10
|
# adds policies
|
@@ -22,7 +22,7 @@ module PolicyManager::Concerns::UserBehavior
|
|
22
22
|
|
23
23
|
define_method :"check_#{rule_name}" do
|
24
24
|
if self.send(rule_name).blank? && needs_policy_confirmation_for?(rule.name)
|
25
|
-
errors.add(rule_name, "
|
25
|
+
errors.add(rule_name, I18n.t("terms_app.user_behavior.needs_confirmation"))
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -137,4 +137,4 @@ module PolicyManager::Concerns::UserBehavior
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
|
-
end
|
140
|
+
end
|
@@ -7,8 +7,8 @@ module PolicyManager
|
|
7
7
|
|
8
8
|
belongs_to :user, class_name: Config.user_resource.to_s
|
9
9
|
|
10
|
-
has_attached_file :attachment,
|
11
|
-
path: Config.exporter.try(:attachment_path) || Rails.root.join("tmp/portability/:id/build.zip").to_s,
|
10
|
+
has_attached_file :attachment,
|
11
|
+
path: Config.exporter.try(:attachment_path) || Rails.root.join("tmp/portability/:id/build.zip").to_s,
|
12
12
|
storage: Config.exporter.try(:attachment_storage) || :filesystem,
|
13
13
|
s3_permissions: :private
|
14
14
|
|
@@ -41,7 +41,7 @@ module PolicyManager
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def download_link
|
44
|
-
url = self.attachment.expiring_url(PolicyManager::Config.exporter.expiration_link)
|
44
|
+
url = self.attachment.expiring_url(PolicyManager::Config.exporter.expiration_link)
|
45
45
|
PolicyManager::Config.exporter.customize_link(url)
|
46
46
|
end
|
47
47
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</a>
|
9
9
|
|
10
10
|
<div class="d-flex order-lg-2 ml-auto">
|
11
|
-
|
11
|
+
|
12
12
|
<div class="dropdown">
|
13
13
|
<a href="#" class="nav-link pr-0 leading-none" data-toggle="dropdown">
|
14
14
|
<span class="avatar" style="background-image: url(<%= gravatar_url(controller.current_user, 40)%>)"></span>
|
@@ -29,14 +29,14 @@
|
|
29
29
|
</a>
|
30
30
|
<div class="dropdown-divider"></div>
|
31
31
|
-->
|
32
|
-
|
32
|
+
|
33
33
|
<% if PolicyManager::Config.logout_url.present? %>
|
34
34
|
<a class="dropdown-item" href="<%= PolicyManager::Config.logout_url %>">
|
35
35
|
<i class="dropdown-icon fe fe-log-out"></i>
|
36
36
|
<%= I18n.t("terms_app.sign_out") %>
|
37
37
|
</a>
|
38
38
|
<% end %>
|
39
|
-
|
39
|
+
|
40
40
|
</div>
|
41
41
|
</div>
|
42
42
|
|
@@ -54,7 +54,7 @@
|
|
54
54
|
<div class="col-lg order-lg-first">
|
55
55
|
|
56
56
|
<ul class="nav nav-tabs border-0 flex-column flex-lg-row">
|
57
|
-
|
57
|
+
|
58
58
|
<% if PolicyManager::Config.is_admin?(controller.current_user) %>
|
59
59
|
|
60
60
|
<li class="nav-item">
|
@@ -97,4 +97,4 @@
|
|
97
97
|
</div>
|
98
98
|
</div>
|
99
99
|
</div>
|
100
|
-
</div>
|
100
|
+
</div>
|
data/config/locales/en.yml
CHANGED
data/config/locales/es.yml
CHANGED
data/config/locales/fr.yml
CHANGED
@@ -0,0 +1,126 @@
|
|
1
|
+
tr:
|
2
|
+
terms_app:
|
3
|
+
user_behavior:
|
4
|
+
needs_confirmation: onay gerekiyor
|
5
|
+
title: Politika Yöneticisi
|
6
|
+
sub_title: Politika Yöneticisi
|
7
|
+
sign_out: Çıkış
|
8
|
+
menu:
|
9
|
+
policies: Politikalar
|
10
|
+
portability_requests: Portatiflik talepleri
|
11
|
+
user_portability_requests: Portatiflik taleplerim
|
12
|
+
user_pending_policies: Bekleyen politikalarım
|
13
|
+
misc:
|
14
|
+
back: Geri
|
15
|
+
edit: Düzenle
|
16
|
+
show: Göster
|
17
|
+
save: Kaydet
|
18
|
+
download: İndir
|
19
|
+
are_you_sure: Emin misiniz?
|
20
|
+
states:
|
21
|
+
draft: Taslak
|
22
|
+
published: Yayınlanmış
|
23
|
+
categories:
|
24
|
+
index:
|
25
|
+
title: Politikalar
|
26
|
+
table:
|
27
|
+
name: İsim
|
28
|
+
terms: Koşullar
|
29
|
+
show: Göster
|
30
|
+
show:
|
31
|
+
title: "%{name} Politikası"
|
32
|
+
new: Yeni Koşul
|
33
|
+
table:
|
34
|
+
id: Id
|
35
|
+
content: İçerik
|
36
|
+
state: Durum
|
37
|
+
updated_at: Güncellenme Tarihi
|
38
|
+
show: Göster
|
39
|
+
terms:
|
40
|
+
index:
|
41
|
+
title: Koşullar
|
42
|
+
button: Yeni Koşul
|
43
|
+
table:
|
44
|
+
description: Açıklama
|
45
|
+
category: Politika
|
46
|
+
updated_at: Güncellenme Tarihi
|
47
|
+
show: Göster
|
48
|
+
edit: Düzenle
|
49
|
+
destroy: Sil
|
50
|
+
new:
|
51
|
+
title: "%{name} yeni koşul"
|
52
|
+
state: Durum
|
53
|
+
description: Açıklama
|
54
|
+
button: Buton
|
55
|
+
error: koşul kaydetmede hata
|
56
|
+
created: Başarılı şekilde oluşturuldu
|
57
|
+
updated: Başarılı şekilde güncellendi
|
58
|
+
destroyed: Başarılı şekilde silindi
|
59
|
+
edit:
|
60
|
+
title: "%{name} koşulunu düzenle"
|
61
|
+
state: Durum
|
62
|
+
description: Açıklama
|
63
|
+
error: koşul kaydedilirken
|
64
|
+
show:
|
65
|
+
title: Koşul
|
66
|
+
last_update: Son güncelleme
|
67
|
+
table:
|
68
|
+
name: Adı
|
69
|
+
terms: Koşullar
|
70
|
+
show: Göster
|
71
|
+
user_terms:
|
72
|
+
pending:
|
73
|
+
title: Bekliyen politikalarım
|
74
|
+
empty: Bekliyen politika yok
|
75
|
+
show:
|
76
|
+
accepted:
|
77
|
+
message: Kabul edilen politika
|
78
|
+
question: Fikrini değiştirdin mi?
|
79
|
+
reject: Reddet
|
80
|
+
not_now: Şimdi değil
|
81
|
+
pending:
|
82
|
+
message: Lütfen bu politikayı kabul ediniz
|
83
|
+
agree: Kabul
|
84
|
+
not_now: Şimdi değil
|
85
|
+
user_portability_requests:
|
86
|
+
index:
|
87
|
+
title: Taşınabilirlik taleplerim
|
88
|
+
empty: Taşınabilirlik talebi yok
|
89
|
+
table:
|
90
|
+
state: Durum
|
91
|
+
file: Dosya
|
92
|
+
created_at: Oluşturulma zamanı
|
93
|
+
destroy: Sil
|
94
|
+
button: Yeni taşınabilirlik talebi
|
95
|
+
states:
|
96
|
+
pending: Beklemede
|
97
|
+
progress: İşlemde
|
98
|
+
completed: Tamamlandı
|
99
|
+
has_pending: Bekleyen bir isteğiniz var, henüz başka bir tane oluşturamzsınız.
|
100
|
+
created: Bilgi talebi gönderildi!
|
101
|
+
portability_requests:
|
102
|
+
index:
|
103
|
+
title: Bekleyen talepler
|
104
|
+
destroyed: Silme işlemi başarılı
|
105
|
+
empty: Herhangi bir talep yok
|
106
|
+
table:
|
107
|
+
user: Kullanıcı
|
108
|
+
state: Durum
|
109
|
+
created_at: Oluşturulma zamanı
|
110
|
+
destroy: Sil
|
111
|
+
confirm: Onayla
|
112
|
+
states:
|
113
|
+
pending: Beklemede
|
114
|
+
progress: İşlemde
|
115
|
+
completed: Tamamlandı
|
116
|
+
mails:
|
117
|
+
admin:
|
118
|
+
subject: Kullanıcı %{email} taşınabilirlik isteği gönderdi
|
119
|
+
progress:
|
120
|
+
subject: Verileriniz işleniyor
|
121
|
+
completed:
|
122
|
+
subject: Verileriniz kullanılabilir
|
123
|
+
will_paginate:
|
124
|
+
previous_label: "<"
|
125
|
+
next_label: ">"
|
126
|
+
page_gap: "…"
|
@@ -21,8 +21,8 @@ module PolicyManager
|
|
21
21
|
yield self
|
22
22
|
|
23
23
|
# sets this defaults after configuration
|
24
|
-
@@user_resource ||= User
|
25
|
-
@@admin_user_resource ||= User
|
24
|
+
@@user_resource ||= 'User'
|
25
|
+
@@admin_user_resource ||= 'User'
|
26
26
|
|
27
27
|
self
|
28
28
|
end
|
@@ -45,7 +45,7 @@ module PolicyManager
|
|
45
45
|
user.is_a? admin_user_resource
|
46
46
|
else
|
47
47
|
raise Rails.logger.error("GDPR ERROR! please add is_admin_method to your gdpr initializer") if @@is_admin_method.blank?
|
48
|
-
@@is_admin_method.call(user)
|
48
|
+
@@is_admin_method.call(user)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -78,4 +78,4 @@ module PolicyManager
|
|
78
78
|
end
|
79
79
|
|
80
80
|
end
|
81
|
-
end
|
81
|
+
end
|
@@ -7,7 +7,11 @@ module PolicyManager
|
|
7
7
|
|
8
8
|
def initialize(opts={})
|
9
9
|
self.path = opts[:path]
|
10
|
-
self.resource = opts[:resource]
|
10
|
+
self.resource = if opts[:resource].is_a?(String)
|
11
|
+
opts[:resource].constantize
|
12
|
+
else
|
13
|
+
opts[:resource]
|
14
|
+
end
|
11
15
|
self.after_zip = opts[:after_zip] if opts[:after_zip]
|
12
16
|
end
|
13
17
|
|
@@ -68,20 +72,20 @@ module PolicyManager
|
|
68
72
|
base_dir = self.base_path.join(rule.name)
|
69
73
|
FileUtils.mkdir_p(base_dir)
|
70
74
|
resource_path = base_dir.join("index.html")
|
71
|
-
|
75
|
+
|
72
76
|
view = ExporterView.new({
|
73
|
-
assigns: {member: o},
|
74
|
-
build_path: self.base_path,
|
75
|
-
base_path: resource_path,
|
76
|
-
template: rule.template,
|
77
|
+
assigns: {member: o},
|
78
|
+
build_path: self.base_path,
|
79
|
+
base_path: resource_path,
|
80
|
+
template: rule.template,
|
77
81
|
rule: rule
|
78
82
|
}).save(resource_path)
|
79
83
|
|
80
84
|
puts "saving at #{self.path.join rule.name}"
|
81
|
-
|
85
|
+
|
82
86
|
json = JsonExporterView.new({
|
83
|
-
assigns: {member: o},
|
84
|
-
template: rule.json_template,
|
87
|
+
assigns: {member: o},
|
88
|
+
template: rule.json_template,
|
85
89
|
folder: base_dir
|
86
90
|
}).save if rule.json_template.present?
|
87
91
|
end
|
@@ -93,26 +97,26 @@ module PolicyManager
|
|
93
97
|
base_dir = self.base_path.join(rule.name)
|
94
98
|
FileUtils.mkdir_p(base_dir)
|
95
99
|
|
96
|
-
(1..o.total_pages).to_a.each do |i|
|
100
|
+
(1..o.total_pages).to_a.each do |i|
|
97
101
|
o = resource.portability_collection_for(rule, i)
|
98
102
|
|
99
103
|
page_name = i
|
100
104
|
folder_dir = page_name == 1 ? base_dir : base_dir.join(page_name.to_s)
|
101
105
|
FileUtils.mkdir_p(folder_dir)
|
102
106
|
resource_path = folder_dir.join("index.html")
|
103
|
-
|
107
|
+
|
104
108
|
view = ExporterView.new({
|
105
|
-
assigns: {collection: o} ,
|
106
|
-
build_path: self.base_path,
|
107
|
-
base_path: resource_path,
|
108
|
-
template: rule.template,
|
109
|
+
assigns: {collection: o} ,
|
110
|
+
build_path: self.base_path,
|
111
|
+
base_path: resource_path,
|
112
|
+
template: rule.template,
|
109
113
|
rule: rule
|
110
114
|
}).save(resource_path)
|
111
115
|
|
112
|
-
|
116
|
+
|
113
117
|
json = JsonExporterView.new({
|
114
|
-
assigns: {collection: o},
|
115
|
-
template: rule.json_template,
|
118
|
+
assigns: {collection: o},
|
119
|
+
template: rule.json_template,
|
116
120
|
folder: folder_dir
|
117
121
|
}).save if rule.json_template.present?
|
118
122
|
|
@@ -123,12 +127,12 @@ module PolicyManager
|
|
123
127
|
def render_index
|
124
128
|
resource_path = self.base_path.join("index.html")
|
125
129
|
template = PolicyManager::Config.exporter.index_template
|
126
|
-
view = ExporterView.new({
|
130
|
+
view = ExporterView.new({
|
127
131
|
assigns: {
|
128
132
|
collection: PolicyManager::Config.portability_rules
|
129
|
-
},
|
130
|
-
build_path: self.base_path,
|
131
|
-
base_path: resource_path,
|
133
|
+
},
|
134
|
+
build_path: self.base_path,
|
135
|
+
base_path: resource_path,
|
132
136
|
template: template
|
133
137
|
}).save( resource_path )
|
134
138
|
puts "saving at #{resource_path}"
|
@@ -142,4 +146,4 @@ module PolicyManager
|
|
142
146
|
end
|
143
147
|
|
144
148
|
end
|
145
|
-
end
|
149
|
+
end
|
@@ -2,14 +2,14 @@ require "fileutils"
|
|
2
2
|
|
3
3
|
module PolicyManager
|
4
4
|
class Exporter
|
5
|
-
attr_accessor :path,
|
6
|
-
:resource,
|
7
|
-
:index_template,
|
8
|
-
:layout,
|
9
|
-
:after_zip,
|
10
|
-
:mail_helpers,
|
5
|
+
attr_accessor :path,
|
6
|
+
:resource,
|
7
|
+
:index_template,
|
8
|
+
:layout,
|
9
|
+
:after_zip,
|
10
|
+
:mail_helpers,
|
11
11
|
:attachment_path,
|
12
|
-
:attachment_storage,
|
12
|
+
:attachment_storage,
|
13
13
|
:expiration_link,
|
14
14
|
:customize_link,
|
15
15
|
:mailer_templates,
|
@@ -61,7 +61,7 @@ module PolicyManager
|
|
61
61
|
|
62
62
|
def handled_template(template)
|
63
63
|
return if template.blank?
|
64
|
-
if template.is_a?(String)
|
64
|
+
if template.is_a?(String)
|
65
65
|
template
|
66
66
|
elsif template.is_a?(Pathname)
|
67
67
|
File.open(template).read
|
@@ -78,4 +78,4 @@ module PolicyManager
|
|
78
78
|
end
|
79
79
|
|
80
80
|
end
|
81
|
-
end
|
81
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
module PolicyManager
|
2
|
+
module PolicyManager
|
3
3
|
describe PortabilityRequestsController do
|
4
4
|
|
5
5
|
routes { PolicyManager::Engine.routes }
|
@@ -9,17 +9,17 @@ module PolicyManager
|
|
9
9
|
|
10
10
|
@config = PolicyManager::Config.setup do |c|
|
11
11
|
c.is_admin_method = ->(o){true}
|
12
|
-
c.user_resource = User
|
12
|
+
c.user_resource = 'User'
|
13
13
|
c.from_email = "admin@acme.com"
|
14
14
|
c.admin_email_inbox = "admin@acme.com"
|
15
|
-
c.add_rule({name: "age",
|
15
|
+
c.add_rule({name: "age",
|
16
16
|
validates_on: [:create, :update],
|
17
|
-
blocking: true,
|
18
|
-
if: ->(o){ o.enabled_for_validation }
|
17
|
+
blocking: true,
|
18
|
+
if: ->(o){ o.enabled_for_validation }
|
19
19
|
})
|
20
20
|
c.exporter = {
|
21
21
|
path: Rails.root + "tmp/export",
|
22
|
-
resource: User
|
22
|
+
resource: 'User'
|
23
23
|
}
|
24
24
|
end
|
25
25
|
|
@@ -2,16 +2,16 @@ require 'spec_helper'
|
|
2
2
|
require 'ostruct'
|
3
3
|
|
4
4
|
describe PolicyManager::Exporter do
|
5
|
-
|
5
|
+
|
6
6
|
before(:each) do
|
7
7
|
PolicyManager::Term.create(description: "el", rule: "age")
|
8
8
|
|
9
9
|
@config = PolicyManager::Config.setup do |c|
|
10
|
-
c.add_rule({name: "age", validates_on: [:create, :update],
|
10
|
+
c.add_rule({name: "age", validates_on: [:create, :update],
|
11
11
|
if: ->(o){ o.enabled_for_validation } })
|
12
|
-
c.exporter = {
|
13
|
-
path: Rails.root + "tmp/export",
|
14
|
-
resource: User ,
|
12
|
+
c.exporter = {
|
13
|
+
path: Rails.root + "tmp/export",
|
14
|
+
resource: 'User' ,
|
15
15
|
index_template: '<h1>index template, custom</h1>
|
16
16
|
<ul>
|
17
17
|
<% @collection.each do |rule| %>
|
@@ -24,8 +24,8 @@ describe PolicyManager::Exporter do
|
|
24
24
|
}
|
25
25
|
|
26
26
|
c.add_portability_rule({
|
27
|
-
name: "exportable_data",
|
28
|
-
collection: :foo_data,
|
27
|
+
name: "exportable_data",
|
28
|
+
collection: :foo_data,
|
29
29
|
template: "hellow , here a collection will be rendered
|
30
30
|
<%= @base_path %>
|
31
31
|
<% @collection.each do |item| %>
|
@@ -38,13 +38,13 @@ describe PolicyManager::Exporter do
|
|
38
38
|
})
|
39
39
|
|
40
40
|
c.add_portability_rule({
|
41
|
-
name: "my_account",
|
41
|
+
name: "my_account",
|
42
42
|
member: :account_data,
|
43
|
-
template: "hellow , here a resource will be rendered <%= image_tag(@member[:image]) %> <%= @member[:name] %> "
|
43
|
+
template: "hellow , here a resource will be rendered <%= image_tag(@member[:image]) %> <%= @member[:name] %> "
|
44
44
|
})
|
45
45
|
|
46
46
|
c.add_portability_rule({
|
47
|
-
name: "my_account_from_template",
|
47
|
+
name: "my_account_from_template",
|
48
48
|
member: :account_data,
|
49
49
|
template: Rails.root.join("app/views").join("template.erb")
|
50
50
|
})
|
@@ -76,10 +76,10 @@ describe PolicyManager::Exporter do
|
|
76
76
|
user = User.create(email: "a@a.cl")
|
77
77
|
assert !user.errors.any?
|
78
78
|
PolicyManager::ExporterHandler.any_instance.stubs(:clear!).returns(true)
|
79
|
-
|
79
|
+
|
80
80
|
PolicyManager::ExporterHandler.any_instance.stubs(:handle_zip_upload).returns(true)
|
81
81
|
@config.exporter.perform(user)
|
82
|
-
|
82
|
+
|
83
83
|
assert File.exists?(Rails.root.join("tmp/export/#{user.id}"))
|
84
84
|
paths = Dir.glob( Rails.root.join("tmp/export/#{user.id}") + "*")
|
85
85
|
names = paths.map{|o| File.basename(o) }
|
@@ -91,8 +91,8 @@ describe PolicyManager::Exporter do
|
|
91
91
|
|
92
92
|
FileUtils.rm_rf(Rails.root.join("tmp/export/#{user.id}"))
|
93
93
|
FileUtils.rm_rf(Rails.root.join("tmp/export/#{user.id}-out.zip"))
|
94
|
-
|
95
|
-
|
94
|
+
|
95
|
+
|
96
96
|
end
|
97
97
|
|
98
98
|
end
|