Sha256: 044dcdbe081cba8b9a4ad705a84c69cc23b845c858e7fecc48b3360983a78c41
Contents?: true
Size: 1.01 KB
Versions: 6
Compression:
Stored size: 1.01 KB
Contents
# require some "necessary" other gems # shouldn't need this next line # require 'rubygems' if RUBY_VERSION < '1.9' # for the other requires require 'os' require 'andand' for file in Dir[File.dirname(__FILE__) + '/sane/*'] do require file end class Sane # helper for installing it locally on 1.8 # if you want to be able to use it without rubygems # except, then you'll still need rubygems anyway... # I hate 1.8 def self.install_local! if RUBY_VERSION >= '1.9' raise 'you dont need to install local for 1.9!' end require 'fileutils' require 'rbconfig' Dir.chdir File.dirname(__FILE__) do for file in Dir['*'] do FileUtils.cp_r file, Config::CONFIG['sitelibdir'] # copy subdirs, too end installed_sane = Config::CONFIG['sitelibdir'] + '/' + 'sane.rb' old_contents = File.read installed_sane File.write installed_sane, "require 'faster_rubygems'\n" + old_contents puts 'hardened sane with this gem version (and faster rubygems) to ' + installed_sane end end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
sane-0.22.0 | lib/sane.rb |
sane-0.21.0 | lib/sane.rb |
sane-0.20.3 | lib/sane.rb |
sane-0.20.2 | lib/sane.rb |
sane-0.20.1 | lib/sane.rb |
sane-0.20.0 | lib/sane.rb |