Closed jgarber closed 13 years ago
I'll do the setting; look for it in 0.3.4. I'll comment here when it's added!
Oh, and thanks for the request!
Nice! I never expected to write up a ticket and have it answered before my gem install rails was done! :)
Thanks for doing it. I think this project is great!
The fix has been pushed as 0.3.4, you must now explicitly provide test_development_dependencies
set to true in your test_options
for this to happen.
Please test the latest version and close this ticket if it resolves your issues. Thanks!
Closing this, please feel free to reply or reopen if things aren't working.
I'm having trouble getting this to work. It still asks me if I want to test the dependencies as I'm installing them. Am I doing something wrong?
~/Documents/Business/Sites/jasongarber.com(master) $ gem list rubygems-test *** LOCAL GEMS *** rubygems-test (0.3.5, 0.3.2) ~/Documents/Business/Sites/jasongarber.com(master) $ gem -v 1.5.0 ~/Documents/Business/Sites/jasongarber.com(master) $ cat ~/.gemrc --- :update_sources: true :bulk_threshold: 1000 install: --no-rdoc --no-ri :sources: - http://gems.rubyforge.org :backtrace: false update: --no-rdoc --no-ri :verbose: true :benchmark: false test_options: # auto_test_on_install: true test_on_install: true test_development_dependencies: false install_development_dependencies: true # upload_results: true force_install: true # set if you want to install gems even if they fail tests. force_uninstall_on_failure: false ~/Documents/Business/Sites/jasongarber.com(master) $ gem install heroku Fetching: json-1.4.6.gem (100%) Building native extensions. This could take a while... Test json (1.4.6)? [Yn] n Fetching: heroku-1.17.11.gem (100%) Test heroku (1.17.11)? [Yn] y Gem 'heroku' (version 1.17.11) needs to opt-in for testing. Locally available testing helps gems maintain high quality by ensuring they work correctly on a wider array of platforms than the original developer can access. If you are the author: * Add the file '.gemtest' to your spec.files * Ensure 'rake test' works and doesn't do system damage * Add your tests and Rakefile to your gem. For more information, please see the rubygems-test README: https://github.com/rubygems/rubygems-test/blob/master/README.txt Successfully installed json-1.4.6 Successfully installed heroku-1.17.11 2 gems installed
remove the old rubygems-test. does it still break?
Yes, still breaks, but I think my expectations are off. I was expecting it to not test any dependencies (runtime or development), but it looks like the option you added is just for development dependencies, right?
That's correct.
I see. I was expecting it to not test any dependencies (including runtime), but perhaps that's undesirable.
My original suggestion was to mute or aggregate the "developer hasn't opted-in" warnings for each of the dependencies? It clutters the output considerably and makes it hard to tell what's going on. My gem has opted-in, so I really don't want to see those two paragraphs of explanation over and over.
~ $ gem list *** LOCAL GEMS *** awesome_print (0.3.1) bundler (1.0.10, 1.0.9) hoe (2.9.1) rake (0.8.7) rubygems-test (0.3.5) ~ $ gem install cucumber Fetching: json-1.4.6.gem (100%) Building native extensions. This could take a while... Gem 'json' (version 1.4.6) needs to opt-in for testing. Locally available testing helps gems maintain high quality by ensuring they work correctly on a wider array of platforms than the original developer can access. If you are the author: * Add the file '.gemtest' to your spec.files * Ensure 'rake test' works and doesn't do system damage * Add your tests and Rakefile to your gem. For more information, please see the rubygems-test README: https://github.com/rubygems/rubygems-test/blob/master/README.txt Fetching: gherkin-2.3.3.gem (100%) Building native extensions. This could take a while... Gem 'gherkin' (version 2.3.3) needs to opt-in for testing. Locally available testing helps gems maintain high quality by ensuring they work correctly on a wider array of platforms than the original developer can access. If you are the author: * Add the file '.gemtest' to your spec.files * Ensure 'rake test' works and doesn't do system damage * Add your tests and Rakefile to your gem. For more information, please see the rubygems-test README: https://github.com/rubygems/rubygems-test/blob/master/README.txt Fetching: term-ansicolor-1.0.5.gem (100%) Gem 'term-ansicolor' (version 1.0.5) needs to opt-in for testing. Locally available testing helps gems maintain high quality by ensuring they work correctly on a wider array of platforms than the original developer can access. If you are the author: * Add the file '.gemtest' to your spec.files * Ensure 'rake test' works and doesn't do system damage * Add your tests and Rakefile to your gem. For more information, please see the rubygems-test README: https://github.com/rubygems/rubygems-test/blob/master/README.txt Fetching: builder-3.0.0.gem (100%) Gem 'builder' (version 3.0.0) needs to opt-in for testing. Locally available testing helps gems maintain high quality by ensuring they work correctly on a wider array of platforms than the original developer can access. If you are the author: * Add the file '.gemtest' to your spec.files * Ensure 'rake test' works and doesn't do system damage * Add your tests and Rakefile to your gem. For more information, please see the rubygems-test README: https://github.com/rubygems/rubygems-test/blob/master/README.txt Fetching: diff-lcs-1.1.2.gem (100%) Gem 'diff-lcs' (version 1.1.2) needs to opt-in for testing. Locally available testing helps gems maintain high quality by ensuring they work correctly on a wider array of platforms than the original developer can access. If you are the author: * Add the file '.gemtest' to your spec.files * Ensure 'rake test' works and doesn't do system damage * Add your tests and Rakefile to your gem. For more information, please see the rubygems-test README: https://github.com/rubygems/rubygems-test/blob/master/README.txt Fetching: cucumber-0.10.0.gem (100%) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) Thank you for installing cucumber-0.10.0. Please be sure to read http://wiki.github.com/aslakhellesoy/cucumber/upgrading for important information about this release. Happy cuking! (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) Gem 'cucumber' (version 0.10.0) needs to opt-in for testing. Locally available testing helps gems maintain high quality by ensuring they work correctly on a wider array of platforms than the original developer can access. If you are the author: * Add the file '.gemtest' to your spec.files * Ensure 'rake test' works and doesn't do system damage * Add your tests and Rakefile to your gem. For more information, please see the rubygems-test README: https://github.com/rubygems/rubygems-test/blob/master/README.txt Successfully installed json-1.4.6 Successfully installed gherkin-2.3.3 Successfully installed term-ansicolor-1.0.5 Successfully installed builder-3.0.0 Successfully installed diff-lcs-1.1.2 Successfully installed cucumber-0.10.0 6 gems installed ~ $
Yeah; been thinking about how best to solve this. Gonna leave this open until I figure it out; but I wanted to get back to you!
For awhile I had auto_test_on_install enabled and got tired of seeing the opt-in message on each dependency. I switched to just test_on_install, but now I have to say 'n' for each dependency. When I'm installing a gem, I'm interested to know whether it works, not whether rake, activesupport, or treetop work.
May I suggest that dependencies be muted? You can still do the tests if auto_test_on_install is true, but just don't clutter the output with warnings. Or, introduce a new setting to toggle dependency testing.