fast-polylines 2.0.1 → 2.1.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: 2b799fba2f53eb5a319d237b5460cfc20185bbe757108420ed4a2c95414ab3b5
4
- data.tar.gz: 7853302b6843e13d4ce0161be04c4deb514a4bbd62e3c0f2fd334c00ef3b6d72
3
+ metadata.gz: ef058eadb11fa085c5298a026a53a28cb11fd2e2320471af3999560102fdf918
4
+ data.tar.gz: 361297656bbc9785ab69c977574be178cf37206dd9c11897a0084f544f75242e
5
5
  SHA512:
6
- metadata.gz: 5381b5bcaa24e8dc5a6d397dc514fdeed8dc20c894a855385ba78af691e10bab8442b9d93329af658a6a8eba3a26716aff3fb3f9f2a238ca1cc1d5dea4a10243
7
- data.tar.gz: '08733692f3f9e7ac461434f57b82b0c689e981eac015f57c92a7be94ae0195f72a283695e876120018f14aa8f8be6095640bf86631eb166701af17f601b624f4'
6
+ metadata.gz: b68fddf33a97de12330bcc41c69d9d3d96061b65fafee34cfe5bad5d5af6abc106608d68b28961ce0905b7c8d252da19acef389872263c6a9aa99e539b9d18fc
7
+ data.tar.gz: 3ee95983cf98fe415340a7f9c9ade2c9b9a33584addf481d64752fd48d2b587179e373bac7550507e332e0df075fdd1a3015bac44ff249244ad760f8577e40b2
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
@@ -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/ruby.h>
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,3 @@
1
+ # frozen_string_literal: true
2
+ # Allow both snake_case and kebab-case way to require
3
+ require_relative "fast_polylines"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FastPolylines
4
- VERSION = "2.0.1"
4
+ VERSION = "2.1.0"
5
5
  end
@@ -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
@@ -1,3 +1,5 @@
1
+ require "fast_polylines"
2
+
1
3
  describe FastPolylines do
2
4
  describe ".decode" do
3
5
  let(:points) { [[38.5, -120.2], [40.7, -120.95], [43.252, -126.453]] }
@@ -4,8 +4,6 @@ require "bundler/setup"
4
4
  $LOAD_PATH.unshift File.join(__dir__, "..", "lib")
5
5
  $LOAD_PATH.unshift File.join(__dir__, "..", "ext")
6
6
 
7
- require "fast_polylines"
8
-
9
7
  RSpec.configure do |config|
10
8
  # Additional config goes here
11
9
  end
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.1
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-02 00:00:00.000000000 Z
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: '0'
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"
@@ -1,3 +0,0 @@
1
- *.o
2
- *.bundle
3
- Makefile