bin/hanami-assets in hanami-assets-1.3.4 vs bin/hanami-assets in hanami-assets-1.3.5

- old
+ new

@@ -1,22 +1,23 @@ #!/usr/bin/env ruby +# frozen_string_literal: true -require 'optparse' -require 'pathname' +require "optparse" +require "pathname" options = {} OptionParser.new do |opts| - opts.banner = 'Usage: hanami-assets --config=path/to/config.rb' + opts.banner = "Usage: hanami-assets --config=path/to/config.rb" - opts.on('-c', '--config FILE', 'Path to config') do |c| + opts.on("-c", "--config FILE", "Path to config") do |c| options[:config] = c end end.parse! -config = options.fetch(:config) { raise ArgumentError.new('You must specify a configuration file') } +config = options.fetch(:config) { raise ArgumentError.new("You must specify a configuration file") } config = Pathname.new(config) config.exist? or raise ArgumentError.new("Cannot find configuration file: #{config}") -require 'hanami/assets' +require "hanami/assets" load config Hanami::Assets.deploy