activerecord-postgres-earthdistance 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 14914cf3227e2902f8116b489d41e3210603a9c1
4
- data.tar.gz: b4226864db951d270d472f3d14921a30568bb258
2
+ SHA256:
3
+ metadata.gz: 14b64ce9adeedc19f81dcd2c359b11535643f2d40654dbb8577e3cde19246c5a
4
+ data.tar.gz: 146a8b1d02d23c2e53e12b26e7c97beff80a2adc4cdc8ffff677fbba77378c1a
5
5
  SHA512:
6
- metadata.gz: ee07956cd76fcd31ba907d8a5e7c8aaf8d1da42034e188a4e76f5c7930f6a3b0dc454ab7a2dcabb8f443c3c5b4dd057433d3331f721a4871edcc5a2bea16d5d9
7
- data.tar.gz: 7e3ffb6b064c3a0ff0af310f446c2f83fdfce42693ed856917ec04d4c254f6964742226c0a6d0fd2dbcfefd8109949544c982e1a81ca585c5dde42dccee2d9b2
6
+ metadata.gz: e69b871105d854bae2e6b3595960af66970ca28451e85c664348b8802302db0cbb2b3f44047b302e181844d7da229522a800e533849698a51220794a717d8ad3
7
+ data.tar.gz: 599d73218999e4e6656b95ff2dacc7014e58d1afebb0d4e669a35aec584c43e101ad6e5593df8675523ac346f4887f67f0064c77a991b520d5e402b2a95b449c
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "activerecord-postgres-earthdistance"
7
- s.version = "0.7.1"
7
+ s.version = "0.7.2"
8
8
 
9
9
  s.platform = Gem::Platform::RUBY
10
10
  s.license = "MIT"
@@ -32,7 +32,19 @@ class EarthDistance < Rails::Railtie
32
32
  end
33
33
 
34
34
  def create_migration_file
35
- migration_template "setup_earthdistance.rb", "db/migrate/setup_earthdistance.rb"
35
+ migration_template "setup_earthdistance.rb", "db/migrate/setup_earthdistance.rb", migration_version: migration_version
36
+ end
37
+
38
+ private
39
+
40
+ def requires_migration_version?
41
+ Rails::VERSION::MAJOR >= 5
42
+ end
43
+
44
+ def migration_version
45
+ if requires_migration_version?
46
+ "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
47
+ end
36
48
  end
37
49
  end
38
50
  end
@@ -1,4 +1,4 @@
1
- class SetupEarthdistance < ActiveRecord::Migration
1
+ class SetupEarthdistance < ActiveRecord::Migration<%= migration_version %>
2
2
  def self.up
3
3
  execute "CREATE EXTENSION IF NOT EXISTS cube"
4
4
  execute "CREATE EXTENSION IF NOT EXISTS earthdistance"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-postgres-earthdistance
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diogo Biazus
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-03 00:00:00.000000000 Z
11
+ date: 2021-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -143,7 +143,7 @@ homepage: http://github.com/diogob/activerecord-postgres-earthdistance
143
143
  licenses:
144
144
  - MIT
145
145
  metadata: {}
146
- post_install_message:
146
+ post_install_message:
147
147
  rdoc_options: []
148
148
  require_paths:
149
149
  - lib
@@ -158,14 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  version: 1.3.6
160
160
  requirements: []
161
- rubyforge_project:
162
- rubygems_version: 2.6.13
163
- signing_key:
161
+ rubygems_version: 3.1.4
162
+ signing_key:
164
163
  specification_version: 4
165
164
  summary: Check distances with latitude and longitude using PostgreSQL special indexes
166
- test_files:
167
- - spec/act_as_geolocated_spec.rb
168
- - spec/fixtures/event.rb
169
- - spec/fixtures/job.rb
170
- - spec/fixtures/place.rb
171
- - spec/spec_helper.rb
165
+ test_files: []