lib/hanami/assets/bundler.rb in hanami-assets-1.3.4 vs lib/hanami/assets/bundler.rb in hanami-assets-1.3.5
- old
+ new
@@ -1,12 +1,14 @@
-require 'fileutils'
-require 'json'
+# frozen_string_literal: true
-require 'hanami/assets/bundler/compressor'
-require 'hanami/assets/bundler/asset'
-require 'hanami/assets/bundler/manifest_entry'
+require "fileutils"
+require "json"
+require "hanami/assets/bundler/compressor"
+require "hanami/assets/bundler/asset"
+require "hanami/assets/bundler/manifest_entry"
+
module Hanami
module Assets
# Bundle assets from a single application.
#
# @since 0.1.0
@@ -16,15 +18,15 @@
# @api private
DEFAULT_PERMISSIONS = 0o644
# @since 0.1.0
# @api private
- URL_SEPARATOR = '/'.freeze
+ URL_SEPARATOR = "/"
# @since 0.1.0
# @api private
- URL_REPLACEMENT = ''.freeze
+ URL_REPLACEMENT = ""
# Return a new instance
#
# @param configuration [Hanami::Assets::Configuration] a single application configuration
#
@@ -103,10 +105,10 @@
# @since 0.1.0
# @api private
def _convert_to_url(path)
path.sub(public_directory.to_s, URL_REPLACEMENT)
- .gsub(File::SEPARATOR, URL_SEPARATOR)
+ .gsub(File::SEPARATOR, URL_SEPARATOR)
end
# @since 0.1.0
# @api private
def _write(path, content)