This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'rotp' | |
require 'time' | |
user = ARGV[0] | |
secret = ARGV[1] | |
abort unless user and secret | |
trap("INT") do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
class Store | |
attr_accessor :name, :address, :city, :state, :zip, :phone_number | |
def unique_attributes | |
[name[0..5], zip, phone_number, address[0..3]] | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
puts "looking for the gems to upgrade..." | |
gem_info = Struct.new(:name, :version) | |
to_reinstall = [] | |
Dir.glob("#{Gem.dir}/**/*.bundle").map do |path| | |
path =~ /.*1.8\/gems\/(.*)-(.*?)\/.*/ | |
name, version = $1, $2 | |
bundle_info = `file #{path}` |
NewerOlder