Skip to content

Commit

Permalink
Bump version to 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peetucket committed Nov 30, 2023
1 parent 681baee commit bf2e8f6
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.3.0
42 changes: 42 additions & 0 deletions diff.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
diff --git a/lib/iiif/v3/presentation/nav_place.rb b/lib/iiif/v3/presentation/nav_place.rb
index 3a51256..9c16caf 100644
--- a/lib/iiif/v3/presentation/nav_place.rb
+++ b/lib/iiif/v3/presentation/nav_place.rb
@@ -5,6 +5,8 @@ module IIIF
module Presentation
class NavPlace < IIIF::V3::AbstractResource
Rect = Struct.new(:coord1, :coord2)
+
+ COORD_REGEX = /(?<hemisphere>[NSEW]) (?<degrees>\d+)[°⁰*] ?(?<minutes>\d+)?[ʹ']? ?(?<seconds>\d+)?[ʺ"]?/

def initialize(coordinate_texts:, base_uri:)
@coordinate_texts = coordinate_texts
@@ -22,7 +24,7 @@ module IIIF
{
id: "#{base_uri}/feature-collection/1",
type: 'FeatureCollection',
- features:
+ features: features
}
end

@@ -42,8 +44,6 @@ module IIIF
end.compact
end

- COORD_REGEX = /(?<hemisphere>[NSEW]) (?<degrees>\d+)[°⁰*] ?(?<minutes>\d+)?[ʹ']? ?(?<seconds>\d+)?[ʺ"]?/
-
def coord_for(long_str, lat_str)
long_matcher = long_str.match(COORD_REGEX)
lat_matcher = lat_str.match(COORD_REGEX)
diff --git a/spec/unit/iiif/v3/presentation/nav_place_spec.rb b/spec/unit/iiif/v3/presentation/nav_place_spec.rb
index 5c45388..08790f2 100644
--- a/spec/unit/iiif/v3/presentation/nav_place_spec.rb
+++ b/spec/unit/iiif/v3/presentation/nav_place_spec.rb
@@ -1,5 +1,5 @@
describe IIIF::V3::Presentation::NavPlace do
- let(:subject) { described_class.new(coordinate_texts:, base_uri:) }
+ let(:subject) { described_class.new(coordinate_texts: coordinate_texts, base_uri: base_uri) }
let(:base_uri) { "https://purl.stanford.edu" }
let(:invalid_coordinates) { ["bogus", "stuff", "is", "here"] }
let(:valid_coordinates) do

0 comments on commit bf2e8f6

Please sign in to comment.