hyrax 2.9.4 → 2.9.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
  SHA256:
3
- metadata.gz: f943e7915f659dabbc79d757e34334d8eb602fd0a25d663ccaffd6e4d5427cab
4
- data.tar.gz: dc220a862725eaf06e8bf6b3d2c7196aa1c7aca72d63f950d4ace93aab4cc544
3
+ metadata.gz: '0148443e7ca6987d77b7ccbad46c89c895ae60e226565819b095293884c040cc'
4
+ data.tar.gz: 5a2cfda462e5415dc6c736dcbaaf4bb7b7a202fa0afe54c2819026f4559d7942
5
5
  SHA512:
6
- metadata.gz: 8511afa746c378d0b697ea488aae0811e0cd93c6e055d23b063a75f5611cbc6d99004d134bafb19f285a20b160b5c37cc3ce5625a484964d7d91d4ca4d72e7d9
7
- data.tar.gz: 43efe3c7bfc349a2aa113c18d2f507da53a8d6fd9e1ceb677f028577e832469740cff247ef3fd3e7a4f8b9b136aed595ef1bfda2a3a1fc3146bab365b97a0a46
6
+ metadata.gz: faaee31b6dec44292d47981fe77d22bc9f8f40865670b9f2b1a470aca00b10193cb01931c1084a9622cb3a4e6fca5803c1b6a8a77965dca75619cc59f5da1d67
7
+ data.tar.gz: b3232036171e55e8166da5d4886d52b91fe6ce3f0c05018508deee6b594491df87b0d7b925b477e4d8a6a5134c0233026433d4df47d9902c28e074614dd3e18d
data/.circleci/config.yml CHANGED
@@ -12,7 +12,7 @@ jobs:
12
12
  default: 1.17.3
13
13
  rails_version:
14
14
  type: string
15
- default: '5.2.4.3'
15
+ default: '5.2.6'
16
16
  executor:
17
17
  name: 'samvera/ruby'
18
18
  ruby_version: << parameters.ruby_version >>
@@ -57,7 +57,7 @@ jobs:
57
57
  default: 1.17.3
58
58
  rails_version:
59
59
  type: string
60
- default: '5.2.4.3'
60
+ default: '5.2.6'
61
61
  executor:
62
62
  name: 'samvera/ruby'
63
63
  ruby_version: << parameters.ruby_version >>
@@ -136,10 +136,10 @@ workflows:
136
136
  jobs:
137
137
  - bundle:
138
138
  ruby_version: "2.5.8"
139
- rails_version: "5.2.4.3"
139
+ rails_version: "5.2.6"
140
140
  - build:
141
141
  ruby_version: "2.5.8"
142
- rails_version: "5.2.4.3"
142
+ rails_version: "5.2.6"
143
143
  requires:
144
144
  - bundle
145
145
  - test:
@@ -151,10 +151,10 @@ workflows:
151
151
  jobs:
152
152
  - bundle:
153
153
  ruby_version: "2.6.6"
154
- rails_version: "5.2.4.3"
154
+ rails_version: "5.2.6"
155
155
  - build:
156
156
  ruby_version: "2.6.6"
157
- rails_version: "5.2.4.3"
157
+ rails_version: "5.2.6"
158
158
  requires:
159
159
  - bundle
160
160
  - test:
@@ -166,11 +166,11 @@ workflows:
166
166
  jobs:
167
167
  - bundle:
168
168
  ruby_version: "2.7.1"
169
- rails_version: "5.2.4.3"
169
+ rails_version: "5.2.6"
170
170
  bundler_version: "2.1.2"
171
171
  - build:
172
172
  ruby_version: "2.7.1"
173
- rails_version: "5.2.4.3"
173
+ rails_version: "5.2.6"
174
174
  bundler_version: "2.1.2"
175
175
  requires:
176
176
  - bundle
data/README.md CHANGED
@@ -158,7 +158,7 @@ NOTE: The steps need to be done in order to create a new Hyrax based app.
158
158
  Generate a new Rails application using the template.
