$ gem list nokogiri
*** LOCAL GEMS ***
nokogiri (1.4.0, 1.3.3)
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 'socket' | |
require 'webrick/httprequest' | |
require 'stringio' | |
# Super-primitive transparent, recording, single-threaded HTTP Proxy | |
class TransparentHttpProxy | |
attr_reader :port | |
def initialize(port, recorder) | |
@port = port |
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
def visit(h, incr) | |
puts "Visiting #{h.inspect}" | |
visited_keys = [] | |
begin | |
h.each_pair do |k, v| | |
visited_keys << k | |
h[incr.call(k)] = v | |
if h.size > 20 # arbitrary limit | |
raise "Infinite loop!" | |
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
# include at least one source and the rails gem | |
source :gemcutter | |
gem "rails", "~> 2.3.5", :require => nil | |
gem "sqlite3-ruby", :require => "sqlite3" | |
# Devise 1.0.2 is not a valid gem plugin for Rails, so use git until 1.0.3 | |
# gem "devise", :git => "git://github.com/plataformatec/devise.git", :ref => "v1.0" | |
group :development do | |
# bundler requires these gems in development |
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
gem "rails", "2.3.5" |
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
file 'config/preinitializer.rb', <<-PRE | |
# Use bundled gems | |
begin | |
require File.expand_path('../../.bundle/environment', __FILE__) | |
rescue LoadError | |
# This setup deliberately requires that the application be locked. | |
# For an alternative, see http://gist.github.com/302406#file_preinitializer.rb | |
if File.exist?(File.expand_path('../../Gemfile.lock', __FILE__)) | |
raise "Application is locked but not installed. Run `bundle install` and then try again." | |
else |
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
module A | |
def foo | |
"a" | |
end | |
alias bar foo | |
end | |
module B | |
def foo |
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
Gem::Specification.new do |s| | |
s.name = "A" | |
s.version = "0.0.0" | |
s.summary = "Gem A" | |
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
gems: | |
- ivy4r | |
ivy: | |
settings.file: ivysettings.xml |
OlderNewer