diff --git a/lib/inline_svg.rb b/lib/inline_svg.rb index 45aa49e..749bd26 100644 --- a/lib/inline_svg.rb +++ b/lib/inline_svg.rb @@ -1,15 +1,16 @@ -require "inline_svg/version" -require "inline_svg/action_view/helpers" -require "inline_svg/asset_file" -require "inline_svg/cached_asset_file" -require "inline_svg/finds_asset_paths" -require "inline_svg/propshaft_asset_finder" -require "inline_svg/static_asset_finder" -require "inline_svg/webpack_asset_finder" -require "inline_svg/transform_pipeline" -require "inline_svg/io_resource" - -require "inline_svg/railtie" if defined?(Rails) +require_relative "inline_svg/version" +require_relative "inline_svg/action_view/helpers" +require_relative "inline_svg/asset_file" +require_relative "inline_svg/cached_asset_file" +require_relative "inline_svg/finds_asset_paths" +require_relative "inline_svg/propshaft_asset_finder" +require_relative "inline_svg/static_asset_finder" +require_relative "inline_svg/webpack_asset_finder" +require_relative "inline_svg/transform_pipeline" +require_relative "inline_svg/io_resource" + +require_relative "inline_svg/railtie" if defined?(Rails) + require 'active_support' require 'active_support/core_ext/object/blank' require 'active_support/core_ext/string' diff --git a/lib/inline_svg/railtie.rb b/lib/inline_svg/railtie.rb index 6e55db9..5187133 100644 --- a/lib/inline_svg/railtie.rb +++ b/lib/inline_svg/railtie.rb @@ -3,7 +3,7 @@ module InlineSvg class Railtie < ::Rails::Railtie initializer "inline_svg.action_view" do |app| ActiveSupport.on_load :action_view do - require "inline_svg/action_view/helpers" + require_relative "action_view/helpers" include InlineSvg::ActionView::Helpers end end diff --git a/lib/inline_svg/transform_pipeline/transformations.rb b/lib/inline_svg/transform_pipeline/transformations.rb index 2cec526..b13e6af 100644 --- a/lib/inline_svg/transform_pipeline/transformations.rb +++ b/lib/inline_svg/transform_pipeline/transformations.rb @@ -75,18 +75,18 @@ def self.no_transform end end -require 'inline_svg/transform_pipeline/transformations/transformation' -require 'inline_svg/transform_pipeline/transformations/no_comment' -require 'inline_svg/transform_pipeline/transformations/class_attribute' -require 'inline_svg/transform_pipeline/transformations/style_attribute' -require 'inline_svg/transform_pipeline/transformations/title' -require 'inline_svg/transform_pipeline/transformations/description' -require 'inline_svg/transform_pipeline/transformations/size' -require 'inline_svg/transform_pipeline/transformations/height' -require 'inline_svg/transform_pipeline/transformations/width' -require 'inline_svg/transform_pipeline/transformations/view_box' -require 'inline_svg/transform_pipeline/transformations/id_attribute' -require 'inline_svg/transform_pipeline/transformations/data_attributes' -require 'inline_svg/transform_pipeline/transformations/preserve_aspect_ratio' -require 'inline_svg/transform_pipeline/transformations/aria_attributes' -require "inline_svg/transform_pipeline/transformations/aria_hidden_attribute" +require_relative 'transformations/transformation' +require_relative 'transformations/no_comment' +require_relative 'transformations/class_attribute' +require_relative 'transformations/style_attribute' +require_relative 'transformations/title' +require_relative 'transformations/description' +require_relative 'transformations/size' +require_relative 'transformations/height' +require_relative 'transformations/width' +require_relative 'transformations/view_box' +require_relative 'transformations/id_attribute' +require_relative 'transformations/data_attributes' +require_relative 'transformations/preserve_aspect_ratio' +require_relative 'transformations/aria_attributes' +require_relative 'transformations/aria_hidden_attribute'