armg 0.9.0 → 0.11.0

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
2
  SHA256:
3
- metadata.gz: 799e9abfae32c77cb45dcba9d047b1993c0bd89c1c7991e6638ca57fe08df00c
4
- data.tar.gz: 78872a397ba74eb08968f3c6e7e9173976501563304ed582d925b93ce085f920
3
+ metadata.gz: 1d93f5c0ccd639a541a6b5c7f4d6e525bb726ee51dad6b7e10e44bbb5391e661
4
+ data.tar.gz: a8fc3cf837edfd65e95c989822016205e10cb018142315040e7997f82229eaa1
5
5
  SHA512:
6
- metadata.gz: f938016e888bf2d30cebc445c414205ea9543932b9c33c89dd2c0af6b0c2522997caee1503434cd2c6c22b635eaa496bddb5bec0b80e6b78634128e5b868259f
7
- data.tar.gz: 18d735ba55d6504f0d784ec1b0d65527abb65d3cbf3ac7813e5a8ac05da90f2d72bd21a6928c26f1b059a43bce439896c0bad363835420497ba1a714a61a1cd2
6
+ metadata.gz: 24aecfae70437c9b4c84f34f31dac0b3ab4737e62318895c5808f0b410f929c3953574718bdf82a3eb8c3cb20f11f5958a014bec66e07d6f896ee1a3789d946e
7
+ data.tar.gz: d526c3fb89a6585b072e524fb99741faa92471a3ede5538d928364ae0b8144f37503b68778aad578fa26fc10da1463dda57d116a8038acd146cfde0ec83964f2
@@ -11,35 +11,29 @@ jobs:
11
11
  fail-fast: false
12
12
  matrix:
13
13
  ruby:
14
- - 2.4
15
- - 2.5
16
- - 2.6
17
14
  - 2.7
15
+ - 3.0
16
+ - 3.1
18
17
  env:
19
18
  - ARMG_TEST_MYSQL_PORT=10056 ARMG_TEST_MYSQL_ENGINE=MyISAM
20
19
  - ARMG_TEST_MYSQL_PORT=10057 ARMG_TEST_MYSQL_ENGINE=MyISAM
21
20
  - ARMG_TEST_MYSQL_PORT=10057 ARMG_TEST_MYSQL_ENGINE=InnoDB
21
+ - ARMG_TEST_MYSQL_PORT=10080 ARMG_TEST_MYSQL_ENGINE=MyISAM
22
+ - ARMG_TEST_MYSQL_PORT=10080 ARMG_TEST_MYSQL_ENGINE=InnoDB
22
23
  gemfile:
23
- - gemfiles/ar50.gemfile
24
- - gemfiles/ar51.gemfile
25
- - gemfiles/ar52.gemfile
26
24
  - gemfiles/ar60.gemfile
27
25
  - gemfiles/ar61.gemfile
28
- exclude:
29
- - ruby: 2.4
30
- gemfile: gemfiles/ar60.gemfile
31
- - ruby: 2.4
32
- gemfile: gemfiles/ar61.gemfile
26
+ - gemfiles/ar70.gemfile
33
27
 
34
28
  steps:
35
29
  - uses: actions/checkout@v2
36
- - uses: actions/setup-ruby@v1
30
+ - uses: ruby/setup-ruby@v1
37
31
  with:
38
32
  ruby-version: ${{ matrix.ruby }}
39
33
  - uses: actions/cache@v2
40
34
  with:
41
35
  path: gemfiles/vendor/bundle
42
- key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ hashFiles('ridgepole.gemspec', '**/Gemfile', '${{ matrix.gemfile }}') }}
36
+ key: ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.gemfile }}-${{ hashFiles('ridgepole.gemspec', '**/Gemfile', matrix.gemfile) }}
43
37
  restore-keys: |
44
38
  ${{ runner.os }}-gems-${{ matrix.ruby }}-${{ matrix.gemfile }}-
45
39
 
