ddr-models 2.6.2 → 2.7.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +1 -1
  4. data/Gemfile +2 -3
  5. data/app/models/collection.rb +11 -3
  6. data/app/models/component.rb +54 -4
  7. data/app/models/item.rb +1 -2
  8. data/config/initializers/active_fedora_base.rb +8 -5
  9. data/config/initializers/rubydora_monkey_patch.rb +11 -0
  10. data/config/initializers/subscriptions.rb +16 -9
  11. data/config/locales/ddr-models.en.yml +3 -0
  12. data/ddr-models.gemspec +3 -2
  13. data/lib/ddr/actions/virus_check.rb +10 -16
  14. data/lib/ddr/auth.rb +0 -8
  15. data/lib/ddr/datastreams.rb +13 -2
  16. data/lib/ddr/datastreams/administrative_metadata_datastream.rb +9 -0
  17. data/lib/ddr/datastreams/content_datastream.rb +5 -0
  18. data/lib/ddr/datastreams/datastream_behavior.rb +60 -15
  19. data/lib/ddr/datastreams/delete_external_files.rb +29 -0
  20. data/lib/ddr/datastreams/descriptive_metadata_datastream.rb +33 -33
  21. data/lib/ddr/datastreams/external_file_datastream.rb +69 -0
  22. data/lib/ddr/datastreams/fits_datastream.rb +15 -5
  23. data/lib/ddr/datastreams/intermediate_file_datastream.rb +5 -0
  24. data/lib/ddr/datastreams/metadata_datastream.rb +15 -17
  25. data/lib/ddr/datastreams/multires_image_datastream.rb +5 -0
  26. data/lib/ddr/derivatives.rb +1 -0
  27. data/lib/ddr/derivatives/ptif_generator.rb +5 -1
  28. data/lib/ddr/derivatives/update_derivatives.rb +23 -0
  29. data/lib/ddr/events/deletion_event.rb +5 -9
  30. data/lib/ddr/events/event.rb +7 -9
  31. data/lib/ddr/events/ingestion_event.rb +5 -9
  32. data/lib/ddr/events/update_event.rb +12 -5
  33. data/lib/ddr/index.rb +0 -1
  34. data/lib/ddr/index/csv_query_result.rb +10 -2
  35. data/lib/ddr/index/fields.rb +10 -9
  36. data/lib/ddr/index/filter.rb +1 -0
  37. data/lib/ddr/managers/derivatives_manager.rb +84 -98
  38. data/lib/ddr/managers/technical_metadata_manager.rb +20 -5
  39. data/lib/ddr/models.rb +24 -24
  40. data/lib/ddr/models/base.rb +98 -74
  41. data/lib/ddr/models/cache.rb +20 -0
  42. data/lib/ddr/models/engine.rb +4 -6
  43. data/lib/ddr/models/file_management.rb +57 -152
  44. data/lib/ddr/models/fixity_checkable.rb +0 -5
  45. data/lib/ddr/models/has_admin_metadata.rb +4 -2
  46. data/lib/ddr/models/has_children.rb +35 -1
  47. data/lib/ddr/models/has_content.rb +3 -33
  48. data/lib/ddr/models/has_intermediate_file.rb +18 -0
  49. data/lib/ddr/models/has_multires_image.rb +12 -15
  50. data/lib/ddr/models/has_struct_metadata.rb +2 -38
  51. data/lib/ddr/models/indexing.rb +160 -163
  52. data/lib/ddr/models/permanent_id.rb +26 -49
  53. data/lib/ddr/models/solr_document.rb +21 -19
  54. data/lib/ddr/models/structure.rb +168 -41
  55. data/lib/ddr/models/structures/agent.rb +49 -0
  56. data/lib/ddr/models/structures/div.rb +64 -0
  57. data/lib/ddr/models/structures/f_locat.rb +54 -0
  58. data/lib/ddr/models/structures/file.rb +52 -0
  59. data/lib/ddr/models/structures/file_grp.rb +35 -0
  60. data/lib/ddr/models/structures/file_sec.rb +22 -0
  61. data/lib/ddr/models/structures/fptr.rb +31 -0
  62. data/lib/ddr/models/structures/mets_hdr.rb +37 -0
  63. data/lib/ddr/models/structures/mptr.rb +49 -0
  64. data/lib/ddr/models/structures/struct_map.rb +40 -0
  65. data/lib/ddr/models/version.rb +1 -1
  66. data/lib/ddr/notifications.rb +10 -12
  67. data/lib/ddr/utils.rb +29 -16
  68. data/lib/ddr/vocab.rb +15 -17
  69. data/lib/ddr/vocab/asset.rb +29 -19
  70. data/lib/ddr/vocab/contact.rb +5 -7
  71. data/lib/ddr/vocab/display.rb +6 -8
  72. data/lib/ddr/vocab/duke_terms.rb +8 -10
  73. data/lib/ddr/vocab/rdf_vocabulary_parser.rb +37 -39
  74. data/lib/ddr/vocab/roles.rb +17 -19
  75. data/lib/ddr/vocab/vocabulary.rb +26 -26
  76. data/spec/datastreams/external_file_datastream_spec.rb +37 -0
  77. data/spec/derivatives/png_generator_spec.rb +21 -25
  78. data/spec/derivatives/ptif_generator_spec.rb +22 -26
  79. data/spec/dummy/config/environments/test.rb +1 -1
  80. data/spec/dummy/db/schema.rb +23 -23
  81. data/spec/factories/structure_factories.rb +8 -2
  82. data/spec/fixtures/imageA.jpg +0 -0
  83. data/spec/fixtures/imageB.jpg +0 -0
  84. data/spec/index/csv_query_result_spec.rb +3 -3
  85. data/spec/index/fields_spec.rb +7 -6
  86. data/spec/managers/derivatives_manager_spec.rb +105 -112
  87. data/spec/managers/technical_metadata_manager_spec.rb +22 -18
  88. data/spec/models/active_fedora_base_spec.rb +0 -106
  89. data/spec/models/active_fedora_datastream_spec.rb +33 -2
  90. data/spec/models/attachment_spec.rb +0 -2
  91. data/spec/models/cache_spec.rb +32 -0
  92. data/spec/models/collection_spec.rb +43 -19
  93. data/spec/models/component_spec.rb +41 -51
  94. data/spec/models/descriptive_metadata_datastream_spec.rb +99 -87
  95. data/spec/models/events_spec.rb +50 -69
  96. data/spec/models/file_management_spec.rb +79 -187
  97. data/spec/models/has_children_spec.rb +54 -3
  98. data/spec/models/has_struct_metadata_spec.rb +32 -38
  99. data/spec/models/indexing_spec.rb +11 -6
  100. data/spec/models/item_spec.rb +21 -7
  101. data/spec/models/permanent_id_spec.rb +1 -5
  102. data/spec/models/solr_document_spec.rb +13 -41
  103. data/spec/models/structure_spec.rb +85 -16
  104. data/spec/models/structures/agent_spec.rb +30 -0
  105. data/spec/models/structures/div_spec.rb +26 -0
  106. data/spec/models/structures/f_locat_spec.rb +78 -0
  107. data/spec/models/structures/file_grp_spec.rb +23 -0
  108. data/spec/models/structures/file_sec_spec.rb +22 -0
  109. data/spec/models/structures/file_spec.rb +60 -0
  110. data/spec/models/structures/fptr_spec.rb +23 -0
  111. data/spec/models/structures/mets_hdr_spec.rb +26 -0
  112. data/spec/models/structures/mptr_spec.rb +25 -0
  113. data/spec/models/structures/struct_map_spec.rb +24 -0
  114. data/spec/models/target_spec.rb +0 -2
  115. data/spec/spec_helper.rb +4 -9
  116. data/spec/support/shared_examples_for_ddr_models.rb +96 -156
  117. data/spec/support/shared_examples_for_has_content.rb +56 -30
  118. data/spec/support/shared_examples_for_has_intermediate_spec.rb +28 -0
  119. data/spec/support/shared_examples_for_non_collection_models.rb +5 -0
  120. data/spec/support/structural_metadata_helper.rb +230 -59
  121. data/spec/utils_spec.rb +0 -2
  122. metadata +86 -44
  123. data/app/helpers/models_helper.rb +0 -10
  124. data/lib/ddr/auth/legacy/abstract_legacy_permissions.rb +0 -17
  125. data/lib/ddr/auth/legacy/legacy_authorization.rb +0 -44
  126. data/lib/ddr/auth/legacy/legacy_default_permissions.rb +0 -33
  127. data/lib/ddr/auth/legacy/legacy_permissions.rb +0 -33
  128. data/lib/ddr/auth/legacy/legacy_roles.rb +0 -25
  129. data/lib/ddr/index/legacy_license_fields.rb +0 -12
  130. data/lib/ddr/jobs.rb +0 -12
  131. data/lib/ddr/jobs/fits_file_characterization.rb +0 -13
  132. data/lib/ddr/jobs/fixity_check.rb +0 -13
  133. data/lib/ddr/jobs/job.rb +0 -36
  134. data/lib/ddr/jobs/queue.rb +0 -27
  135. data/lib/ddr/jobs/update_index.rb +0 -13
  136. data/lib/ddr/models/access_controllable.rb +0 -24
  137. data/lib/ddr/models/struct_div.rb +0 -63
  138. data/spec/auth/legacy_default_permissions_spec.rb +0 -37
  139. data/spec/auth/legacy_permissions_spec.rb +0 -37
  140. data/spec/helpers/models_helper_spec.rb +0 -11
  141. data/spec/jobs/fits_file_characterization_spec.rb +0 -16
  142. data/spec/jobs/fixity_check_spec.rb +0 -22
  143. data/spec/jobs/job_spec.rb +0 -40
  144. data/spec/jobs/update_index_spec.rb +0 -22
  145. data/spec/models/struct_div_spec.rb +0 -70
  146. data/spec/support/shared_examples_for_access_controllables.rb +0 -6
