diff --git a/Gemfile.lock b/Gemfile.lock index 42e42ae..e221217 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - katalyst-content (2.5.0) + katalyst-content (2.5.1) active_storage_validations katalyst-html-attributes katalyst-kpop diff --git a/katalyst-content.gemspec b/katalyst-content.gemspec index 06108f8..644b935 100644 --- a/katalyst-content.gemspec +++ b/katalyst-content.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "katalyst-content" - spec.version = "2.5.0" + spec.version = "2.5.1" spec.authors = ["Katalyst Interactive"] spec.email = ["developers@katalyst.com.au"] diff --git a/lib/katalyst/content.rb b/lib/katalyst/content.rb index 2a073ee..b919b57 100644 --- a/lib/katalyst/content.rb +++ b/lib/katalyst/content.rb @@ -1,16 +1,14 @@ # frozen_string_literal: true require "active_support" -require "katalyst/html_attributes" -require "katalyst/kpop" - -require "katalyst/content/config" -require "katalyst/content/engine" module Katalyst module Content + extend ActiveSupport::Autoload extend self + autoload :Config + def config @config ||= Config.new end @@ -20,3 +18,5 @@ def configure end end end + +require "katalyst/content/engine" diff --git a/lib/katalyst/content/engine.rb b/lib/katalyst/content/engine.rb index d0c67a1..124b63f 100644 --- a/lib/katalyst/content/engine.rb +++ b/lib/katalyst/content/engine.rb @@ -1,11 +1,14 @@ # frozen_string_literal: true -require "rails" +require "katalyst/html_attributes" +require "katalyst/kpop" +require "rails/engine" module Katalyst module Content class Engine < ::Rails::Engine isolate_namespace Katalyst::Content + config.eager_load_namespaces << Katalyst::Content initializer "katalyst-content.factories", after: "factory_bot.set_factory_paths" do FactoryBot.definition_file_paths << Engine.root.join("spec/factories") if defined?(FactoryBot) diff --git a/lib/tasks/yarn.rake b/lib/tasks/yarn.rake deleted file mode 100644 index 56939a9..0000000 --- a/lib/tasks/yarn.rake +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -namespace :yarn do - desc "Install npm packages with yarn" - task install: :environment do - sh "yarn install" - end - - desc "Lint JS/SCSS files using yarn (prettier)" - task lint: :install do - sh "yarn lint" - end - - desc "Autoformat JS/SCSS files using yarn (prettier)" - task format: :install do - sh "yarn format" - end -end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a2ee2d4..b960d8c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require "katalyst/content" - RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status"