@@ -55,6 +49,7 @@ jobs:
55
49
  function mysql_ping { mysqladmin -u root -h 127.0.0.1 -P $1 ping; }
56
50
  for i in {1..60}; do mysql_ping 10056 && break; sleep 1; done
57
51
  for i in {1..60}; do mysql_ping 10057 && break; sleep 1; done
52
+ for i in {1..60}; do mysql_ping 10080 && break; sleep 1; done
58
53
  env:
59
54
  BUNDLE_GEMFILE: ${{ matrix.gemfile }}
60
55
 
data/.rubocop.yml CHANGED
@@ -25,3 +25,5 @@ Style/HashTransformValues:
25
25
  Enabled: true
26
26
  Gemspec/RequiredRubyVersion:
27
27
  Enabled: false
28
+ Gemspec/DevelopmentDependencies:
29
+ EnforcedStyle: gemspec
data/Appraisals CHANGED
@@ -1,17 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'ar50' do
4
- gem 'activerecord', '~> 5.0.0'
5
- end
6
-
7
- appraise 'ar51' do
8
- gem 'activerecord', '~> 5.1.0'
9
- end
10
-
11
- appraise 'ar52' do
12
- gem 'activerecord', '~> 5.2.0'
13
- end
14
-
15
3
  appraise 'ar60' do
16
4
  gem 'activerecord', '~> 6.0.0'
17
5
  end
@@ -19,3 +7,7 @@ end
19
7
  appraise 'ar61' do
20
8
  gem 'activerecord', '~> 6.1.0'
21
9
  end
10
+
11
+ appraise 'ar70' do
12
+ gem 'activerecord', '~> 7.0.0'
13
+ end
data/CHANGELOG.md ADDED
@@ -0,0 +1,42 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
+
7
+ ## [Unreleased]
8
+
9
+ ### Added
10
+
11
+ ### Changed
12
+
13
+ ### Deprecated
14
+
15
+ ### Removed
16
+
17
+ ### Fixed
18
+
19
+ ### Security
20
+
21
+ ## [v0.11.0] - 2023-03-07
22
+
23
+ ### Added
24
+
25
+ - Support MySQL 8.0 (with limitation) [#18](https://github.com/cookpad/armg/pull/18)
26
+ - Be careful of your SRID when upgrading.
27
+
28
+ ## [v0.10.0] - 2022-06-18
29
+
30
+ ### Added
31
+
32
+ - Support ActiveRecord 7.0 [#14](https://github.com/cookpad/armg/pull/14)
33
+ - Support Ruby 3.0 and 3.1 [#15](https://github.com/cookpad/armg/pull/15)
34
+
35
+ ### Removed
36
+
37
+ - Drop support for ActiveRecord 5.0, 5.1, and 5.2 [#15](https://github.com/cookpad/armg/pull/15)
38
+ - Drop support for Ruby 2.4, 2.5, and 2.6 [#15](https://github.com/cookpad/armg/pull/15)
39
+
40
+ [Unreleased]: https://github.com/cookpad/armg/compare/v0.10.0...HEAD
41
+ [v0.10.0]: https://github.com/cookpad/armg/compare/v0.9.0...v0.10.0
42
+ [v0.11.0]: https://github.com/cookpad/armg/compare/v0.10.0...v0.11.0
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Add MySQL geometry type to Active Record.
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/armg.svg)](https://badge.fury.io/rb/armg)
6
- [![Build Status](https://github.com/winebarrel/armg/workflows/test/badge.svg?branch=master)](https://github.com/winebarrel/armg/actions)
6
+ [![Build Status](https://github.com/cookpad/armg/workflows/test/badge.svg?branch=master)](https://github.com/cookpad/armg/actions)
7
7
 
8
8
 
9
9
  ## Installation
@@ -108,10 +108,10 @@ Geom.create!(id: 4, location: 'Point(-122.1 47.3)')
108
108
  docker-compose up -d
109
109
  bundle install
110
110
  bundle exec appraisal install
111
- bundle exec appraisal ar51 rake
112
- # bundle exec appraisal ar50 rake
113
- # ARMG_TEST_MYSQL_PORT=10057 bundle exec appraisal ar51 rake # MySQL 5.7
114
- # ARMG_TEST_MYSQL_PORT=10057 ARMG_TEST_MYSQL_ENGINE=InnoDB bundle exec appraisal ar51 rake
111
+ bundle exec appraisal ar61 rake
112
+ # bundle exec appraisal ar60 rake
113
+ # ARMG_TEST_MYSQL_PORT=10057 bundle exec appraisal ar61 rake # MySQL 5.7
114
+ # ARMG_TEST_MYSQL_PORT=10057 ARMG_TEST_MYSQL_ENGINE=InnoDB bundle exec appraisal ar61 rake
115
115
  ```
116
116
 
117
117
  ## Using with [Ridgepole](https://github.com/winebarrel/ridgepole)
@@ -155,6 +155,14 @@ Apply `Schemafile`
155
155
  No change
156
156
  ```
157
157
 
158
+ ## Limitation on MySQL 8.0
159
+
160
+ At the moment, armg gem supports only SRIDs with long-lat axis order in MySQL 8.0.
161
+ e.g. SRID=3857 (WGS 84 / Pseudo-Mercator -- Spherical Mercator, Google Maps, OpenStreetMap, Bing, ArcGIS, ESRI)
162
+
163
+ That is, armg does not support SRIDs with lat-long axis order.
164
+ e.g. SRID=4326 (WGS 84 -- WGS84 - World Geodetic System 1984, used in GPS)
165
+
158
166
  ## Related links
159
167
 
160
168
  * [rgeo/rgeo: Geospatial data library for Ruby](https://github.com/rgeo/rgeo)
data/armg.gemspec CHANGED
@@ -7,14 +7,13 @@ require 'armg/version'
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'armg'
9
9
  spec.version = Armg::VERSION
10
- spec.authors = ['Genki Sugawara']
11
- spec.email = ['sugawara@cookpad.com']
10
+ spec.authors = ['Genki Sugawara', 'Cookpad Inc.']
11
+ spec.email = ['kaimono-dev@cookpad.com']
12
12
 
13
13
  spec.summary = 'Add MySQL geometry type to Active Record.'
14
14
  spec.description = 'Add MySQL geometry type to Active Record.'
15
- spec.homepage = 'https://github.com/winebarrel/armg'
15
+ spec.homepage = 'https://github.com/cookpad/armg'
16
16
  spec.license = 'MIT'
17
-
18
17
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
19
18
  f.match(%r{^(test|spec|features)/})
20
19
  end
@@ -22,7 +21,9 @@ Gem::Specification.new do |spec|
22
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
22
  spec.require_paths = ['lib']
24
23
 
25
- spec.add_dependency 'activerecord', '>= 5', '< 7'
24
+ spec.metadata['rubygems_mfa_required'] = 'true'
25
+
26
+ spec.add_dependency 'activerecord', '>= 6', '< 8'
26
27
  spec.add_dependency 'rgeo'
27
28
  spec.add_development_dependency 'appraisal', '>= 2.2.0'
28
29
  spec.add_development_dependency 'bundler'
data/docker-compose.yml CHANGED
@@ -12,3 +12,9 @@ services:
12
12
  image: "mysql:5.7"
13
13
  environment:
14
14
  - MYSQL_ALLOW_EMPTY_PASSWORD=1
15
+ mysql80:
16
+ ports:
17
+ - "10080:3306"
18
+ image: "mysql:8.0"
19
+ environment:
20
+ - MYSQL_ALLOW_EMPTY_PASSWORD=1
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 5.0.0"
5
+ gem "activerecord", "~> 7.0.0"
6
6
 
7
7
  gemspec path: "../"
@@ -2,11 +2,6 @@
2
2
 
3
3
  module Armg
4
4
  module AbstractMysqlAdapterExt
5
- def initialize_type_map(m = type_map)
6
- super
7
- m.register_type(/^geometry/i, Armg::MysqlGeometry.new)
8
- end
9
-
10
5
  def indexes(*args, &block)
11
6
  is = super
12
7
 
@@ -16,5 +11,9 @@ module Armg
16
11
 
17
12
  is
18
13
  end
14
+
15
+ def type_map
16
+ @type_map ||= super.tap { |m| m.register_type(/^geometry/i, Armg::MysqlGeometry.new) }
17
+ end
19
18
  end
20
19
  end
data/lib/armg/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Armg
4
- VERSION = '0.9.0'
4
+ VERSION = '0.11.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: armg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
+ - Cookpad Inc.
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2020-12-30 00:00:00.000000000 Z
12
+ date: 2023-03-07 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: activerecord
@@ -16,20 +17,20 @@ dependencies:
16
17
  requirements:
17
18
  - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: '5'
20
+ version: '6'
20
21
  - - "<"
21
22
  - !ruby/object:Gem::Version
22
- version: '7'
23
+ version: '8'
23
24
  type: :runtime
24
25
  prerelease: false
25
26
  version_requirements: !ruby/object:Gem::Requirement
26
27
  requirements:
27
28
  - - ">="
28
29
  - !ruby/object:Gem::Version
29
- version: '5'
30
+ version: '6'
30
31
  - - "<"
31
32
  - !ruby/object:Gem::Version
32
- version: '7'
33
+ version: '8'
33
34
  - !ruby/object:Gem::Dependency
34
35
  name: rgeo
35
36
  requirement: !ruby/object:Gem::Requirement
@@ -186,7 +187,7 @@ dependencies:
186
187
  version: '0'
187
188
  description: Add MySQL geometry type to Active Record.
188
189
  email:
189
- - sugawara@cookpad.com
190
+ - kaimono-dev@cookpad.com
190
191
  executables: []
191
192
  extensions: []
192
193
  extra_rdoc_files: []
@@ -196,6 +197,7 @@ files:
196
197
  - ".rspec"
197
198
  - ".rubocop.yml"
198
199
  - Appraisals
200
+ - CHANGELOG.md
199
201
  - Gemfile
200
202
  - LICENSE.txt
201
203
  - README.md
@@ -205,11 +207,9 @@ files:
205
207
  - bin/setup
206
208
  - docker-compose.yml
207
209
  - gemfiles/.bundle/config
208
- - gemfiles/ar50.gemfile
209
- - gemfiles/ar51.gemfile
210
- - gemfiles/ar52.gemfile
211
210
  - gemfiles/ar60.gemfile
212
211
  - gemfiles/ar61.gemfile
212
+ - gemfiles/ar70.gemfile
213
213
  - lib/armg.rb
214
214
  - lib/armg/abstract_mysql_adapter_ext.rb
215
215
  - lib/armg/armg.rb
@@ -221,10 +221,11 @@ files:
221
221
  - lib/armg/wkb_serializer.rb
222
222
  - lib/armg/wkt_deserializer.rb
223
223
  - lib/armg/wkt_serializer.rb
224
- homepage: https://github.com/winebarrel/armg
224
+ homepage: https://github.com/cookpad/armg
225
225
  licenses:
226
226
  - MIT
227
- metadata: {}
227
+ metadata:
228
+ rubygems_mfa_required: 'true'
228
229
  post_install_message:
229
230
  rdoc_options: []
230
231
  require_paths:
@@ -240,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
241
  - !ruby/object:Gem::Version
241
242
  version: '0'
242
243
  requirements: []
243
- rubygems_version: 3.1.2
244
+ rubygems_version: 3.3.26
244
245
  signing_key:
245
246
  specification_version: 4
246
247
  summary: Add MySQL geometry type to Active Record.
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 5.1.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activerecord", "~> 5.2.0"
6
-
7
- gemspec path: "../"