rewriting check in ruby
removing old bash version
Merge branch 'ruby_rewrite'