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 +4 -4
- data/.github/workflows/test.yml +8 -13
- data/.rubocop.yml +2 -0
- data/Appraisals +4 -12
- data/CHANGELOG.md +42 -0
- data/README.md +13 -5
- data/armg.gemspec +6 -5
- data/docker-compose.yml +6 -0
- data/gemfiles/{ar50.gemfile → ar70.gemfile} +1 -1
- data/lib/armg/abstract_mysql_adapter_ext.rb +4 -5
- data/lib/armg/version.rb +1 -1
- metadata +14 -13
- data/gemfiles/ar51.gemfile +0 -7
- data/gemfiles/ar52.gemfile +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d93f5c0ccd639a541a6b5c7f4d6e525bb726ee51dad6b7e10e44bbb5391e661
|
4
|
+
data.tar.gz: a8fc3cf837edfd65e95c989822016205e10cb018142315040e7997f82229eaa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24aecfae70437c9b4c84f34f31dac0b3ab4737e62318895c5808f0b410f929c3953574718bdf82a3eb8c3cb20f11f5958a014bec66e07d6f896ee1a3789d946e
|
7
|
+
data.tar.gz: d526c3fb89a6585b072e524fb99741faa92471a3ede5538d928364ae0b8144f37503b68778aad578fa26fc10da1463dda57d116a8038acd146cfde0ec83964f2
|
data/.github/workflows/test.yml
CHANGED
@@ -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
|
-
|
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:
|
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',
|
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
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/
|
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
|
112
|
-
# bundle exec appraisal
|
113
|
-
# ARMG_TEST_MYSQL_PORT=10057 bundle exec appraisal
|
114
|
-
# ARMG_TEST_MYSQL_PORT=10057 ARMG_TEST_MYSQL_ENGINE=InnoDB bundle exec appraisal
|
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 = ['
|
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/
|
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.
|
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
@@ -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
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.
|
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:
|
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: '
|
20
|
+
version: '6'
|
20
21
|
- - "<"
|
21
22
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
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: '
|
30
|
+
version: '6'
|
30
31
|
- - "<"
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
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
|
-
-
|
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/
|
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.
|
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.
|
data/gemfiles/ar51.gemfile
DELETED