gdpr_rails 0.3.4 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/policy_manager/concerns/user_terms.rb +42 -0
- data/app/controllers/policy_manager/user_terms_controller.rb +6 -64
- data/app/models/policy_manager/concerns/user_behavior.rb +5 -5
- data/app/models/policy_manager/portability_request.rb +1 -1
- data/app/models/policy_manager/user_term.rb +1 -1
- data/lib/policy_manager/config.rb +1 -1
- data/lib/policy_manager/version.rb +1 -1
- data/spec/dummy/app/models/another_user.rb +26 -0
- data/spec/dummy/config/database.yml +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20190221193827_create_another_users.rb +9 -0
- data/spec/dummy/db/schema.rb +4 -33
- data/spec/dummy/log/development.log +443 -0
- data/spec/dummy/log/test.log +43784 -0
- data/spec/dummy/test/fixtures/another_users.yml +7 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-a/-aHQxwP06Q1l3SFvBIxMiQYltGHC1m8JxkYfDgYrLAQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-g/-gjzp-ck2yb6Tdt89GKu6zXQ2WQKkhpSiJVFkbrB1EA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-h/-hlM1kR2vjOUm5WXoeZIHyodp0CoKRebRsO_NBtsoyI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/-t/-t8f990sOfpmPQ4Z8vmOf6mEfDZ2yoWG9ULAHI1RZOE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0E/0EAgLp4avByXCEGss-kYmNLhcq1TDHSA3tzzO3voKqc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/0k/0keLS7n7BrF1dW6jOPaZlLoMNgN0SdbpEz1hGQg6Vdc.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1b/1bEROIwc5oQj23SZ2htz-UPdxilvNkK-_zO2enz89cQ.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/1r/1rL0_vhnXKflEHCIhayqGKvIahggn4OM32S-u9cldjs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/22/22qlopVfSb-NAprLkGvGFnrrGyT3aknPTd1mcr9n6iM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/2z/2zaQH3i5-H2sAGaNv1xhwKPIupojlSZsUhWxDle6dls.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3I/3IMIH0CnWgFKpGfyuz6cqr3GQqw5Kqr4FXeY2T4t2Ms.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/3P/3PkdTX8Fs3jHWDVmgTw678B9TbL72pTiao-Sa14xQAE.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/4k/4kyxn8Xl9YphOdLdBhWr_oNqL32lFejOAFviuHukNH8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/59/59CiVYAVFPtvleIV5bHPFieuEuNeWBXLu_pPlA_AU38.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/5y/5yHoqy9mnUxVO_i7ZR-K03kXQK-auoOt-eBEjU5OXj4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6A/6AIzqF1gZnraQ1STmFh6RLU-Lxt6gmnLKOKd_b5mua8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/6A/6aYIoeQLvEzSfCg96v48NbCUftuuT8AtEkX9QZMqSW0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/72/726z-qbVgHrbQwjA24SMkQj6NC01NKV26LKL5YIEMrw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7J/7J4keF13Jv41wAmHnJtghu6FAyawJVTtonJ0-W3-rTM.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7P/7PIUbRiV8Y8GWYRSWsdwmX44RmQMsTejd_b5_UJLib0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/7h/7hZcMIiObzta3kek4vjVvIDlUxHE5zpJaz6IEbsKk_0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/8e/8e4FRdl1DMMQtTXSFykJV9GTvmFlTDM33Wr2aQimDt4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/9-/9-OTYYYlxRuwJWIldQDi-9Fl_V3yAuvawsIbqh41DDI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/A-/A-6FMllBPcMUYEz2RuYEqpusM4sB1VYB-nr2pjLdxxE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/AI/AIRy1qewdSPu4KspUovTsLLWBUegd-Noyw1-CrJOxw4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/CS/CSAj2e_TLDqvgl3MRh-6RE9I841LoqSDZOd2rLLyfFw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/CV/CV6JVVdW1ZMxnoQDN54ivA-jQX8pXqRAMO0M9nbcrAU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/CY/CYjbcilVseR74bMqiNJQvYDEfhtXuiyZXgmnuUsGkV8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Cu/CuTGLxessomzqUukr5eNIW47zWSw2EcrkHjPU2T79Ss.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Du/DUyo6-s7Nz9FkQCddo6QBemrhIKpLvgP_EQlVIvCMIc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Du/DusKbND6jVwMWGdbLHHFIXSn-VyGoaDFMzfyiRGa01g.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dw/Dw5Rv79fHl7RhN7UndE5QWTk2XxlGR8E4TGriK-fTRo.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Dz/DzxYG8j_Hk80TSDytBYzhEh4iw2qgnThsphbRfb8Yo0.cache +1 -0
- 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/FV/FVo-aHKXwy1yxqSMJbkLyHPwRAyFujt9uxWXYbPica0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Gh/Gh11Op6cnd3BVM_BqiVDDFJMYQXzF1Rs0H85KKvS6gg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/H3/H3QsZsFck_eI2szqQIJX6m6CKepNHfW03O7kDjLp67M.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/HB/HBAJM5iGpE8mygYQoQXo94iLywhzb50rXbxsp-0QFHo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/I5/I5hN3KZt5ivvrkpxjmtRV7IuDmIkCg7oIwzDmNiIcBo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/JB/JBRp7gYK7Am4VSpEA2KtgnJ7hUn_uWR4Efyepn583_Y.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/JU/JUavCo99Fo8fIYH8WHAJW0VWKrwWxzX3SkQ6tVnqa8A.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/K9/K9kikk4UzNAlj-ylS9V_SIXVh9akPqvgC2wmXLSKPWw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/L7/L7xnnxbChRgMZtzQzwy05Js412R7_RUgJg5FSuH_n4k.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/MJ/MJ17_sTXgjjs1pZDWp0lj7tCTp9kQ6siEqPiIt0yeEQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Mu/Mu1Oqh4YiJx7b3kXCVW0vmwspLRRCO76QR5CZ4hNCjg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NA/NAkzU02rQDJYnKyMltEcsYO4LSTYpGAiYpADUzqbNVw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NH/NHI6S815-hL6Dzee6b-DdCQZRvPmaxbOawD8EFc68YI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/NU/NUom7-2vYXd_eEJPYknrsAwAZ8wjIt7PYHRy5_IbFVc.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/OW/OWzR1WGfjf6E9LsFGmqv9FjKF7tLnK91uhEw79KE-mo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/PE/PEjWR-I1zxRHtUF7gbBQ1Ek7DoXi1LdpgEd0DtAHDdQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Pi/Pi3bAArV_H1E3W8ia0iNyPPhD5YJQ4508ZX7CzdKPQU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Pp/PpNVKBqdav3EobsJmcyre8lzG1wClMVj9j-2gmU2QRM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/R6/R6FpOoS6EuiKrVXgMbcjad3Ibr_VL2W0KYP47A7jaxI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/RF/RFIQgPTxjMCnNgoYLpS0zLAlSPqlYgp-yNLrpiT6bNs.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ra/RaAeFkh66Icz5PuPcBMb_Kn4lKaFCxMKj3Mf5u0rJpM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Rg/Rg8-NBWaLbUxa3ffglccKpJoe3Qp62cXTBJf0YKOicI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Tf/TfX7CKxq9CGT0II7byr8IDUgkKUETRmyqd3UTh_q0w4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Us/UsdQRHUf-zrBnHLmAUGpqNF9-AcpT3ALFZGgMQudV0w.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/V-/V-jtx_79ypXyz8ax35C8m7_j7yusZ11XHrXUA9z7XMI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/W1/W1UKBtf-STM8xlySkcIx-mG8XFQ9ajXmcF05Ltisu0I.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/WL/WLQS2trklavDjrIyu36sVxonmT5JolxoyuE45epHAdw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/YA/YA3wOiaLDEYoaqT5DFTqyfKYTjY_rFd14qGwFOPMTZ4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ys/YsT84heq92j3foWlXO6byYWcCudufPlS0Oq-EZnduXs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Ys/ys3mA-zRRUGP0S4iTcKx_RonHf_WAQp99ZGpkNQwvzE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Yu/YukzgTJTB7k2Fwy2rMGCD8hZY90GFYlbkAT4YmW_UYE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZB/ZByeGqvssY6UTbq1m29fzJrwC_P4U10nc_zXYXqUSSg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ZU/ZUvhYFT9e0Nd2rmhFfmJWeAW5fijeeZMO1NbJ3qi8pg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/Zv/ZvZwK5ypI2yuEEbYHYJl1co5hGUZ2tRDWwF9JwfQM_c.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/bS/bS3iC0H4_Ge-r9Sbi8YcH91uja7SfilnJfetBOaFrDw.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/b_/b_Itlk9QZZd7Rvf8kcA4yLP1R5Acu7jB-m1xQiSU0qE.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/eB/eBlG7T8TAhmoTaPohjEANUNiW0UHMQZXnmITm4gJimI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ey/EYjFXzqqLtiodZKUuOD38psN3mbJhkiMNH1KMJHtjVg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ey/eyvM_HCZA_hlXW6K1xu6P9_Mea3gLMQBwVbUxWA6Ttw.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/f_/f_i36Hmu17xYcpc3jDVCAzykva6KquwYGdqqLgRwiE0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/fa/faPn7B4zieXAAvcPec_s0FA6FtbAXXk114vv1ojuGUo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ft/ftJPgTPp6dnElMFIzpHJCUikKcpFW8db_yZGUaZ_W70.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/g1/g1u_oGi3pgA-2uAtIqn3G9Fu9DnuCCIt3cMsn-a6iRY.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ge/geIQ-vL4sRcpZWAUIm1GWhS8A1_YU2ndjIdVJCS-Uvo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/jC/jCh_R4fzgyGAxgZmG717sTbhYTe2-p-EA0Wtj1Y7UbQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/lg/lg1ExD6zq_Fv1Ht71z2B1MwWlhUeyq0rAT-gP_8-37c.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ll/llIDdeIkmyURZ2DbBvGx9ELYgC05FPyZaiMs47zl_rI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/ln/lnkOHZjj0qN0wjdDTqISbwi3rpVgKphccVPphNphEzY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/mX/mX1nlsL_SWOB4y22W5FheRX0YEONKyOY7xUeIvRiHco.cache +0 -0
- 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/oz/ozRNsKle-0dkVv9TVQv2L4j0KHKVorNn-Y1ZoqeH23k.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/p0/p0UgQyUa03wLjKCdKoh6l88KkFZm51Y6l2ErCpLpq6I.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/p0/p0jMhMrkXWEXKdz0A_xO8foeJcDMfZU725lMT6cB9vk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pc/pcLEltO95ofx-rKi148bXemS3vuiolGFQrQTEEaufBg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/pz/pzM3RUUwtXKhQ3imcaa9doASJAQJ3zXWHSk-tMaPmTE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qO/qOCD4lYmSNrCmsS2Dlso08gYE3XqDgH6jfj8qv53VZE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/qg/qgo_TK76kN_M7OIblszKynmFxms-BnGAEcMuCFCcUmk.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rh/RhnOcAIH9GnZzgm48mq6kDm02o5RD0ruwS7Vc22Z0kA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rh/rhiHxaMtmmZZYiO583Or4k7BPLAmMzeqyLc0gmJoKLg.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/rx/rxcwzzK5tXb6VXzTjzMxfy6a4CdCOrU4mpq6zsOSCXE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/sX/sX4_nDcAYBCSCoSVewGQxOL5FI9vJgNVUSWDFwA0tUQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/tc/tc_cLeZ4aQAI-SY7F67fDqd3rcESqbLaDrjsh6aE6FU.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/to/tofj2C9SbKyYUj_dML3zHTK91A1mHAqikxNxok-XGGU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uU/uUlJF0msNAdT4ST6rqRUkAdlH9vL4_Q3uAmcPmr_7Xw.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/uU/uuTD2W9Def3Rk5kCW8BxVAcw6OvGZXvyHOy72YZCow0.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/v0/v06KWsxyryY_cefXxIgvJij95aGaUkbxq3A885_7y5o.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/vL/vLX0REBBtf63M9wzTi_c5JGvFp6Hw2TfvB8QNTvXF1o.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/w9/w9K9vo0RempLOAQVeC3k12n9QJ1o7uyzzByc4y6PMmQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/wX/wXNkAN8ZgMZVOPKuGDGGtarO_P1jzW9WrhvM9WdMtTM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xF/xFziKPVCIY03L0QMyGb_Qwosu5RqxS2bgjsJa7lXZ_Q.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xH/xHYVu8nN-cIJEamW8IVhmY-VieizkWObrlah08OoMyA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xQ/xQdSRH9yEopgH30aAN2vKW4HkDMMAt4XVJF-EKUMOhk.cache +2 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xX/xXItV0-SqLEWMVEQR95OPM6uasu-sSI008PLfVivz8g.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/xa/xaZG1JF1braF1MlRAgPC19dVKkA9Xdlx7YQb0JOOoF0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/z9/z9O51M9rznozjEDoJhswOkaolmfanQKZyCIXuM8jDqs.cache +3 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/zK/zKriUMIyjtR_QgfrDDjxeTzXauxjjWEFjfQwqLHULSE.cache +0 -0
- data/spec/dummy/tmp/cache/assets/sprockets/v3.0/z_/z_i_-cAgESR9YdjR1qCZHQyu2qGIM0Ypxyk6hR6EYb4.cache +0 -0
- data/spec/dummy/tmp/export/28/exportable_data/10/index.html +14 -0
- data/spec/dummy/tmp/export/28/exportable_data/2/index.html +14 -0
- data/spec/dummy/tmp/export/28/exportable_data/3/index.html +14 -0
- data/spec/dummy/tmp/export/28/exportable_data/4/index.html +14 -0
- data/spec/dummy/tmp/export/28/exportable_data/5/index.html +14 -0
- data/spec/dummy/tmp/export/28/exportable_data/6/index.html +14 -0
- data/spec/dummy/tmp/export/28/exportable_data/7/index.html +14 -0
- data/spec/dummy/tmp/export/28/exportable_data/8/index.html +14 -0
- data/spec/dummy/tmp/export/28/exportable_data/9/index.html +14 -0
- data/spec/dummy/tmp/export/28/exportable_data/index.html +14 -0
- data/spec/dummy/tmp/export/28/index.html +16 -0
- data/spec/dummy/tmp/export/28-out.zip +0 -0
- data/spec/dummy/tmp/portability/1/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/16/build.zip +0 -0
- data/spec/dummy/tmp/portability/17/build.zip +0 -0
- data/spec/dummy/tmp/portability/18/build.zip +0 -0
- data/spec/dummy/tmp/portability/2/build.zip +0 -0
- data/spec/dummy/tmp/portability/20/build.zip +0 -0
- data/spec/dummy/tmp/restart.txt +0 -0
- data/spec/models/policy_manager/another_user_spec.rb +134 -0
- data/spec/models/policy_manager/exporter_spec.rb +1 -0
- data/spec/models/policy_manager/portability_request_spec.rb +4 -1
- data/spec/models/policy_manager/user_spec.rb +13 -2
- metadata +300 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 386298d1731a0a6830f1445e562f7e4dd0bca49ee37b0eed4fb1e35b9e1b8ca8
|
4
|
+
data.tar.gz: 5f31692024cae1c58a1403679fd7690c50bf3c07776c3d912f0873cb264135d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52c20ac58d490cda8066dde9adbd91a8630216a9aae6ac5110dedbae379882d934e56d24b4e360d77d08c25660cb38e26cebb03926aa37e595ca6682d7a0139a
|
7
|
+
data.tar.gz: 163475f3ad0de7c4e1ea477b59ab51796e1903e918facc04aa3c283b4faa1452e5cadc4dfac0ac50f4e03ef33ba6096f211befeae10d85c77fa54c3920a46395
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module PolicyManager::Concerns::UserTerms
|
2
|
+
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
|
5
|
+
def accept_term(term)
|
6
|
+
if current_user
|
7
|
+
user_term = current_user.handle_policy_for(term)
|
8
|
+
return if user_term.accepted?
|
9
|
+
if user_term.accept!
|
10
|
+
term.rule.on_accept.call(self) if term.rule.on_accept.is_a?(Proc)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
cookies["policy_rule_#{term.rule.name}"] = {
|
15
|
+
:value => "accepted",
|
16
|
+
:expires => 1.year.from_now
|
17
|
+
}
|
18
|
+
|
19
|
+
user_term
|
20
|
+
end
|
21
|
+
|
22
|
+
def reject_term(term)
|
23
|
+
if current_user
|
24
|
+
user_term = current_user.handle_policy_for(term)
|
25
|
+
return if user_term.rejected?
|
26
|
+
if user_term.reject!
|
27
|
+
term.rule.on_reject.call(self) if term.rule.on_reject.is_a?(Proc)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
cookies.delete("policy_rule_#{term.rule.name}")
|
32
|
+
|
33
|
+
user_term
|
34
|
+
end
|
35
|
+
|
36
|
+
# Use callbacks to share common setup or constraints between actions.
|
37
|
+
def policy_term_on(name)
|
38
|
+
category = PolicyManager::Config.rules.find{|o| o.name == name}
|
39
|
+
category.terms.last
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -1,8 +1,11 @@
|
|
1
1
|
require_dependency "policy_manager/application_controller"
|
2
|
+
require "policy_manager/concerns/user_terms"
|
2
3
|
|
3
4
|
module PolicyManager
|
4
5
|
class UserTermsController < ApplicationController
|
5
6
|
|
7
|
+
include PolicyManager::Concerns::UserTerms
|
8
|
+
|
6
9
|
skip_before_action :user_authenticated?, only: [:show, :accept, :reject, :blocking_terms]
|
7
10
|
before_action :set_user_term, only: [:accept, :reject, :show, :edit, :update, :destroy]
|
8
11
|
|
@@ -44,8 +47,7 @@ module PolicyManager
|
|
44
47
|
end
|
45
48
|
|
46
49
|
def accept
|
47
|
-
|
48
|
-
handle_term_accept
|
50
|
+
@user_term = accept_term(@term)
|
49
51
|
|
50
52
|
respond_to do |format|
|
51
53
|
format.html{
|
@@ -65,7 +67,7 @@ module PolicyManager
|
|
65
67
|
end
|
66
68
|
|
67
69
|
def reject
|
68
|
-
|
70
|
+
@user_term = reject_term(@term)
|
69
71
|
|
70
72
|
respond_to do |format|
|
71
73
|
format.html{
|
@@ -88,70 +90,10 @@ module PolicyManager
|
|
88
90
|
end
|
89
91
|
end
|
90
92
|
|
91
|
-
=begin
|
92
|
-
# GET /user_terms/new
|
93
|
-
def new
|
94
|
-
@user_term = UserTerm.new
|
95
|
-
end
|
96
|
-
|
97
|
-
# POST /user_terms
|
98
|
-
def create
|
99
|
-
@user_term = UserTerm.new(user_term_params)
|
100
|
-
|
101
|
-
if @user_term.save
|
102
|
-
redirect_to @user_term, notice: 'User term was successfully created.'
|
103
|
-
else
|
104
|
-
render :new
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
# PATCH/PUT /user_terms/1
|
109
|
-
def update
|
110
|
-
if @user_term.update(user_term_params)
|
111
|
-
redirect_to @user_term, notice: 'User term was successfully updated.'
|
112
|
-
else
|
113
|
-
render :edit
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
# DELETE /user_terms/1
|
118
|
-
def destroy
|
119
|
-
@user_term.destroy
|
120
|
-
redirect_to user_terms_url, notice: 'User term was successfully destroyed.'
|
121
|
-
end
|
122
|
-
=end
|
123
|
-
|
124
93
|
private
|
125
94
|
|
126
|
-
def handle_term_accept
|
127
|
-
if current_user
|
128
|
-
@user_term = current_user.handle_policy_for(@term)
|
129
|
-
if @user_term.accept!
|
130
|
-
@term.rule.on_accept.call(self) if @term.rule.on_accept.is_a?(Proc)
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
|
-
cookies["policy_rule_#{@term.rule.name}"] = {
|
135
|
-
:value => "accepted",
|
136
|
-
:expires => 1.year.from_now
|
137
|
-
}
|
138
|
-
end
|
139
|
-
|
140
|
-
def handle_term_reject
|
141
|
-
if current_user
|
142
|
-
@user_term = current_user.handle_policy_for(@term)
|
143
|
-
if @user_term.reject!
|
144
|
-
@term.rule.on_reject.call(self) if @term.rule.on_reject.is_a?(Proc)
|
145
|
-
end
|
146
|
-
end
|
147
|
-
|
148
|
-
cookies.delete("policy_rule_#{@term.rule.name}")
|
149
|
-
end
|
150
|
-
|
151
|
-
# Use callbacks to share common setup or constraints between actions.
|
152
95
|
def set_user_term
|
153
|
-
@
|
154
|
-
@term = @category.terms.last
|
96
|
+
@term = policy_term_on(params[:id])
|
155
97
|
end
|
156
98
|
|
157
99
|
# Only allow a trusted parameter "white list" through.
|
@@ -3,9 +3,9 @@ module PolicyManager::Concerns::UserBehavior
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
-
has_many :user_terms, class_name: "PolicyManager::UserTerm", autosave: true
|
7
|
-
has_many :terms, through: :user_terms, class_name: "PolicyManager::Term"
|
8
|
-
has_many :portability_requests, class_name: "PolicyManager::PortabilityRequest"
|
6
|
+
has_many :user_terms, class_name: "PolicyManager::UserTerm", autosave: true, foreign_key: :user_id, inverse_of: :user
|
7
|
+
has_many :terms, through: :user_terms, class_name: "PolicyManager::Term", foreign_key: :user_id, inverse_of: :user
|
8
|
+
has_many :portability_requests, class_name: "PolicyManager::PortabilityRequest", foreign_key: :user_id, inverse_of: :user
|
9
9
|
|
10
10
|
# adds policies
|
11
11
|
PolicyManager::Config.rules.each do |rule|
|
@@ -87,14 +87,14 @@ module PolicyManager::Concerns::UserBehavior
|
|
87
87
|
def confirm_all_policies!
|
88
88
|
pending_policies.each do |c|
|
89
89
|
term = c.terms.last
|
90
|
-
|
90
|
+
self.handle_policy_for(term).accept!
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
94
|
def reject_all_policies!
|
95
95
|
pending_policies.each do |c|
|
96
96
|
term = c.terms.last
|
97
|
-
|
97
|
+
self.handle_policy_for(term).reject!
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
@@ -5,7 +5,7 @@ module PolicyManager
|
|
5
5
|
class PortabilityRequest < ApplicationRecord
|
6
6
|
include Paperclip::Glue
|
7
7
|
|
8
|
-
belongs_to :user, class_name: Config.user_resource.to_s
|
8
|
+
belongs_to :user, class_name: Config.user_resource.to_s, foreign_key: :user_id
|
9
9
|
|
10
10
|
has_attached_file :attachment,
|
11
11
|
path: Config.exporter.try(:attachment_path) || Rails.root.join("tmp/portability/:id/build.zip").to_s,
|
@@ -4,7 +4,7 @@ module PolicyManager
|
|
4
4
|
class UserTerm < ApplicationRecord
|
5
5
|
include AASM
|
6
6
|
|
7
|
-
belongs_to :user, class_name: Config.user_resource.to_s
|
7
|
+
belongs_to :user, class_name: Config.user_resource.to_s, foreign_key: :user_id
|
8
8
|
belongs_to :term
|
9
9
|
|
10
10
|
validates_uniqueness_of :term_id, :scope => :user_id
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class AnotherUser < ApplicationRecord
|
2
|
+
include PolicyManager::Concerns::UserBehavior
|
3
|
+
|
4
|
+
def enabled_for_validation
|
5
|
+
true
|
6
|
+
end
|
7
|
+
|
8
|
+
def foo_data
|
9
|
+
30.times.map do |i|
|
10
|
+
OpenStruct.new(
|
11
|
+
:id => i,
|
12
|
+
:country => "Australia",
|
13
|
+
:population => 20_000_000,
|
14
|
+
image: "http://lorempixel.com/400/200/sports/"
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def account_data
|
20
|
+
{
|
21
|
+
name: "me",
|
22
|
+
dob: 30.years.ago,
|
23
|
+
image: "https://images.pexels.com/photos/34950/pexels-photo.jpg?auto=compress&cs=tinysrgb&h=650&w=940 1x, https://images.pexels.com/photos/34950/pexels-photo.jpg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940 2x"
|
24
|
+
}
|
25
|
+
end
|
26
|
+
end
|
Binary file
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,44 +10,15 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 2019_02_21_193827) do
|
14
14
|
|
15
|
-
create_table "
|
16
|
-
t.
|
17
|
-
t.string "state"
|
18
|
-
t.string "attachment"
|
19
|
-
t.string "attachment_file_name"
|
20
|
-
t.string "attachment_file_size"
|
21
|
-
t.datetime "attachment_content_type"
|
22
|
-
t.string "attachment_file_content_type"
|
23
|
-
t.datetime "expire_at"
|
24
|
-
t.datetime "created_at", null: false
|
25
|
-
t.datetime "updated_at", null: false
|
26
|
-
t.index ["user_id"], name: "index_policy_manager_portability_requests_on_user_id"
|
27
|
-
end
|
28
|
-
|
29
|
-
create_table "policy_manager_terms", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
|
30
|
-
t.text "description"
|
31
|
-
t.string "rule"
|
32
|
-
t.string "state"
|
33
|
-
t.datetime "accepted_at"
|
34
|
-
t.datetime "rejected_at"
|
35
|
-
t.datetime "created_at", null: false
|
36
|
-
t.datetime "updated_at", null: false
|
37
|
-
end
|
38
|
-
|
39
|
-
create_table "policy_manager_user_terms", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
|
40
|
-
t.integer "user_id"
|
41
|
-
t.integer "term_id"
|
42
|
-
t.string "state"
|
15
|
+
create_table "another_users", force: :cascade do |t|
|
16
|
+
t.string "email"
|
43
17
|
t.datetime "created_at", null: false
|
44
18
|
t.datetime "updated_at", null: false
|
45
|
-
t.index ["state"], name: "index_policy_manager_user_terms_on_state"
|
46
|
-
t.index ["term_id"], name: "index_policy_manager_user_terms_on_term_id"
|
47
|
-
t.index ["user_id"], name: "index_policy_manager_user_terms_on_user_id"
|
48
19
|
end
|
49
20
|
|
50
|
-
create_table "users", force: :cascade
|
21
|
+
create_table "users", force: :cascade do |t|
|
51
22
|
t.string "email"
|
52
23
|
t.datetime "created_at", null: false
|
53
24
|
t.datetime "updated_at", null: false
|