geopolitical 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -3
- data/app/controllers/geopolitical/cities_controller.rb +0 -2
- data/app/controllers/geopolitical/geopolitical_controller.rb +0 -3
- data/app/controllers/geopolitical/hoods_controller.rb +0 -2
- data/app/controllers/geopolitical/nations_controller.rb +0 -1
- data/app/controllers/geopolitical/regions_controller.rb +2 -3
- data/app/models/city.rb +2 -7
- data/app/models/concerns/{geo_helper.rb → geopolitocracy.rb} +9 -2
- data/app/models/hood.rb +3 -6
- data/app/models/nation.rb +3 -8
- data/app/models/region.rb +1 -6
- data/app/views/geopolitical/geopolitical/index.html.haml +2 -2
- data/app/views/layouts/geopolitical.html.haml +1 -1
- data/config/routes.rb +0 -1
- data/lib/geopolitical/engine.rb +1 -0
- data/lib/geopolitical/version.rb +1 -1
- data/spec/dummy/config/application.rb +5 -5
- data/spec/dummy/config/boot.rb +1 -1
- data/spec/dummy/config/environments/development.rb +1 -1
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/config/mongoid.yml +59 -3
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +2264 -0
- data/spec/fabricators/hood_fabricator.rb +1 -1
- data/spec/fabricators/nation_fabricator.rb +1 -1
- data/spec/models/city_spec.rb +12 -7
- data/spec/models/hood_spec.rb +3 -3
- data/spec/models/nation_spec.rb +8 -8
- data/spec/models/region_spec.rb +2 -2
- data/spec/spec_helper.rb +0 -1
- metadata +7 -488
- data/app/controllers/geopolitical/zones_controller.rb +0 -18
- data/app/models/address.rb +0 -76
- data/app/models/zone.rb +0 -40
- data/app/views/geopolitical/addresses/_address.html.haml +0 -6
- data/app/views/geopolitical/addresses/_form.html.haml +0 -17
- data/app/views/geopolitical/zones/_form.html.haml +0 -22
- data/app/views/geopolitical/zones/_region.html.haml +0 -7
- data/app/views/geopolitical/zones/index.html.haml +0 -31
- data/app/views/geopolitical/zones/show.html.haml +0 -21
- data/spec/dummy/app/controllers/application_controller.rb +0 -5
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_alerts.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_badges.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_breadcrumbs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_button-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_buttons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_carousel.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_close.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_code.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_component-animations.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_dropdowns.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_forms.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_glyphicons.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_grid.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_input-groups.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_jumbotron.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_labels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_list-group.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_media.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_mixins.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_modals.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_navbar.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_navs.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_normalize.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_pager.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_pagination.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_panels.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_popovers.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_print.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_progress-bars.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_responsive-utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_scaffolding.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_tables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_thumbnails.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_tooltip.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_type.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_utilities.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_variables.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/_wells.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/01973edbe849c28bdcfd2d35ff68bf81d0a47072/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/5678d69f2ebac99ad77c0227053319b29c8501bd/admin.css.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/5678d69f2ebac99ad77c0227053319b29c8501bd/overrides.css.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/5678d69f2ebac99ad77c0227053319b29c8501bd/share.css.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/6615f4cc6b8bee275d6bf93c7bb05f48def7f448/zoom.css.sassc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sass/f714e0ce6a9f758c9e5c97b773f445f87d06f242/bootstrap.scssc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0041e4e955903135b91731d343b375dc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/00f9985cfd5cc4bc66f28c8f90ea846f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/01da972ec8035647fefc75891d38723d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/020db56d5200a5d5a6e5b13a0f28230e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/06e340cfa3dd92c6920f110cb9cd10fb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/070aaf64358c91f00472aa3617506e7d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/07ac992c6b6de9d93abb42b528a5f0b1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0a931c1680cc466bc1cbd4cdb06e2d11 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0aaec1d5a5e191621d34b8725baa785c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0b8282ca819a0b1989f2762a229e12b7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0bc1dc945505f7f88b19130f0b20ca17 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0cb1da3adc8f79c0d6eeb03f7f7a1a09 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0d1eb5b2d5e20b202372f98e80e17776 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0e36e17c024944e3db6d104ae6535b52 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/0fa162070c700cd9f1730e7d36de963a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/10fc19d6134120a35ae0774018b87fa3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/134bc5485587d91d2934c8c6c34adbe7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/18ec083456858c6045c6f76ae68abb81 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/198b7f9aa1c72d3d9ac65204e456547e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1a84ab6489681fd097a95f83ecb8cbd3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1d2a158c133854d253acb5c935a1871a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2087b360c50c3d09eeaa49dd4ef19b47 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/281868008f5019df9a68315ee6ae805f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/28fb855197e403b5f29cdd03d1759d6f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2d0cadbd9d5832d13ba61db18484d51b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/2f9da913d28d36b849157c4701a1fb6e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/325872504435cefc103906d0b932cbdf +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3259e527d2a69f4275796cd6604425ac +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/348d2f2e9a56d75e839e9ced9a7456d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/381a5c531cbfb5482922eb47225886fe +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/38f59f20d082fef8b2d25ceaf1087c87 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3c8e862c91156774ec6a7e91f7eea206 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/3eae73f70fa353f8805f443d9cb6e323 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/43af88fdc924b46adec835065acbf723 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/45020bf349215c82c6af09d2fc08cb75 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/478fcb1bb14dea6676d7daa4da761816 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/49dce858c0c28a5a74156716e4fbc921 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4b8e8643c7280aa13c29b9746bf7beeb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4c2e8488d0fd9168ac0e99f00bc19358 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4cfb0d755c7099184a533360d7ff5626 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4d29959a49ff32c7bf049ae08fe70044 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4d68964bf550b84b6f9dcbd58c11de91 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/4f46412cf48ba4fbee8ad67f5af0f464 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/504113899bd4b1d5c1a6d3f3e858f842 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5074f04cdf0dc09cb716ae031690a00d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/51d826944b223f671b6396c4471a8a77 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/51e8e83783e5e14c2bd1af8d93f29e29 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/53d6a4fd118d7acfc2f9e386f2970f14 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/54024c686e64fffd712c4c5abbe310d3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5b51b3a9e048ffb9640807f0879ef5be +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5e1cddcbdb8303539c39235cf57e81c7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6099bff893c14a5f752193d9442939a6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/62f6f3c5a05c16cc4b74197e043a9d28 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/67a605c9caec90cb2ba5bc994d76a366 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/69dd3cd0ec5a05717820f12f283aebcd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6a70c5285aa6e70accd72d625570dce3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6aabc873702d45cbceb1a7800279de11 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6cd765df7a5f7a22a96c933477d4b008 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6db2166e3d867d0d972fe487be15915f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6eafae65d99b0722eda57f5ada433ab7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/70b1a61a943e625f9b036a603bb7f577 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/71f87fa85551718ab20ecadd54f0d483 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/739e384616ffc915d501c0c02313cdd9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/756cb1548072eaaee06c449b1819dcd0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/76d38d4e1a834a6672618689ef0828ca +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/77feab1a2bcb6152609b249f01ff845c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/78220ea07af0a3147bfbbe78acf3885a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/78633251542f083af9005904659cb655 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/7878a82b050f7b5b8ecb25bad24534af +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/79591057553e920f5f912e98bcb787bd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8421ebe816691acdf86bbbd0794b1124 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/86665c82bed592f08fdd900eb1cf091e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8748647f30ee2cc6c39f3ed97dc6bc3d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/87fc80c518fa992700d3cc1400725780 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8827af2c1d3d9e7e0e03c55b4ed04cb6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8876b54f94e080a763f022901d855e17 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8a008d0af6fe8b0c2a087fb8798d5566 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8a94af8ea0695dd59952ec1122198b0b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8ac06f8ceb5967ed5169b1be587c3570 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8ae7c9af3c25c5c6aa1669d9fe8efadd +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/8ee36bea713d96d816abc2aab05eb574 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/91067d1ce35da27238ca2f60e31567d0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/91b5f749c34d67378b1c85691d8f1d64 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/91df8620ba94eb4e38ee57a630e6d755 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/952d3e11fc0afc434b8bf57a0a90c070 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/95ae4486d7a42a92cb505dacd28e86e2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/9b61caed22770dd2a5cc3dbca76ad587 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a02c7467276b2f5d5bcfe6684fe3b942 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a2ba2122ca70cd81c88655161f5bf5cb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a3866df72bbd7d238210078e67a10d62 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a386ab2670e0df13821c50c4f28681a1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/a9b464a19e2d8fa57784813fbd469997 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/aa5d7a5bae61d803effb92bf52cf2a05 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/aad12f69a4bacf541bda36c93a5f853c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ae5925c4e01634fe56cac05f2df1747c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ae9db6465d683af41afd3155bf52fbeb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/aef534e3a27e319c280ae279ae731919 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/af5b2e00dfd5a2496b13a72d21d51c7c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b2703a952cb55e7a292ac6cfe3f9aa5c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b6564f80dcfcdf8bdd35f0c026db304a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b6bb5034ed6516dc3966c1c4ec7c5460 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b745b5f2cc7f0f42d5738f7e6b8e0854 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b76c9ca20bde811b483f94fe0ba62d74 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b8133e2641e2a6f5b97bd3de2544fe4f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/b98f111061cd9e06780ea13628e8dfba +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bcaeab4a5a782622a5f21ec347eb05b3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/be7fde69656a4d4535e80ab190e407e2 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c3393f41e87f49ea319eb9968a9329f6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c37be87ac7023923064ae0dce529596b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c48103ec9cfa293adf8ca759b167320e +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/c4a181d17d132ad3a1e37082cfbd8cf5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cad1287e7f84aa4b2b3ff487fe1a41e0 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cbd89d7e198517e93c68da59102a0d6a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cda96c20c04a712d796667193d1dbd57 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d0009ae22ba892efb460a7c2cb5fd6f3 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d1475d01243a109566fb5e511db0867a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d3c3e28044f0a5aef2db422c587a9401 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d53324fd75be79baac08c902b96c441f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d620b180a760baf0490d20c097e1d011 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/da84643104ca352141685ff8c3863ce7 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/dc5779cb64c2006f82cc18b217e2f7a8 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/dda4b685f40af48896b2d342e9bcec0d +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/de1a11fdb38979c879ad54bbf6da81fb +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e1a3159adc4ec4f206057edd3dffb125 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e2058ffe0658afb7d588eb1daa92fe64 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e25c41e3244e3f299e593886f167695b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e49b96a347dbf45574e34dfb0f900bee +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e4f7474105e93416d46d1f8f98f8bb66 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e7e33153bc8a2603808249a76778f269 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e8145722d5669d3c30eca8aa5558d4e1 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/e921a2d02e6f51c557bcbe12899fab4c +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ea447ef7448d4c3d6a43050713171083 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f0a30760a680efc89f7cb0105581d1f6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f600ecd975c175f027a8357c30e3c34a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f6410ace4dba715ebc97aa27df34dc79 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/f9d8b1fb1bfd8a62aefedf79ed68cbc5 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fa3b5b8ef9c7773cc00eedded9d8755b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/fd05d0348b4bf9122f9b88fe349cb336 +0 -0
- data/spec/dummy/tmp/capybara/capybara-201310301520548452373222.html +0 -345
- data/spec/dummy/tmp/capybara/capybara-201310301521204849080625.html +0 -345
- data/spec/dummy/tmp/ember-rails/ember-data.js +0 -10204
- data/spec/dummy/tmp/ember-rails/ember.js +0 -36999
- data/spec/fabricators/address_fabricator.rb +0 -8
- data/spec/fabricators/zones_fabricator.rb +0 -5
- data/spec/models/zone_spec.rb +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bb0b89bd70de2fdb5043eb0aa7df85ccb16a6e8
|
4
|
+
data.tar.gz: e7cd29bd02745c80a3f41c7442d94018c84f068d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d72e2bdaafb73d270e2821e873b4958d9e4ac8f6c1f3a6b2cd74b3aa8119458e4e0c23f990f0901408dcc874f1613f19bdffaa1311484b8e7d8ed384e7b1bc38
|
7
|
+
data.tar.gz: f82ae4c772d3df1f26a198969c6cc25118d6d3ebda15b50499566e6a009eb521acf4006e4a330762b137b6b0a2b05ee482273298063a3b2ca92bff0fcde2f8fe
|
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ end
|
|
7
7
|
require 'bundler/gem_tasks'
|
8
8
|
|
9
9
|
require 'rspec/core/rake_task'
|
10
|
-
#require 'rubocop/rake_task'
|
10
|
+
# require 'rubocop/rake_task'
|
11
11
|
|
12
12
|
require 'rdoc/task'
|
13
13
|
|
@@ -19,8 +19,7 @@ RDoc::Task.new(:rdoc) do |rdoc|
|
|
19
19
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
20
20
|
end
|
21
21
|
|
22
|
-
APP_RAKEFILE = File.expand_path(
|
22
|
+
APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
|
23
23
|
# load 'rails/tasks/engine.rake'
|
24
24
|
|
25
|
-
|
26
25
|
# Bundler::GemHelper.install_tasks
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Geopolitical
|
2
2
|
# Main Geopolitical Controller
|
3
3
|
class GeopoliticalController < ActionController::Base
|
4
|
-
|
5
4
|
layout 'geopolitical'
|
6
5
|
|
7
6
|
def index
|
@@ -14,7 +13,5 @@ module Geopolitical
|
|
14
13
|
def permitted_params
|
15
14
|
params.permit!
|
16
15
|
end
|
17
|
-
|
18
16
|
end
|
19
|
-
|
20
17
|
end
|
@@ -2,7 +2,7 @@ module Geopolitical
|
|
2
2
|
# Main Regions Controller
|
3
3
|
class RegionsController < GeopoliticalController
|
4
4
|
inherit_resources
|
5
|
-
before_filter :
|
5
|
+
before_filter :set_nations, only: [:new, :edit, :create, :update]
|
6
6
|
|
7
7
|
def collection
|
8
8
|
@regions = Region.ordered.page(params[:page])
|
@@ -10,9 +10,8 @@ module Geopolitical
|
|
10
10
|
|
11
11
|
private
|
12
12
|
|
13
|
-
def
|
13
|
+
def set_nations
|
14
14
|
@nations = Nation.all.map { |n| [n.name, n.id] }
|
15
15
|
end
|
16
|
-
|
17
16
|
end
|
18
17
|
end
|
data/app/models/city.rb
CHANGED
@@ -4,13 +4,9 @@
|
|
4
4
|
class City
|
5
5
|
include Mongoid::Document
|
6
6
|
include Mongoid::Geospatial
|
7
|
-
include
|
7
|
+
include Geopolitocracy
|
8
8
|
|
9
|
-
field :gid, type: Integer
|
10
9
|
field :zip, type: String
|
11
|
-
field :slug, type: String
|
12
|
-
field :name, type: String, localize: true
|
13
|
-
field :ascii, type: String
|
14
10
|
field :area, type: Integer
|
15
11
|
field :souls, type: Integer
|
16
12
|
field :geom, type: Point, spatial: true
|
@@ -28,7 +24,7 @@ class City
|
|
28
24
|
scope :ordered, -> { order_by(name: 1) }
|
29
25
|
|
30
26
|
validates :slug, presence: true, uniqueness: true
|
31
|
-
validates :name, uniqueness: { scope: :
|
27
|
+
validates :name, uniqueness: { scope: :nation_id }
|
32
28
|
|
33
29
|
# scope :close_to, GeoHelper::CLOSE
|
34
30
|
|
@@ -50,5 +46,4 @@ class City
|
|
50
46
|
def <=>(other)
|
51
47
|
slug <=> other.slug
|
52
48
|
end
|
53
|
-
|
54
49
|
end
|
@@ -1,8 +1,16 @@
|
|
1
1
|
# Geopolitical Helpers
|
2
|
-
module
|
2
|
+
module Geopolitocracy
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
+
field :name, type: String, localize: true
|
7
|
+
field :abbr, type: String
|
8
|
+
field :gid, type: Integer # geonames id
|
9
|
+
|
10
|
+
field :slug, type: String
|
11
|
+
field :ascii, type: String
|
12
|
+
field :code, type: String
|
13
|
+
|
6
14
|
before_validation :set_slug
|
7
15
|
end
|
8
16
|
|
@@ -19,5 +27,4 @@ module GeoHelper
|
|
19
27
|
self[:slug] = txt.encode(Encoding::ISO_8859_1)
|
20
28
|
.gsub(/\s/, '-').downcase
|
21
29
|
end
|
22
|
-
|
23
30
|
end
|
data/app/models/hood.rb
CHANGED
@@ -3,22 +3,19 @@
|
|
3
3
|
#
|
4
4
|
class Hood
|
5
5
|
include Mongoid::Document
|
6
|
+
include Geopolitocracy
|
6
7
|
|
7
|
-
field :gid, type: Integer
|
8
|
-
field :slug, type: String
|
9
|
-
field :name, type: String, localize: true
|
10
8
|
field :souls, type: Integer
|
11
|
-
field :zip, type: Integer
|
12
9
|
field :rank, type: Integer
|
10
|
+
field :zip, type: Integer
|
13
11
|
|
14
12
|
belongs_to :city
|
15
13
|
|
16
|
-
validates
|
14
|
+
validates :city, :name, presence: true
|
17
15
|
|
18
16
|
scope :ordered, -> { order_by(name: 1) }
|
19
17
|
|
20
18
|
def to_s
|
21
19
|
name || slug
|
22
20
|
end
|
23
|
-
|
24
21
|
end
|
data/app/models/nation.rb
CHANGED
@@ -3,14 +3,10 @@
|
|
3
3
|
#
|
4
4
|
class Nation
|
5
5
|
include Mongoid::Document
|
6
|
-
include
|
6
|
+
include Geopolitocracy
|
7
7
|
|
8
|
-
field :_id, type: String, default: ->{ abbr }
|
8
|
+
field :_id, type: String, default: -> { abbr }
|
9
9
|
|
10
|
-
field :gid, type: Integer # geonames id
|
11
|
-
field :slug, type: String
|
12
|
-
field :name, type: String, localize: true
|
13
|
-
field :abbr, type: String
|
14
10
|
field :code # optional phone/whatever code
|
15
11
|
field :zip, type: String
|
16
12
|
field :cash, type: String
|
@@ -23,6 +19,5 @@ class Nation
|
|
23
19
|
|
24
20
|
validates :slug, :abbr, uniqueness: true, presence: true
|
25
21
|
|
26
|
-
|
27
|
-
|
22
|
+
alias_method :currency, :cash
|
28
23
|
end
|
data/app/models/region.rb
CHANGED
@@ -3,12 +3,8 @@
|
|
3
3
|
#
|
4
4
|
class Region
|
5
5
|
include Mongoid::Document
|
6
|
-
include
|
6
|
+
include Geopolitocracy
|
7
7
|
|
8
|
-
field :gid, type: Integer # geonames id
|
9
|
-
field :slug, type: String
|
10
|
-
field :name, type: String, localize: true
|
11
|
-
field :abbr, type: String
|
12
8
|
field :codes, type: Array # phone codes
|
13
9
|
|
14
10
|
belongs_to :nation
|
@@ -19,5 +15,4 @@ class Region
|
|
19
15
|
|
20
16
|
validates :nation, presence: true
|
21
17
|
validates :name, presence: true, uniqueness: { scope: :nation_id }
|
22
|
-
|
23
18
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
%h1 Geopolitical
|
2
2
|
%hr
|
3
3
|
|
4
|
-
- [
|
4
|
+
- [Nation, Region, City, Hood].each do |klass|
|
5
5
|
.block
|
6
6
|
%h3.title
|
7
7
|
= link_to klass.model_name.human.pluralize, send("#{klass.to_s.downcase.pluralize}_path")
|
@@ -18,4 +18,4 @@
|
|
18
18
|
%hr
|
19
19
|
%p Minimalist layout by NoCSS Co.
|
20
20
|
%p= link_to "fireho/geopolitical", "http://github.com/fireho/geopolitical"
|
21
|
-
%p= link_to "< Back", "/"
|
21
|
+
%p= link_to "< Back", "/"
|
@@ -14,7 +14,7 @@
|
|
14
14
|
= csrf_meta_tags
|
15
15
|
//%link{:href => image_path("favicon.png?v=111119"), :rel => "shortcut icon"}/
|
16
16
|
%body
|
17
|
-
- [
|
17
|
+
- [Nation, Region, City, Hood].each do |klass|
|
18
18
|
= link_to klass.model_name.human.pluralize, send("#{klass.to_s.downcase.pluralize}_path")
|
19
19
|
|
20
20
|
= yield
|
data/config/routes.rb
CHANGED
data/lib/geopolitical/engine.rb
CHANGED
data/lib/geopolitical/version.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
require File.expand_path('../boot', __FILE__)
|
2
2
|
|
3
3
|
# Pick the frameworks you want:
|
4
|
-
#require "active_record/railtie"
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
4
|
+
# require "active_record/railtie"
|
5
|
+
require 'action_controller/railtie'
|
6
|
+
require 'action_mailer/railtie'
|
7
|
+
require 'sprockets/railtie'
|
8
8
|
# require "rails/test_unit/railtie"
|
9
9
|
|
10
10
|
Bundler.require(*Rails.groups)
|
11
|
-
require
|
11
|
+
require 'geopolitical'
|
12
12
|
|
13
13
|
module Dummy
|
14
14
|
class Application < Rails::Application
|
data/spec/dummy/config/boot.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Set up gems listed in the Gemfile.
|
2
2
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
|
3
3
|
|
4
|
-
require 'bundler/setup' if File.
|
4
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
5
5
|
$LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
|
@@ -20,7 +20,7 @@ Dummy::Application.configure do
|
|
20
20
|
config.active_support.deprecation = :log
|
21
21
|
|
22
22
|
# Raise an error on page load if there are pending migrations
|
23
|
-
config.active_record.migration_error = :page_load
|
23
|
+
# config.active_record.migration_error = :page_load
|
24
24
|
|
25
25
|
# Debug mode disables concatenation and preprocessing of assets.
|
26
26
|
# This option may cause significant delays in view rendering with a large
|
@@ -14,7 +14,7 @@ Dummy::Application.configure do
|
|
14
14
|
|
15
15
|
# Configure static asset server for tests with Cache-Control for performance.
|
16
16
|
config.serve_static_assets = true
|
17
|
-
config.static_cache_control =
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
18
|
|
19
19
|
# Show full error reports and disable caching.
|
20
20
|
config.consider_all_requests_local = true
|
@@ -1,13 +1,69 @@
|
|
1
|
+
development:
|
2
|
+
# Configure available database sessions. (required)
|
3
|
+
sessions:
|
4
|
+
# Defines the default session. (required)
|
5
|
+
default:
|
6
|
+
# Defines the name of the default database that Mongoid can connect to.
|
7
|
+
# (required).
|
8
|
+
database: geopolitical_spec_development
|
9
|
+
# Provides the hosts the default session can connect to. Must be an array
|
10
|
+
# of host:port pairs. (required)
|
11
|
+
hosts:
|
12
|
+
- localhost:27017
|
13
|
+
options:
|
14
|
+
# Change the default write concern. (default = { w: 1 })
|
15
|
+
# write:
|
16
|
+
# w: 1
|
17
|
+
|
18
|
+
# Change the default consistency model to primary, secondary.
|
19
|
+
# 'secondary' will send reads to secondaries, 'primary' sends everything
|
20
|
+
# to master. (default: primary)
|
21
|
+
# read: secondary_preferred
|
22
|
+
|
23
|
+
# How many times Moped should attempt to retry an operation after
|
24
|
+
# failure. (default: The number of nodes in the cluster)
|
25
|
+
# max_retries: 20
|
26
|
+
|
27
|
+
# The time in seconds that Moped should wait before retrying an
|
28
|
+
# operation on failure. (default: 0.25)
|
29
|
+
# retry_interval: 0.25
|
30
|
+
# Configure Mongoid specific options. (optional)
|
31
|
+
options:
|
32
|
+
# Includes the root model name in json serialization. (default: false)
|
33
|
+
# include_root_in_json: false
|
34
|
+
|
35
|
+
# Include the _type field in serializaion. (default: false)
|
36
|
+
# include_type_for_serialization: false
|
37
|
+
|
38
|
+
# Preload all models in development, needed when models use
|
39
|
+
# inheritance. (default: false)
|
40
|
+
# preload_models: false
|
41
|
+
|
42
|
+
# Protect id and type from mass assignment. (default: true)
|
43
|
+
# protect_sensitive_fields: true
|
44
|
+
|
45
|
+
# Raise an error when performing a #find and the document is not found.
|
46
|
+
# (default: true)
|
47
|
+
# raise_not_found_error: true
|
48
|
+
|
49
|
+
# Raise an error when defining a scope with the same name as an
|
50
|
+
# existing method. (default: false)
|
51
|
+
# scope_overwrite_exception: false
|
52
|
+
|
53
|
+
# Use Active Support's time zone in conversions. (default: true)
|
54
|
+
# use_activesupport_time_zone: true
|
55
|
+
|
56
|
+
# Ensure all times are UTC in the app side. (default: false)
|
57
|
+
# use_utc: false
|
1
58
|
test:
|
2
59
|
sessions:
|
3
60
|
default:
|
4
|
-
database:
|
61
|
+
database: geopolitical_spec
|
5
62
|
hosts:
|
6
63
|
- localhost:27017
|
7
64
|
options:
|
8
|
-
|
65
|
+
read: primary
|
9
66
|
# In the test environment we lower the retries and retry interval to
|
10
67
|
# low amounts for fast failures.
|
11
68
|
max_retries: 1
|
12
69
|
retry_interval: 0
|
13
|
-
|
data/spec/dummy/config/routes.rb
CHANGED
File without changes
|