Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix gem metadata when using aliases #894

Merged
merged 1 commit into from
Feb 24, 2015
Merged

Fix gem metadata when using aliases #894

merged 1 commit into from
Feb 24, 2015

Conversation

arthurnn
Copy link
Member

Problem

After we upgraded our yaml parser to Psych latest, and start using safe_load, the YAML aliases on the metadata file stop working, they were been rejected by rubygems.org.

Solution

On safe_load we need to pass a true flag to allow aliases.


I added a regression test to make sure this doesnt happen again, aliases-0.0.0.gem is pretty much a test gem with one dependency like this (which includes a &id001 alias):

- !ruby/object:Gem::Dependency 
  name: bundler
  prerelease: false
  requirement: &id001 !ruby/object:Gem::Requirement 
    requirements: 
    - - ~>
      - !ruby/object:Gem::Version 
        version: "1.0"
  type: :development
  version_requirements: *id001

review @evanphx @qrush @dwradcliffe @sferik
cc @tenderlove

evanphx added a commit that referenced this pull request Feb 24, 2015
Fix gem metadata when using aliases
@evanphx evanphx merged commit f78231f into master Feb 24, 2015
@arthurnn arthurnn deleted the fix_yaml_aliases branch February 24, 2015 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants