lib/ronin/ui/cli/commands/console.rb in ronin-1.4.1 vs lib/ronin/ui/cli/commands/console.rb in ronin-1.5.0.rc1
- old
+ new
@@ -66,26 +66,35 @@
option :version, :type => true,
:flag => '-V',
:description => 'Print the Ronin version'
#
- # Starts the Ronin Console.
+ # Sets up the Ronin Console.
#
- def execute
- if version?
- puts "ronin #{Ronin::VERSION}"
- return
- end
+ # @since 1.5.0
+ #
+ def setup
+ super
UI::Console.color = color?
UI::Console.short_errors = !backtrace?
@require.each do |path|
UI::Console.auto_load << path
end
if database?
Database.repositories[:default] = @database
+ end
+ end
+
+ #
+ # Starts the Ronin Console.
+ #
+ def execute
+ if version?
+ puts "ronin #{Ronin::VERSION}"
+ return
end
UI::Console.start
end