iiif-presentation 0.0.4 → 0.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e600987059a68eef0064df0b7d4a62606af135e
4
- data.tar.gz: d1a85d821d52a370f9c3b0cd27383437cd242694
3
+ metadata.gz: 40a8beab9d760a59d1bff41487a2f3329ade03e0
4
+ data.tar.gz: debe13d12cbc1634d28958521c6fe75525e049f5
5
5
  SHA512:
6
- metadata.gz: 65ab0328b4f5c514e4c6a3860d24aa00d0d9908971d64ff0a36fd000d552c1992711700c30ea690a43b1a436b3c8b459242d1f853a01a71b0b699a4685fd8228
7
- data.tar.gz: e210d147df7c6ce971c518c5f117c2918aadab3ad9f4e115a3add980453f81251a33acd3ec69dcb576b0f5157c23b14df37f9517e4b82505d8ae9fa09cc32eb0
6
+ metadata.gz: cd6967c2793fff9225183b77f4862c6ec01122c6b29866b0f402af1b05fb0401cfbb9577ed0c525bc3ba88a733b9d21bad18ba10c51bff6dc136d93172627a85
7
+ data.tar.gz: c584263143abdf9661b1dfde6f45e905f33b66b7bd4e1b26dcc5f466efad64385912e630dabf65b647b73b7b229ee03d045d70cc68ecc169eaf709cae29610f9
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Installation
8
8
 
9
- From the source code do `rake install`, or get the latest release [from RubyGems](https://rubygems.org/gems/iiif-presentation).
9
+ From the source code do `rake install`, or get the latest release [from RubyGems](https://rubygems.org/gems/osullivan).
10
10
 
11
11
  ## Building New Objects
12
12
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -41,6 +41,10 @@ module IIIF
41
41
  %w{ left-to-right right-to-left top-to-bottom bottom-to-top }
42
42
  end
43
43
 
44
+ def legal_viewing_hint_values
45
+ []
46
+ end
47
+
44
48
  # Initialize a Presentation node
45
49
  # @param [Hash] hsh - Anything in this hash will be added to the Object.'
46
50
  # Order is only guaranteed if an ActiveSupport::OrderedHash is passed.
@@ -90,7 +90,7 @@ module IIIF
90
90
  if remote_info['profile'].kind_of?(Array)
91
91
  resource.service['profile'] = remote_info['profile'][0]
92
92
  else
93
- resource.service['profile'] = remote_info['profile'][0]
93
+ resource.service['profile'] = remote_info['profile']
94
94
  end
95
95
  else
96
96
  resource.service['profile'] = profile
@@ -1,4 +1,5 @@
1
1
  require File.join(File.dirname(__FILE__), 'hash_behaviours')
2
+ require 'active_support/core_ext/class/subclasses'
2
3
  require 'active_support/ordered_hash'
3
4
  require 'active_support/inflector'
4
5
  require 'json'
@@ -233,17 +234,14 @@ module IIIF
233
234
  protected
234
235
 
235
236
  def self.get_descendant_class_by_jld_type(type)
236
- IIIF::Service.all_service_subclasses.select { |klass|
237
+ IIIF::Service.all_service_subclasses.find do |klass|
237
238
  klass.const_defined?(:TYPE) && klass.const_get(:TYPE) == type
238
- }.first
239
+ end
239
240
  end
240
241
 
241
242
  # All known subclasses of service.
242
243
  def self.all_service_subclasses
243
- klass = IIIF::Service
244
- # !c.name.nil? filters out classes that rspec creates for some reason;
245
- # this condition isn't necessary when using the API, afaik
246
- descendants = ObjectSpace.each_object(Class).select { |c| c < klass && !c.name.nil? }
244
+ @all_service_subclasses ||= IIIF::Service.descendants
247
245
  end
248
246
 
249
247
  def data=(hsh)
@@ -411,8 +409,3 @@ module IIIF
411
409
 
412
410
  end
413
411
  end
414
-
415
-
416
-
417
-
418
-
@@ -36,5 +36,11 @@ describe IIIF::Presentation::Canvas do
36
36
  it_behaves_like 'it has the appropriate methods for any-type keys'
37
37
  end
38
38
 
39
+ describe "#legal_viewing_hint_values" do
40
+ it "should not error" do
41
+ expect{subject.legal_viewing_hint_values}.not_to raise_error
42
+ end
43
+ end
44
+
39
45
  end
40
46
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iiif-presentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Stroop
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-16 00:00:00.000000000 Z
11
+ date: 2016-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -260,3 +260,4 @@ test_files:
260
260
  - spec/unit/iiif/presentation/shared_examples/int_only_keys.rb
261
261
  - spec/unit/iiif/presentation/shared_examples/string_only_keys.rb
262
262
  - spec/unit/iiif/service_spec.rb
263
+ has_rdoc: