changing order of where clauses, making rubygems secure