REDDOT
Promo code:
$49 off first month of Prime
http://learn.thoughtbot.com
Slide 9
Slide 9 text
No content
Slide 10
Slide 10 text
2 hours by x
Slide 11
Slide 11 text
Closest Ruby conference
to my home™
Slide 12
Slide 12 text
U JELLY?
Slide 13
Slide 13 text
Appraisal
Slide 14
Slide 14 text
I use a gem called “Appraisal” to test my
gems against multiple versions of its
dependencies. You should give it a try!
#RDRC
Slide 15
Slide 15 text
I use a gem called “Appraisal” to test my
gems against multiple versions of its
dependencies. You should give it a try!
#RDRC
http://git.io/i-love-appraisal
Why was this so bad?
• Time consuming
• Can’t test against multiple versions at once
• Doesn’t handle dependency of dependency
• Dependency hell
• $ rm -Rf $GEM_HOME
This is good, but ...
• Waste of space; gems are not shared
• Contributors need to use Ruby manager
that supports Gemset
• May need to have bootstrap script to setup
gemsets
# Run "test" task against all versions
$ rake appraisal test
# Run "test" task against a single version
$ rake appraisal:rails-3-1 test
Slide 80
Slide 80 text
Appraisal
• Allow you to set dependencies in a single
place
• Generate sub-Gemfiles for you
• Install multiple versions of dependencies
• Setup Bundler to use the correct version
of dependency
Slide 81
Slide 81 text
Setup CI
Slide 82
Slide 82 text
No content
Slide 83
Slide 83 text
Show that our gems
are working correctly
Slide 84
Slide 84 text
Show that our gems are
working with multiple
versions of dependency
Already in master
• source
• ruby
• gem
• git
• group
• gemspec
Slide 95
Slide 95 text
Already in master
• source
• ruby
• gem
• git
• group
• gemspec
* Not tested in Appraisals file yet
Slide 96
Slide 96 text
No content
Slide 97
Slide 97 text
Migrate away from
Rake task
W
ork In Progress
Slide 98
Slide 98 text
W
ork In Progress
# Generate Gemfiles
$ rake appraisal:gemfiles
Slide 99
Slide 99 text
W
ork In Progress
# Generate Gemfiles
$ appraisal [generate]
Slide 100
Slide 100 text
W
ork In Progress
# Install dependencies
$ rake appraisal:install
Slide 101
Slide 101 text
W
ork In Progress
# Install dependencies
$ appraisal install
Slide 102
Slide 102 text
W
ork In Progress
# Run "test" task against all versions
$ rake appraisal test
Slide 103
Slide 103 text
W
ork In Progress
# Run "test" task against all versions
$ appraisal rake test
Slide 104
Slide 104 text
W
ork In Progress
# Run "test" task against a single version
$ rake appraisal:rails-3-1 test
Slide 105
Slide 105 text
W
ork In Progress
# Run "test" task against a single version
$ appraisal rails3-1 rake test
Slide 106
Slide 106 text
W
ork In Progress
# Run Ruby test on a single file
$ appraisal rails3-1 ruby -Itest test/foo_test.rb
Slide 107
Slide 107 text
Soon™
Slide 108
Slide 108 text
Remember
Slide 109
Slide 109 text
No content
Slide 110
Slide 110 text
Test it against multiple
versions of its dependencies*
Slide 111
Slide 111 text
Test it against multiple
versions of its dependencies*
* by using Appraisal
Slide 112
Slide 112 text
No content
Slide 113
Slide 113 text
No content
Slide 114
Slide 114 text
Thank you!
Prem Sichanugrist (@sikachu)
Tweet your love:
http://git.io/i-love-appraisal
http://learn.thoughtbot.com –
Promo code: REDDOT
$49 off first month of Prime
I also have some stickers