fast-polylines 2.0.1 → 2.1.0
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/.rspec +1 -0
- data/CHANGELOG.md +34 -0
- data/ext/fast_polylines/fast_polylines.c +2 -2
- data/lib/fast-polylines.rb +3 -0
- data/lib/fast_polylines/version.rb +1 -1
- data/spec/fast-polylines_spec.rb +10 -0
- data/spec/fast_polylines_spec.rb +2 -0
- data/spec/spec_helper.rb +0 -2
- metadata +10 -5
- data/ext/fast_polylines/.gitignore +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef058eadb11fa085c5298a026a53a28cb11fd2e2320471af3999560102fdf918
|
4
|
+
data.tar.gz: 361297656bbc9785ab69c977574be178cf37206dd9c11897a0084f544f75242e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b68fddf33a97de12330bcc41c69d9d3d96061b65fafee34cfe5bad5d5af6abc106608d68b28961ce0905b7c8d252da19acef389872263c6a9aa99e539b9d18fc
|
7
|
+
data.tar.gz: 3ee95983cf98fe415340a7f9c9ade2c9b9a33584addf481d64752fd48d2b587179e373bac7550507e332e0df075fdd1a3015bac44ff249244ad760f8577e40b2
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
|
2
|
+
# Changelog
|
3
|
+
|
4
|
+
All notable changes to this project will be documented in this file.
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/).
|
6
|
+
This project adheres to [Semantic Versioning](http://semver.org/).
|
7
|
+
|
8
|
+
|
9
|
+
## [unreleased] —
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- A Require ptah that match the gem name (#18)
|
14
|
+
|
15
|
+
### Changed
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
## [2.1.0] — 2020-04-30
|
20
|
+
|
21
|
+
### Added
|
22
|
+
|
23
|
+
- A Require ptah that match the gem name (#18)
|
24
|
+
|
25
|
+
## [2.0.1] — 2020-04-02
|
26
|
+
|
27
|
+
### Fixed
|
28
|
+
|
29
|
+
- Broken behavior when approaching the chunk size limit (#16)
|
30
|
+
|
31
|
+
|
32
|
+
[unreleased]: https://github.com/klaxit/fast-polylines/compare/v2.1.0...HEAD
|
33
|
+
[2.1.0]: https://github.com/klaxit/fast-polylines/compare/v2.0.1...v2.1.0
|
34
|
+
[2.0.1]: https://github.com/klaxit/fast-polylines/compare/v2.0.0...v2.0.1
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#include <ruby
|
1
|
+
#include <ruby.h>
|
2
2
|
|
3
3
|
// An encoded number can have at most _precision_ characters. However,
|
4
4
|
// it seems like we have a fuzzy behavior on low precisions. Hence a guard
|
@@ -83,7 +83,7 @@ _polyline_encode_number(char *chunks, int64_t number) {
|
|
83
83
|
chunks[i++] = number + 63;
|
84
84
|
dbg("%u encoded chunks\n", i);
|
85
85
|
dbg("chunks: %s\n", chunks);
|
86
|
-
dbg("/_polyline_encode_number");
|
86
|
+
dbg("/_polyline_encode_number\n");
|
87
87
|
return i;
|
88
88
|
}
|
89
89
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require "fast-polylines"
|
2
|
+
|
3
|
+
describe FastPolylines do
|
4
|
+
let(:points) { [[38.5, -120.2], [40.7, -120.95], [43.252, -126.453]] }
|
5
|
+
let(:polyline) { "_p~iF~ps|U_ulLnnqC_mqNvxq`@" }
|
6
|
+
it "should work with kebab-case requirement" do
|
7
|
+
expect(FastPolylines.encode(points)).to eq polyline
|
8
|
+
expect(FastPolylines.decode(polyline)).to eq points
|
9
|
+
end
|
10
|
+
end
|
data/spec/fast_polylines_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fast-polylines
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyrille Courtière
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-04-
|
12
|
+
date: 2020-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: benchmark-ips
|
@@ -61,12 +61,15 @@ extensions:
|
|
61
61
|
- ext/fast_polylines/extconf.rb
|
62
62
|
extra_rdoc_files: []
|
63
63
|
files:
|
64
|
+
- ".rspec"
|
65
|
+
- CHANGELOG.md
|
64
66
|
- README.md
|
65
|
-
- ext/fast_polylines/.gitignore
|
66
67
|
- ext/fast_polylines/extconf.rb
|
67
68
|
- ext/fast_polylines/fast_polylines.c
|
69
|
+
- lib/fast-polylines.rb
|
68
70
|
- lib/fast_polylines.rb
|
69
71
|
- lib/fast_polylines/version.rb
|
72
|
+
- spec/fast-polylines_spec.rb
|
70
73
|
- spec/fast_polylines_spec.rb
|
71
74
|
- spec/spec_helper.rb
|
72
75
|
homepage: https://github.com/klaxit/fast-polylines
|
@@ -81,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
84
|
requirements:
|
82
85
|
- - ">="
|
83
86
|
- !ruby/object:Gem::Version
|
84
|
-
version:
|
87
|
+
version: 2.4.6
|
85
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
89
|
requirements:
|
87
90
|
- - ">="
|
@@ -93,5 +96,7 @@ signing_key:
|
|
93
96
|
specification_version: 4
|
94
97
|
summary: Fast & easy Google polylines
|
95
98
|
test_files:
|
96
|
-
- spec/fast_polylines_spec.rb
|
97
99
|
- spec/spec_helper.rb
|
100
|
+
- spec/fast-polylines_spec.rb
|
101
|
+
- spec/fast_polylines_spec.rb
|
102
|
+
- ".rspec"
|