geokit-rails 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of geokit-rails might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48ca6ff9da9db809b5364c5da86253f349dc5aff
4
- data.tar.gz: faf83c4907ad40f8c14b1431309d9db0b009fba7
3
+ metadata.gz: 60cc7291a94e6384a48947ecb040a472b26c0ac6
4
+ data.tar.gz: e067b31c96bf53bbe4a3be1f6acf9f490e0c2c16
5
5
  SHA512:
6
- metadata.gz: 7aeacd224c2d14b57a37a1666dc514002d4baf6bf3d20a03f6a212a05bcf9920dc4f5c2cc72fa0798dc42ab6c1912dec185e0616edf41f0070806cfaf04c8060
7
- data.tar.gz: ef046a2677870e71be5ecdf2c0bf8e90f979d858efb237bea8ec531644473af9a339f0ec413bfcc37affb19187bdaaaaf7272567a96fff3a32ed062b3ba4c642
6
+ metadata.gz: 06e80fa935a623e414e484df78abbc3fb8795c59babe7c40acc152a415b0ca12563be5c3bbaca82be6b36701cea934a8d5d9ae79b1a77defd9a5dd7735e71eb3
7
+ data.tar.gz: 617c4629c9a48b244dbaa9c8afed2cfb7315de6309e11c1d775892174e5d4166c23158d150a506f6f8f7084c0fd1f42e7549baddc8194d83f4c8e62cf40e59b3
@@ -4,15 +4,23 @@ rvm:
4
4
  - 2.1
5
5
  - 2.2
6
6
  - 2.3
7
+ - 2.4
7
8
  gemfile:
8
9
  - gemfiles/rails3.gemfile
9
10
  - gemfiles/rails4.gemfile
11
+ - gemfiles/rails5.gemfile
10
12
  matrix:
11
13
  exclude:
12
14
  - rvm: 2.2
13
15
  gemfile: gemfiles/rails3.gemfile
14
16
  - rvm: 2.3
15
17
  gemfile: gemfiles/rails3.gemfile
18
+ - rvm: 2.4
19
+ gemfile: gemfiles/rails3.gemfile
20
+ - rvm: 2.0
21
+ gemfile: gemfiles/rails5.gemfile
22
+ - rvm: 2.1
23
+ gemfile: gemfiles/rails5.gemfile
16
24
  script: "bundle exec rake coverage"
17
25
  before_install:
18
26
  - gem install bundler
@@ -1,3 +1,7 @@
1
+ ## 2.3.1
2
+
3
+ * Fix Rails 5.2 deprecation warning
4
+
1
5
  ## 2.3.0
2
6
 
3
7
  * Drop ruby 1.9 and add 2.3 support
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development, :test do
4
+ gem 'activerecord', '~> 5.0'
5
+ gem 'test-unit'
6
+ end
7
+
8
+ gemspec :path => "../"
@@ -26,7 +26,6 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency 'test-unit'
27
27
  spec.add_development_dependency "mocha", "~> 0.9"
28
28
  spec.add_development_dependency 'coveralls'
29
- spec.add_development_dependency "mysql", "~> 2.8"
30
29
  spec.add_development_dependency "mysql2", "~> 0.2"
31
30
  spec.add_development_dependency "activerecord-mysql2spatial-adapter"
32
31
  spec.add_development_dependency "pg", "~> 0.10"
@@ -153,7 +153,9 @@ module Geokit
153
153
  units = extract_units_from_options(options)
154
154
  formula = extract_formula_from_options(options)
155
155
  distance_column_name = distance_sql(origin, units, formula)
156
- with_latlng.order("#{distance_column_name} #{options[:reverse] ? 'DESC' : 'ASC'}")
156
+ with_latlng.order(Arel.sql(
157
+ "#{distance_column_name} #{options[:reverse] ? 'DESC' : 'ASC'}"
158
+ ))
157
159
  end
158
160
 
159
161
  def with_latlng
@@ -1,3 +1,3 @@
1
1
  module GeokitRails
2
- VERSION = "2.3.0"
2
+ VERSION = "2.3.1"
3
3
  end
@@ -1,7 +1,8 @@
1
1
  require 'pathname'
2
2
 
3
- require 'test/unit'
3
+ require "active_support/version"
4
4
  require 'active_support/test_case'
5
+ require "active_support/testing/autorun" if ActiveSupport::VERSION::MAJOR >= 4
5
6
 
6
7
  require 'active_record'
7
8
  require 'active_record/fixtures'
@@ -28,4 +29,4 @@ ActiveRecord::Base.logger = Logger.new(logger_file)
28
29
  ActiveRecord::Base.establish_connection(db_config[ADAPTER])
29
30
 
30
31
  ActiveRecord::Migration.verbose = false
31
- load schema_file
32
+ load schema_file
@@ -34,6 +34,8 @@ require 'geokit-rails'
34
34
  ActiveRecord::Base.send(:include, Geokit::ActsAsMappable::Glue)
35
35
  ActionController::Base.send(:include, Geokit::GeocoderControl)
36
36
  ActionController::Base.send(:include, Geokit::IpGeocodeLookup)
37
+ # Rails >= 4 requires models classes to be loaded before fixtures are created
38
+ Dir[PLUGIN_ROOT + "test/models/*.rb"].each { |file| require file }
37
39
 
38
40
  class GeokitTestCase < ActiveSupport::TestCase
39
41
  begin
@@ -43,7 +45,11 @@ class GeokitTestCase < ActiveSupport::TestCase
43
45
  end
44
46
 
45
47
  self.fixture_path = (PLUGIN_ROOT + 'test/fixtures').to_s
46
- self.use_transactional_fixtures = true
48
+ if Rails::VERSION::MAJOR >= 5
49
+ self.use_transactional_tests = true
50
+ else
51
+ self.use_transactional_fixtures = true
52
+ end
47
53
  self.use_instantiated_fixtures = false
48
54
 
49
55
  fixtures :all
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geokit-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Noack
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-08-08 00:00:00.000000000 Z
14
+ date: 2018-05-04 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -139,20 +139,6 @@ dependencies:
139
139
  - - ">="
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
- - !ruby/object:Gem::Dependency
143
- name: mysql
144
- requirement: !ruby/object:Gem::Requirement
145
- requirements:
146
- - - "~>"
147
- - !ruby/object:Gem::Version
148
- version: '2.8'
149
- type: :development
150
- prerelease: false
151
- version_requirements: !ruby/object:Gem::Requirement
152
- requirements:
153
- - - "~>"
154
- - !ruby/object:Gem::Version
155
- version: '2.8'
156
142
  - !ruby/object:Gem::Dependency
157
143
  name: mysql2
158
144
  requirement: !ruby/object:Gem::Requirement
@@ -230,6 +216,7 @@ files:
230
216
  - Rakefile
231
217
  - gemfiles/rails3.gemfile
232
218
  - gemfiles/rails4.gemfile
219
+ - gemfiles/rails5.gemfile
233
220
  - geokit-rails.gemspec
234
221
  - lib/generators/geokit_rails/install_generator.rb
235
222
  - lib/generators/templates/geokit_config.rb
@@ -293,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
280
  version: '0'
294
281
  requirements: []
295
282
  rubyforge_project:
296
- rubygems_version: 2.5.2
283
+ rubygems_version: 2.6.14.1
297
284
  signing_key:
298
285
  specification_version: 4
299
286
  summary: Geokit helpers for rails apps.