dog_biscuits 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71c03a6e89458b01913889f32d2b524be47258e9b88c707fd7e789b95d7aa1ee
4
- data.tar.gz: 0a4cb9cc5f6a6e0b7262dbe969b0f81c367498833e0f9b748a576f77b646aff4
3
+ metadata.gz: 375c9be3c1f6429e878c649a3d7f9659e3b0d101e7a153be791ef5626b5df1d3
4
+ data.tar.gz: '088f0fe542e0867a37c0e5d525ea6bbff4bbbcbbbc42ea7078efd7a9fd35d60d'
5
5
  SHA512:
6
- metadata.gz: 84362a1e341973479f6cf4996970c866dcc98e5c57090879b4d72ae5696f4e2f821f443876d77666f3f496fc59f0aa6b19881fac211531193ce5c30386aec10e
7
- data.tar.gz: 6f43da07453911a68d54d957dbf76ce2049ac5374e254b5feb93662d1467097223d4a11585e2eac4c7898c9d2139ac58641e1595e0410e92c722e862d5e1b79d
6
+ metadata.gz: d190891b7c3195b8286b5c86e3ea3cd4d593f0c84952d3f5163f0d43ee1937ce649532a5ff6158eb5fefdb02909ec3ed8f2006f531176300686c943499bb6d1f
7
+ data.tar.gz: 12448689b6c482409295b74143cf128f1e98b8c57dfb257ce24351ec20abcd5cb7600aa26f1b8bbf8db4b3cb58d44e8eb4e1f5540765c2885b22789f5d764711
data/.solr_wrapper ADDED
@@ -0,0 +1,3 @@
1
+ # Place any default configuration for solr_wrapper here
2
+ # temporary fix for solr_wrapper issue with solr8, remove once Hyrax updates active_fedora to 12.1*
3
+ version: 7.7.1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DogBiscuits
4
- VERSION = '0.5.6'
4
+ VERSION = '0.5.7'
5
5
  end
@@ -86,10 +86,6 @@ This generator makes the following changes to your application:
86
86
  generate 'dog_biscuits:schema_org', '-f'
87
87
  end
88
88
 
89
- def imagify
90
- generate "dog_biscuits:imagify #{class_name}", '-f' if File.exist?('config/initializers/version.rb') && File.read('config/initializers/version.rb').include?('Hyku')
91
- end
92
-
93
89
  def display_readme
94
90
  readme 'README'
95
91
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dog_biscuits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julie Allinson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-20 00:00:00.000000000 Z
11
+ date: 2019-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hyrax
@@ -212,6 +212,7 @@ files:
212
212
  - ".rspec"
213
213
  - ".rubocop.yml"
214
214
  - ".rubocop_todo.yml"
215
+ - ".solr_wrapper"
215
216
  - ".travis.yml"
216
217
  - CODE_OF_CONDUCT.md
217
218
  - CONTRIBUTING.md
@@ -434,7 +435,6 @@ files:
434
435
  - lib/generators/dog_biscuits/catalog_generator.rb
435
436
  - lib/generators/dog_biscuits/dates_generator.rb
436
437
  - lib/generators/dog_biscuits/generate_all_generator.rb
437
- - lib/generators/dog_biscuits/imagify_generator.rb
438
438
  - lib/generators/dog_biscuits/install_generator.rb
439
439
  - lib/generators/dog_biscuits/locales_generator.rb
440
440
  - lib/generators/dog_biscuits/presenter/presenter_generator.rb
@@ -1,67 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'rails/generators'
4
- require 'rails/generators/model_helpers'
5
-
6
- class DogBiscuits::ImagifyGenerator < Rails::Generators::NamedBase
7
- include Rails::Generators::ModelHelpers
8
- source_root File.expand_path('../templates', __FILE__)
9
-
10
- class_option :skipmodel, type: :boolean, default: false
11
-
12
- desc '
13
- This generator makes the following changes to your application:
14
- 1. If this is a Hyku application, enables UV / IIIF
15
- '
16
-
17
- def banner
18
- say_status("info", "Enabling UV / IIIF support for #{class_name}", :blue)
19
-
20
- if class_name == 'All'
21
- @models = DogBiscuits.config.selected_models.map(&:underscore)
22
- else
23
- if DogBiscuits.config.selected_models.include? class_name
24
- @models = [class_name.underscore]
25
- else
26
- say_status("error", "UNSUPPORTED MODEL. SUPPORTED MODELS ARE: #{DogBiscuits.config.available_models.collect { |m| m }.join(', ')}", :red)
27
- exit 0
28
- end
29
- end
30
- end
31
-
32
- # If this is a Hyku app, enable IIIF / UV rendering
33
- def image_ify_hyku
34
- @models.each do |model|
35
- next unless File.exist?('config/initializers/version.rb') && File.read('config/initializers/version.rb').include?('Hyku')
36
- model_injection = " include HasRendering"
37
- unless File.read("app/models/#{model}.rb").include? model_injection
38
- inject_into_file "app/models/#{model}.rb", after: 'WorkBehavior' do
39
- "\n#{model_injection}"
40
- end
41
- end
42
-
43
- # add 'rendering_ids' to the form
44
- form_injection = "self.terms += [:rendering_ids]"
45
- form_injection += "\n\n def secondary_terms"
46
- form_injection += "\n super - [:rendering_ids]"
47
- form_injection += "\n end"
48
- gsub_file "app/forms/hyrax/#{model}_form.rb", /self\.terms \+\= \[\]/, form_injection
49
-
50
- # change from WorkShowPresenter to ManifestEnabledWorkShowPresente
51
- presenter_injection = "Hyku::ManifestEnabledWorkShowPresenter"
52
- gsub_file "app/presenters/hyrax/#{model}_presenter.rb", /Hyrax::WorkShowPresenter/, presenter_injection
53
-
54
- # add Hyku::IIIFManifest to the controllers
55
- controller_injection = "\n\n include Hyku::IIIFManifest"
56
- unless File.read("app/controllers/hyrax/#{model.pluralize}_controller.rb").include? controller_injection
57
- inject_into_file "app/controllers/hyrax/#{model.pluralize}_controller.rb", after: "::#{class_name}\n" do
58
- controller_injection
59
- end
60
- end
61
-
62
- # add all properties to the delegates block of Hyku::ManifestEnabledWorkShowPresenter
63
- delegates = DogBiscuits.config.all_properties - DogBiscuits.config.base_properties
64
- gsub_file 'app/presenters/hyku/manifest_enabled_work_show_presenter.rb', /delegate :extent/, "delegate :#{delegates.join(', :')}, :extent"
65
- end
66
- end
67
- end