diff --git a/lib/motion/project/command.rb b/lib/motion/project/command.rb index 4c1b6af4..946fe1b3 100644 --- a/lib/motion/project/command.rb +++ b/lib/motion/project/command.rb @@ -83,7 +83,7 @@ module Motion; module Project # Base command class of RubyMotion # ------------------------------------------------------------------------- - #require 'motion/project/command/account' + require 'motion/project/command/account' #require 'motion/project/command/archive' #require 'motion/project/command/activate' require 'motion/project/command/changelog' @@ -144,6 +144,7 @@ module Motion; module Project end def guess_email_address + require 'uri' # Guess the default email address from git. URI.escape(`git config --get user.email`.strip) end diff --git a/lib/motion/project/command/account.rb b/lib/motion/project/command/account.rb index 995043b6..fde43114 100644 --- a/lib/motion/project/command/account.rb +++ b/lib/motion/project/command/account.rb @@ -22,18 +22,14 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. module Motion; module Project - class AccountCommand < Command - self.name = 'account' - self.help = 'Access the software license account' - - def run(args) - unless args.empty? - die "Usage: motion account" - end - + class Account < Command + self.summary = 'Access account details.' + self.description = 'Access the details of your software license account.' + + def run license_key = read_license_key email = guess_email_address - + system("open \"https://secure.rubymotion.com/account?license_key=#{license_key}&email=#{email}\"") end end