From 0ced1d3951df34bf0c5c6f4e324d798d5c0cfd71 Mon Sep 17 00:00:00 2001 From: Eric O Date: Thu, 21 Dec 2023 11:18:00 -0500 Subject: [PATCH] Gemfile cleanup; Rename constant Hyacinth::XMLGenerator to Hyacinth::XmlGenerator --- Gemfile | 10 +++------- Gemfile.lock | 5 ----- .../digital_object/xml_datastream_rendering.rb | 2 +- lib/hyacinth/xml_generator.rb | 2 +- lib/hyacinth/xml_generator/element.rb | 2 +- spec/lib/hyacinth/xml_generator/element_spec.rb | 4 ++-- .../xml_generator/restriction_on_access_spec.rb | 4 ++-- spec/lib/hyacinth/xml_generator_spec.rb | 4 ++-- 8 files changed, 12 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index 1da8422a1..b28aaab75 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 6.0.0' gem 'bootsnap', require: false -gem 'responders' +# gem 'responders' # Use sqlite3 as the database for Active Record gem 'sqlite3', '~> 1.4' @@ -57,9 +57,6 @@ gem 'thread' # Use terser as compressor for JavaScript assets gem 'terser' -# Use CoffeeScript for .js.coffee assets and views -gem 'coffee-rails' - # Use jquery as the JavaScript library gem 'jquery-rails', '>= 4.0.4' @@ -91,14 +88,13 @@ gem 'nokogiri', '~> 1.15.5' # For authentication gem 'devise', '~> 4.9.3' -gem 'childprocess', '~> 2.0' +# gem 'childprocess', '~> 2.0' # CUL Fedora Dependencies and Content Models gem 'cul_hydra', git: 'https://github.com/cul/cul_hydra', ref: 'master' -gem 'active-fedora', '8.6.0' # gem 'cul_hydra', path: '../cul_hydra' +gem 'active-fedora', '8.6.0' gem 'rubydora' -# gem 'cul_hydra', path: '../cul_hydra' # Temporarily use specific commit because new version of gem hasn't been released yet. Latest is 1.1.3. gem 'rdf', '>= 1.1.5' gem 'rdf-vocab' diff --git a/Gemfile.lock b/Gemfile.lock index 90f4d180e..fd4f921f2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -166,8 +166,6 @@ GEM regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) charlock_holmes (0.7.7) - childprocess (2.0.0) - rake (< 13.0) chosen-rails (1.10.0) coffee-rails (>= 3.2) railties (>= 3.0) @@ -587,10 +585,8 @@ DEPENDENCIES capistrano-rails (~> 1.4) capybara (~> 3.32) charlock_holmes - childprocess (~> 2.0) chosen-rails coderay - coffee-rails cul_hydra! devise (~> 4.9.3) diffy (~> 3.1) @@ -624,7 +620,6 @@ DEPENDENCIES rdf (>= 1.1.5) rdf-vocab redis (< 4) - responders resque (~> 1.26.0) retriable (~> 2.1) rspec-rails (~> 4.0) diff --git a/app/models/concerns/digital_object/xml_datastream_rendering.rb b/app/models/concerns/digital_object/xml_datastream_rendering.rb index 8818587a6..ed8280eeb 100644 --- a/app/models/concerns/digital_object/xml_datastream_rendering.rb +++ b/app/models/concerns/digital_object/xml_datastream_rendering.rb @@ -5,7 +5,7 @@ def render_xml_datastream(xml_datastream) base_translation_logic = JSON(xml_datastream.xml_translation) dynamic_field_group_map = Hash[DynamicFieldGroup.all.map { |dfg| [dfg.string_key, dfg.xml_translation] }] - Hyacinth::XMLGenerator + Hyacinth::XmlGenerator .new(self.dynamic_field_data, base_translation_logic, dynamic_field_group_map, internal_fields) .generate .to_xml(indent: 2) diff --git a/lib/hyacinth/xml_generator.rb b/lib/hyacinth/xml_generator.rb index 15b236d97..82f2e10df 100644 --- a/lib/hyacinth/xml_generator.rb +++ b/lib/hyacinth/xml_generator.rb @@ -1,5 +1,5 @@ module Hyacinth - class XMLGenerator + class XmlGenerator attr_reader :dynamic_fields_groups_map, :internal_fields def initialize(digital_object_data, base_xml_translation, dynamic_fields_groups_map, internal_fields = {}) diff --git a/lib/hyacinth/xml_generator/element.rb b/lib/hyacinth/xml_generator/element.rb index d4553afd9..114439b36 100644 --- a/lib/hyacinth/xml_generator/element.rb +++ b/lib/hyacinth/xml_generator/element.rb @@ -1,5 +1,5 @@ module Hyacinth - class XMLGenerator::Element + class XmlGenerator::Element attr_reader :generator, :parent_element, :xml_translation, :df_data, :dynamic_fields_groups_map, :ng_element diff --git a/spec/lib/hyacinth/xml_generator/element_spec.rb b/spec/lib/hyacinth/xml_generator/element_spec.rb index 1ffa46322..cc9056e80 100644 --- a/spec/lib/hyacinth/xml_generator/element_spec.rb +++ b/spec/lib/hyacinth/xml_generator/element_spec.rb @@ -1,9 +1,9 @@ require 'rails_helper' -describe Hyacinth::XMLGenerator::Element do +describe Hyacinth::XmlGenerator::Element do let(:internal_fields) { { 'project.display_label' => 'Test Project', 'project.string_key' => 'test_project' } } let(:xml_translation) { {} } - let(:generator) { Hyacinth::XMLGenerator.new(nil, nil, nil, internal_fields) } + let(:generator) { Hyacinth::XmlGenerator.new(nil, nil, nil, internal_fields) } let(:dynamic_field_data) do JSON.parse(fixture('lib/hyacinth/xml_generator/test_dynamic_field_data.json').read) diff --git a/spec/lib/hyacinth/xml_generator/restriction_on_access_spec.rb b/spec/lib/hyacinth/xml_generator/restriction_on_access_spec.rb index 74a192cb9..82c982368 100644 --- a/spec/lib/hyacinth/xml_generator/restriction_on_access_spec.rb +++ b/spec/lib/hyacinth/xml_generator/restriction_on_access_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe Hyacinth::XMLGenerator do +describe Hyacinth::XmlGenerator do let(:dynamic_field_data) do JSON.parse(fixture('lib/hyacinth/xml_generator/test_dynamic_field_data.json').read) end @@ -202,7 +202,7 @@ let(:internal_fields) { {'uuid' => "89dcca6c-87b3-46d5-a1fd-1264ae7488c2"} } let(:xml_generator) do - Hyacinth::XMLGenerator.new(dynamic_field_data, base_xml_translation, xml_translation_map, internal_fields) + Hyacinth::XmlGenerator.new(dynamic_field_data, base_xml_translation, xml_translation_map, internal_fields) end describe '#generate' do diff --git a/spec/lib/hyacinth/xml_generator_spec.rb b/spec/lib/hyacinth/xml_generator_spec.rb index 188f8348c..3536c77a7 100644 --- a/spec/lib/hyacinth/xml_generator_spec.rb +++ b/spec/lib/hyacinth/xml_generator_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -describe Hyacinth::XMLGenerator do +describe Hyacinth::XmlGenerator do let(:dynamic_field_data) do JSON.parse(fixture('lib/hyacinth/xml_generator/test_dynamic_field_data.json').read) end @@ -76,7 +76,7 @@ end let(:xml_generator) do - Hyacinth::XMLGenerator.new(dynamic_field_data, base_xml_translation, xml_translation_map) + Hyacinth::XmlGenerator.new(dynamic_field_data, base_xml_translation, xml_translation_map) end let(:expected_mods) do