Create
Your Own Gem
with github, jeweler and rubygems
Gem structure
Gem repository
Gem versioning
Gem releasing
Get a Github Account




    Don’t you have one yet?
Rubygems Account
gem install
  jeweler
Create a Project
jeweler an-awesome-gem --rspec
  --rubygems
cd an-awesome-gem


Safe some time with defaults:
export JEWE...
Create a Version
rake version:write




> version is 0.0.0
Update Versions
rake version:bump:minor

                     major . minor . patch


> version is 0.1.0
Description
require 'rubygems'
require 'rake'

begin
  require 'jeweler'
  Jeweler::Tasks.new do |gem|
    gem.name = "an-...
Github Repository
Git It
git add .
git commit -m "initial commit"
Local Install
[sudo] rake install


Be careful:
- Only commited files will be installed
- Once commited but changed files ...
Release It
rake release

Magic:
✓ Commits

✓ Creates a release tag

✓ Pushes to github

✓ Releases to:

  rubygems.org/gem...
Ready!
Don’t Forget
★   Edit/create README.md
★   Add a CHANGELOG.md
★   Add dependencies in Rakefile
★   Write some specs/tests
...
Any questions?
last name
first name


             nico@hagenburger.net
    e-mail
              twitter
                        blog
Nächste SlideShare
Wird geladen in ...5
×

Create your-own-gem-with-github-jeweler-rubygems

3,822

Published on

Create your own gem with github, jeweler and rubygems.org. I gave this talk at Railscamp Germany 4.

Published in: Technologie
0 Kommentare
4 Gefällt mir
Statistiken
Notizen
  • Hinterlassen Sie den ersten Kommentar

Keine Downloads
Views
Gesamtviews
3,822
Bei Slideshare
0
Aus Einbettungen
0
Anzahl an Einbettungen
0
Aktionen
Geteilt
0
Downloads
12
Kommentare
0
Gefällt mir
4
Einbettungen 0
No embeds

No notes for slide

Create your-own-gem-with-github-jeweler-rubygems

  1. 1. Create Your Own Gem with github, jeweler and rubygems
  2. 2. Gem structure Gem repository Gem versioning Gem releasing
  3. 3. Get a Github Account Don’t you have one yet?
  4. 4. Rubygems Account
  5. 5. gem install jeweler
  6. 6. Create a Project jeweler an-awesome-gem --rspec --rubygems cd an-awesome-gem Safe some time with defaults: export JEWELER_OPTS="--rspec"
  7. 7. Create a Version rake version:write > version is 0.0.0
  8. 8. Update Versions rake version:bump:minor major . minor . patch > version is 0.1.0
  9. 9. Description require 'rubygems' require 'rake' begin require 'jeweler' Jeweler::Tasks.new do |gem| gem.name = "an-awesome-gem" gem.summary = %Q{TODO: one-line summary of your gem} gem.description = %Q{TODO: longer description of your gem} gem.email = "nico@hagenburger.net" gem.homepage = "http://github.com/hagenburger/an-awesome-gem" gem.authors = ["Nico Hagenburger"] gem.add_development_dependency "rspec", ">= 1.2.9" # gem is a Gem::Specification... see http://www.rubygems.org/ read/chapter/20 for additional settings end an-awesome-gem/Rakefile
  10. 10. Github Repository
  11. 11. Git It git add . git commit -m "initial commit"
  12. 12. Local Install [sudo] rake install Be careful: - Only commited files will be installed - Once commited but changed files will be installed with current not commited version
  13. 13. Release It rake release Magic: ✓ Commits ✓ Creates a release tag ✓ Pushes to github ✓ Releases to: rubygems.org/gems/an-awesome-gem
  14. 14. Ready!
  15. 15. Don’t Forget ★ Edit/create README.md ★ Add a CHANGELOG.md ★ Add dependencies in Rakefile ★ Write some specs/tests ★ Promote it!
  16. 16. Any questions?
  17. 17. last name first name nico@hagenburger.net e-mail twitter blog
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×