-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Support gemspec in Appraisals #48
Comments
Yes, my plan is to make Appraisal file to works like a Gemfile. However, I'm curious on why would you want to load your gem's dependency in one appraisal and not in the other, though ... Would you mind sharing a real-world example? |
This morning I setup Appraisals with strong_parameters project to run strong_parameters tests against each version of Rails. However, due to a gotcha in strong_parameters, the strong_parameters gem itself cannot be included when testing itself against Rails 4.0.0.beta1 because it is included. Trying to include the strong_parameters gem actually causes it to fail. I assumed I could just put gemspec in Appraisals for within appraise blocks for Rails 3.x (I had a loop that was checking the latest 3.1.x, 3.2.x against every possible strong params version that was capable of running with that version) and another appraise block for Rails 4.0.0.beta1 that would not include the gemspec (and I had removed gemspec from the Gemfile at the root and made some other alterations). I am not blocked by not having this feature, and I doubt that dhh or anyone else on that project would want strong_parameters appraised like that, but I was having trouble with something and wanted to build confidence and test it out. BTW- Thanks so much for your work on Appraisals. I'm using it in a few projects now and it's awesome. I like not having to be dependent on travis or other CI just to run tests locally against various versions of gems. |
e.g.
|
Got it. Thanks for the example. 👍 |
👍 Thanks, @sikachu! |
Even though Appraisal supports gemspec in Gemfile, if you only want to include the gemspec for certain appraisals within the Appraisals file. Most of the time you want to run tests against the local gem, but sometimes you may have a set of tests that you want to run without the local gem, so you'd want something like this in Appraisals:
But currently that would result in an error, e.g.:
This is probably an edge case, but it seems like Appraisals should work like like a more flexible Gemfile, and for it to do that, it seems like it should be able to support loading the gemspec by specifying Appraisals instead of Gemfile if that is required.
The text was updated successfully, but these errors were encountered: