hyrax 1.0.1 → 1.0.2

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.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -1
  3. data/README.md +2 -2
  4. data/app/assets/javascripts/hyrax/file_manager/member.es6 +6 -0
  5. data/app/models/concerns/hyrax/file_set/derivatives.rb +1 -1
  6. data/app/models/concerns/hyrax/work_behavior.rb +1 -1
  7. data/app/models/hyrax/operation.rb +3 -1
  8. data/app/models/sipity/agent.rb +14 -1
  9. data/app/models/sipity/entity.rb +3 -1
  10. data/app/models/sipity/workflow_action.rb +3 -1
  11. data/app/models/sipity/workflow_state.rb +3 -1
  12. data/app/presenters/hyrax/presents_attributes.rb +2 -2
  13. data/app/renderers/hyrax/renderers/configured_microdata.rb +1 -3
  14. data/app/search_builders/hyrax/catalog_search_builder.rb +1 -1
  15. data/app/services/hyrax/microdata.rb +66 -0
  16. data/app/services/hyrax/resource_types_service.rb +1 -2
  17. data/config/locales/hyrax.en.yml +0 -46
  18. data/config/locales/hyrax.es.yml +0 -46
  19. data/config/schema_org.yml +46 -0
  20. data/db/migrate/20160328222152_create_version_committers.rb +1 -1
  21. data/db/migrate/20160328222153_create_checksum_audit_logs.rb +1 -1
  22. data/db/migrate/20160328222154_create_single_use_links.rb +1 -1
  23. data/db/migrate/20160328222156_add_social_to_users.rb +1 -1
  24. data/db/migrate/20160328222157_add_ldap_attrs_to_user.rb +1 -1
  25. data/db/migrate/20160328222158_add_avatars_to_users.rb +1 -1
  26. data/db/migrate/20160328222161_create_trophies.rb +1 -1
  27. data/db/migrate/20160328222162_add_linkedin_to_users.rb +1 -1
  28. data/db/migrate/20160328222163_create_tinymce_assets.rb +1 -1
  29. data/db/migrate/20160328222164_create_content_blocks.rb +1 -1
  30. data/db/migrate/20160328222165_create_featured_works.rb +1 -1
  31. data/db/migrate/20160328222166_add_external_key_to_content_blocks.rb +1 -1
  32. data/db/migrate/20160328222226_create_proxy_deposit_rights.rb +1 -1
  33. data/db/migrate/20160328222227_create_proxy_deposit_requests.rb +1 -1
  34. data/db/migrate/20160328222228_create_file_view_stats.rb +1 -1
  35. data/db/migrate/20160328222229_create_file_download_stats.rb +1 -1
  36. data/db/migrate/20160328222230_add_orcid_to_users.rb +1 -1
  37. data/db/migrate/20160328222231_create_user_stats.rb +1 -1
  38. data/db/migrate/20160328222232_create_work_view_stats.rb +1 -1
  39. data/db/migrate/20160328222233_add_works_to_user_stats.rb +1 -1
  40. data/db/migrate/20160328222236_change_trophy_generic_file_id_to_work_id.rb +1 -1
  41. data/db/migrate/20160328222237_change_proxy_deposit_generic_file_id_to_work_id.rb +1 -1
  42. data/db/migrate/20160328222238_change_audit_log_generic_file_id_to_file_set_id.rb +1 -1
  43. data/db/migrate/20160328222239_change_proxy_deposit_request_generic_file_id_to_work_id.rb +1 -1
  44. data/db/migrate/20160401142419_create_uploaded_files.rb +1 -1
  45. data/db/migrate/20160415212015_create_features.rb +1 -1
  46. data/db/migrate/20160427155928_create_operations.rb +1 -1
  47. data/db/migrate/20160510000007_change_featured_work_generic_file_id_to_work_id.rb +1 -1
  48. data/db/migrate/20160516190435_add_arkivo_to_users.rb +1 -1
  49. data/db/migrate/20160919151348_create_sipity.rb +1 -1
  50. data/db/migrate/20161012182404_create_sipity_workflow_methods.rb +1 -1
  51. data/db/migrate/20161021175854_create_permission_template.rb +1 -1
  52. data/db/migrate/20161021180154_create_permission_template_access.rb +1 -1
  53. data/db/migrate/20161116222307_add_release_to_permission_templates.rb +1 -1
  54. data/db/migrate/20170131142607_add_permission_template_to_sipity_workflow.rb +1 -1
  55. data/db/migrate/20170307142607_tidy_up_because_of_bad_exception.rb +1 -1
  56. data/db/migrate/20170308175556_add_allows_access_grant_to_workflow.rb +1 -1
  57. data/hyrax.gemspec +1 -1
  58. data/lib/generators/hyrax/install_generator.rb +18 -2
  59. data/lib/hyrax/version.rb +1 -1
  60. data/spec/actors/hyrax/create_with_files_actor_spec.rb +3 -3
  61. data/spec/controllers/catalog_controller_spec.rb +6 -6
  62. data/spec/controllers/hyrax/uploads_controller_spec.rb +7 -4
  63. data/spec/conversions/power_converters/sipity_workflow_state_spec.rb +2 -2
  64. data/spec/factories/uploaded_files.rb +5 -0
  65. data/spec/features/delete_work_spec.rb +23 -0
  66. data/spec/fixtures/config/schema_org.yml +5 -0
  67. data/spec/jobs/attach_files_to_work_job_spec.rb +2 -2
  68. data/spec/jobs/create_derivatives_job_spec.rb +16 -15
  69. data/spec/models/sipity/entity_spec.rb +2 -1
  70. data/spec/models/sipity/workflow_state_spec.rb +2 -2
  71. data/spec/renderers/hyrax/renderers/attribute_renderer_spec.rb +5 -5
  72. data/spec/search_builder/hyrax/catalog_search_builder_spec.rb +1 -1
  73. data/spec/services/hyrax/workflow/action_taken_service_spec.rb +3 -3
  74. data/spec/services/hyrax/workflow/notification_generator_spec.rb +1 -1
  75. metadata +13 -7
  76. data/spec/fixtures/locales/renderer.en.yml +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3425401f62c2b4c3509f2254c84fef91e55d34c
4
- data.tar.gz: c959faf3cc3c45eb8ccc024d48567ec5e41d41af
3
+ metadata.gz: 7ba1e774b9fb00e5c4384e30c0001161c3dac629
4
+ data.tar.gz: b3c1f51c995c1a56bbbeeb447dbd9d0c2f41161a
5
5
  SHA512:
