Rewrite bin script in ruby
Merge branch 'master' into release