aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-05-05 22:11:58 -0400
committerRalph Amissah <ralph@amissah.com>2011-05-05 22:11:58 -0400
commita9642d67f69d83d3fdb56ab115ef3c10bcd1895c (patch)
tree352c633d6b60a54a9ef74ff143162ac07c981b18 /bin
parentdebian/changelog (3.0.7-1) (diff)
parentv3: i18n, sysenv, class variable to prevent unnecessary re-construction of hash (diff)
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'bin')
-rw-r--r--bin/sisu33
-rw-r--r--bin/sisu333
-rw-r--r--bin/sisu_termsheet33
-rw-r--r--bin/sisu_webrick31
4 files changed, 79 insertions, 51 deletions
diff --git a/bin/sisu b/bin/sisu
index ceeebd6c..9facda87 100644
--- a/bin/sisu
+++ b/bin/sisu
@@ -2,25 +2,24 @@
# encoding: utf-8
#SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information
begin
- def check_sisu_stable_ruby_version?
- rbv_sisu_stable='1.8.7'
- if RUBY_VERSION < rbv_sisu_stable
- raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}"
- else check_incompatible_ruby_build?
- end
- end
- def check_sisu_dev_ruby_version?
- rbv_sisu_dev='1.9.2'
- if RUBY_VERSION < rbv_sisu_dev
- raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}"
+ def ruby_version_ok?(base_version)
+ @v ||=RUBY_VERSION.scan(/\d+/)
+ vb=base_version.scan(/\d+/)
+ if @v[0].to_i < vb[0].to_i \
+ or @v[0].to_i == vb[0].to_i \
+ && @v[1].to_i < vb[1].to_i \
+ or @v[0].to_i == vb[0].to_i \
+ && @v[1].to_i == vb[1].to_i \
+ && @v[1].to_i < vb[2].to_i
+ raise "Please, use Ruby#{vb} or later, current Ruby #{RUBY_VERSION}"
else check_incompatible_ruby_build?
end
end
def check_incompatible_ruby_build?
require 'rbconfig'
e=Config::CONFIG
- if RUBY_VERSION == '1.9.2' \
- and e['PATCHLEVEL'].to_i < 180
+ if RUBY_VERSION == '1.9.2' \
+ && e['PATCHLEVEL'].to_i < 180
raise <<WOK
There are known issues with early versions of ruby1.9.2.
Please, use Ruby 1.9.2p180 or later,
@@ -30,6 +29,14 @@ current version #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']}
WOK
end
end
+ def check_sisu_stable_ruby_version?
+ rbv_sisu_stable='1.8.7'
+ ruby_version_ok?(rbv_sisu_stable)
+ end
+ def check_sisu_dev_ruby_version?
+ rbv_sisu_dev='1.9.2'
+ ruby_version_ok?(rbv_sisu_dev)
+ end
$VERBOSE=nil
$KCODE='u' if RUBY_VERSION < '1.9'
argv=$*
diff --git a/bin/sisu3 b/bin/sisu3
index e3246376..b53c3e54 100644
--- a/bin/sisu3
+++ b/bin/sisu3
@@ -2,25 +2,24 @@
# encoding: utf-8
#SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information
begin
- def check_sisu_stable_ruby_version?
- rbv_sisu_stable='1.8.7'
- if RUBY_VERSION < rbv_sisu_stable
- raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}"
- else check_incompatible_ruby_build?
- end
- end
- def check_sisu_dev_ruby_version?
- rbv_sisu_dev='1.9.2'
- if RUBY_VERSION < rbv_sisu_dev
- raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}"
+ def ruby_version_ok?(base_version)
+ @v ||=RUBY_VERSION.scan(/\d+/)
+ vb=base_version.scan(/\d+/)
+ if @v[0].to_i < vb[0].to_i \
+ or @v[0].to_i == vb[0].to_i \
+ && @v[1].to_i < vb[1].to_i \
+ or @v[0].to_i == vb[0].to_i \
+ && @v[1].to_i == vb[1].to_i \
+ && @v[1].to_i < vb[2].to_i
+ raise "Please, use Ruby#{vb} or later, current Ruby #{RUBY_VERSION}"
else check_incompatible_ruby_build?
end
end
def check_incompatible_ruby_build?
require 'rbconfig'
e=Config::CONFIG
- if RUBY_VERSION == '1.9.2' \
- and e['PATCHLEVEL'].to_i < 180
+ if RUBY_VERSION == '1.9.2' \
+ && e['PATCHLEVEL'].to_i < 180
raise <<WOK
There are known issues with early versions of ruby1.9.2.
Please, use Ruby 1.9.2p180 or later,
@@ -30,6 +29,14 @@ current version #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']}
WOK
end
end
+ def check_sisu_stable_ruby_version?
+ rbv_sisu_stable='1.8.7'
+ ruby_version_ok?(rbv_sisu_stable)
+ end
+ def check_sisu_dev_ruby_version?
+ rbv_sisu_dev='1.9.2'
+ ruby_version_ok?(rbv_sisu_dev)
+ end
$VERBOSE=nil
$KCODE='u' if RUBY_VERSION < '1.9'
argv=$*
diff --git a/bin/sisu_termsheet b/bin/sisu_termsheet
index 10318191..5566a962 100644
--- a/bin/sisu_termsheet
+++ b/bin/sisu_termsheet
@@ -2,25 +2,24 @@
# encoding: utf-8
#SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information
begin
- def check_sisu_stable_ruby_version?
- rbv_sisu_stable='1.8.7'
- if RUBY_VERSION < rbv_sisu_stable
- raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}"
- else check_incompatible_ruby_build?
- end
- end
- def check_sisu_dev_ruby_version?
- rbv_sisu_dev='1.9.2'
- if RUBY_VERSION < rbv_sisu_dev
- raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}"
+ def ruby_version_ok?(base_version)
+ @v ||=RUBY_VERSION.scan(/\d+/)
+ vb=base_version.scan(/\d+/)
+ if @v[0].to_i < vb[0].to_i \
+ or @v[0].to_i == vb[0].to_i \
+ && @v[1].to_i < vb[1].to_i \
+ or @v[0].to_i == vb[0].to_i \
+ && @v[1].to_i == vb[1].to_i \
+ && @v[1].to_i < vb[2].to_i
+ raise "Please, use Ruby#{vb} or later, current Ruby #{RUBY_VERSION}"
else check_incompatible_ruby_build?
end
end
def check_incompatible_ruby_build?
require 'rbconfig'
e=Config::CONFIG
- if RUBY_VERSION == '1.9.2' \
- and e['PATCHLEVEL'].to_i < 180
+ if RUBY_VERSION == '1.9.2' \
+ && e['PATCHLEVEL'].to_i < 180
raise <<WOK
There are known issues with early versions of ruby1.9.2.
Please, use Ruby 1.9.2p180 or later,
@@ -30,6 +29,14 @@ current version #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']}
WOK
end
end
+ def check_sisu_stable_ruby_version?
+ rbv_sisu_stable='1.8.7'
+ ruby_version_ok?(rbv_sisu_stable)
+ end
+ def check_sisu_dev_ruby_version?
+ rbv_sisu_dev='1.9.2'
+ ruby_version_ok?(rbv_sisu_dev)
+ end
$VERBOSE=nil
argv=$*
SiSU_version_dir=case argv.inspect
diff --git a/bin/sisu_webrick b/bin/sisu_webrick
index 8f79a51f..b9ac031a 100644
--- a/bin/sisu_webrick
+++ b/bin/sisu_webrick
@@ -2,17 +2,16 @@
# encoding: utf-8
#SiSU: copyright (C) 1997 - 2011 Ralph Amissah; License GPL, see appended program information
begin
- def check_sisu_stable_ruby_version?
- rbv_sisu_stable='1.8.7'
- if RUBY_VERSION < rbv_sisu_stable
- raise "Please, use Ruby#{rbv_sisu_stable} or later, current Ruby #{RUBY_VERSION}"
- else check_incompatible_ruby_build?
- end
- end
- def check_sisu_dev_ruby_version?
- rbv_sisu_dev='1.9.2'
- if RUBY_VERSION < rbv_sisu_dev
- raise "Please, use Ruby#{rbv_sisu_dev} or later, current Ruby #{RUBY_VERSION}"
+ def ruby_version_ok?(base_version)
+ @v ||=RUBY_VERSION.scan(/\d+/)
+ vb=base_version.scan(/\d+/)
+ if @v[0].to_i < vb[0].to_i \
+ or @v[0].to_i == vb[0].to_i \
+ && @v[1].to_i < vb[1].to_i \
+ or @v[0].to_i == vb[0].to_i \
+ && @v[1].to_i == vb[1].to_i \
+ && @v[1].to_i < vb[2].to_i
+ raise "Please, use Ruby#{vb} or later, current Ruby #{RUBY_VERSION}"
else check_incompatible_ruby_build?
end
end
@@ -20,7 +19,7 @@ begin
require 'rbconfig'
e=Config::CONFIG
if RUBY_VERSION == '1.9.2' \
- and e['PATCHLEVEL'].to_i < 180
+ && e['PATCHLEVEL'].to_i < 180
raise <<WOK
There are known issues with early versions of ruby1.9.2.
Please, use Ruby 1.9.2p180 or later,
@@ -30,6 +29,14 @@ current version #{e['RUBY_PROGRAM_VERSION']}p#{e['PATCHLEVEL']}
WOK
end
end
+ def check_sisu_stable_ruby_version?
+ rbv_sisu_stable='1.8.7'
+ ruby_version_ok?(rbv_sisu_stable)
+ end
+ def check_sisu_dev_ruby_version?
+ rbv_sisu_dev='1.9.2'
+ ruby_version_ok?(rbv_sisu_dev)
+ end
$VERBOSE=nil
argv=$*
SiSU_version_dir=case argv.inspect