lib/genZPK.rb in genZPK-0.1.2 vs lib/genZPK.rb in genZPK-0.1.3
- old
+ new
@@ -2,10 +2,16 @@
require 'genZPK/templates'
require 'tempfile'
require 'nokogiri'
require 'highline/import'
+class Object
+ def not_nil?
+ !nil?
+ end
+end
+
module GenZPK
def getZdpack
if File.exists? '/usr/local/zend/bin/zdpack'
'/usr/local/zend/bin/zdpack'
else
@@ -68,10 +74,17 @@
a = d if a.length == 0
end
a == 'y'
end
+ def requireCondition(condition, message)
+ if not condition
+ puts message
+ exit -1
+ end
+ end
+
def doConfigure
if not File.exists?(File.expand_path '~/.genZPK')
FileUtils.mkpath(File.expand_path '~/.genZPK')
end
@@ -122,7 +135,6 @@
checksFile.close
tmpChecksFile.close
tmpChecksFile.unlink
end
-
end
\ No newline at end of file