Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Auto merge of #4916 - bundler:seg-remove-pysched-yaml, r=indirect
Browse files Browse the repository at this point in the history
Remove psyched_yaml

Closes #4825
See #4856
  • Loading branch information
homu committed Sep 30, 2016
2 parents 447d519 + 7428308 commit 16fcbf7
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 47 deletions.
2 changes: 0 additions & 2 deletions .rubocop_todo.yml
Expand Up @@ -17,7 +17,6 @@ Lint/Eval:
Lint/HandleExceptions:
Exclude:
- 'lib/bundler/installer.rb'
- 'lib/bundler/psyched_yaml.rb'
- 'lib/bundler/vendored_persistent.rb'

# Offense count: 1
Expand Down Expand Up @@ -122,7 +121,6 @@ Style/ConditionalAssignment:
- 'lib/bundler/cli/platform.rb'
- 'lib/bundler/dsl.rb'
- 'lib/bundler/lazy_specification.rb'
- 'lib/bundler/psyched_yaml.rb'
- 'lib/bundler/rubygems_integration.rb'
- 'lib/bundler/source/git.rb'
- 'lib/bundler/source/rubygems.rb'
Expand Down
4 changes: 1 addition & 3 deletions lib/bundler.rb
Expand Up @@ -386,10 +386,8 @@ def reset!
private

def eval_yaml_gemspec(path, contents)
# If the YAML is invalid, Syck raises an ArgumentError, and Psych
# raises a Psych::SyntaxError. See psyched_yaml.rb for more info.
Gem::Specification.from_yaml(contents)
rescue YamlLibrarySyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
rescue Psych::SyntaxError, ArgumentError, Gem::EndOfYAMLException, Gem::Exception
eval_gemspec(path, contents)
end

Expand Down
27 changes: 0 additions & 27 deletions lib/bundler/psyched_yaml.rb

This file was deleted.

3 changes: 1 addition & 2 deletions lib/bundler/rubygems_integration.rb
Expand Up @@ -80,13 +80,12 @@ def platforms
end

def configuration
require "bundler/psyched_yaml"
Gem.configuration
rescue Gem::SystemExitException, LoadError => e
Bundler.ui.error "#{e.class}: #{e.message}"
Bundler.ui.trace e
raise
rescue YamlLibrarySyntaxError => e
rescue Psych::SyntaxError => e
raise YamlSyntaxError.new(e, "Your RubyGems configuration, which is " \
"usually located in ~/.gemrc, contains invalid YAML syntax.")
end
Expand Down
9 changes: 0 additions & 9 deletions spec/bundler/psyched_yaml_spec.rb

This file was deleted.

2 changes: 1 addition & 1 deletion spec/install/gems/resolving_spec.rb
Expand Up @@ -118,7 +118,7 @@
gem 'require_ruby'
G

expect(out).to_not include("Gem::InstallError: require_ruby requires Ruby version > 9000")
expect(out).to_not match(/Gem::(InstallError|RuntimeRequirementNotMetError): require_ruby requires Ruby version > 9000/)
end
end
end
Expand Down
12 changes: 10 additions & 2 deletions spec/realworld/edgecases_spec.rb
Expand Up @@ -48,8 +48,16 @@
gem 'capybara', '~> 2.2.0'
gem 'rack-cache', '1.2.0' # last version that works on Ruby 1.9
G
bundle :lock
expect(lockfile).to include("rails (3.2.22.4)")
bundle! :lock
rails_version = ruby(<<-R)
require 'rubygems'
require 'bundler'
fetcher = Bundler::Fetcher.new(Bundler::Source::Rubygems::Remote.new(URI('https://rubygems.org')))
index = fetcher.specs(%w(rails), nil)
rails = index.search(Gem::Dependency.new("rails", "~> 3.0")).last
puts rails.version
R
expect(lockfile).to include("rails (#{rails_version})")
expect(lockfile).to include("capybara (2.2.1)")
end

Expand Down
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Expand Up @@ -2,7 +2,6 @@
$:.unshift File.expand_path("..", __FILE__)
$:.unshift File.expand_path("../../lib", __FILE__)

require "bundler/psyched_yaml"
require "fileutils"
require "uri"
require "digest/sha1"
Expand Down

0 comments on commit 16fcbf7

Please sign in to comment.