Closed simi closed 11 years ago
This project uses Jeweler for its gemspec, and you're editing the generated file. Make changes to Gemfile, then run rake gemspec
.
I believe the Gemfile reference is incorrect, gem "mongoid", "~> 3.1"
isn't what you intended per supporting mongoid 3.0 and above.
Gemfile is used only for local development. Correct mongoid version reference is in gemspec, which is used for resolving dependencies by bundler for example. I'll add later travis setup to use both ~> 3.0 and ~> 3.1 mongoid versions.
rake gemspec
did this -> https://gist.github.com/simi/5301920 @dblock
I tried to use mongoid ~> 3.0 and ~> 3.1 in Gemfile and all tests were green. I'll do same setup for Travis.
@simi I can see how this looks confusing, but you're incorrect.
The gemfile is the source of the .gemspec for Jewler, a tool that is used to generate the .gemspec that is then used for production purposes. Whether you craft a gemspec manually or with Jewler is more like a style choice, read about it.
Go back to clean code without your changes and modify Gemfile
to have the correct Mongoid reference, probably ~> 3.0
which means 3.0, 3.1, etc. Any 3.x version. Then run rake gemspec
, that will create an updated .gemspec. I think that should be everything you need.
OK, I'll try. I'm not Jeweler user.
Also, thank you for sending the patch. We definitely want to fix the dependency so that this gem can work with whatever version of Mongoid.
Ready for rubygems push @artsy, @dblock I can setup Travis for both versions later.