Closed jeremywrowe closed 5 years ago
bundler/gem_tasks
provide:
rake build # Build spreedly-2.0.20.gem into the pkg directory
rake clean # Remove any temporary products
rake clobber # Remove any generated files
rake default # Run the unit test suite
rake install # Build and install spreedly-2.0.20.gem into system gems
rake install:local # Build and install spreedly-2.0.20.gem into system gems without network access
rake release[remote] # Create tag v2.0.20 and build and push spreedly-2.0.20.gem to rubygems.org
When running rake -T
bundler is required to run them, but it doesn't block other development. I guess what I am getting at, we shouldn't be strict with version of bundler, and most developers have it on their machine - so why specifiy version or requirement :)
I do understand the idea of wanting to remove extraneous dependency declarations if they really are extraneous. I also agree that there is no reason to lock our development dependencies to specific required versions.
However, from my point of view, the gemspec is there as a form of machine-readable documentation. If you can't actually work on the gem's development without having Bundler installed, it seems more correct to me to leave the declaration in place, even if there's a bit of overhead to pay for that explicitness. (Most developers using Ruby will also have rake, test-unit, and even pry, yet we do also declare those in the gemspec).
Ah, but the big difference here is that bundler loads gems for you. When using bundler - you have to list all dependencies dev or otherwise so that bundler can pull the correct one. Bundler does not fail if bundler isn't included in the gemspec, however it would if you were to omit something like pry.
Bundler does not fail if bundler isn't included in the gemspec, however it would if you were to omit something like pry.
I recognize that Bundler itself doesn't need to have it listed as a dev dependency when it is doing the dependency management, but Bundler's functionality is orthogonal to the Bundler-agnostic gemspec itself. Put another way, the gemspec has value even where Bundler is not in view, and should represent the actual dependencies of the gem.
rake
does fail if you attempt to use our Rakefile
without having Bundler installed. We're not only using it as an optional means to manage dependency versions, but also as a library which provides default rake tasks. If it weren't for that usage, Bundler would be optional and thus not a dependency for doing development work on the gem.
Even though this is a small change, because of my above hesitations, I don't feel I'm in a good position to sign off on this change. However, I'm happy to defer to others with more experience with Spreedly and the Spreedly Gem on this question.
Happy to close for now.
This slows bundler down when resolving dependencies and isn't really needed since most people have bundler installed on their system