mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-07 22:42:10 +08:00
[command] Some refactoring/cleaning.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user