[command] Some refactoring/cleaning.

This commit is contained in:
Eloy Durán
2014-01-17 16:43:37 +01:00
parent 2d5ac6de09
commit b65a05e142
3 changed files with 8 additions and 2 deletions

View File

@@ -124,6 +124,8 @@ module Motion; module Project
include CLAide::InformativeError
end
protected
def die(message)
raise InformativeError, message
end
@@ -134,6 +136,10 @@ module Motion; module Project
end
end
def pager
ENV['PAGER'] || '/usr/bin/less'
end
LicensePath = '/Library/RubyMotion/license.key'
def read_license_key
unless File.exist?(LicensePath)

View File

@@ -23,7 +23,8 @@
module Motion; module Project
class Activate < Command
self.summary = 'Activate the software license'
self.summary = 'Activate software license.'
self.description = 'Activate your RubyMotion software license key.'
self.arguments = 'LICENSE-KEY'

View File

@@ -28,7 +28,6 @@ module Motion; module Project
'RubyMotion versions.'
def run
pager = (ENV['PAGER'] or '/usr/bin/less')
system("#{pager} /Library/RubyMotion/NEWS")
end
end