159
159
 
160
160
  ```
161
- rails _5.2.4.4_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v2.9.4/template.rb
161
+ rails _5.2.6_ new my_app -m https://raw.githubusercontent.com/samvera/hyrax/v2.9.5/template.rb
162
162
  ```
163
163
 
164
164
  Generating a new Rails application using Hyrax's template above takes cares of a number of steps for you, including:
@@ -73,7 +73,7 @@ module Hyrax
73
73
  ids = PermissionTemplateAccess.for_user(ability: self,
74
74
  access: ['deposit', 'manage'])
75
75
  .joins(:permission_template)
76
- .pluck('DISTINCT source_id')
76
+ .pluck(Arel.sql('DISTINCT source_id'))
77
77
  query = "_query_:\"{!raw f=has_model_ssim}AdminSet\" AND {!terms f=id}#{ids.join(',')}"
78
78
  ActiveFedora::SolrService.count(query).positive?
79
79
  end
@@ -67,7 +67,7 @@ module Hyrax
67
67
  end
68
68
 
69
69
  def file_size
70
- self[Solrizer.solr_name("file_size")]
70
+ self["file_size_lts"]
71
71
  end
72
72
 
73
73
  def filename
@@ -13,7 +13,7 @@ module Hyrax
13
13
  # If calling from Abilities, pass the ability. If you try to get the ability from the user, you end up in an infinit loop.
14
14
  def self.collection_type_ids_for_user(roles:, user: nil, ability: nil)
15
15
  return false unless user.present? || ability.present?
16
- return Hyrax::CollectionType.all.pluck('DISTINCT id') if user_admin?(user, ability)
16
+ return Hyrax::CollectionType.all.pluck(Arel.sql('DISTINCT id')) if user_admin?(user, ability)
17
17
  Hyrax::CollectionTypeParticipant.where(agent_type: Hyrax::CollectionTypeParticipant::USER_TYPE,
18
18
  agent_id: user_id(user, ability),
19
19
  access: roles)
@@ -21,7 +21,7 @@ module Hyrax
21
21
  Hyrax::CollectionTypeParticipant.where(agent_type: Hyrax::CollectionTypeParticipant::GROUP_TYPE,
22
22
  agent_id: user_groups(user, ability),
23
23
  access: roles)
24
- ).pluck('DISTINCT hyrax_collection_type_id')
24
+ ).pluck(Arel.sql('DISTINCT hyrax_collection_type_id'))
25
25
  end
26
26
 
27
27
  # @api public
@@ -174,7 +174,7 @@ module Hyrax
174
174
  def self.agent_ids_for(collection_type:, agent_type:, access:)
175
175
  Hyrax::CollectionTypeParticipant.where(hyrax_collection_type_id: collection_type.id,
176
176
  agent_type: agent_type,
177
- access: access).pluck('DISTINCT agent_id')
177
+ access: access).pluck(Arel.sql('DISTINCT agent_id'))
178
178
  end
179
179
  private_class_method :agent_ids_for
180
180
 
@@ -13,7 +13,7 @@ module Hyrax
13
13
  def self.source_ids_for_user(access:, ability:, source_type: nil, exclude_groups: [])
14
14
  scope = PermissionTemplateAccess.for_user(ability: ability, access: access, exclude_groups: exclude_groups)
15
15
  .joins(:permission_template)
16
- ids = scope.pluck('DISTINCT source_id')
16
+ ids = scope.pluck(Arel.sql('DISTINCT source_id'))
17
17
  return ids unless source_type
18
18
  filter_source(source_type: source_type, ids: ids)
19
19
  end
@@ -10,7 +10,7 @@ module Hyrax
10
10
 
11
11
  def show
12
12
  if parent_presenter
