Skip to content
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

Update README.md to add appraisal in gemspec instead of Gemfile #122

Merged
merged 2 commits into from
Apr 24, 2017
Merged

Update README.md to add appraisal in gemspec instead of Gemfile #122

merged 2 commits into from
Apr 24, 2017

Conversation

aripollak
Copy link
Contributor

I'm not really sure if this is the right thing to do, so this is more of an RFC. I was just trying to set up appraisal in a gem that was created a year ago and the instructions weren't working.

@mike-burns
Copy link
Contributor

It might be worthwhile to call out why this goes in the gemspec instead of the Gemfile.

@odlp odlp self-requested a review April 19, 2017 16:07
Copy link

@odlp odlp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @aripollak one small request to update the quotes please.

Alternatively you can allow commits from maintainers on your PR and I can make this adjustment.

README.md Outdated

gem "appraisal"
s.add_development_dependency 'appraisal'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please could this be changed to double quotes, so it remains consistent with the rest of the readme?

@aripollak
Copy link
Contributor Author

@odlp done. Looks like the allow-edits box is already checked too.

@odlp odlp merged commit c3e369b into thoughtbot:master Apr 24, 2017
@deivid-rodriguez
Copy link
Contributor

Why this? I actually prefer the other way around, since for example I'm able to point directly to the master branch in github if I need to.

@aripollak
Copy link
Contributor Author

@deivid-rodriguez on a new gem project, putting appraisal in Gemfile wasn't working.

@deivid-rodriguez
Copy link
Contributor

mmmm, can you be more specific? What wasn't working? I did a simple test and it worked fine:

deivid@pantani ~/Code $ bundle gem testgem
Creating gem 'testgem'...
MIT License enabled in config
Code of conduct enabled in config
      create  testgem/Gemfile
      create  testgem/.gitignore
      create  testgem/lib/testgem.rb
      create  testgem/lib/testgem/version.rb
      create  testgem/testgem.gemspec
      create  testgem/Rakefile
      create  testgem/README.md
      create  testgem/bin/console
      create  testgem/bin/setup
      create  testgem/.travis.yml
      create  testgem/.rspec
      create  testgem/spec/spec_helper.rb
      create  testgem/spec/testgem_spec.rb
      create  testgem/LICENSE.txt
      create  testgem/CODE_OF_CONDUCT.md
Initializing git repo in /home/deivid/Code/testgem
deivid@pantani ~/Code $ cd testgem/
deivid@pantani ~/Code/testgem $ sed -i 's/TODO/something/' testgem.gemspec 
deivid@pantani ~/Code/testgem $ echo "gem 'appraisal'" >> Gemfile 
deivid@pantani ~/Code/testgem $ bundle
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 10.5.0
Using bundler 1.14.6
Using thor 0.19.4
Using diff-lcs 1.3
Using rspec-support 3.5.0
Using testgem 0.1.0 from source at `.`
Using appraisal 2.2.0
Using rspec-core 3.5.4
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Using rspec 3.5.0
Bundle complete! 5 Gemfile dependencies, 11 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
deivid@pantani ~/Code/testgem $ 

@aripollak
Copy link
Contributor Author

@deivid-rodriguez when using bundle gem with Bundler 1.13.6, the auto-generated Gemfile explicitly includes the comment "Specify your gem's dependencies in testgem.gemspec", and example development dependencies are specified in the gemspec. Even if it works as is (I don't remember what wasn't working anymore), Bundler best practices say to use the gemspec.

@deivid-rodriguez
Copy link
Contributor

Yes, I've heard that argument before: "I do it because bundler tells me to". But I've never been given an actual reason.

My personal best practice is to specify add_development_dependeny 'bundler', and then manage all development dependencies via Gemfile. It works great and I find it more flexible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants