Skip to content

Commit

Permalink
Gemfile cleanup; Rename constant Hyacinth::XMLGenerator to Hyacinth::…
Browse files Browse the repository at this point in the history
…XmlGenerator
  • Loading branch information
elohanlon committed Dec 21, 2023
1 parent 539ee40 commit 0ced1d3
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 21 deletions.
10 changes: 3 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'

Expand Down Expand Up @@ -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'
Expand Down
5 changes: 0 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/hyacinth/xml_generator.rb
Original file line number Diff line number Diff line change
@@ -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 = {})
Expand Down
2 changes: 1 addition & 1 deletion lib/hyacinth/xml_generator/element.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions spec/lib/hyacinth/xml_generator/element_spec.rb
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/hyacinth/xml_generator/restriction_on_access_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/hyacinth/xml_generator_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0ced1d3

Please sign in to comment.