diff --git a/lib/fakerbot/cli.rb b/lib/fakerbot/cli.rb index 398a62c..98e88b8 100644 --- a/lib/fakerbot/cli.rb +++ b/lib/fakerbot/cli.rb @@ -9,6 +9,8 @@ module FakerBot class CLI < Thor Error = Class.new(StandardError) + # Do not print depracation warnings; the CLI will do that + Gem::Deprecate.skip = true desc 'version', 'fakerbot version' def version diff --git a/lib/fakerbot/renderer.rb b/lib/fakerbot/renderer.rb index 9aadef2..2d3bada 100644 --- a/lib/fakerbot/renderer.rb +++ b/lib/fakerbot/renderer.rb @@ -15,7 +15,7 @@ def self.call(*args) def initialize(hash, options, output) @hash = hash - @options = options.deep_symbolize_keys + @options = options @output = output @crayon = Pastel.new(enabled: output.tty?) @pager = TTY::Pager.new(command: 'less -R') @@ -70,7 +70,7 @@ def leaf_args(method, const) end def verbose? - options[:verbose] == true + options[:verbose] end def verbose_output(method, const, arr) diff --git a/spec/fakerbot/renderer_spec.rb b/spec/fakerbot/renderer_spec.rb index 9489451..3bc1f08 100644 --- a/spec/fakerbot/renderer_spec.rb +++ b/spec/fakerbot/renderer_spec.rb @@ -51,7 +51,7 @@ def self.bar context 'when the verbose option is enabled' do it 'renders methods with data' do hash = { MockFaker::Foo => [:bar] } - options = { 'verbose' => true } + options = { verbose: true } output = StringIO.new renderer = described_class.new(hash, options, output) @@ -65,7 +65,7 @@ def self.bar context 'when the verbose option is disabled' do it 'renders methods only' do hash = { MockFaker::Foo => [:bar] } - options = { 'verbose' => false } + options = { verbose: false } output = StringIO.new renderer = described_class.new(hash, options, output)