13
- polymorphic_path([:hyrax, :parent, presenter.model_name.singular],
13
+ polymorphic_path([:hyrax, :parent, presenter.model_name.singular.to_sym],
14
14
  parent_id: parent_presenter.id,
15
15
  id: presenter.id)
16
16
  else
@@ -24,7 +24,7 @@ HTML Properties:
24
24
  </div>
25
25
  <div class="message has-warning hidden"></div>
26
26
  <div style="margin-top: 10px">
27
- <%= link_to t('.attach_new_work'), polymorphic_path([main_app, :new, :hyrax, :parent, curation_concern.model_name.singular], parent_id: curation_concern.id), target: "_blank", class: 'btn btn-primary' %>
27
+ <%= link_to t('.attach_new_work'), polymorphic_path([main_app, :new, :hyrax, :parent, curation_concern.model_name.singular.to_sym], parent_id: curation_concern.id), target: "_blank", class: 'btn btn-primary' %>
28
28
  </div>
29
29
  <table class="table table-striped">
30
30
  <caption><%= t('.caption') %></caption>
@@ -1,3 +1,5 @@
1
1
  <%= f.full_error(:visibility) %>
2
2
  <%= f.full_error(:embargo_release_date) %>
3
3
  <%= f.full_error(:visibility_after_embargo) %>
4
+ <%= f.full_error(:lease_expiration_date) %>
5
+ <%= f.full_error(:visibility_after_lease) %>
@@ -15,7 +15,7 @@
15
15
  <ul class="dropdown-menu">
16
16
  <% presenter.valid_child_concerns.each do |concern| %>
17
17
  <li>
18
- <%= link_to "Attach #{concern.human_readable_type}", polymorphic_path([main_app, :new, :hyrax, :parent, concern.model_name.singular], parent_id: presenter.id) %>
18
+ <%= link_to "Attach #{concern.human_readable_type}", polymorphic_path([main_app, :new, :hyrax, :parent, concern.model_name.singular.to_sym], parent_id: presenter.id) %>
19
19
  </li>
20
20
  <% end %>
21
21
  </ul>
@@ -7,7 +7,7 @@
7
7
  <% provide :files_tab do %>
8
8
  <p class="instructions"><%= t("hyrax.batch_uploads.files.instructions") %></p>
9
9
  <p class="switch-upload-type"><%= t("hyrax.batch_uploads.files.upload_type_instructions") %>
10
- <%= link_to t("hyrax.batch_uploads.files.button_label"), [main_app, :new, Hyrax.primary_work_type.model_name.singular_route_key] %>
10
+ <%= link_to t("hyrax.batch_uploads.files.button_label"), [main_app, :new, Hyrax.primary_work_type.model_name.singular_route_key.to_sym] %>
11
11
  </p>
12
12
  <% end %>
13
13
  <%= render 'hyrax/base/guts4form', f: f, tabs: form_tabs_for(form: f.object) %>
data/lib/hyrax/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hyrax
2
- VERSION = '2.9.4'.freeze
2
+ VERSION = '2.9.5'.freeze
3
3
  end
data/template.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # Hack for https://github.com/rails/rails/issues/35153
2
2
  gsub_file 'Gemfile', /^gem ["']sqlite3["']$/, 'gem "sqlite3", "~> 1.3.0"'
3
- gem 'hyrax', '2.9.4'
3
+ gem 'hyrax', '2.9.5'
4
4
  run 'bundle install'
5
5
  generate 'hyrax:install', '-f'
6
6
  rails_command 'db:migrate'
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: 2.9.4
4
+ version: 2.9.5
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: 2021-02-22 00:00:00.000000000 Z
17
+ date: 2021-05-07 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails
@@ -2473,7 +2473,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2473
2473
  - !ruby/object:Gem::Version
2474
2474
  version: '0'
2475
2475
  requirements: []
2476
- rubygems_version: 3.1.4
2476
+ rubygems_version: 3.1.6
2477
2477
  signing_key:
2478
2478
  specification_version: 4
2479
2479
  summary: Hyrax is a front-end based on the robust Samvera framework, providing a user