chef-cookbooks / rubygems

Configures Rubygems sources and provides rubygems_api resource
https://supermarket.chef.io/cookbooks/rubygems
Apache License 2.0
5 stars 14 forks source link

Fix gemrc error #11

Closed gjkliewer closed 7 years ago

gjkliewer commented 7 years ago

Description

When using this cookbook like so (tested with Chef 12.12.15)

"default_attributes": {
  "rubygems": {
    "gem_sources": [
      "https://rubygems.org",
      "https://path_to/my_internal/rubygems/"
    ]
  },
  ...

the cookbook is generating the .gemrc file incorrectly. Here are the contents of /root/.gemrc

---
sources:
- https://rubygems.org
:sources: !ruby/array:Chef::Node::ImmutableArray
- https://rubygems.org
- https://path_to/my_internal/rubygems/

Can see that it is injecting !ruby/array:Chef::Node::ImmutableArray. Using to_a fixes the issue.

Issues Resolved

N/A

Check List

AnthonyRoss commented 7 years ago

+1 to this

gjkliewer commented 7 years ago

@rhass ok should be good now, I misread the part on how to add the signature

gjkliewer commented 7 years ago

@tas50 I saw that this was tagged, but I don't yet see it in the supermarket. Do you know when it will be uploaded?

gjkliewer commented 7 years ago

Any chance this can get pushed to the chef supermarket? cc @rhass @tas50

rhass commented 7 years ago

@kleaver Sorry about that, I just published v1.0.3 to the supermarket.