bploetz / versionist

A plugin for versioning Rails based RESTful APIs.
MIT License
971 stars 51 forks source link

Eliminate validation in copy_api_version generator #27

Closed bploetz closed 12 years ago

bploetz commented 12 years ago

When trying to copy an existing API version to a new one, I encountered this:

bundle exec rails g versionist:copy_api_version v1 V1 v2 V2
/Users/bploetz/.rvm/gems/ruby-1.9.2-p0@my-api/gems/versionist-0.2.1/lib/generators/versionist/copy_api_version/copy_api_version_generator.rb:29:in `block in validate_old_version': old API version module namespace V1 not found in spec/controllers/v1 (RuntimeError)

Well, what if I don't have controller specs, and only request specs?

This generator should simply ignore bits that don't exist when copying API versions, rather than failing hard.

bploetz commented 12 years ago

This is fixed in versionist 0.3.0. Also fixed a bug when copying documentation.