data/lib/ddr/vocab.rb CHANGED
@@ -1,24 +1,22 @@
1
1
  require "rdf/vocab"
2
2
 
3
- module Ddr
4
- module Vocab
5
- extend ActiveSupport::Autoload
3
+ module Ddr::Vocab
4
+ extend ActiveSupport::Autoload
6
5
 
7
- BASE_URI = "http://repository.lib.duke.edu/vocab"
6
+ BASE_URI = "http://repository.lib.duke.edu/vocab"
8
7
 
9
- PREMIS = begin
10
- RDF::Vocab::PREMIS::V1
11
- rescue NameError
12
- RDF::Vocab::PREMIS
13
- end
8
+ PREMIS = begin
9
+ RDF::Vocab::PREMIS::V1
10
+ rescue NameError
11
+ RDF::Vocab::PREMIS
12
+ end
14
13
 
15
- autoload :Asset
16
- autoload :Contact
17
- autoload :Display
18
- autoload :DukeTerms
19
- autoload :RDFVocabularyParser
20
- autoload :Roles
21
- autoload :Vocabulary
14
+ autoload :Asset
15
+ autoload :Contact
16
+ autoload :Display
17
+ autoload :DukeTerms
18
+ autoload :RDFVocabularyParser
19
+ autoload :Roles
20
+ autoload :Vocabulary
22
21
 
23
- end
24
22
  end
@@ -1,29 +1,39 @@
1
- module Ddr
2
- module Vocab
3
- class Asset < RDF::StrictVocabulary("http://repository.lib.duke.edu/vocab/asset/")
1
+ module Ddr::Vocab
2
+ class Asset < RDF::StrictVocabulary("http://repository.lib.duke.edu/vocab/asset/")
4
3
 
5
- property "permanentId",
6
- label: "Permanent Identifier"
4
+ property "permanentId",
5
+ label: "Permanent Identifier"
7
6
 
8
- property "permanentUrl",
9
- label: "Permanent URL"
7
+ property "permanentUrl",
8
+ label: "Permanent URL"
10
9
 
11
- property "workflowState",
12
- label: "Workflow State"
10
+ property "workflowState",
11
+ label: "Workflow State"
13
12
 
14
- property "adminSet",
15
- label: "Administrative Set",
16
- comment: "A name under which objects (principally collections) are grouped for administrative purposes."
13
+ property "adminSet",
14
+ label: "Administrative Set",
15
+ comment: "A name under which objects (principally collections) are grouped for administrative purposes."
17
16
 
18
- property "eadId",
19
- label: "EAD ID"
17
+ property "eadId",
18
+ label: "EAD ID"
20
19
 
21
- property "archivesSpaceId",
22
- label: "ArchivesSpace Identifier"
20
+ property "archivesSpaceId",
21
+ label: "ArchivesSpace Identifier"
23
22
 
