auto_admin 0.0.1 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +11 -1
- data/app/assets/javascripts/auto_admin/application.js +14 -0
- data/app/assets/stylesheets/auto_admin/application.scss +19 -0
- data/app/controllers/auto_admin/application_controller.rb +3 -0
- data/app/controllers/auto_admin/resources_controller.rb +13 -0
- data/app/controllers/auto_admin/root_controller.rb +3 -0
- data/app/helpers/auto_admin/application_helper.rb +11 -0
- data/app/views/auto_admin/resources/_resource.html.erb +12 -0
- data/app/views/auto_admin/resources/_resources.html.erb +22 -0
- data/app/views/auto_admin/resources/index.html.erb +6 -0
- data/app/views/auto_admin/resources/show.html.erb +26 -0
- data/app/views/auto_admin/root/index.html.erb +28 -0
- data/app/views/layouts/auto_admin/application.html.erb +31 -0
- data/config/routes.rb +6 -0
- data/lib/auto_admin/association.rb +14 -0
- data/lib/auto_admin/engine.rb +5 -0
- data/lib/auto_admin/node.rb +110 -0
- data/lib/auto_admin/version.rb +1 -1
- data/lib/auto_admin.rb +2 -0
- data/spec/internal/app/models/event.rb +4 -0
- data/spec/internal/app/models/guest.rb +3 -0
- data/spec/internal/app/models/location.rb +3 -0
- data/spec/internal/app/models/spouse.rb +3 -0
- data/spec/internal/app/models/wedding.rb +7 -0
- data/spec/internal/config/database.yml +3 -0
- data/spec/internal/config/deprecations.ignore +8 -0
- data/spec/internal/config/routes.rb +6 -0
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/db/schema.rb +36 -0
- data/spec/internal/db/seeds.rb +40 -0
- data/spec/internal/log/test.log +7349 -0
- data/spec/internal/public/favicon.ico +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/-g/-g5D7a2rHIg8LmAmKiBeIc2U8Ytr69vDhdaxZH8sZKs.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/1E/1Ek6BQKYDmI3p-lsgerA2QbLAZManaq3matnrIEfqus.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/1b/1bWDazvqQ5eEpedrmuRZaM6sZ-B1eChr9Wlmqoj3nio.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/3O/3OqrvX4eM-NTfHpZRncVsHS3c2afsS-VUxYbhI_itP0.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/58/58XNELuVm3VUzY9xFEGque_tuymzXG7b3HgFaN0B0eE.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/6I/6IwrQwi_5DeWhHFXFsRNo8rOPpIz5SQaODjcnT53glg.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/6c/6cu-sPf3zSZouQmY2E8RZIXfmRKRCj3DRj7CyjLD3ng.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/7o/7oyq6kRsy7q9_dJllSX7HJa_KMVwl_2LQW3ZiPxRD24.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/7q/7qoAmNZeOaXTA0Fw0HiXfvjTjV0SdNDp1pIwIrddSZ0.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/8K/8KB908gcMRv7YGZ7YohAp-fKSoE6uMMhQ6l4lN28prI.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/8h/8hZ9H_42QSHpCvXHoTxX5fmg_s6vtoF0qHktdUcqMMc.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/8u/8u7Qtu9oipuSyNxftRBekCWgk2BN1x9xhlx_IKwynSU.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/8v/8vFS_WXrlHCzHkUNfMgcMt2JMYQ5edPO73Zw2hAjm3Y.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/9C/9CIax374DQ1JB9Jb80Jjp_Jd7ybte0ZO_nsnnh0qm_s.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Ad/Adfekt2KmnAnXVdjfJPAAJdA7TiHMd9zOiaG_qQRFe8.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Al/Al_RTPBQZmis5UD3VDE5QBgObnziUzSNMhh6CozUXs4.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Ay/AyoqsVeG9WrBSBwoA4eUNnfN-sKgWH3y_3__B52rzsk.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Bu/BuHQbYztt4Clbfa5pGORGKUdrd09m9eoLV6bpagQa_A.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/C4/C4YJgrlR5tnrKEPVEGBr5PtyPYlZUYEdb50GTAQ-GBg.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/DL/DL8uT7MxwsfHPVPRD2pMEmRYatppQCxpmTFnYMfj7Cc.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/E7/E7tel185C_eLgys-9Wzrr5mWXl7YysieAVSGdFaJ42E.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/EE/EE1OXD4ZIHvIrqeauDb8DwW6PCX0pYSCZnok3hs_WU8.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/FB/FBfd7rRZainBCvST2WkPinNNc_KTPVJ7vNSDqEAtXZw.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/FJ/FJ0CEc5AG8VfTdOJtgdTJNhFVhIKXZTcMv8MztlLm58.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/GG/GG0efRIvD5nA7gT013q9PpVcfBtWyV6rA1LIp6U4RxI.cache +2 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Ge/GeC3AihoKnJhCkmlEMT9xgBMcnM_057iAJKtR26H104.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/H0/H0pFr3A5hh4Pl1Xmz6AOMCpokq0raYkhhNXVTAexL6E.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/IE/IEatqwcaNFcp7BnwoYrFNphqPqJdADAP21VOmX2SgEU.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/IQ/IQ6dNgm-TB2n8-bXyQqJYx4eBtsJeyPrnm_VYZBSj3I.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Ib/Ib8AmMvsB0kpqet0zmHsr17kgB9LLX36TIWXVs0CIpw.cache +2 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/JK/JK4_xpfwpkdMGqotrf2sRDq0A7u_4OXQidIp1Dwmo90.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/JW/JWY015E_4v3TJh6lnirFbG4tc_6S8QnFkCnKD08sB8I.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/K1/K17YLnwXyhxemHam5BM4IgwZi0SqZokiGdI4Lq4pJ_A.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Kl/Kl1PcdIvb52OfvNNTdfN0l0Uj45-BqvUbXIDBxV2w0M.cache +2 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Kl/KlZ8RdmnN6KXAq6vhGssBMzuaOsF02_HB55vkvT7_3c.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/LF/LFpw1bUJwk5Z0YUXRZzvCzL6leKLmrpy5L53PKDKgvU.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Lz/LznQPIxdodqdBkU9w5lMGDSUNt0lXPmLZmrDchQySPs.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/M2/M234kQQXwp_89f-7T-XzoZ9wezWKvlYQaCB6hGzRFmk.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Mu/MuNQRk3oQ84H3Tp6KjQ13avpVTb3BVRZegrsMWkHo44.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Mv/Mv_DdQoZCHeDHbcUxJvwXoetNwkjcl8A1xfI-8Cc0FM.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/NF/NFdV8GCmk70eDuRi43GHQGzseblONpqDM6ER3xXQgfg.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/O0/O0mXS0nhsIVoZcqzgHUCMshb23CZ-B3eV8iXUpQfXMo.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Oc/Ocxmw2zOkD_Fae_ZaKGcp1UqOfV0IyYF67jwCf9b9ic.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/On/ONVsTA-XvEb_Z8Ou1rAdSDNel4umft9Upddl4ammlPU.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/On/Onnt81R720TR7OLlNyyKj9Lwz7hg03bo6Xxa73eZuyM.cache +2 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Oy/OyxoYhrvpllJDVX9iyushlhNDx62kv7s5sq2CH-wQuA.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/RZ/RZDY4XES5sOKTKAptTKqEAIq6a039KuVM3uyQxJdW2Q.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Sd/SdEVcqMx6gPxOQEDzHBsFb7hJSixz2OEcfazytRLRFQ.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Sg/Sg2fQdPuJMgyUObf9OJJv8SzPBIbpi9OJokWrz8nY28.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/TF/TFDRGYQfxQITHbuhzzRJulViRK28mhAm4nhcl0861-c.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/UI/UIungvBjyb9anThvrdiSuGZSrM_8nv5gYw9W6HCYeAI.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/UJ/UJH4rJjcGyqiiprzASArsCPqHn65vTS-jcA_rq6ED0g.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Uu/Uu78bgFdLtTnEPW67QVIFD20wmcZRTzwvDa5OUDEGo4.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Vu/Vu2tvm3rbkC9AtklPqCE7mLrwFr6vZBrHT-4qRIRjfk.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Wj/Wjc9rC0fjS9hoGkKycwZB1-OWjk5Uo8ZQ9OTKHFRTPQ.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Wm/Wm11_W1l_3i_HQ5OkUmm1LgFa3gsO9bc-C4HD1WmDxE.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/YF/YFosmIuBAvSvsWYIeManIFvEHrTY5hiaMxm2HeMqviU.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/YF/yf78M0jN2SVNcch99_CaWKTFJtCviFN3VirhFT7omsA.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/YH/YHzMiSwdvvc52ICwumRE5sh11TtxITTqZ8APoFr1YNo.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/YP/YP5pYfyiwmkGwn0ng9msO7KmWj2bR7BrhSJN_TVu6lE.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Yn/Yn01mIlbdMjo89bWpd2i5ur46gWZRsTlUhZs4zTRtZw.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/Yu/YuZHD9yz969pq5CTN0W9jBPeIVIUlMoRseOv8j15ctw.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/_i/_iC6VsZn7sWQPRrNIyOuJrtKauyn0jJZuvvmUtnMig4.cache +3 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/_v/_vlftFF_sy9XApwuIV27PdOODln_9lPVUywS1tLZLPI.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/aO/aOyl1NaE416Yn4Svb4ZxvCwnbFj1jtrIbWr9pCWSTpc.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/aR/aRpXm6cyi-CcIxcV_Jj0kJpBkeHsDQl2L9GkLkUNMSg.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/b5/b5_4FcMP3sUDIjTMizXw2AoUZ8kA_9EOXSWwNobUnd4.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/bA/bAthtCNeRjh9XZFR5xd8tHZtXQYkJIbiRfNvhUGGCy4.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/bV/bVE5ftYff_PdbN6jKd927FtpSIVXuTXyjMf4ct4UHLU.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/bp/bp80MEtbUmuKyWtM2TZVvV1cCIbVKClS23LPXNNKF2s.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/bx/bxLvJ-Uyj1Ve1MPmQxcCQsuvoNw4IWBcI-MDXwC8BC4.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/c9/c9G5ED_SQ5eN9-4i69fKLJS_i_qqNs4Lu5daIFqAxlY.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/cG/cG6PKqICCIefV2jf7-2cY9aHEscGLOVM_t7WanHXhd8.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/cP/cP3gTpeIQDSLhZXKezIuOw8PFGkRG1GO7ICHQxNyxvo.cache +2 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/d4/d4ENU3asIuW0_efKW26U9vcEOasc8i4ek_ltbmwWKUw.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/db/db40SFQj9R-vYndw66gIDUZaH50QzQjlMzF0TaADskU.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/df/df7Zrk8Tzo_ujGidlL7jnp53ZiVQR33GYDHDtcFKavs.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/dr/drDMjDhBmeS72Lo2DZBfpranZmox2KjQfA3BStWh3dQ.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/dt/dtZ3d1TPBmhxBdSeMPpyvXAvHttommlmB53PaJFmBOE.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/e9/e9qpFFRDFdoKMeZBOT3SdcM5tmfp__sd_f9nnta5HIA.cache +2 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/eg/egwY1_MMNhNnoIr69vO6v2Ps21FLK9xOd6Wjt5DlF4E.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/f5/f5SX35qF5Qm2JBcNLx_F61oawJbpDGIDzayN0FfNAAY.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/g6/g6_irwcsshDNlq-hq0H5_KkVAP2C_ddOypP-5HcmKLE.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/gL/gLldr_ERXPQatjJNAuUcJVMWkgfGpj8V2clXYCa5vsA.cache +2 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/gP/gPb3LDJpCpb9E2hIxyEGs6GTyYl_Q254U7DwTTBZF1Y.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/jg/jgJsibianecLs6vKLZB3qzLkqQNXS8yMfv3K6bU8xBs.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/ji/jiMiJDGSQJCiTzn_Xzry37A6tzREv_bTkMBaGek0UIc.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/kY/kY0i_69JE_dcY6lyECHD2szXWXkQbL92X4ZJTbJ1UCg.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/lB/LbJQh4ZFGs6aEzLnWrUyHJLBFI0-qp_WGxe3uuvrCXc.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/lB/lB_dPzEOHIkFMQB5Ig0rjG2_1H35fcdoaCL0BlXl3sM.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/o6/o6uq73B0EydyzUz19mydT6C_pTG6O39AOxEuyHvZvGY.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/oj/oji0xBwdcVa5i_Tni6XaJI635LAgM2wSQ0AUA0qTNY4.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/r9/r9ZQZeUK1lHHsMk2OW_y39A1-bL7sv9JEVpvzCDUcX0.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/rA/rA3O9jGRfxEZ0GvXtfIAD-i3oiJxC-BjgxKM5E8leOM.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/rJ/rJo1QQvojWERnXxN04HLXcZK5g1uZMfUmSdhGvXZD3w.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/rK/rKRjTb3jqg7H6ITemMBILeAZhrVmGJZC3Io7jqfExmc.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/rK/rkkCfZLwpHG_6mLHrLvsgk93hbxd2prCtKHcnfvTdbk.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/rM/rMd0oJRNVx-ZiZljIdJar0hqdzXOR4cB0iusMMQXOyA.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/rp/rpjqB9hra4jJDlc_PcVaSdTDDOUQzqurJjQnQS5l2D0.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/rq/rqiQ11oZf9PBbajE6xeKq09pC9HY-6tLmPrJKkoXNwE.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/ru/ru6DMnvf_DCLs2KELxQRr--e7jMAhf8o6nrNphFJvhs.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/s8/s8qz3JAa9e9quBhzrWxZGfuNiLtNHnsYEWvy7Un0bwQ.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/sS/sS_B7E6lPpJwtu4jDQ3uLgpcwGg0cvC_LblrvCo1Wms.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/si/sil63HU_2OsIEv1N4vmVM9heh7NJqr9Vkv4nl55Cns8.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/uC/uCntLi3u40TVljQigZcB2VMY8mhNMsLhFPu3C2qZFmI.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/uw/uwpfCkDCxEdvpikZDZThJYN5_u2Z1PeV8e4yhOITlq8.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/uy/uyLbbq8bxYaVtv-O5HgWklkfsra-RngDrP-fUMq3WV0.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/vT/vTjQ66jZT4S9WTExzF4eItGJHEDXgbqmeZoemBMQyIQ.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/vy/VyrSTLFzA5qFIOQCbMuOpb_VJF5Sf22iPCvwX6rTWws.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/vy/vyOTdnO1la3XemZUtYHfQZKdg83R1yG-5KW4cr7kkFc.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/w7/w7qjMtw2xiTadnwBw38HFj-wJGOhDcJYKWwXY0hNX8w.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/x6/x6ywdxwKEEOfNb3d8OW3zESRWhoILFPRGof_eNGIfqU.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/xy/xyhZHxlpEWCXskPafN_ujFOSCeyaqNoXYPMvEdbHg78.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/yS/ySaeoCZRRMLS0GrKXJTZutBhbrd-oIIprrge2QjqZGE.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/ya/yaavZzi6Kk8sU9nFGBnZg9v2ZYLR-d0J5PPmgxCQbP8.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/ya/yawvjnilnAQhjPetQwcD6tYAWpiXPJ4tlzR5XO2IqHI.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/yl/ylPOausLQEUiM2W0Da-U9vQd4Hs6g8AIal7RNl38dQ8.cache +1 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/zR/zRymhKWXNLfRSLZ2-0cOGC2DItIYWnGaWO61fQ6mnbI.cache +0 -0
- data/spec/internal/tmp/cache/assets/sprockets/v3.0/zX/zXnRwk8dtIJqQb2IyryIkHZMeHq9L8SNk3iLDp7weYw.cache +0 -0
- data/spec/models/node_spec.rb +9 -0
- data/spec/spec_helper.rb +11 -0
- metadata +370 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d4878f3f05e89504ce4bdef4311c20b72b1a1de9098a004b7f62bbdee630d08
|
4
|
+
data.tar.gz: b8399a4973de5b7f4072550f1991ae3296a76098ebf8bdb36e4bbf7443c03b23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adee936602b67ce18adb9bb1cf440f11cdbd20345d90ac9ca7c9f9fc23f4a238ee2239609b3d00352c4d641fe3e3bda9567a974f2955b28e3c5fb97e4a48a012
|
7
|
+
data.tar.gz: ccb819a2762f6d2a54d6b73eb9a029a5e43bea35b022232a6b3fed6ccac41f6c7863e00e11edae80656dedc4bf0cfa36551fbaf6eacc400779e363c0b4e583f1
|
data/Rakefile
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rspec/core/rake_task"
|
3
3
|
|
4
|
+
require 'rubocop/rake_task'
|
5
|
+
RuboCop::RakeTask.new
|
6
|
+
|
7
|
+
require 'rspec/core'
|
8
|
+
require 'rspec/core/rake_task'
|
4
9
|
RSpec::Core::RakeTask.new(:spec)
|
5
10
|
|
6
|
-
task default:
|
11
|
+
task default: %i(rubocop spec)
|
12
|
+
|
13
|
+
desc 'Open an irb session preloaded with this library'
|
14
|
+
task :console do
|
15
|
+
sh 'irb -rubygems -I lib -r auto_admin'
|
16
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
|
5
|
+
// vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require turbolinks
|
14
|
+
//= require_tree .
|
@@ -0,0 +1,19 @@
|
|
1
|
+
$turquoise: #70C1B3;
|
2
|
+
$blue: #247BA0;
|
3
|
+
$green: #B2DBBF;
|
4
|
+
$yellow: #F3FFBD;
|
5
|
+
$red: #FF1654;
|
6
|
+
|
7
|
+
$primary: $turquoise;
|
8
|
+
$info: $blue;
|
9
|
+
$success: $green;
|
10
|
+
$warning: $yellow;
|
11
|
+
$danger: $red;
|
12
|
+
|
13
|
+
@import url('https://fonts.googleapis.com/css?family=Open+Sans|Roboto+Slab');
|
14
|
+
|
15
|
+
$family-sans-serif: 'Open Sans', sans-serif;
|
16
|
+
$family-serif: 'Roboto Slab', serif;
|
17
|
+
$family-primary: $family-serif;
|
18
|
+
|
19
|
+
@import "bulma";
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module AutoAdmin
|
2
|
+
class ResourcesController < AutoAdmin::ApplicationController
|
3
|
+
def index
|
4
|
+
@node = Node.nodes[params[:node]]
|
5
|
+
@resources = @node.klass.all
|
6
|
+
end
|
7
|
+
|
8
|
+
def show
|
9
|
+
@node = Node.nodes[params[:node]]
|
10
|
+
@resource = @node.klass.find(params[:id])
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div class="table-container">
|
2
|
+
<table class='table is-fullwidth'>
|
3
|
+
<tbody>
|
4
|
+
<% node.attributes.each do |attribute| %>
|
5
|
+
<tr>
|
6
|
+
<td><strong><%= attribute.humanize %></strong></td>
|
7
|
+
<td><%= resource.public_send(attribute) %></td>
|
8
|
+
</tr>
|
9
|
+
<% end %>
|
10
|
+
</tbody>
|
11
|
+
</table>
|
12
|
+
</div>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div class="table-container">
|
2
|
+
<table class='table is-fullwidth'>
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<% node.attributes.each do |attr| %>
|
6
|
+
<th><%= attr.humanize %></th>
|
7
|
+
<% end %>
|
8
|
+
<th>
|
9
|
+
</tr>
|
10
|
+
</thead>
|
11
|
+
<tbody>
|
12
|
+
<% resources.limit(20).each do |resource| %>
|
13
|
+
<tr>
|
14
|
+
<% node.attributes.each do |attribute| %>
|
15
|
+
<td><%= resource.public_send(attribute).to_s.truncate(200) %></td>
|
16
|
+
<% end %>
|
17
|
+
<td><%= link_to '->', public_send("#{node.resource_name.singularize}_path", resource) %></td>
|
18
|
+
</tr>
|
19
|
+
<% end %>
|
20
|
+
</tbody>
|
21
|
+
</table>
|
22
|
+
</div>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<section class='section'>
|
2
|
+
<div class='container'>
|
3
|
+
<h5 class="title is-5"><%= @node.resource_name.singularize.titleize %></h5>
|
4
|
+
<%= render 'resource', resource: @resource, node: @node %>
|
5
|
+
</div>
|
6
|
+
</section>
|
7
|
+
|
8
|
+
<% @node.has_one.each do |friendship| %>
|
9
|
+
<section class='section'>
|
10
|
+
<div class='container'>
|
11
|
+
<% if (friend_resource = @resource.send(friendship.name)) %>
|
12
|
+
<h5 class="title is-5"><%= friendship.name.titleize %></h5>
|
13
|
+
<%= render 'resource', resource: friend_resource, node: friendship.node %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
</section>
|
17
|
+
<% end %>
|
18
|
+
|
19
|
+
<% @node.has_many.each do |child| %>
|
20
|
+
<section class='section'>
|
21
|
+
<div class='container'>
|
22
|
+
<h5 class="title is-5"><%= child.name.titleize %></h5>
|
23
|
+
<%= render 'resources', resources: @resource.send(child.name), node: child.node %>
|
24
|
+
</div>
|
25
|
+
</section>
|
26
|
+
<% end %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<section class='section'>
|
2
|
+
<div class='container'>
|
3
|
+
<div class="table-container">
|
4
|
+
<table class='table is-fullwidth'>
|
5
|
+
<thead>
|
6
|
+
<tr>
|
7
|
+
<th>Model</th>
|
8
|
+
<th>Parents</th>
|
9
|
+
<th>Children</th>
|
10
|
+
<th>Friends</th>
|
11
|
+
<th>Weight</th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
<tbody>
|
15
|
+
<% AutoAdmin::Node.nodes.values.sort_by { |n| [-n.weight, n.name] }.each do |node| %>
|
16
|
+
<tr>
|
17
|
+
<td><strong><%= node.to_s %></strong></td>
|
18
|
+
<td><%= node.belongs_to.count %></td>
|
19
|
+
<td><%= node.has_many.count %></td>
|
20
|
+
<td><%= node.has_one.count %></td>
|
21
|
+
<td><%= node.weight %></td>
|
22
|
+
</tr>
|
23
|
+
<% end %>
|
24
|
+
</tbody>
|
25
|
+
</table>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</section>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<% content_for(:body) do %>
|
2
|
+
<nav class='navbar is-dark' role='navigation' aria-label='main navigation'>
|
3
|
+
<div class='container'>
|
4
|
+
<div class='navbar-brand'>
|
5
|
+
<%= link_to 'AutoAdmin', root_path, class: 'navbar-item has-text-weight-bold' %>
|
6
|
+
<% AutoAdmin::Node.root_nodes.each do |node| %>
|
7
|
+
<%= link_to node.resource_name.humanize, node.polymorphic_path, class: ['navbar-item', ('is-active' if @node == node)].compact.join(' ') %>
|
8
|
+
<% end %>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
</nav>
|
12
|
+
<%= yield %>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<!DOCTYPE html>
|
16
|
+
<html>
|
17
|
+
<head>
|
18
|
+
<title>AutoAdmin: <%= app_name %></title>
|
19
|
+
<meta charset='utf-8'>
|
20
|
+
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
21
|
+
<%= csrf_meta_tags %>
|
22
|
+
<%= csp_meta_tag if respond_to?(:csp_meta_tag) %>
|
23
|
+
|
24
|
+
<%= stylesheet_link_tag 'auto_admin/application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
25
|
+
<%= javascript_include_tag 'auto_admin/application', 'data-turbolinks-track': 'reload' %>
|
26
|
+
</head>
|
27
|
+
|
28
|
+
<body>
|
29
|
+
<%= content_for(:body) %>
|
30
|
+
</body>
|
31
|
+
</html>
|
data/config/routes.rb
ADDED
data/lib/auto_admin/engine.rb
CHANGED
@@ -0,0 +1,110 @@
|
|
1
|
+
module AutoAdmin
|
2
|
+
class Node
|
3
|
+
class << self
|
4
|
+
def nodes
|
5
|
+
@nodes ||= begin
|
6
|
+
Rails.application.eager_load!
|
7
|
+
ActiveRecord::Base.descendants.each_with_object({}) do |klass, hash|
|
8
|
+
next if klass.abstract_class? || klass.name.split('::').first == 'ActiveRecord'
|
9
|
+
|
10
|
+
hash[klass.name] = AutoAdmin::Node.new(klass)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def preload_associations! # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
16
|
+
return true if @preloading
|
17
|
+
|
18
|
+
@preloading = true
|
19
|
+
@preload_associations ||= begin
|
20
|
+
nodes.values.each do |node|
|
21
|
+
node.klass.reflect_on_all_associations(:has_many).each do |association|
|
22
|
+
node.has_many association unless association.options[:through]
|
23
|
+
end
|
24
|
+
node.klass.reflect_on_all_associations(:has_one).each do |association|
|
25
|
+
node.has_one association
|
26
|
+
end
|
27
|
+
node.klass.reflect_on_all_associations(:belongs_to).each do |association|
|
28
|
+
node.belongs_to association unless association.polymorphic?
|
29
|
+
end
|
30
|
+
end
|
31
|
+
true
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def root_nodes
|
36
|
+
nodes.values.select { |n| n.belongs_to.none? }.sort_by { |n| -n.weight }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
attr_accessor :klass
|
41
|
+
delegate :name, :to_s, to: :klass
|
42
|
+
|
43
|
+
def initialize(klass)
|
44
|
+
self.klass = klass
|
45
|
+
end
|
46
|
+
|
47
|
+
def define_routes!(ctx)
|
48
|
+
ctx.resources resource_name, controller: 'resources', defaults: { node: klass.name }, only: %i(index show), shallow: true do
|
49
|
+
has_many.map(&:node).each do |child_node|
|
50
|
+
child_node.define_routes!(ctx)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def resource_name
|
56
|
+
klass.name.demodulize.underscore.pluralize
|
57
|
+
end
|
58
|
+
|
59
|
+
def polymorphic_path
|
60
|
+
[resource_name.to_sym]
|
61
|
+
end
|
62
|
+
|
63
|
+
def attributes
|
64
|
+
klass.column_names - primary_keys - belongs_to.map(&:node).map { |hm| hm.to_s.foreign_key }
|
65
|
+
end
|
66
|
+
|
67
|
+
def primary_keys
|
68
|
+
klass.respond_to?(:primary_keys) ? klass.primary_keys : [klass.primary_key]
|
69
|
+
end
|
70
|
+
|
71
|
+
def weight
|
72
|
+
@weight ||= has_many.map(&:node).sum(&:weight) + 1
|
73
|
+
end
|
74
|
+
|
75
|
+
def has_many(association = nil) # rubocop:disable Metrics/AbcSize
|
76
|
+
@has_many ||= Set.new
|
77
|
+
if association
|
78
|
+
node = self.class.nodes[association.klass.name]
|
79
|
+
node.belongs_to << Association.new(self, association.inverse_of) if association.inverse_of
|
80
|
+
@has_many << Association.new(node, association.name)
|
81
|
+
else
|
82
|
+
self.class.preload_associations!
|
83
|
+
end
|
84
|
+
@has_many
|
85
|
+
end
|
86
|
+
|
87
|
+
def has_one(association = nil) # rubocop:disable Metrics/AbcSize
|
88
|
+
@has_one ||= Set.new
|
89
|
+
if association
|
90
|
+
node = self.class.nodes[association.klass.name]
|
91
|
+
node.belongs_to << Association.new(self, association.inverse_of) if association.inverse_of
|
92
|
+
@has_one << Association.new(node, association.name)
|
93
|
+
else
|
94
|
+
self.class.preload_associations!
|
95
|
+
end
|
96
|
+
@has_one
|
97
|
+
end
|
98
|
+
|
99
|
+
def belongs_to(association = nil)
|
100
|
+
@belongs_to ||= Set.new
|
101
|
+
if association
|
102
|
+
node = self.class.nodes[association.klass.name]
|
103
|
+
@belongs_to << Association.new(node, association.name)
|
104
|
+
else
|
105
|
+
self.class.preload_associations!
|
106
|
+
end
|
107
|
+
@belongs_to
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
data/lib/auto_admin/version.rb
CHANGED
data/lib/auto_admin.rb
CHANGED
@@ -0,0 +1,8 @@
|
|
1
|
+
{
|
2
|
+
"ignored_warnings": [
|
3
|
+
"DEPRECATION WARNING: Leaving `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer`\nset to false is deprecated. SQLite databases have used 't' and 'f' to serialize\nboolean values and must have old data converted to 1 and 0 (its native boolean\nserialization) before setting this flag to true. Conversion can be accomplished\nby setting up a rake task which runs\n\n ExampleModel.where(\"boolean_column = 't'\").update_all(boolean_column: 1)\n ExampleModel.where(\"boolean_column = 'f'\").update_all(boolean_column: 0)\n\nfor all models and all boolean columns, after which the flag must be set to\ntrue by adding the following to your application.rb file:\n\n Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true\n (called from <global scope> at ../spec_helper.rb)",
|
4
|
+
"DEPRECATION WARNING: Leaving `ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer`\nset to false is deprecated. SQLite databases have used 't' and 'f' to serialize\nboolean values and must have old data converted to 1 and 0 (its native boolean\nserialization) before setting this flag to true. Conversion can be accomplished\nby setting up a rake task which runs\n\n ExampleModel.where(\"boolean_column = 't'\").update_all(boolean_column: 1)\n ExampleModel.where(\"boolean_column = 'f'\").update_all(boolean_column: 0)\n\nfor all models and all boolean columns, after which the flag must be set to\ntrue by adding the following to your application.rb file:\n\n Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true\n (called from block in <global scope> at ../../config.ru)"
|
5
|
+
],
|
6
|
+
"updated": "2019-05-01 03:28:56 UTC",
|
7
|
+
"rails_version": "5.2.3"
|
8
|
+
}
|
Binary file
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
ActiveRecord::Schema.define do
|
4
|
+
create_table :weddings do |t|
|
5
|
+
t.date :date, null: false
|
6
|
+
t.timestamps
|
7
|
+
end
|
8
|
+
|
9
|
+
create_table :spouses do |t|
|
10
|
+
t.references :wedding
|
11
|
+
t.string :full_name, null: false
|
12
|
+
t.string :nickname, null: false
|
13
|
+
t.integer :name_order
|
14
|
+
end
|
15
|
+
|
16
|
+
create_table :locations do |t|
|
17
|
+
t.string :name, null: false
|
18
|
+
t.text :address
|
19
|
+
t.timestamps
|
20
|
+
end
|
21
|
+
|
22
|
+
create_table :events do |t|
|
23
|
+
t.references :wedding, null: false
|
24
|
+
t.references :location, null: false
|
25
|
+
t.string :name
|
26
|
+
t.datetime :time
|
27
|
+
t.timestamps
|
28
|
+
end
|
29
|
+
|
30
|
+
create_table :guests do |t|
|
31
|
+
t.references :wedding
|
32
|
+
t.string :full_name, null: false
|
33
|
+
t.string :nickname, null: false
|
34
|
+
t.string :email
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
wedding = Wedding.create!(
|
2
|
+
date: (wedding_day = Faker::Date.forward(365))
|
3
|
+
)
|
4
|
+
|
5
|
+
wedding.create_spouse_a!(
|
6
|
+
nickname: (first_name = Faker::Name.first_name),
|
7
|
+
full_name: "#{first_name} #{Faker::Name.middle_name} #{Faker::Name.last_name}",
|
8
|
+
name_order: 1
|
9
|
+
)
|
10
|
+
wedding.create_spouse_b!(
|
11
|
+
nickname: (first_name = Faker::Name.first_name),
|
12
|
+
full_name: "#{first_name} #{Faker::Name.middle_name} #{Faker::Name.last_name}",
|
13
|
+
name_order: 2
|
14
|
+
)
|
15
|
+
|
16
|
+
build_location = lambda do |odds_of_address|
|
17
|
+
Location.new(
|
18
|
+
name: Faker::Restaurant.name,
|
19
|
+
address: (Faker::Address.full_address if rand(100) < odds_of_address)
|
20
|
+
)
|
21
|
+
end
|
22
|
+
[
|
23
|
+
[50, -1.day, '7:00pm'],
|
24
|
+
[100, 0.days, '6:00pm'],
|
25
|
+
[0, 1.day, '11:00am']
|
26
|
+
].each do |(odds_of_address, day_offset, time)|
|
27
|
+
wedding.events.create!(
|
28
|
+
name: 'Friday Drinks',
|
29
|
+
time: Time.zone.parse("#{wedding_day - day_offset} #{time}"),
|
30
|
+
location: build_location.call(odds_of_address)
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
25.times do
|
35
|
+
wedding.guests.create!(
|
36
|
+
nickname: (first_name = Faker::Name.first_name),
|
37
|
+
full_name: "#{first_name} #{Faker::Name.last_name}",
|
38
|
+
email: (Faker::Internet.email if rand(100) < 80)
|
39
|
+
)
|
40
|
+
end
|