6
- metadata.gz: 79d50f4747368ff6908659683221905c45f041ccad389580824119ddcdd346c4a9015aa5685dded91e83ba6101defb82608fe52bfc133ef1be81f905fe458f58
7
- data.tar.gz: 5fd59a562ca1c3420d8f662a116fe0bdb6975eb6884b0c228b86039ff7e699cfbbd63b0ace358a7fa6855ed67bcae6a1b5d5aa693c6a72734e411244713d8de3
6
+ metadata.gz: a7fede837b32421d36837ebea2aaec223fc81c89005009336cedf60fbf6e9605b726a30c8cbcbb17b3e30ebf23cdb80d7fe32aaf0ad3142882b45b50c6a88a24
7
+ data.tar.gz: d05a6e8047084d8de30add25123d815c634f6880ea37d6a0b681667ddb46bd7be8594f5b6722af92b25fd1b7678b86801fe6a2d9cc2c3c52d0de545b1566d121
@@ -22,7 +22,8 @@ env:
22
22
  global:
23
23
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
24
24
  matrix:
25
- - "RAILS_VERSION=5.0.2"
25
+ - "RAILS_VERSION=5.0.3"
26
+ - "RAILS_VERSION=5.1.1"
26
27
  services:
27
28
  - redis-server
28
29
  before_script:
data/README.md CHANGED
@@ -59,7 +59,7 @@ If you have questions or need help, please email [the Hydra community tech list]
59
59
  # Getting started
60
60
 
61
61
  This document contains instructions specific to setting up an app with __Hyrax
62
- v1.0.0.rc2__. If you are looking for instructions on installing a different
62
+ v1.0.2__. If you are looking for instructions on installing a different
63
63
  version, be sure to select the appropriate branch or tag from the drop-down
64
64
  menu above.
65
65
 
@@ -133,7 +133,7 @@ Rails requires that you have a JavaScript runtime -- for example, nodejs -- inst
133
133
  Generate a new Rails application using the template.
134
134
 
135
135
  ```
136
- rails new my_app -m https://raw.githubusercontent.com/projecthydra-labs/hyrax/master/template.rb
136
+ rails new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v1.0.2/template.rb
137
137
  ```
138
138
 
139
139
  Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
@@ -1,4 +1,10 @@
1
1
  export class InputTracker {
2
+ /*
3
+ * @param element {jQuery} The field to bind to. Typically instantiated for
4
+ * the titles of each member (file_set) object as well
5
+ * the hidden work thumbnail_id and representative_id
6
+ * @param notifier {FileManagerMember}
7
+ */
2
8
  constructor(element, notifier) {
3
9
  this.element = element
4
10
  this.notifier = notifier
@@ -44,7 +44,7 @@ module Hyrax
44
44
  Hydra::Derivatives.source_file_service = Hyrax::LocalFileService
45
45
  Hydra::Derivatives.output_file_service = Hyrax::PersistDerivatives
46
46
  Hydra::Derivatives::FullTextExtract.output_file_service = Hyrax::PersistDirectlyContainedOutputFileService
47
- after_destroy :cleanup_derivatives
47
+ before_destroy :cleanup_derivatives
48
48
  # This completely overrides the version in Hydra::Works so that we
49
49
  # read and write to a local file. It's important that characterization runs
50
50
  # before derivatives so that we have a credible mime_type field to work with.
@@ -3,7 +3,7 @@ module Hyrax
3
3
  extend ActiveSupport::Concern
4
4
  include Hydra::Works::WorkBehavior
5
5
  include HumanReadableType
6
- include Noid
6
+ include Hyrax::Noid
7
7
  include Permissions
8
8
  include Serializers
9
9
  include Hydra::WithDepositor
@@ -18,7 +18,9 @@ module Hyrax
18
18
  self.table_name = 'curation_concerns_operations'
19
19
  acts_as_nested_set
20
20
  define_callbacks :success, :failure
21
- belongs_to :user, class_name: '::User'
21
+ belongs_to :user,
22
+ optional: true,
23
+ class_name: '::User'
22
24
 
23
25
  # If this is a batch job (has children), check to see if all the children are complete
24
26
  # @see #fail! when none of the children are in a PENDING nor PERFORMING state but at least one is in a FAILURE state
@@ -9,7 +9,6 @@ module Sipity
9
9
  ENTITY_LEVEL_AGENT_RELATIONSHIP = 'entity_level'.freeze
10
10
  WORKFLOW_LEVEL_AGENT_RELATIONSHIP = 'workflow_level'.freeze
11
11
 
12
- belongs_to :proxy_for, polymorphic: true
13
12
  has_many :workflow_responsibilities, dependent: :destroy, class_name: 'Sipity::WorkflowResponsibility'
14
13
  has_many :entity_specific_responsibilities, dependent: :destroy, class_name: 'Sipity::EntitySpecificResponsibility'
15
14
 
@@ -17,5 +16,19 @@ module Sipity
17
16
  foreign_key: :agent_id,
18
17
  dependent: :destroy,
19
18
  class_name: 'Sipity::Comment'
19
+
20
+ # Presently Hyrax::Group is a PORO not an ActiveRecord object, so
21
+ # creating a belongs to causes Rails 5.1 to try to access methods that don't exist.
22
+ # We do have this relationship, abet only conceptually:
23
+ # belongs_to :proxy_for, polymorphic: true
24
+
25
+ def proxy_for=(target)
26
+ self.proxy_for_id = target.id
27
+ self.proxy_for_type = target.class.name
28
+ end
29
+
30
+ def proxy_for
31
+ @proxy_for ||= proxy_for_type.constantize.find(proxy_for_id)
32
+ end
20
33
  end
21
34
  end
@@ -9,7 +9,9 @@ module Sipity
9
9
  self.table_name = 'sipity_entities'
10
10
 
11
11
  belongs_to :workflow, class_name: 'Sipity::Workflow'
12
- belongs_to :workflow_state, class_name: 'Sipity::WorkflowState'
12
+ belongs_to :workflow_state,
13
+ optional: true,
14
+ class_name: 'Sipity::WorkflowState'
13
15
 
14
16
  has_many :entity_specific_responsibilities, dependent: :destroy, class_name: 'Sipity::EntitySpecificResponsibility'
15
17
 
@@ -12,7 +12,9 @@ module Sipity
12
12
  self.table_name = 'sipity_workflow_actions'
13
13
 
14
14
  belongs_to :workflow, class_name: 'Sipity::Workflow'
15
- belongs_to :resulting_workflow_state, class_name: 'Sipity::WorkflowState'
15
+ belongs_to :resulting_workflow_state,
16
+ optional: true,
17
+ class_name: 'Sipity::WorkflowState'
16
18
 
17
19
  has_many :workflow_state_actions, dependent: :destroy, class_name: 'Sipity::WorkflowStateAction'
18
20
  has_many :triggered_methods, dependent: :destroy, class_name: 'Sipity::Method'
@@ -4,7 +4,9 @@ module Sipity
4
4
  class WorkflowState < ActiveRecord::Base
5
5
  self.table_name = 'sipity_workflow_states'
6
6
 
7
- belongs_to :workflow, class_name: 'Sipity::Workflow'
7
+ belongs_to :workflow,
8
+ class_name: 'Sipity::Workflow'
9
+
8
10
  has_many :originating_workflow_state_actions,
9
11
  dependent: :destroy,
10
12
  class_name: 'Sipity::WorkflowStateAction',
@@ -34,7 +34,7 @@ module Hyrax
34
34
 
35
35
  def microdata_type_to_html
36
36
  return "" unless display_microdata?
37
- value = I18n.t(microdata_type_key, default: Hyrax.config.microdata_default_type)
37
+ value = Microdata.fetch(microdata_type_key, default: Hyrax.config.microdata_default_type)
38
38
  " itemscope itemtype=\"#{value}\"".html_safe
39
39
  end
40
40
 
@@ -64,7 +64,7 @@ module Hyrax
64
64
  end
65
65
 
66
66
  def microdata_type_key
67
- "hyrax.schema_org.resource_type.#{human_readable_type}"
67
+ "resource_type.#{human_readable_type}"
68
68
  end
69
69
  end
70
70
  end
@@ -1,8 +1,6 @@
1
1
  module Hyrax
2
2
  module Renderers
3
3
  module ConfiguredMicrodata
4
- PREFIX = 'hyrax.schema_org'.freeze
5
-
6
4
  def microdata?(field)
7
5
  return false unless Hyrax.config.display_microdata?
8
6
  translate_microdata(field: field, field_context: 'property', default: false)
@@ -41,7 +39,7 @@ module Hyrax
41
39
  private
42
40
 
43
41
  def translate_microdata(field:, field_context:, default: true)
44
- t("#{PREFIX}.#{field}.#{field_context}", default: default)
42
+ Microdata.fetch("#{field}.#{field_context}", default: default)
45
43
  end
46
44
  end
47
45
  end
@@ -7,7 +7,7 @@ class Hyrax::CatalogSearchBuilder < Hyrax::SearchBuilder
7
7
 
8
8
  # show both works that match the query and works that contain files that match the query
9
9
  def show_works_or_works_that_contain_files(solr_parameters)
10
- return if blacklight_params[:q].blank? || blacklight_params[:search_field]
10
+ return if blacklight_params[:q].blank? || blacklight_params[:search_field] != 'all_fields'
11
11
  solr_parameters[:user_query] = blacklight_params[:q]
12
12
  solr_parameters[:q] = new_query
13
13
  end
@@ -0,0 +1,66 @@
1
+ module Hyrax
2
+ class Microdata
3
+ include Singleton
4
+ FILENAME = 'config/schema_org.yml'.freeze
5
+ TOP_KEY = 'schema_org'.freeze
6
+
7
+ def self.fetch(key, options = {})
8
+ instance.fetch(key, options)
9
+ end
10
+
11
+ def fetch(key, options)
12
+ data.fetch(key) { options[:default] }
13
+ end
14
+
15
+ # Allow clients to register paths providing config data sources.
16
+ # Register a config files like this:
17
+ # Microdata.load_path << 'path/to/locale/en.yml'
18
+ def self.load_path
19
+ @load_path ||= [FILENAME]
20
+ end
21
+
22
+ # Sets the load path instance.
23
+ class << self
24
+ attr_writer :load_path
25
+ end
26
+
27
+ def self.reload!
28
+ instance.reload!
29
+ end
30
+
31
+ def reload!
32
+ @data = nil
33
+ end
34
+
35
+ private
36
+
37
+ def data
38
+ @data ||= begin
39
+ flatten(yaml)
40
+ end
41
+ end
42
+
43
+ def yaml
44
+ yaml = {}
45
+ self.class.load_path.each do |path|
46
+ from_file = YAML.safe_load(File.open(path))[TOP_KEY]
47
+ yaml.deep_merge!(from_file) if from_file
48
+ end
49
+ yaml
50
+ end
51
+
52
+ # Given a deeply nested hash, return a single hash
53
+ def flatten(hash)
54
+ hash.each_with_object({}) do |(key, value), h|
55
+ if value.instance_of?(Hash)
56
+ value.map do |k, v|
57
+ # We could add recursion here if we ever had more than 2 levels
58
+ h["#{key}.#{k}"] = v
59
+ end
60
+ else
61
+ h[key] = value
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -16,8 +16,7 @@ module Hyrax
16
16
  # @param [String] id identifier of the resource type
17
17
  def self.microdata_type(id)
18
18
  return Hyrax.config.microdata_default_type if id.nil?
19
- I18n.t("#{Hyrax::Renderers::ConfiguredMicrodata::PREFIX}.resource_type.#{id}",
20
- default: Hyrax.config.microdata_default_type)
19
+ Microdata.fetch("resource_type.#{id}", default: Hyrax.config.microdata_default_type)
21
20
  end
22
21
  end
23
22
  end
@@ -493,52 +493,6 @@ en:
493
493
  subject: "Batch upload complete"
494
494
  title: "Files uploaded successfully"
495
495
  passive_consent_to_agreement: "By saving this work I agree to the"
496
- schema_org:
497
- based_near:
498
- property: contentLocation
499
- type: "http://schema.org/Place"
500
- value: name
501
- contributor:
502
- property: contributor
503
- # used as the itemprop value for itemscoped attributes
504
- type: "http://schema.org/Person"
505
- value: name
506
- creator:
507
- property: creator
508
- type: "http://schema.org/Person"
509
- value: name
510
- date_created:
511
- property: dateCreated
512
- description:
513
- property: description
514
- keyword:
515
- property: keywords
516
- language:
517
- property: inLanguage
518
- publisher:
519
- property: publisher
520
- type: "http://schema.org/Organization"
521
- value: name
522
- resource_type:
523
- Article: "http://schema.org/Article"
524
- Audio: "http://schema.org/AudioObject"
525
- Book: "http://schema.org/Book"
526
- Conference Proceeding: "http://schema.org/ScholarlyArticle"
527
- Dataset: "http://schema.org/Dataset"
528
- Dissertation: "http://schema.org/ScholarlyArticle"
529
- Image: "http://schema.org/ImageObject"
530
- Map or Cartographic Material: "http://schema.org/Map"
531
- Masters Thesis: "http://schema.org/ScholarlyArticle"
532
- Part of Book: "http://schema.org/Book"
533
- Research Paper: "http://schema.org/ScholarlyArticle"
534
- Software or Program Code: "http://schema.org/Code"
535
- Video: "http://schema.org/VideoObject"
536
- subject:
537
- property: about
538
- type: "http://schema.org/Thing"
539
- value: name
540
- title:
541
- property: name
542
496
  search:
543
497
  button:
544
498
  html: '<span class="glyphicon glyphicon-search"></span> Go'
@@ -492,52 +492,6 @@ es:
492
492
  subject: "Carga en lote completa"
493
493
  title: "Archivos cargados satisfactoriamente"
494
494
  passive_consent_to_agreement: "Al salvar este trabajo yo acepto a"
495
- schema_org:
496
- based_near:
497
- property: contentLocation
498
- type: "http://schema.org/Place"
499
- value: name
500
- contributor:
501
- property: contributor
502
- # used as the itemprop value for itemscoped attributes
503
- type: "http://schema.org/Person"
504
- value: name
505
- creator:
506
- property: creator
507
- type: "http://schema.org/Person"
508
- value: name
509
- date_created:
510
- property: dateCreated
511
- description:
512
- property: description
513
- keyword:
514
- property: keywords
515
- language:
516
- property: inLanguage
517
- publisher:
518
- property: publisher
519
- type: "http://schema.org/Organization"
520
- value: name
521
- resource_type:
522
- Article: "http://schema.org/Article"
523
- Audio: "http://schema.org/AudioObject"
524
- Book: "http://schema.org/Book"
525
- Conference Proceeding: "http://schema.org/ScholarlyArticle"
526
- Dataset: "http://schema.org/Dataset"
527
- Dissertation: "http://schema.org/ScholarlyArticle"
528
- Image: "http://schema.org/ImageObject"
529
- Map or Cartographic Material: "http://schema.org/Map"
530
- Masters Thesis: "http://schema.org/ScholarlyArticle"
531
- Part of Book: "http://schema.org/Book"
532
- Research Paper: "http://schema.org/ScholarlyArticle"
533
- Software or Program Code: "http://schema.org/Code"
534
- Video: "http://schema.org/VideoObject"
535
- subject:
536
- property: about
537
- type: "http://schema.org/Thing"
538
- value: name
539
- title:
540
- property: name
541
495
  search:
542
496
  button:
543
497
  html: '<span class="glyphicon glyphicon-search"></span> Ir'
@@ -0,0 +1,46 @@
1
+ schema_org:
2
+ based_near:
3
+ property: contentLocation
4
+ type: "http://schema.org/Place"
5
+ value: name
6
+ contributor:
7
+ property: contributor
8
+ # used as the itemprop value for itemscoped attributes
9
+ type: "http://schema.org/Person"
10
+ value: name
11
+ creator:
12
+ property: creator
13
+ type: "http://schema.org/Person"
14
+ value: name
15
+ date_created:
16
+ property: dateCreated
17
+ description:
18
+ property: description
19
+ keyword:
20
+ property: keywords
21
+ language:
22
+ property: inLanguage
23
+ publisher:
24
+ property: publisher
25
+ type: "http://schema.org/Organization"
26
+ value: name
27
+ resource_type:
28
+ Article: "http://schema.org/Article"
29
+ Audio: "http://schema.org/AudioObject"
30
+ Book: "http://schema.org/Book"
31
+ Conference Proceeding: "http://schema.org/ScholarlyArticle"
32
+ Dataset: "http://schema.org/Dataset"
33
+ Dissertation: "http://schema.org/ScholarlyArticle"
34
+ Image: "http://schema.org/ImageObject"
35
+ Map or Cartographic Material: "http://schema.org/Map"
36
+ Masters Thesis: "http://schema.org/ScholarlyArticle"
37
+ Part of Book: "http://schema.org/Book"
38
+ Research Paper: "http://schema.org/ScholarlyArticle"
39
+ Software or Program Code: "http://schema.org/Code"
40
+ Video: "http://schema.org/VideoObject"
41
+ subject:
42
+ property: about
43
+ type: "http://schema.org/Thing"
44
+ value: name
45
+ title:
46
+ property: name
@@ -1,4 +1,4 @@
1
- class CreateVersionCommitters < ActiveRecord::Migration
1
+ class CreateVersionCommitters < ActiveRecord::Migration[4.2]
2
2
  def self.up
3
3
  create_table :version_committers do |t|
4
4
  t.string :obj_id
@@ -1,4 +1,4 @@
1
- class CreateChecksumAuditLogs < ActiveRecord::Migration
1
+ class CreateChecksumAuditLogs < ActiveRecord::Migration[4.2]
2
2
  def self.up
3
3
  create_table :checksum_audit_logs do |t|
4
4
  t.string :file_set_id
@@ -1,4 +1,4 @@
1
- class CreateSingleUseLinks < ActiveRecord::Migration
1
+ class CreateSingleUseLinks < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :single_use_links do |t|
4
4
  t.string :downloadKey
@@ -1,4 +1,4 @@
1
- class AddSocialToUsers < ActiveRecord::Migration
1
+ class AddSocialToUsers < ActiveRecord::Migration[4.2]
2
2
  def self.up
3
3
  add_column :users, :facebook_handle, :string
4
4
  add_column :users, :twitter_handle, :string
@@ -1,4 +1,4 @@
1
- class AddLdapAttrsToUser < ActiveRecord::Migration
1
+ class AddLdapAttrsToUser < ActiveRecord::Migration[4.2]
2
2
  def self.up
3
3
  add_column :users, :display_name, :string
4
4
  add_column :users, :address, :string
@@ -1,4 +1,4 @@
1
- class AddAvatarsToUsers < ActiveRecord::Migration
1
+ class AddAvatarsToUsers < ActiveRecord::Migration[4.2]
2
2
  def self.up
3
3
  add_column :users, "avatar_file_name", :string
4
4
  add_column :users, "avatar_content_type", :string
@@ -1,4 +1,4 @@
1
- class CreateTrophies < ActiveRecord::Migration
1
+ class CreateTrophies < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :trophies do |t|
4
4
  t.integer :user_id
@@ -1,4 +1,4 @@
1
- class AddLinkedinToUsers < ActiveRecord::Migration
1
+ class AddLinkedinToUsers < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :users, :linkedin_handle, :string
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateTinymceAssets < ActiveRecord::Migration
1
+ class CreateTinymceAssets < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :tinymce_assets do |t|
4
4
  t.string :file
@@ -1,4 +1,4 @@
1
- class CreateContentBlocks < ActiveRecord::Migration
1
+ class CreateContentBlocks < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :content_blocks do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreateFeaturedWorks < ActiveRecord::Migration
1
+ class CreateFeaturedWorks < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :featured_works do |t|
4
4
  t.integer :order, default: 5
@@ -1,4 +1,4 @@
1
- class AddExternalKeyToContentBlocks < ActiveRecord::Migration
1
+ class AddExternalKeyToContentBlocks < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :content_blocks, :external_key, :string
4
4
  remove_index :content_blocks, :name
@@ -1,4 +1,4 @@
1
- class CreateProxyDepositRights < ActiveRecord::Migration
1
+ class CreateProxyDepositRights < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :proxy_deposit_rights do |t|
4
4
  t.references :grantor
@@ -1,4 +1,4 @@
1
- class CreateProxyDepositRequests < ActiveRecord::Migration
1
+ class CreateProxyDepositRequests < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :proxy_deposit_requests do |t|
4
4
  t.string :generic_file_id, null: false
@@ -1,4 +1,4 @@
1
- class CreateFileViewStats < ActiveRecord::Migration
1
+ class CreateFileViewStats < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :file_view_stats do |t|
4
4
  t.datetime :date
@@ -1,4 +1,4 @@
1
- class CreateFileDownloadStats < ActiveRecord::Migration
1
+ class CreateFileDownloadStats < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :file_download_stats do |t|
4
4
  t.datetime :date
@@ -1,4 +1,4 @@
1
- class AddOrcidToUsers < ActiveRecord::Migration
1
+ class AddOrcidToUsers < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :users, :orcid, :string
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateUserStats < ActiveRecord::Migration
1
+ class CreateUserStats < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :user_stats do |t|
4
4
  t.integer :user_id
@@ -1,4 +1,4 @@
1
- class CreateWorkViewStats < ActiveRecord::Migration
1
+ class CreateWorkViewStats < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :work_view_stats do |t|
4
4
  t.datetime :date
@@ -1,4 +1,4 @@
1
- class AddWorksToUserStats < ActiveRecord::Migration
1
+ class AddWorksToUserStats < ActiveRecord::Migration[4.2]
2
2
  def self.up
3
3
  add_column :user_stats, :work_views, :integer
4
4
  add_column :work_view_stats, :user_id, :integer
@@ -1,4 +1,4 @@
1
- class ChangeTrophyGenericFileIdToWorkId < ActiveRecord::Migration
1
+ class ChangeTrophyGenericFileIdToWorkId < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  rename_column :trophies, :generic_file_id, :work_id
4
4
  end
@@ -1,4 +1,4 @@
1
- class ChangeProxyDepositGenericFileIdToWorkId < ActiveRecord::Migration
1
+ class ChangeProxyDepositGenericFileIdToWorkId < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  rename_column :proxy_deposit_requests, :generic_file_id, :work_id
4
4
  end
@@ -1,4 +1,4 @@
1
- class ChangeAuditLogGenericFileIdToFileSetId < ActiveRecord::Migration
1
+ class ChangeAuditLogGenericFileIdToFileSetId < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  rename_column :checksum_audit_logs, :generic_file_id, :file_set_id unless ChecksumAuditLog.column_names.include?('file_set_id')
4
4
  end
@@ -1,4 +1,4 @@
1
- class ChangeProxyDepositRequestGenericFileIdToWorkId < ActiveRecord::Migration
1
+ class ChangeProxyDepositRequestGenericFileIdToWorkId < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  rename_column :proxy_deposit_requests, :generic_file_id, :generic_id if ProxyDepositRequest.column_names.include?('generic_file_id')
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateUploadedFiles < ActiveRecord::Migration
1
+ class CreateUploadedFiles < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :uploaded_files do |t|
4
4
  t.string :file
@@ -1,4 +1,4 @@
1
- class CreateFeatures < ActiveRecord::Migration
1
+ class CreateFeatures < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :hyrax_features do |t|
4
4
  t.string :key, null: false
@@ -1,4 +1,4 @@
1
- class CreateOperations < ActiveRecord::Migration
1
+ class CreateOperations < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :curation_concerns_operations do |t|
4
4
  t.string :status
@@ -1,4 +1,4 @@
1
- class ChangeFeaturedWorkGenericFileIdToWorkId < ActiveRecord::Migration
1
+ class ChangeFeaturedWorkGenericFileIdToWorkId < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  return unless column_exists?(:featured_works, :generic_file_id)
4
4
  rename_column :featured_works, :generic_file_id, :work_id
@@ -1,4 +1,4 @@
1
- class AddArkivoToUsers < ActiveRecord::Migration
1
+ class AddArkivoToUsers < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :users, :arkivo_token, :string
4
4
  add_column :users, :arkivo_subscription, :string
@@ -1,4 +1,4 @@
1
- class CreateSipity < ActiveRecord::Migration
1
+ class CreateSipity < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table "sipity_notification_recipients" do |t|
4
4
  t.integer "notification_id", null: false
@@ -1,4 +1,4 @@
1
- class CreateSipityWorkflowMethods < ActiveRecord::Migration
1
+ class CreateSipityWorkflowMethods < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :sipity_workflow_methods do |t|
4
4
  t.string "service_name", null: false
@@ -1,4 +1,4 @@
1
- class CreatePermissionTemplate < ActiveRecord::Migration
1
+ class CreatePermissionTemplate < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :permission_templates do |t|
4
4
  t.belongs_to :workflow
@@ -1,4 +1,4 @@
1
- class CreatePermissionTemplateAccess < ActiveRecord::Migration
1
+ class CreatePermissionTemplateAccess < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :permission_template_accesses do |t|
4
4
  t.references :permission_template, foreign_key: true
@@ -1,4 +1,4 @@
1
- class AddReleaseToPermissionTemplates < ActiveRecord::Migration
1
+ class AddReleaseToPermissionTemplates < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :permission_templates, :release_date, :date
4
4
  add_column :permission_templates, :release_period, :string
@@ -1,4 +1,4 @@
1
- class AddPermissionTemplateToSipityWorkflow < ActiveRecord::Migration
1
+ class AddPermissionTemplateToSipityWorkflow < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :sipity_workflows, :permission_template_id, :integer, index: true
4
4
  remove_index :sipity_workflows, :name
@@ -1,4 +1,4 @@
1
- class TidyUpBecauseOfBadException < ActiveRecord::Migration
1
+ class TidyUpBecauseOfBadException < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  if Hyrax::PermissionTemplate.column_names.include?('workflow_id')
4
4
  Hyrax::PermissionTemplate.all.each do |permission_template|
@@ -1,4 +1,4 @@
1
- class AddAllowsAccessGrantToWorkflow < ActiveRecord::Migration
1
+ class AddAllowsAccessGrantToWorkflow < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :sipity_workflows, :allows_access_grant, :boolean
4
4
  end
@@ -56,7 +56,7 @@ Gem::Specification.new do |spec|
56
56
  spec.add_dependency 'dry-validation', '~> 0.9'
57
57
  spec.add_dependency 'dry-equalizer', '~> 0.2'
58
58
  spec.add_dependency 'dry-struct', '~> 0.1'
59
- spec.add_dependency 'active_attr', '~> 0.9.0'
59
+ spec.add_dependency 'active_attr', '~> 0.9'
60
60
  spec.add_dependency 'redlock', '~> 0.1.2'
61
61
  spec.add_dependency 'retriable', '>= 2.9', '< 4.0'
62
62
  spec.add_dependency 'active-fedora', '>= 11.1.3'
@@ -23,7 +23,7 @@ module Hyrax
23
23
  13. Installs hyrax assets
24
24
  14. Updates simple_form to use browser validations
25
25
  15. Installs Blacklight gallery (and removes it's scss)
26
- 16. Runs the jquery-datatables generator
26
+ 16. Install jquery-datatables
27
27
  17. Initializes the active-fedora_noid database-backed minter
28
28
  18. Adds configuration to config/application.rb to fix tinymce asset compiling
29
29
  """
@@ -143,7 +143,23 @@ module Hyrax
143
143
  end
144
144
 
145
145
  def datatables
146
- generate 'jquery:datatables:install bootstrap3'
146
+ javascript_manifest = 'app/assets/javascripts/application.js'
147
+ # Generator is broken https://github.com/rweng/jquery-datatables-rails/issues/225
148
+ # generate 'jquery:datatables:install bootstrap3'
149
+ insert_into_file javascript_manifest, after: /jquery.?\n/ do
150
+ "//= require jquery_ujs\n" \
151
+ "//= require dataTables/jquery.dataTables\n" \
152
+ "//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap\n"
153
+ end
154
+
155
+ # This is only necessary for Rails 5.1 and hopefully is temporary.
156
+ # There was some trouble getting the file-manager javascript (remote forms) to work well
157
+ # with rails-ujs. Note jquery_ujs was added to the block above (after jQuery)
158
+ gsub_file javascript_manifest, 'require rails-ujs', ''
159
+
160
+ insert_into_file 'app/assets/stylesheets/application.css', before: ' *= require_self' do
161
+ " *= require dataTables/bootstrap/3/jquery.dataTables.bootstrap\n"
162
+ end
147
163
  end
148
164
 
149
165
  def af_noid_database_minter_initialize
@@ -1,3 +1,3 @@
1
1
  module Hyrax
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
@@ -9,9 +9,9 @@ describe Hyrax::CreateWithFilesActor do
9
9
  Hyrax::Actors::ActorStack.new(work, ::Ability.new(user), [described_class])
10
10
  end
11
11
  let(:user) { create(:user) }
12
- let(:uploaded_file1) { Hyrax::UploadedFile.create(user: user) }
13
- let(:uploaded_file2) { Hyrax::UploadedFile.create(user: user) }
14
12
  let(:work) { create(:generic_work, user: user) }
13
+ let(:uploaded_file1) { create(:uploaded_file, user: user) }
14
+ let(:uploaded_file2) { create(:uploaded_file, user: user) }
15
15
  let(:uploaded_file_ids) { [uploaded_file1.id, uploaded_file2.id] }
16
16
  let(:attributes) { { uploaded_files: uploaded_file_ids } }
17
17
 
@@ -38,7 +38,7 @@ describe Hyrax::CreateWithFilesActor do
38
38
  end
39
39
 
40
40
  context "when uploaded_file_ids don't belong to me" do
41
- let(:uploaded_file2) { Hyrax::UploadedFile.create }
41
+ let(:uploaded_file2) { create(:uploaded_file) }
42
42
  it "doesn't attach files" do
43
43
  expect(AttachFilesToWorkJob).not_to receive(:perform_later)
44
44
  expect(actor.public_send(mode, attributes)).to be false
@@ -113,18 +113,18 @@ describe CatalogController, type: :controller do
113
113
  edit_access_person_ssim: [user.user_key] }
114
114
  end
115
115
 
116
- it "finds work and work that contains file with title" do
117
- get :index, params: { q: 'find me' }
116
+ it "finds a work and a work that contains a file set with a matching title" do
117
+ get :index, params: { q: 'find me', search_field: 'all_fields' }
118
118
  expect(assigns(:document_list).map(&:id)).to contain_exactly(work1[:id], work2[:id])
119
119
  end
120
120
 
121
- it "finds work that contains file with title" do
122
- get :index, params: { q: 'other file' }
121
+ it "finds a work that contains a file set with a matching title" do
122
+ get :index, params: { q: 'other file', search_field: 'all_fields' }
123
123
  expect(assigns(:document_list).map(&:id)).to contain_exactly(work1[:id])
124
124
  end
125
125
 
126
- it "finds work with title" do
127
- get :index, params: { q: 'me too' }
126
+ it "finds a work with a matching title" do
127
+ get :index, params: { q: 'me too', search_field: 'all_fields' }
128
128
  expect(assigns(:document_list).map(&:id)).to contain_exactly(work1[:id])
129
129
  end
130
130
  end
@@ -26,7 +26,7 @@ describe Hyrax::UploadsController do
26
26
 
27
27
  describe "#destroy" do
28
28
  let(:file) { File.open(fixture_path + '/world.png') }
29
- let(:uploaded_file) { Hyrax::UploadedFile.create(file: file, user: user) }
29
+ let(:uploaded_file) { create(:uploaded_file, file: file, user: user) }
30
30
 
31
31
  context "when signed in" do
32
32
  before do
@@ -39,9 +39,12 @@ describe Hyrax::UploadsController do
39
39
  expect(File.exist?(uploaded_file.file.file.file)).to be false
40
40
  end
41
41
 
42
- it "doesn't destroy files that don't belong to me" do
43
- delete :destroy, params: { id: Hyrax::UploadedFile.create(file: file) }
44
- expect(response.status).to eq 401
42
+ context "for a file that doesn't belong to me" do
43
+ let(:uploaded_file) { create(:uploaded_file, file: file) }
44
+ it "doesn't destroy" do
45
+ delete :destroy, params: { id: uploaded_file }
46
+ expect(response.status).to eq 401
47
+ end
45
48
  end
46
49
  end
47
50
 
@@ -3,13 +3,13 @@ require 'spec_helper'
3
3
  RSpec.describe 'PowerConverter', no_clean: true do
4
4
  context 'sipity_workflow_state' do
5
5
  let(:workflow_state) { Sipity::WorkflowState.new(id: 1, name: 'hello') }
6
- let(:workflow) { Sipity::Workflow.new(id: 2, name: 'workflow') }
6
+ let(:workflow) { create(:workflow) }
7
7
  it 'will convert a Sipity::WorkflowState' do
8
8
  expect(PowerConverter.convert(workflow_state, to: :sipity_workflow_state)).to eq(workflow_state)
9
9
  end
10
10
 
11
11
  it 'will convert a string based on scope' do
12
- Sipity::WorkflowState.create!(workflow_id: workflow.id, name: 'hello')
12
+ create(:workflow_state, workflow_id: workflow.id, name: 'hello')
13
13
  PowerConverter.convert('hello', scope: workflow, to: :sipity_workflow_state)
14
14
  end
15
15
 
@@ -0,0 +1,5 @@
1
+ FactoryGirl.define do
2
+ factory :uploaded_file, class: Hyrax::UploadedFile do
3
+ user
4
+ end
5
+ end
@@ -0,0 +1,23 @@
1
+ RSpec.feature 'Deleting a work', type: :feature do
2
+ let(:user) { create(:user) }
3
+ let(:work) { build(:work, user: user) }
4
+ let(:file_set) { create(:file_set, user: user, title: ['ABC123xyz']) }
5
+ let(:file) { File.open(fixture_path + '/world.png') }
6
+
7
+ before do
8
+ sign_in user
9
+ Hydra::Works::AddFileToFileSet.call(file_set, file, :original_file)
10
+ work.ordered_members << file_set
11
+ work.read_groups = []
12
+ work.save!
13
+ end
14
+
15
+ context 'After deleting a work from the work show page' do
16
+ it 'redirects to my dashboard' do
17
+ visit hyrax_generic_work_path(work)
18
+ click_on('Delete', match: :first)
19
+ expect(page).to have_current_path(hyrax.dashboard_works_path, only_path: true)
20
+ expect(page).to have_content 'Deleted Test title'
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,5 @@
1
+ schema_org:
2
+ name:
3
+ type: "http://schema.org/Person"
4
+ property: name
5
+ value: firstName
@@ -2,8 +2,8 @@ describe AttachFilesToWorkJob do
2
2
  context "happy path" do
3
3
  let(:file1) { File.open(fixture_path + '/world.png') }
4
4
  let(:file2) { File.open(fixture_path + '/image.jp2') }
5
- let(:uploaded_file1) { Hyrax::UploadedFile.create(file: file1) }
6
- let(:uploaded_file2) { Hyrax::UploadedFile.create(file: file2) }
5
+ let(:uploaded_file1) { build(:uploaded_file, file: file1) }
6
+ let(:uploaded_file2) { build(:uploaded_file, file: file2) }
7
7
  let(:generic_work) { create(:public_generic_work) }
8
8
 
9
9
  context "with uploaded files on the filesystem" do
@@ -66,30 +66,31 @@ describe CreateDerivativesJob do
66
66
 
67
67
  context "with a pdf file" do
68
68
  let(:file_set) { create(:file_set) }
69
- let(:params) { { qt: "search", q: "CutePDF", qf: "all_text_timv" } }
70
69
 
71
70
  let(:file) do
72
- Hydra::PCDM::File.new.tap do |f|
73
- f.content = File.open(File.join(fixture_path, "hyrax/hyrax_test4.pdf")).read
71
+ Hydra::PCDM::File.new do |f|
72
+ f.content = File.open(File.join(fixture_path, "hyrax/hyrax_test4.pdf"))
74
73
  f.original_name = 'test.pdf'
75
- f.save!
74
+ f.mime_type = 'application/pdf'
76
75
  end
77
76
  end
78
77
 
79
- let(:search_response) do
80
- Blacklight::Solr::Response.new(
81
- Blacklight.default_index.connection.get("select", params: params),
82
- params
83
- )
84
- end
85
-
86
78
  before do
87
- allow(file_set).to receive(:mime_type).and_return('application/pdf')
88
- described_class.perform_now(file_set, file.id)
79
+ file_set.original_file = file
80
+ file_set.save!
89
81
  end
90
82
 
91
- it "searches the extracted content" do
92
- expect(search_response.documents.count).to eq(1)
83
+ it "runs a full text extract" do
84
+ expect(Hydra::Derivatives::PdfDerivatives).to receive(:create)
85
+ .with(/test\.pdf/, outputs: [{ label: :thumbnail,
86
+ format: 'jpg',
87
+ size: '338x493',
88
+ url: String }])
89
+ expect(Hydra::Derivatives::FullTextExtract).to receive(:create)
90
+ .with(/test\.pdf/, outputs: [{ url: RDF::URI,
91
+ container: "extracted_text" }])
92
+
93
+ described_class.perform_now(file_set, file.id)
93
94
  end
94
95
  end
95
96
  end
@@ -18,8 +18,9 @@ module Sipity
18
18
 
19
19
  describe '#proxy_for' do
20
20
  let(:work) { FactoryGirl.create(:generic_work) }
21
+ let(:entity) { Sipity::Entity.new(proxy_for_global_id: work.to_global_id) }
22
+
21
23
  it 'will retrieve based on a GlobalID of the object' do
22
- entity = Sipity::Entity.create!(proxy_for_global_id: work.to_global_id, workflow_state_id: 1, workflow_id: 2)
23
24
  expect(entity.proxy_for).to eq(work)
24
25
  end
25
26
  end
@@ -5,8 +5,8 @@ module Sipity
5
5
  its(:column_names) { is_expected.to include("name") }
6
6
 
7
7
  describe "#entities" do
8
- let(:workflow_state) { described_class.create name: 'test', workflow_id: 'abc123' }
9
- let!(:entity) { Sipity::Entity.create(workflow_state: workflow_state, proxy_for_global_id: "abc123", workflow_id: workflow_state.workflow_id) }
8
+ let(:workflow_state) { create(:workflow_state, name: 'test') }
9
+ let!(:entity) { Sipity::Entity.create!(workflow_state: workflow_state, proxy_for_global_id: "abc123", workflow_id: workflow_state.workflow_id) }
10
10
  it "has entites" do
11
11
  expect(workflow_state.entities).to match_array([entity])
12
12
  end
@@ -3,14 +3,14 @@ require 'spec_helper'
3
3
  describe Hyrax::Renderers::AttributeRenderer do
4
4
  let(:field) { :name }
5
5
  let(:renderer) { described_class.new(field, ['Bob', 'Jessica']) }
6
- let(:yml_path) { File.join(fixture_path, 'locales', '*.{rb,yml}') }
6
+ let(:yml_path) { File.join(fixture_path, 'config', 'schema_org.{yml}') }
7
7
  before do
8
- I18n.load_path += Dir[yml_path]
9
- I18n.reload!
8
+ Hyrax::Microdata.load_path += Dir[yml_path]
9
+ Hyrax::Microdata.reload!
10
10
  end
11
11
  after do
12
- I18n.load_path -= Dir[yml_path]
13
- I18n.reload!
12
+ Hyrax::Microdata.load_path -= Dir[yml_path]
13
+ Hyrax::Microdata.reload!
14
14
  end
15
15
 
16
16
  describe "#attribute_to_html" do
@@ -2,7 +2,7 @@ describe Hyrax::CatalogSearchBuilder do
2
2
  let(:context) { double }
3
3
  let(:builder) { described_class.new(context).with(blacklight_params) }
4
4
  let(:solr_params) { Blacklight::Solr::Request.new }
5
- let(:blacklight_params) { { q: user_query } }
5
+ let(:blacklight_params) { { q: user_query, search_field: 'all_fields' } }
6
6
  let(:user_query) { "find me" }
7
7
 
8
8
  describe "#show_works_or_works_that_contain_files" do
@@ -8,9 +8,9 @@ RSpec.describe Hyrax::Workflow::ActionTakenService do
8
8
 
9
9
  let(:triggered_methods) { [instance_double(Sipity::Method, service_name: 'FooBar')] }
10
10
  let(:triggered_methods_rel) do
11
- instance_double(Sipity::Method::ActiveRecord_Relation,
12
- order: triggered_methods,
13
- any?: true)
11
+ double('Sipity::Method::ActiveRecord_Relation',
12
+ order: triggered_methods,
13
+ any?: true)
14
14
  end
15
15
  let(:work) { instance_double(GenericWork, id: '9999') }
16
16
  let(:action) { instance_double(Sipity::WorkflowAction, triggered_methods: triggered_methods_rel) }
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  module Hyrax
3
3
  module Workflow
4
4
  RSpec.describe NotificationGenerator, no_clean: true do
5
- let(:workflow) { Sipity::Workflow.new(id: 1) }
5
+ let(:workflow) { create(:workflow) }
6
6
  let(:recipients) { { to: 'creating_user', cc: 'advising', bcc: "data_observing" } }
7
7
 
8
8
  context '#call' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyrax
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2017-05-24 00:00:00.000000000 Z
17
+ date: 2017-06-30 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: hydra-head
@@ -566,14 +566,14 @@ dependencies:
566
566
  requirements:
567
567
  - - "~>"
568
568
  - !ruby/object:Gem::Version
569
- version: 0.9.0
569
+ version: '0.9'
570
570
  type: :runtime
571
571
  prerelease: false
572
572
  version_requirements: !ruby/object:Gem::Requirement
573
573
  requirements:
574
574
  - - "~>"
575
575
  - !ruby/object:Gem::Version
576
- version: 0.9.0
576
+ version: '0.9'
577
577
  - !ruby/object:Gem::Dependency
578
578
  name: redlock
579
579
  requirement: !ruby/object:Gem::Requirement
@@ -1442,6 +1442,7 @@ files:
1442
1442
  - app/services/hyrax/lock_manager.rb
1443
1443
  - app/services/hyrax/lockable.rb
1444
1444
  - app/services/hyrax/message_user_service.rb
1445
+ - app/services/hyrax/microdata.rb
1445
1446
  - app/services/hyrax/noid.rb
1446
1447
  - app/services/hyrax/parent_service.rb
1447
1448
  - app/services/hyrax/persist_derivatives.rb
@@ -1829,6 +1830,7 @@ files:
1829
1830
  - config/locales/hyrax.zh.yml
1830
1831
  - config/locales/simple_form.en.yml
1831
1832
  - config/routes.rb
1833
+ - config/schema_org.yml
1832
1834
  - db/migrate/20160328222152_create_version_committers.rb
1833
1835
  - db/migrate/20160328222153_create_checksum_audit_logs.rb
1834
1836
  - db/migrate/20160328222154_create_single_use_links.rb
@@ -2081,6 +2083,7 @@ files:
2081
2083
  - spec/factories/proxy_deposit_requests.rb
2082
2084
  - spec/factories/single_use_links.rb
2083
2085
  - spec/factories/sipity_entities.rb
2086
+ - spec/factories/uploaded_files.rb
2084
2087
  - spec/factories/users.rb
2085
2088
  - spec/factories/workflow_actions.rb
2086
2089
  - spec/factories/workflow_states.rb
@@ -2097,6 +2100,7 @@ files:
2097
2100
  - spec/features/contact_form_spec.rb
2098
2101
  - spec/features/create_child_work_spec.rb
2099
2102
  - spec/features/create_work_spec.rb
2103
+ - spec/features/delete_work_spec.rb
2100
2104
  - spec/features/display_dashboard_spec.rb
2101
2105
  - spec/features/edit_file_spec.rb
2102
2106
  - spec/features/edit_work_spec.rb
@@ -2117,6 +2121,7 @@ files:
2117
2121
  - spec/fixtures/Example.ogg
2118
2122
  - spec/fixtures/authorities/licenses.yml
2119
2123
  - spec/fixtures/charter.docx
2124
+ - spec/fixtures/config/schema_org.yml
2120
2125
  - spec/fixtures/countdown.avi
2121
2126
  - spec/fixtures/docx_fits.xml
2122
2127
  - spec/fixtures/dublin_core_rdf_descMetadata.nt
@@ -2130,7 +2135,6 @@ files:
2130
2135
  - spec/fixtures/image.png
2131
2136
  - spec/fixtures/jp2_fits.xml
2132
2137
  - spec/fixtures/jpg_fits.xml
2133
- - spec/fixtures/locales/renderer.en.yml
2134
2138
  - spec/fixtures/mp3_fits.xml
2135
2139
  - spec/fixtures/pdf_fits.xml
2136
2140
  - spec/fixtures/piano_note.wav
@@ -2559,7 +2563,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2559
2563
  version: '0'
2560
2564
  requirements: []
2561
2565
  rubyforge_project:
2562
- rubygems_version: 2.6.12
2566
+ rubygems_version: 2.6.8
2563
2567
  signing_key:
2564
2568
  specification_version: 4
2565
2569
  summary: Hyrax is a front-end based on the robust Hydra framework, providing a user
@@ -2668,6 +2672,7 @@ test_files:
2668
2672
  - spec/factories/proxy_deposit_requests.rb
2669
2673
  - spec/factories/single_use_links.rb
2670
2674
  - spec/factories/sipity_entities.rb
2675
+ - spec/factories/uploaded_files.rb
2671
2676
  - spec/factories/users.rb
2672
2677
  - spec/factories/workflow_actions.rb
2673
2678
  - spec/factories/workflow_states.rb
@@ -2684,6 +2689,7 @@ test_files:
2684
2689
  - spec/features/contact_form_spec.rb
2685
2690
  - spec/features/create_child_work_spec.rb
2686
2691
  - spec/features/create_work_spec.rb
2692
+ - spec/features/delete_work_spec.rb
2687
2693
  - spec/features/display_dashboard_spec.rb
2688
2694
  - spec/features/edit_file_spec.rb
2689
2695
  - spec/features/edit_work_spec.rb
@@ -2704,6 +2710,7 @@ test_files:
2704
2710
  - spec/fixtures/Example.ogg
2705
2711
  - spec/fixtures/authorities/licenses.yml
2706
2712
  - spec/fixtures/charter.docx
2713
+ - spec/fixtures/config/schema_org.yml
2707
2714
  - spec/fixtures/countdown.avi
2708
2715
  - spec/fixtures/docx_fits.xml
2709
2716
  - spec/fixtures/dublin_core_rdf_descMetadata.nt
@@ -2717,7 +2724,6 @@ test_files:
2717
2724
  - spec/fixtures/image.png
2718
2725
  - spec/fixtures/jp2_fits.xml
2719
2726
  - spec/fixtures/jpg_fits.xml
2720
- - spec/fixtures/locales/renderer.en.yml
2721
2727
  - spec/fixtures/mp3_fits.xml
2722
2728
  - spec/fixtures/pdf_fits.xml
2723
2729
  - spec/fixtures/piano_note.wav
@@ -1,7 +0,0 @@
1
- en:
2
- hyrax:
3
- schema_org:
4
- name:
5
- type: "http://schema.org/Person"
6
- property: name
7
- value: firstName