h3 3.7.2 → 3.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/ruby_ci.yml +11 -17
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +24 -22
- data/README.md +2 -2
- data/ext/h3/Makefile +1 -1
- data/h3.gemspec +5 -5
- data/lib/h3/bindings/private.rb +1 -0
- data/lib/h3/geo_json.rb +2 -0
- data/lib/h3/inspection.rb +6 -1
- data/lib/h3/version.rb +1 -1
- data/spec/geo_json_spec.rb +1 -1
- data/spec/inspection_spec.rb +13 -4
- metadata +11 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0afa20a7c2275ee45b230c3bae8f3af1959d7c93af314bd49b11eff46cbe8ebc
|
4
|
+
data.tar.gz: 5ff07967dd552ef299d1c7637997c2320835fabb858d914c3b590ddac07e6402
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ced432edf93da613678ee7c48896a116fbf4f9b53908d9e50bcb3de148f9f16c7cdb3d2d422c79f7a2a210c0d7026af841a44eb05fe0b666584e331106c9c02
|
7
|
+
data.tar.gz: 6189e6185e58c8a5d64b6ea0e904d7571bb52b7f86fa86d3d086b0ff14594e856430071277ebbce5e6b1ae5e0641305ea166af5a158db048322fc3c6db3f2d65
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
3
|
+
# Please see the documentation for all configuration options:
|
4
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
5
|
+
|
6
|
+
version: 2
|
7
|
+
updates:
|
8
|
+
- package-ecosystem: "bundler" # See documentation for possible values
|
9
|
+
directory: "/" # Location of package manifests
|
10
|
+
schedule:
|
11
|
+
interval: "daily"
|
@@ -8,23 +8,17 @@ on:
|
|
8
8
|
|
9
9
|
jobs:
|
10
10
|
test:
|
11
|
-
|
12
|
-
runs-on: ubuntu-latest
|
13
|
-
|
14
11
|
strategy:
|
12
|
+
fail-fast: false
|
15
13
|
matrix:
|
16
|
-
|
17
|
-
|
14
|
+
os: [ubuntu-latest, macos-latest]
|
15
|
+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
|
16
|
+
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
|
17
|
+
runs-on: ${{ matrix.os }}
|
18
18
|
steps:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
- name: Install system dependencies
|
26
|
-
run: sudo apt-get install cmake make gcc libtool
|
27
|
-
- name: Install gems
|
28
|
-
run: bundle install
|
29
|
-
- name: Run tests
|
30
|
-
run: bundle exec rake spec
|
19
|
+
- uses: actions/checkout@v4
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
24
|
+
- run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
7
7
|
We track the MAJOR and MINOR version levels of Uber's H3 project (https://github.com/uber/h3) but maintain independent patch levels so we can make small fixes and non breaking changes.
|
8
8
|
|
9
|
+
## [3.7.3] - 2025-04-04
|
10
|
+
### Fixed
|
11
|
+
- `H3.from_string(nil)` should not crash
|
12
|
+
- Cmake fixed
|
13
|
+
|
9
14
|
## [3.7.2] - 2020-07-17
|
10
15
|
### Fixed
|
11
16
|
- kRing of invalid indexes should not crash.
|
data/Gemfile.lock
CHANGED
@@ -1,44 +1,46 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
h3 (3.7.
|
4
|
+
h3 (3.7.4)
|
5
5
|
ffi (~> 1.9)
|
6
6
|
rgeo-geojson (~> 2.1)
|
7
|
-
zeitwerk (~> 2.
|
7
|
+
zeitwerk (~> 2.5)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
diff-lcs (1.
|
13
|
-
ffi (1.
|
14
|
-
|
15
|
-
|
16
|
-
rgeo
|
12
|
+
diff-lcs (1.5.1)
|
13
|
+
ffi (1.17.1)
|
14
|
+
multi_json (1.15.0)
|
15
|
+
rake (13.2.1)
|
16
|
+
rgeo (3.0.0)
|
17
|
+
rgeo-geojson (2.2.0)
|
18
|
+
multi_json (~> 1.15)
|
17
19
|
rgeo (>= 1.0.0)
|
18
|
-
rspec (3.
|
19
|
-
rspec-core (~> 3.
|
20
|
-
rspec-expectations (~> 3.
|
21
|
-
rspec-mocks (~> 3.
|
22
|
-
rspec-core (3.
|
23
|
-
rspec-support (~> 3.
|
24
|
-
rspec-expectations (3.
|
20
|
+
rspec (3.13.0)
|
21
|
+
rspec-core (~> 3.13.0)
|
22
|
+
rspec-expectations (~> 3.13.0)
|
23
|
+
rspec-mocks (~> 3.13.0)
|
24
|
+
rspec-core (3.13.0)
|
25
|
+
rspec-support (~> 3.13.0)
|
26
|
+
rspec-expectations (3.13.0)
|
25
27
|
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
-
rspec-support (~> 3.
|
27
|
-
rspec-mocks (3.
|
28
|
+
rspec-support (~> 3.13.0)
|
29
|
+
rspec-mocks (3.13.0)
|
28
30
|
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
-
rspec-support (~> 3.
|
30
|
-
rspec-support (3.
|
31
|
-
yard (0.9.
|
32
|
-
zeitwerk (2.
|
31
|
+
rspec-support (~> 3.13.0)
|
32
|
+
rspec-support (3.13.1)
|
33
|
+
yard (0.9.37)
|
34
|
+
zeitwerk (2.6.18)
|
33
35
|
|
34
36
|
PLATFORMS
|
35
37
|
ruby
|
36
38
|
|
37
39
|
DEPENDENCIES
|
38
40
|
h3!
|
39
|
-
rake (~>
|
41
|
+
rake (~> 13.0)
|
40
42
|
rspec (~> 3.8)
|
41
43
|
yard (~> 0.9)
|
42
44
|
|
43
45
|
BUNDLED WITH
|
44
|
-
2.
|
46
|
+
2.2.22
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|

|
4
4
|
|
5
|
-
 [](https://coveralls.io/github/seanhandley/h3_ruby?branch=master) [](https://codeclimate.com/github/seanhandley/h3_ruby/maintainability) [](https://badge.fury.io/rb/h3)
|
6
6
|
|
7
7
|
Ruby-to-C bindings for Uber's [H3 library](https://uber.github.io/h3/).
|
8
8
|
|
@@ -64,7 +64,7 @@ H3.to_boundary("8819429a9dfffff".to_i(16))
|
|
64
64
|
|
65
65
|
## Documentation
|
66
66
|
|
67
|
-
Please read [the Gem Documentation](https://www.rubydoc.info/
|
67
|
+
Please read [the Gem Documentation](https://www.rubydoc.info/gems/h3) for a full reference of available methods.
|
68
68
|
|
69
69
|
## Development
|
70
70
|
|
data/ext/h3/Makefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
make:
|
2
|
-
cd src; cmake . -DBUILD_SHARED_LIBS=true -DBUILD_FILTERS=OFF -DBUILD_BENCHMARKS=OFF; make
|
2
|
+
cd src; cmake . -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DBUILD_SHARED_LIBS=true -DBUILD_FILTERS=OFF -DBUILD_BENCHMARKS=OFF -DENABLE_LINTING=OFF; make
|
3
3
|
install:
|
4
4
|
: # do nothing, we'll load the lib directly
|
5
5
|
clean:
|
data/h3.gemspec
CHANGED
@@ -5,19 +5,19 @@ Gem::Specification.new do |spec|
|
|
5
5
|
spec.version = H3::VERSION
|
6
6
|
spec.licenses = ["MIT"]
|
7
7
|
spec.summary = "C Bindings for Uber's H3 library"
|
8
|
-
spec.homepage = "https://github.com/
|
9
|
-
spec.authors = ["
|
10
|
-
spec.email = "
|
8
|
+
spec.homepage = "https://github.com/seanhandley/h3_ruby"
|
9
|
+
spec.authors = ["Sean Handley", "Xavier Noria", "Lachlan Laycock"]
|
10
|
+
spec.email = "sean.handley@gmail.com"
|
11
11
|
|
12
12
|
spec.required_ruby_version = ">= 2.5"
|
13
13
|
spec.files = `git ls-files --recurse-submodules`.split("\n")
|
14
14
|
|
15
15
|
spec.add_runtime_dependency "ffi", "~> 1.9"
|
16
16
|
spec.add_runtime_dependency "rgeo-geojson", "~> 2.1"
|
17
|
-
spec.add_runtime_dependency "zeitwerk", "~> 2.
|
17
|
+
spec.add_runtime_dependency "zeitwerk", "~> 2.5"
|
18
18
|
|
19
19
|
# spec.add_development_dependency "coveralls", "~> 0.8"
|
20
|
-
spec.add_development_dependency "rake", "~>
|
20
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
21
21
|
spec.add_development_dependency "rspec", "~> 3.8"
|
22
22
|
spec.add_development_dependency "yard", "~> 0.9"
|
23
23
|
|
data/lib/h3/bindings/private.rb
CHANGED
@@ -57,6 +57,7 @@ module H3
|
|
57
57
|
attach_function :point_distance_m, :pointDistM, [GeoCoord, GeoCoord], :double
|
58
58
|
attach_function :polyfill, [GeoPolygon, Resolution, H3IndexesOut], :void
|
59
59
|
attach_function :res_0_indexes, :getRes0Indexes, [H3IndexesOut], :void
|
60
|
+
attach_function :string_to_h3, :stringToH3, %i[string], :h3_index
|
60
61
|
attach_function :uncompact, [H3IndexesIn, :size_t, H3IndexesOut, :size_t, Resolution], :bool
|
61
62
|
end
|
62
63
|
end
|
data/lib/h3/geo_json.rb
CHANGED
data/lib/h3/inspection.rb
CHANGED
@@ -44,8 +44,13 @@ module H3
|
|
44
44
|
# H3.from_string("8928308280fffff")
|
45
45
|
# 617700169958293503
|
46
46
|
#
|
47
|
+
# @raise [ArgumentError] If h3_string is nil
|
48
|
+
#
|
47
49
|
# @return [Integer] H3 index
|
48
|
-
|
50
|
+
def from_string(h3_string)
|
51
|
+
raise ArgumentError if h3_string.nil?
|
52
|
+
Bindings::Private.string_to_h3(h3_string)
|
53
|
+
end
|
49
54
|
|
50
55
|
# @!method pentagon?(h3_index)
|
51
56
|
#
|
data/lib/h3/version.rb
CHANGED
data/spec/geo_json_spec.rb
CHANGED
data/spec/inspection_spec.rb
CHANGED
@@ -20,12 +20,21 @@ RSpec.describe H3 do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
describe ".from_string" do
|
23
|
-
let(:h3_index) { "8928308280fffff"}
|
24
|
-
let(:result) { h3_index.to_i(16) }
|
25
|
-
|
26
23
|
subject(:from_string) { H3.from_string(h3_index) }
|
24
|
+
context "- valid" do
|
25
|
+
let(:h3_index) { "8928308280fffff"}
|
26
|
+
let(:result) { h3_index.to_i(16) }
|
27
27
|
|
28
|
-
|
28
|
+
it { is_expected.to eq(result) }
|
29
|
+
end
|
30
|
+
|
31
|
+
context "- nil" do
|
32
|
+
let(:h3_index) { nil }
|
33
|
+
|
34
|
+
it "raises an error" do
|
35
|
+
expect { subject }.to raise_error(ArgumentError)
|
36
|
+
end
|
37
|
+
end
|
29
38
|
end
|
30
39
|
|
31
40
|
describe ".to_string" do
|
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: h3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Lachlan Laycock
|
8
7
|
- Sean Handley
|
8
|
+
- Xavier Noria
|
9
|
+
- Lachlan Laycock
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2025-04-04 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: ffi
|
@@ -45,28 +46,28 @@ dependencies:
|
|
45
46
|
requirements:
|
46
47
|
- - "~>"
|
47
48
|
- !ruby/object:Gem::Version
|
48
|
-
version: '2.
|
49
|
+
version: '2.5'
|
49
50
|
type: :runtime
|
50
51
|
prerelease: false
|
51
52
|
version_requirements: !ruby/object:Gem::Requirement
|
52
53
|
requirements:
|
53
54
|
- - "~>"
|
54
55
|
- !ruby/object:Gem::Version
|
55
|
-
version: '2.
|
56
|
+
version: '2.5'
|
56
57
|
- !ruby/object:Gem::Dependency
|
57
58
|
name: rake
|
58
59
|
requirement: !ruby/object:Gem::Requirement
|
59
60
|
requirements:
|
60
61
|
- - "~>"
|
61
62
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
63
|
+
version: '13.0'
|
63
64
|
type: :development
|
64
65
|
prerelease: false
|
65
66
|
version_requirements: !ruby/object:Gem::Requirement
|
66
67
|
requirements:
|
67
68
|
- - "~>"
|
68
69
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
70
|
+
version: '13.0'
|
70
71
|
- !ruby/object:Gem::Dependency
|
71
72
|
name: rspec
|
72
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,13 +97,14 @@ dependencies:
|
|
96
97
|
- !ruby/object:Gem::Version
|
97
98
|
version: '0.9'
|
98
99
|
description:
|
99
|
-
email:
|
100
|
+
email: sean.handley@gmail.com
|
100
101
|
executables: []
|
101
102
|
extensions:
|
102
103
|
- ext/h3/extconf.rb
|
103
104
|
extra_rdoc_files: []
|
104
105
|
files:
|
105
106
|
- ".codeclimate.yml"
|
107
|
+
- ".github/dependabot.yml"
|
106
108
|
- ".github/workflows/ruby_ci.yml"
|
107
109
|
- ".gitignore"
|
108
110
|
- ".gitmodules"
|
@@ -431,7 +433,7 @@ files:
|
|
431
433
|
- spec/support/shared_contexts/constants.rb
|
432
434
|
- spec/traversal_spec.rb
|
433
435
|
- spec/unidirectional_edges_spec.rb
|
434
|
-
homepage: https://github.com/
|
436
|
+
homepage: https://github.com/seanhandley/h3_ruby
|
435
437
|
licenses:
|
436
438
|
- MIT
|
437
439
|
metadata: {}
|