diff options
author | Jochen Topf <jochen@topf.org> | 2013-04-16 22:40:07 +0200 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-04-16 22:40:07 +0200 |
commit | 1a7a81ba1a1e32ee9499cfc72a05d08a826b5e1e (patch) | |
tree | 835a50e8095002c1467066ce254e2148de9826db | |
parent | 115665f4a53086e580df1e7cc5523e7e9d38382b (diff) | |
download | taginfo-1a7a81ba1a1e32ee9499cfc72a05d08a826b5e1e.tar taginfo-1a7a81ba1a1e32ee9499cfc72a05d08a826b5e1e.tar.gz |
Check ruby version when running taginfo
-rwxr-xr-x | bin/check-translations.rb | 8 | ||||
-rwxr-xr-x | web/taginfo.rb | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/bin/check-translations.rb b/bin/check-translations.rb index e96750b..9f76638 100755 --- a/bin/check-translations.rb +++ b/bin/check-translations.rb @@ -3,6 +3,14 @@ # check-translations.rb DIR LANG # +v=RUBY_VERSION.split('.').map{ |x| x.to_i } +if (v[0]*100+v[1])*100+v[0] < 10901 + STDERR.puts "You need at least Ruby 1.9.1 to run taginfo" + exit(1) +end + +#------------------------------------------------------------------------------ + require 'yaml' dir = ARGV[0] diff --git a/web/taginfo.rb b/web/taginfo.rb index 7e46415..f38db37 100755 --- a/web/taginfo.rb +++ b/web/taginfo.rb @@ -27,6 +27,14 @@ # #------------------------------------------------------------------------------ +v=RUBY_VERSION.split('.').map{ |x| x.to_i } +if (v[0]*100+v[1])*100+v[0] < 10901 + STDERR.puts "You need at least Ruby 1.9.1 to run taginfo" + exit(1) +end + +#------------------------------------------------------------------------------ + $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'json' |