perfect-shape 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +3 -3
- data/VERSION +1 -1
- data/lib/perfect_shape/path.rb +5 -1
- data/perfect-shape.gemspec +6 -4
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c42cbc601c834a3f5f5b22a270885329c3bfbac8379f4e978d0a8499a7b5b958
|
4
|
+
data.tar.gz: 7aa4083ba8bbededcd7a50058b82482d605cf772f92065a5aa7a435173e2b997
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29684cca244b520035eccc0539da8d8747794c746ea6995f984c745175b4cb8cfbb116ff7a678b6841a81022b8391d0a88d0546334725eab21620c659650fc87
|
7
|
+
data.tar.gz: 4803503efdee68e4f97b16f36277f13e266a6bdc4f48dde4b3bc41568f48a7e764ccb5af24ec7fde4a358cdd5fc4e35ecb5a45a4a473042e6b647f7a9d5a5064
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 1.0.8
|
4
|
+
|
5
|
+
- Fix issue with a closed path crashing in `Path#contain?` if the first basic shape is a point array instead of a `PerfectShape::Point` object
|
6
|
+
|
3
7
|
## 1.0.7
|
4
8
|
|
5
9
|
- Support constructing `PerfectShape::Path` without a point at the beginning
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Perfect Shape 1.0.
|
1
|
+
# Perfect Shape 1.0.8
|
2
2
|
## Geometric Algorithms
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/perfect-shape.svg)](http://badge.fury.io/rb/perfect-shape)
|
4
4
|
[![Test](https://github.com/AndyObtiva/perfect-shape/actions/workflows/ruby.yml/badge.svg)](https://github.com/AndyObtiva/perfect-shape/actions/workflows/ruby.yml)
|
@@ -16,13 +16,13 @@ To ensure accuracy and precision, this library does all its mathematical operati
|
|
16
16
|
Run:
|
17
17
|
|
18
18
|
```
|
19
|
-
gem install perfect-shape -v 1.0.
|
19
|
+
gem install perfect-shape -v 1.0.8
|
20
20
|
```
|
21
21
|
|
22
22
|
Or include in Bundler `Gemfile`:
|
23
23
|
|
24
24
|
```ruby
|
25
|
-
gem 'perfect-shape', '~> 1.0.
|
25
|
+
gem 'perfect-shape', '~> 1.0.8'
|
26
26
|
```
|
27
27
|
|
28
28
|
And, run:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.8
|
data/lib/perfect_shape/path.rb
CHANGED
@@ -88,7 +88,11 @@ module PerfectShape
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
91
|
-
|
91
|
+
if closed?
|
92
|
+
first_basic_shape = basic_shapes.first
|
93
|
+
closing_point = first_basic_shape.is_a?(Array) ? first_basic_shape : first_basic_shape.first_point
|
94
|
+
the_points << closing_point
|
95
|
+
end
|
92
96
|
the_points
|
93
97
|
end
|
94
98
|
|
data/perfect-shape.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: perfect-shape 1.0.
|
5
|
+
# stub: perfect-shape 1.0.8 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "perfect-shape".freeze
|
9
|
-
s.version = "1.0.
|
9
|
+
s.version = "1.0.8"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Andy Maleh".freeze]
|
14
|
-
s.date = "
|
14
|
+
s.date = "2023-05-27"
|
15
15
|
s.description = "Perfect Shape is a collection of pure Ruby geometric algorithms that are mostly useful for GUI manipulation like checking viewport rectangle intersection or containment of a mouse click point in popular geometry shapes such as rectangle, square, arc (open, chord, and pie), ellipse, circle, polygon, and paths containing lines, quadratic b\u00E9zier curves, and cubic bezier curves, potentially with affine transforms applied like translation, scale, rotation, shear/skew, and inversion (including both the Ray Casting Algorithm, aka Even-odd Rule, and the Winding Number Algorithm, aka Nonzero Rule). Additionally, it contains some purely mathematical algorithms like IEEEremainder (also known as IEEE-754 remainder).".freeze
|
16
16
|
s.email = "andy.am@gmail.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
|
|
47
47
|
]
|
48
48
|
s.homepage = "http://github.com/AndyObtiva/perfect-shape".freeze
|
49
49
|
s.licenses = ["MIT".freeze]
|
50
|
-
s.rubygems_version = "3.3.
|
50
|
+
s.rubygems_version = "3.3.1".freeze
|
51
51
|
s.summary = "Perfect Shape - Geometric Algorithms".freeze
|
52
52
|
|
53
53
|
if s.respond_to? :specification_version then
|
@@ -60,6 +60,7 @@ Gem::Specification.new do |s|
|
|
60
60
|
s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
61
61
|
s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
62
62
|
s.add_development_dependency(%q<minitest>.freeze, ["~> 5.14.4"])
|
63
|
+
s.add_development_dependency(%q<minitest-focus>.freeze, ["~> 1.3.1"])
|
63
64
|
s.add_development_dependency(%q<puts_debuggerer>.freeze, ["~> 0.13.1"])
|
64
65
|
s.add_development_dependency(%q<rake-tui>.freeze, ["> 0"])
|
65
66
|
else
|
@@ -68,6 +69,7 @@ Gem::Specification.new do |s|
|
|
68
69
|
s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
|
69
70
|
s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
|
70
71
|
s.add_dependency(%q<minitest>.freeze, ["~> 5.14.4"])
|
72
|
+
s.add_dependency(%q<minitest-focus>.freeze, ["~> 1.3.1"])
|
71
73
|
s.add_dependency(%q<puts_debuggerer>.freeze, ["~> 0.13.1"])
|
72
74
|
s.add_dependency(%q<rake-tui>.freeze, ["> 0"])
|
73
75
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: perfect-shape
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: matrix
|
@@ -92,6 +92,20 @@ dependencies:
|
|
92
92
|
- - "~>"
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: 5.14.4
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: minitest-focus
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
98
|
+
requirements:
|
99
|
+
- - "~>"
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 1.3.1
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - "~>"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 1.3.1
|
95
109
|
- !ruby/object:Gem::Dependency
|
96
110
|
name: puts_debuggerer
|
97
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
194
|
- !ruby/object:Gem::Version
|
181
195
|
version: '0'
|
182
196
|
requirements: []
|
183
|
-
rubygems_version: 3.3.
|
197
|
+
rubygems_version: 3.3.1
|
184
198
|
signing_key:
|
185
199
|
specification_version: 4
|
186
200
|
summary: Perfect Shape - Geometric Algorithms
|