sous-chefs / certificate

Development repository for the certificate cookbook
https://supermarket.chef.io/cookbooks/certificate
73 stars 43 forks source link

Replace dots with underscores in search_id #38

Closed Maks3w closed 9 years ago

Maks3w commented 10 years ago

dots are not part of a valid data bag item id.

this make possible to have this.

  certificate_manage 'www.example.com' do
    action :create
  end
{
   "id": "www_example_com"
}

NOTE: This PR include a rspec case for test this.

So the first commit prepare all the rspec stuf.

Maks3w commented 9 years ago

@tmatilai ping

chr4 commented 9 years ago

I'm using dots in my data bags for ages and never had a problem. @Maks3w Where do you take it from, that dots are not allowed? This change broke a lot of my recipes, as I just stored them using the fqdn i.e. www.example.com

atomic-penguin commented 9 years ago

@chr4 this was a bug in knife that has since been addressed. I should have researched the problem more thoroughly before merging.

I propose reverting this change.

chr4 commented 9 years ago

+1 for reverting.

Maks3w commented 9 years ago

I didn't notice this was a "bug" on knife. I agree with revert and add some kind of note (may a wiki page named troubleshooting) with info about the error message and the way for fix it (upgrading chef or adding search_id "mydomain.com".gsub('.', '_'))

Also this PR adds scafolding for use chefspec which is interesting to maintain and use for future test coverage