lib/tileset_tooling/app.rb in tileset_tooling-0.0.2 vs lib/tileset_tooling/app.rb in tileset_tooling-0.1.0
- old
+ new
@@ -1,9 +1,10 @@
# Copyright (c) 2020 Jean-Sebastien Gelinas, see LICENSE.txt
# frozen_string_literal: true
require 'gli'
+require 'mini_magick'
require 'semantic_logger'
require 'tileset_tooling/version'
require 'tileset_tooling/commands'
require 'tileset_tooling/utils'
@@ -27,10 +28,11 @@
# Set the global default log level and add appender
::SemanticLogger.sync!
::SemanticLogger.default_level = :trace
::SemanticLogger.add_appender(io: $stdout, formatter: :color)
+ # ::MiniMagick.logger.level = ::Logger::DEBUG
true
end
post do
end
@@ -47,10 +49,11 @@
bleed_command.desc('Inserts a bleed around tiles')
bleed_command.command(:insert) do |insert_command|
insert_command.switch([:'skip-specs'], desc: 'Skips the reading of the specs')
insert_command.flag([:output], default_value: nil, desc: 'Path where to store result', arg_name: 'path')
insert_command.action do |_, options, args|
- command = ::TilesetTooling::Commands::InsertBleed.new(options, args)
+ specs_loader = ::TilesetTooling::Utils::SpecsLoader.new
+ command = ::TilesetTooling::Commands::InsertBleed.new(options, args, specs_loader)
command.unpack!
command.run
end
end
end