24
- property "isLocked",
25
- label: "Is Locked?"
23
+ property "isLocked",
24
+ label: "Is Locked?"
25
+
26
+ property "ingestedBy",
27
+ label: "Ingested By",
28
+ comment: "The agent (person or software) that initiated or performed the ingestion of the object."
29
+
30
+ property "ingestionDate",
31
+ label: "Ingestion Date",
32
+ comment: "The date/time at which the object was originally ingested into the repository."
33
+
34
+ property "rightsNote",
35
+ label: "Rights Note",
36
+ comment: "Free-text statement about the rights status of the resource."
26
37
 
27
- end
28
38
  end
29
39
  end
@@ -1,11 +1,9 @@
1
- module Ddr
2
- module Vocab
3
- class Contact < RDF::StrictVocabulary("http://repository.lib.duke.edu/vocab/contact/")
1
+ module Ddr::Vocab
2
+ class Contact < RDF::StrictVocabulary("#{BASE_URI}/contact/")
4
3
 
5
- property "assistance",
6
- label: "Research Assistance",
7
- comment: "Contact for research assistance with this object."
4
+ property "assistance",
5
+ label: "Research Assistance",
6
+ comment: "Contact for research assistance with this object."
8
7
 
9
- end
10
8
  end
11
9
  end
@@ -1,11 +1,9 @@
1
- module Ddr
2
- module Vocab
3
- class Display < RDF::StrictVocabulary("http://repository.lib.duke.edu/vocab/display/")
1
+ module Ddr::Vocab
2
+ class Display < RDF::StrictVocabulary("#{BASE_URI}/display/")
4
3
 
5
- property "format",
6
- label: "Display Format",
7
- comment: "Format to use when displaying the object."
4
+ property "format",
5
+ label: "Display Format",
6
+ comment: "Format to use when displaying the object."
8
7
 
9
- end
10
8
  end
11
- end
9
+ end
@@ -1,15 +1,13 @@
1
- module Ddr
2
- module Vocab
1
+ module Ddr::Vocab
3
2
 
4
- class DukeTerms < RDF::StrictVocabulary("http://library.duke.edu/metadata/terms/")
5
-
6
- RDFVocabularyParser.new(
7
- File.join(File.dirname( __FILE__ ), "sources", "duketerms.rdf"),
8
- "http://library.duke.edu/metadata/terms/").
9
- term_symbols.sort.each do |term|
10
- property term, type: "rdf:Property".freeze
11
- end
3
+ class DukeTerms < RDF::StrictVocabulary("http://library.duke.edu/metadata/terms/")
12
4
 
5
+ RDFVocabularyParser.new(
6
+ File.join(File.dirname( __FILE__ ), "sources", "duketerms.rdf"),
7
+ "http://library.duke.edu/metadata/terms/").
8
+ term_symbols.sort.each do |term|
9
+ property term, type: "rdf:Property".freeze
13
10
  end
11
+
14
12
  end
15
13
  end
@@ -1,45 +1,43 @@
1
1
  require 'rdf/rdfxml'
2
2
 
3
- module Ddr
4
- module Vocab
5
- class RDFVocabularyParser
6
-
7
- attr_reader :source, :prefix
8
-
9
- def initialize(source, prefix = "")
10
- @source = source
11
- @prefix = prefix
12
- end
13
-
14
- def term_names
15
- @term_names ||= terms.collect { |t| t[:resource].to_s.sub(prefix, "") }.freeze
16
- end
17
-
18
- def term_symbols
19
- term_names.map(&:to_sym)
20
- end
21
-
22
- def terms
23
- properties.map(&:to_hash)
24
- end
25
-
26
- def properties
27
- RDF::Query.execute(graph, properties_query)
28
- end
29
-
30
- def properties_query
31
- {:resource => {
32
- RDF.type => RDF.Property,
33
- RDF::RDFS.label => :label,
34
- RDF::RDFS.comment => :comment
35
- }
36
- }
37
- end
38
-
39
- def graph
40
- @graph ||= RDF::Graph.load(source).freeze
41
- end
3
+ module Ddr::Vocab
4
+ class RDFVocabularyParser
42
5
 
6
+ attr_reader :source, :prefix
7
+
8
+ def initialize(source, prefix = "")
9
+ @source = source
10
+ @prefix = prefix
11
+ end
12
+
13
+ def term_names
14
+ @term_names ||= terms.collect { |t| t[:resource].to_s.sub(prefix, "") }.freeze
15
+ end
16
+
17
+ def term_symbols
18
+ term_names.map(&:to_sym)
19
+ end
20
+
21
+ def terms
22
+ properties.map(&:to_hash)
43
23
  end
