activerecord-spatial 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1670 -0
  3. data/Gemfile +12 -13
  4. data/Guardfile +7 -10
  5. data/MIT-LICENSE +1 -1
  6. data/README.rdoc +8 -19
  7. data/Rakefile +2 -1
  8. data/activerecord-spatial.gemspec +12 -13
  9. data/lib/activerecord-spatial/active_record/connection_adapters/postgresql/adapter_extensions/active_record.rb +46 -0
  10. data/lib/activerecord-spatial/active_record/connection_adapters/postgresql/adapter_extensions.rb +7 -38
  11. data/lib/activerecord-spatial/active_record/connection_adapters/postgresql/postgis.rb +6 -7
  12. data/lib/activerecord-spatial/active_record/connection_adapters/postgresql/unknown_srid.rb +4 -5
  13. data/lib/activerecord-spatial/active_record/models/geography_column.rb +1 -2
  14. data/lib/activerecord-spatial/active_record/models/geometry_column.rb +1 -2
  15. data/lib/activerecord-spatial/active_record/models/spatial_column.rb +1 -2
  16. data/lib/activerecord-spatial/active_record/models/spatial_ref_sys.rb +5 -6
  17. data/lib/activerecord-spatial/active_record.rb +0 -1
  18. data/lib/activerecord-spatial/associations/active_record.rb +62 -120
  19. data/lib/activerecord-spatial/associations/base.rb +26 -75
  20. data/lib/activerecord-spatial/associations/preloader/spatial_association.rb +57 -0
  21. data/lib/activerecord-spatial/associations/reflection/spatial_reflection.rb +41 -0
  22. data/lib/activerecord-spatial/associations.rb +26 -4
  23. data/lib/activerecord-spatial/spatial_columns.rb +85 -94
  24. data/lib/activerecord-spatial/spatial_function.rb +62 -51
  25. data/lib/activerecord-spatial/spatial_scope_constants/postgis_2_0.rb +48 -0
  26. data/lib/activerecord-spatial/spatial_scope_constants/postgis_2_2.rb +46 -0
  27. data/lib/activerecord-spatial/spatial_scope_constants/postgis_legacy.rb +30 -0
  28. data/lib/activerecord-spatial/spatial_scope_constants.rb +10 -61
  29. data/lib/activerecord-spatial/spatial_scopes.rb +47 -49
  30. data/lib/activerecord-spatial/version.rb +1 -2
  31. data/lib/activerecord-spatial.rb +2 -6
  32. data/lib/tasks/test.rake +21 -19
  33. data/test/.rubocop.yml +35 -0
  34. data/test/accessors_geographies_tests.rb +19 -19
  35. data/test/accessors_geometries_tests.rb +19 -19
  36. data/test/adapter_tests.rb +1 -2
  37. data/test/associations_tests.rb +181 -203
  38. data/test/geography_column_tests.rb +2 -3
  39. data/test/geometry_column_tests.rb +1 -2
  40. data/test/models/bar.rb +2 -3
  41. data/test/models/blort.rb +1 -2
  42. data/test/models/foo.rb +2 -3
  43. data/test/models/foo3d.rb +2 -3
  44. data/test/models/foo_geography.rb +2 -3
  45. data/test/models/zortable.rb +2 -3
  46. data/test/spatial_function_tests.rb +12 -17
  47. data/test/spatial_scopes_geographies_tests.rb +17 -20
  48. data/test/spatial_scopes_tests.rb +84 -75
  49. data/test/test_helper.rb +66 -79
  50. metadata +16 -14
  51. data/lib/activerecord-spatial/associations/active_record_3.rb +0 -123
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc9560eb51306e528c6d7f7d1b7bd0a7fd00a000
4
- data.tar.gz: 05373a7453c4905152bf5339637c006e1ffd3daa
3
+ metadata.gz: 8e8b41fb4fb4f7f444f9afb6e23d436bfbc93e9d
4
+ data.tar.gz: 4ab00a7e91c0c05e81bbe8411bed21ac5a0608a5
5
5
  SHA512:
6
- metadata.gz: 260336e396ba1fa10395776c62488dfe2cd7cfd33759f50da33f6afe432408bac7f53d6a5ec47937acd2313a5a5cdebbbd408cf01f75eed15d764ca955650cda
7
- data.tar.gz: bb4e0db0ec7799049d50720110e29040f523db651545c1139aa070f96300dae4f2c6986f672521f77a3eec8c17e7b4f661a8ad7529796d6d697b46abf40b9b08
6
+ metadata.gz: 26194cb4a43d0fa349c7cc490ae5134d92fbee6fb3a2c31413bb12eaffffea2058727e8624d1f7ec754b70c03c71d4b3cc139a49e460f5f4f203900ff08ac768
7
+ data.tar.gz: fc4ca0402d7e837af58d6822c9dc37c17c2086a1381444e162b93c86b9f06f833d529ae487f64711fd99595317d323be1986401e22ab4f6c9b602dfa6d6a536e