Post on 09-Aug-2015
transcript
File Structure
• Top level files are Gemfile, LICENSE.txt, README.md, Rakefile, *.gemspec, and /lib
• Files are added in /lib, optionally (recommended), create a /spec folder for your tests (assuming you use Rspec)
• Executables would go in /bin
backwards.gemspec
• Your gemspec file is where your gem’s configuration is set.
• You can add dependencies, set versioning, etc.
• The first thing we’ll do in our example is add testing resources
Publishing Your Gem
1. Create a rubygems.org account
2. gem build backwards.gemspec (make sure you get rid of any TODOs in your .gemspec file!). This will create a .gem file in your working directory
3. Put your rubygems.org credentials in a file in ~/.gem/credentials
4. gem push backwards-0.0.1.gem