24
+
25
+ def properties
26
+ RDF::Query.execute(graph, properties_query)
27
+ end
28
+
29
+ def properties_query
30
+ {:resource => {
31
+ RDF.type => RDF.Property,
32
+ RDF::RDFS.label => :label,
33
+ RDF::RDFS.comment => :comment
34
+ }
35
+ }
36
+ end
37
+
38
+ def graph
39
+ @graph ||= RDF::Graph.load(source).freeze
40
+ end
41
+
44
42
  end
45
43
  end
@@ -1,27 +1,25 @@
1
- module Ddr
2
- module Vocab
3
- class Roles < RDF::StrictVocabulary("http://repository.lib.duke.edu/vocab/roles/")
1
+ module Ddr::Vocab
2
+ class Roles < RDF::StrictVocabulary("#{BASE_URI}/roles/")
4
3
 
5
- term :Role,
6
- label: "Role",
7
- comment: "An assertion of a role granted to an agent."
4
+ term :Role,
5
+ label: "Role",
6
+ comment: "An assertion of a role granted to an agent."
8
7
 
9
- property :hasRole,
10
- label: "Has Role",
11
- comment: "Asserts the granting of a role on the subject to an agent."
8
+ property :hasRole,
9
+ label: "Has Role",
10
+ comment: "Asserts the granting of a role on the subject to an agent."
12
11
 
13
- property :type,
14
- label: "Type",
15
- comment: "The type of role granted to the agent."
12
+ property :type,
13
+ label: "Type",
14
+ comment: "The type of role granted to the agent."
16
15
 
17
- property :agent,
18
- label: "Agent",
19
- comment: "The agent to whom the role is granted."
16
+ property :agent,
17
+ label: "Agent",
18
+ comment: "The agent to whom the role is granted."
20
19
 
21
- property :scope,
22
- label: "Scope",
23
- comment: "The scope within which the role applies."
20
+ property :scope,
21
+ label: "Scope",
22
+ comment: "The scope within which the role applies."
24
23
 
25
- end
26
24
  end
27
25
  end
@@ -1,37 +1,37 @@
1
- module Ddr
2
- module Vocab
3
- class Vocabulary
1
+ require 'rdf/vocab'
4
2
 
5
- def self.label(rdf_vocabulary)
6
- case rdf_vocabulary.to_uri
7
- when RDF::DC.to_uri
8
- "DC Terms"
9
- when DukeTerms.to_uri
10
- "Duke Terms"
11
- end
12
- end
3
+ module Ddr::Vocab
4
+ class Vocabulary
13
5
 
14
- def self.namespace_prefix(rdf_vocabulary)
15
- case rdf_vocabulary.to_uri
16
- when RDF::DC.to_uri
17
- "dcterms"
18
- when DukeTerms.to_uri
19
- "duke"
20
- end
6
+ def self.label(rdf_vocabulary)
7
+ case rdf_vocabulary.to_uri
8
+ when RDF::Vocab::DC.to_uri
9
+ "DC Terms"
10
+ when DukeTerms.to_uri
11
+ "Duke Terms"
21
12
  end
13
+ end
22
14
 
23
- def self.property_terms(rdf_vocabulary)
24
- rdf_vocabulary.properties.select { |p| p.type.include?("http://www.w3.org/1999/02/22-rdf-syntax-ns#Property") }
15
+ def self.namespace_prefix(rdf_vocabulary)
16
+ case rdf_vocabulary.to_uri
17
+ when RDF::Vocab::DC.to_uri
18
+ "dcterms"
19
+ when DukeTerms.to_uri
20
+ "duke"
25
21
  end
22
+ end
26
23
 
27
- def self.term_names(rdf_vocabulary)
28
- self.property_terms(rdf_vocabulary).map { |term| self.term_name(rdf_vocabulary, term) }
29
- end
24
+ def self.property_terms(rdf_vocabulary)
25
+ rdf_vocabulary.properties.select { |p| p.type.include?("http://www.w3.org/1999/02/22-rdf-syntax-ns#Property") }
26
+ end
30
27
 
31
- def self.term_name(rdf_vocabulary, term)
32
- term.to_s.gsub(rdf_vocabulary.to_uri.to_s, "").to_sym
33
- end
28
+ def self.term_names(rdf_vocabulary)
29
+ self.property_terms(rdf_vocabulary).map { |term| self.term_name(rdf_vocabulary, term) }
30
+ end
34
31
 
