bin/frameit in frameit-2.5.1 vs bin/frameit in frameit-2.6.0

- old
+ new

@@ -17,27 +17,30 @@ program :help, 'Website', 'https://fastlane.tools' program :help, 'GitHub', 'https://github.com/fastlane/frameit' program :help_formatter, :compact global_option('--verbose') { $verbose = true } + FastlaneCore::CommanderGenerator.new.generate(Frameit::Options.available_options) default_command :black command :black do |c| c.syntax = 'frameit black' c.description = "Adds a black frame around all screenshots." c.action do |args, options| + load_config(options) Frameit::Runner.new.run('.', Frameit::Color::BLACK) end end command :silver do |c| c.syntax = 'frameit silver' c.description = "Adds a silver frame around all screenshots." c.action do |args, options| + load_config(options) Frameit::Runner.new.run('.', Frameit::Color::SILVER) end end command :setup do |c| @@ -50,9 +53,17 @@ end alias_command :white, :silver run! + end + + private + + def load_config(options) + o = options.__hash__.dup + o.delete(:verbose) + Frameit.config = FastlaneCore::Configuration.create(Frameit::Options.available_options, o) end end begin FastlaneCore::UpdateChecker.start_looking_for_update('frameit')