Bug #5625 » profanity.patch
lib/rubygems/indexer.rb | ||
---|---|---|
spec = Gem::Format.from_file_by_path(gemfile).spec
|
||
spec.loaded_from = gemfile
|
||
# HACK: fuck this shit - borks all tests that use pl1
|
||
# HACK: I give up - borks all tests that use pl1
|
||
# if File.basename(gemfile, ".gem") != spec.original_name then
|
||
# exp = spec.full_name
|
||
# exp << " (#{spec.original_name})" if
|
lib/rubygems/path_support.rb | ||
---|---|---|
def path=(gpaths)
|
||
gem_path = [@home]
|
||
# FIX: I can't tell wtf this is doing.
|
||
# FIX: I can't tell what this is doing.
|
||
gpaths ||= (ENV['GEM_PATH'] || "").empty? ? nil : ENV["GEM_PATH"]
|
||
if gpaths then
|
lib/rubygems/source_index.rb | ||
---|---|---|
def search(gem_pattern, platform_or_requirement = false)
|
||
requirement = nil
|
||
only_platform = false # FIX: WTF is this?!?
|
||
only_platform = false # FIX: What is this?!?
|
||
# TODO - Remove support and warning for legacy arguments after 2008/11
|
||
unless Gem::Dependency === gem_pattern
|
lib/rubygems/specification.rb | ||
---|---|---|
def self.remove_spec spec
|
||
# TODO: beat on the tests
|
||
raise "wtf: #{spec.full_name} not in #{all_names.inspect}" unless
|
||
raise "unexpected scenario: #{spec.full_name} not in #{all_names.inspect}" unless
|
||
_all.include? spec
|
||
_all.delete spec
|
||
end
|
||
... | ... | |
return @version
|
||
end
|
||
# FIX: have this handle the platform/new_platform/original_platform bullshit
|
||
# FIX: have this handle the platform/new_platform/original_platform nonsense
|
||
def yaml_initialize(tag, vals) # :nodoc:
|
||
vals.each do |ivar, val|
|
||
instance_variable_set "@#{ivar}", val
|
test/psych/test_struct.rb | ||
---|---|---|
loaded = Psych.load(Psych.dump(ss))
|
||
assert_instance_of(StructSubclass, loaded.foo)
|
||
# FIXME: This seems to cause an infinite loop. wtf. Must report a bug
|
||
# FIXME: This seems to cause an infinite loop. I don't understand. Must report a bug
|
||
# in ruby.
|
||
# assert_equal(ss, loaded)
|
||
end
|
test/rubygems/test_gem_remote_fetcher.rb | ||
---|---|---|
end
|
||
end
|
||
def util_fuck_with_fetcher data, blow = false
|
||
def util_muck_with_fetcher data, blow = false
|
||
fetcher = Gem::RemoteFetcher.fetcher
|
||
fetcher.instance_variable_set :@test_data, data
|
||
... | ... | |
a1_data = fp.read
|
||
end
|
||
fetcher = util_fuck_with_fetcher a1_data
|
||
fetcher = util_muck_with_fetcher a1_data
|
||
a1_cache_gem = @a1.cache_file
|
||
assert_equal a1_cache_gem, fetcher.download(@a1, 'http://gems.example.com')
|
||
... | ... | |
fp.read
|
||
end
|
||
fetcher = util_fuck_with_fetcher a1_data
|
||
fetcher = util_muck_with_fetcher a1_data
|
||
install_dir = File.join @tempdir, 'more_gems'
|
||
... | ... | |
FileUtils.chmod 0555, @a1.cache_dir
|
||
FileUtils.chmod 0555, @gemhome
|
||
fetcher = util_fuck_with_fetcher File.read(@a1_gem)
|
||
fetcher = util_muck_with_fetcher File.read(@a1_gem)
|
||
fetcher.download(@a1, 'http://gems.example.com')
|
||
a1_cache_gem = File.join Gem.user_dir, "cache", @a1.file_name
|
||
assert File.exist? a1_cache_gem
|
||
... | ... | |
e1_data = fp.read
|
||
end
|
||
fetcher = util_fuck_with_fetcher e1_data, :blow_chunks
|
||
fetcher = util_muck_with_fetcher e1_data, :do_output
|
||
e1_cache_gem = e1.cache_file
|
||