bounding_boxes 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bounding_boxes.rb +6 -3
- data/lib/bounding_boxes/version.rb +1 -1
- metadata +2 -2
- data/lib/bounding_boxes/split_box.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d94adf3ccf85c8e48ed643e6cbb92c39182e62fc
|
4
|
+
data.tar.gz: 0d3210a6d9ed81b07630e2cdeb99e1bc6274a679
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0c6c14399c7e1aab2aa3644f13cfe6e6a69e811d72e1ef65835520bdb3fccd93dae899fa0a7ec01e588d017b9c00e6a14545947493562ae7402fe67658a103c
|
7
|
+
data.tar.gz: 8879fffc6358c3f37ac63ee295d8694379051f5399fd2da54099ddc3a01b9449edc883f28f30f8d57f2a29033917a70dd232ad117137b33c48f8bcdcf9aabb6d
|
data/lib/bounding_boxes.rb
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
require_relative "bounding_boxes/base_bounding_box"
|
2
|
+
require_relative "bounding_boxes/bounding_box"
|
3
|
+
require_relative "bounding_boxes/distance"
|
4
|
+
require_relative "bounding_boxes/point_bounding_box"
|
5
|
+
require_relative "bounding_boxes/square_bounding_box"
|
6
|
+
require_relative "bounding_boxes/version"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bounding_boxes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Morgan
|
@@ -23,7 +23,6 @@ files:
|
|
23
23
|
- lib/bounding_boxes/bounding_box.rb
|
24
24
|
- lib/bounding_boxes/distance.rb
|
25
25
|
- lib/bounding_boxes/point_bounding_box.rb
|
26
|
-
- lib/bounding_boxes/split_box.rb
|
27
26
|
- lib/bounding_boxes/square_bounding_box.rb
|
28
27
|
- lib/bounding_boxes/version.rb
|
29
28
|
homepage: https://github.com/tylermorgan86/bounding_boxes
|
@@ -51,3 +50,4 @@ signing_key:
|
|
51
50
|
specification_version: 4
|
52
51
|
summary: geolocation bounding boxes
|
53
52
|
test_files: []
|
53
|
+
has_rdoc:
|
@@ -1,10 +0,0 @@
|
|
1
|
-
module BB
|
2
|
-
def self.split_box(box, length_of_side)
|
3
|
-
parsed = length_of_side.to_s.scan(/\d+|km|mi/)
|
4
|
-
split_length = parsed[0].to_f
|
5
|
-
units = parsed[1]
|
6
|
-
raise "box width smaller than split" unless box.send("side_length_#{units}".to_sym) > split_length
|
7
|
-
|
8
|
-
|
9
|
-
end
|
10
|
-
end
|