Sha256: 0d0108429d5e73faba08f2157d8f8702d86284ab9906b0f097646996946aab3d

Contents?: true

Size: 1.03 KB

Versions: 12

Compression:

Stored size: 1.03 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' # hmm...
for file in Dir[File.dirname(__FILE__) + '/sane/*.rb'].sort 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

12 entries across 12 versions & 1 rubygems

Version Path
sane-0.25.8 lib/sane.rb
sane-0.25.7 lib/sane.rb
sane-0.25.6 lib/sane.rb
sane-0.25.5 lib/sane.rb
sane-0.25.4 lib/sane.rb
sane-0.25.3 lib/sane.rb
sane-0.25.2 lib/sane.rb
sane-0.25.1 lib/sane.rb
sane-0.25.0 lib/sane.rb
sane-0.24.6 lib/sane.rb
sane-0.24.5 lib/sane.rb
sane-0.24.4 lib/sane.rb