32
+ def self.term_name(rdf_vocabulary, term)
33
+ term.to_s.gsub(rdf_vocabulary.to_uri.to_s, "").to_sym
35
34
  end
35
+
36
36
  end
37
37
  end
@@ -0,0 +1,37 @@
1
+ module Ddr::Datastreams
2
+ RSpec.describe ExternalFileDatastream do
3
+
4
+ let(:obj) { Component.new }
5
+ let(:file1) { fixture_file_upload("sample.pdf", "application/pdf") }
6
+ let(:file2) { fixture_file_upload("sample.docx") }
7
+
8
+ subject { obj.content }
9
+
10
+ its(:file_size) { is_expected.to be_nil }
11
+ its(:file_path) { is_expected.to be_nil }
12
+ its(:file_paths) { is_expected.to be_empty }
13
+
14
+ specify {
15
+ subject.add_file(file1.path, mime_type: file1.content_type)
16
+ obj.save!
17
+ path1 = subject.file_path
18
+ expect(::File.exist?(path1)).to be true
19
+ expect(subject.file_size).to eq 83777
20
+ expect(subject.mimeType).to eq "application/pdf"
21
+ subject.add_file(file2.path)
22
+ obj.save!
23
+ path2 = subject.file_path
24
+ expect(::File.exist?(path2)).to be true
25
+ expect(subject.file_size).to eq 12552
26
+ expect(subject.mimeType).to eq "application/octet-stream"
27
+ expect(subject.file_paths).to contain_exactly(path1, path2)
28
+ subject.delete
29
+ expect(::File.exist?(path1)).to be false
30
+ expect(::File.exist?(path2)).to be false
31
+ expect(subject.file_size).to be_nil
32
+ expect(subject.dsLocation).to be_nil
33
+ expect(subject.file_path).to be_nil
34
+ }
35
+
36
+ end
37
+ end
@@ -1,31 +1,27 @@
1
- require 'spec_helper'
1
+ module Ddr::Derivatives
2
+ RSpec.describe PngGenerator do
2
3
 
3
- module Ddr
4
- module Derivatives
5
- RSpec.describe PngGenerator do
6
-
7
- describe "generate" do
8
- let(:tempdir) { Dir.mktmpdir }
9
- let(:output_file) { File.new(File.join(tempdir, "output.png"), 'wb') }
10
- let(:options) { "-resize '100x100>'" }
11
- let(:generator) { described_class.new(source, output_file.path, options) }
12
- after { FileUtils.rmdir(tempdir) }
13
- context "tiff source" do
14
- let(:source) { File.join(Ddr::Models::Engine.root, "spec", "fixtures", "imageA.tif") }
15
- it "should generate a non-empty file" do
16
- generator.generate
17
- expect(File.size(output_file.path)).to be > 0
18
- end
4
+ describe "generate" do
5
+ let(:tempdir) { Dir.mktmpdir }
6
+ let(:output_file) { File.new(File.join(tempdir, "output.png"), 'wb') }
7
+ let(:options) { "-resize '100x100>'" }
8
+ let(:generator) { described_class.new(source, output_file.path, options) }
9
+ after { FileUtils.rmdir(tempdir) }
10
+ context "tiff source" do
11
+ let(:source) { File.join(Ddr::Models::Engine.root, "spec", "fixtures", "imageA.tif") }
12
+ it "should generate a non-empty file" do
13
+ generator.generate
14
+ expect(File.size(output_file.path)).to be > 0
19
15
  end
20
- context "animated gif source" do
21
- let(:source) { File.join(Ddr::Models::Engine.root, "spec", "fixtures", "arrow1rightred_e0.gif") }
22
- it "should generate a non-empty file" do
23
- generator.generate
24
- expect(File.size(output_file.path)).to be > 0
25
- end
16
+ end
17
+ context "animated gif source" do
18
+ let(:source) { File.join(Ddr::Models::Engine.root, "spec", "fixtures", "arrow1rightred_e0.gif") }
19
+ it "should generate a non-empty file" do
20
+ generator.generate
21
+ expect(File.size(output_file.path)).to be > 0
26
22
  end
27
23
  end
28
-
29
24
  end
25
+
30
26
  end
31
- end
27
+ end