diff --git a/lib/motion/project/command.rb b/lib/motion/project/command.rb index d9f940b1..414e6d73 100644 --- a/lib/motion/project/command.rb +++ b/lib/motion/project/command.rb @@ -45,29 +45,29 @@ module Motion; module Project end def self.name - warn "The usage of `Motion::Project::Command.name` is deprecated use the " \ - "`Motion::Project::Command.command` method instead. " \ + warn "[!] The usage of `Motion::Project::Command.name` is deprecated " \ + "use the `Motion::Project::Command.command` method instead. " \ "(Called from: #{caller.first})" command end def self.name=(name) - warn "The usage of `Motion::Project::Command.name=` is deprecated use the " \ - "`Motion::Project::Command.command=` method instead. " \ + warn "[!] The usage of `Motion::Project::Command.name=` is deprecated " \ + "use the `Motion::Project::Command.command=` method instead. " \ "(Called from: #{caller.first})" self.command = name end def self.help - warn "The usage of `Motion::Project::Command.help` is deprecated use the " \ - "`Motion::Project::Command.summary` method instead. " \ + warn "[!] The usage of `Motion::Project::Command.help` is deprecated " \ + "use the `Motion::Project::Command.summary` method instead. " \ "(Called from: #{caller.first})" summary end def self.help=(summary) - warn "The usage of `Motion::Project::Command.help=` is deprecated use the " \ - "`Motion::Project::Command.summary=` method instead. " \ + warn "[!] The usage of `Motion::Project::Command.help=` is deprecated " \ + "use the `Motion::Project::Command.summary=` method instead. " \ "(Called from: #{caller.first})" self.summary = summary end @@ -80,7 +80,7 @@ module Motion; module Project require 'motion/project/command/activate' require 'motion/project/command/changelog' #require 'motion/project/command/create' - #require 'motion/project/command/device_console' + require 'motion/project/command/device_console' require 'motion/project/command/ri' require 'motion/project/command/support' require 'motion/project/command/update' diff --git a/lib/motion/project/command/device_console.rb b/lib/motion/project/command/device_console.rb index 3f392708..e4cc188f 100644 --- a/lib/motion/project/command/device_console.rb +++ b/lib/motion/project/command/device_console.rb @@ -22,15 +22,20 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. module Motion; module Project - class DeviceConsoleCommand < Command - self.name = 'device:console' - self.help = 'Print the device console logs' + class DeprecatedDeviceConsole < Command + self.command = 'device:console' - def run(args) - unless args.empty? - die "Usage: motion device:console" - end + def run + warn "[!] The usage of the `device:console` command is deprecated" \ + "use the `device-console` command instead." + DeviceConsole.run([]) + end + end + class DeviceConsole < Command + self.summary = 'Print iOS device logs' + + def run deploy = File.join(File.dirname(__FILE__), '../../../../bin/ios/deploy') devices = `\"#{deploy}\" -D`.strip.split(/\n/) if devices.empty?