Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Gemas en ruby
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Angel Celis Botto
August 14, 2015
Programming
1
64
Gemas en ruby
Charla sobre gemas en ruby
Angel Celis Botto
August 14, 2015
Tweet
Share
More Decks by Angel Celis Botto
See All by Angel Celis Botto
Liftit Sttorage
angelbotto
0
44
Growth optional
angelbotto
0
150
Infiniteloops bogota-ruby-meetup
angelbotto
0
59
Cheers presentation
angelbotto
0
79
Pitch Desk
angelbotto
1
160
Landmoda pitch
angelbotto
0
65
LandModa - Manual de Identidad Corporativa
angelbotto
1
79
Raffi krikorian twitter timelines at scale
angelbotto
1
160
Beu desk pith june 2013
angelbotto
0
140
Other Decks in Programming
See All in Programming
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
340
モダンOBSプラグイン開発
umireon
0
160
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.2k
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
360
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
680
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
230
Codex の「自走力」を高める
yorifuji
0
1.3k
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.5k
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
350
AI時代の脳疲弊と向き合う ~言語学としてのPHP~
sakuraikotone
1
1.2k
PHPで TLSのプロトコルを実装してみる
higaki_program
0
310
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Design in an AI World
tapps
0
170
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
160
It's Worth the Effort
3n
188
29k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
110
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
240
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
240
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
290
The Pragmatic Product Professional
lauravandoore
37
7.2k
Transcript
Ruby Gems
Angel Botto Founder Landmoda Inc github.com/angelbotto twitter/bottico botti.co
¿QUE ES UNA GEMA? Ruby Gems - ¿Que es una
gema?
Ruby Gems - Comando gem Comando gem $ gem search
rails --------------> Buscar gemas $ gem install rails --------------> Instalar gemas $ gem list --------------> Listar gemas instaladas $ gem uninstall rails --------------> Remover gemas
Ruby Gems - ¿para que sirven las gema ? ¿para
que sirven las gemas? > Simplificar funciones complejas. > Crear aplicaciones para la linea de comandos. > Facilitar el uso de una aplicacion publica. > Reusar codigo en una o varias aplicaciones.
¿COMO CREAR UNA GEMA? Ruby Gems - ¿Que es una
gema?
Ruby Gems - dale un buen nombre Dale un buen
nombre ☝ > Underscore para gemas de multiples palabras $ gem hola_mundo ----------------> HolaMundo > Dashes para extensiones $ gem rails-hola_mundo ----------------> Rails::HolaMundo > Asegurate que el nombre este disponible $ gem query --remote --name-matches ‘^rails$’ $ gem query —rn ‘^rails$’
Ruby Gems - Creemos una gema Creemos una gema $
gem install bundler create rails_girls/Gemfile create rails_girls/Rakefile create rails_girls/LICENSE.txt create rails_girls/README.md create rails_girls/.gitignore create rails_girls/rails_girls.gemspec create rails_girls/lib/rails_girls.rb create rails_girls/lib/rails_girls/version.rb $ bundle gem rails_girls
Ruby Gems - Gemfile & Rakefile Gemfile & Rakefile Gemfile
source 'https://rubygems.org' gemspec Rakefile require "bundler/gem_tasks" $ rake -T rake build rake install rake release
Ruby Gems - *.gemspec *.gemspec rails_girls.gemspec Gem::Specification.new do |spec| spec.name
= "rails_girls" spec.version = RailsGirls::VERSION spec.authors = ["angelbotto"] spec.email = ["
[email protected]
"] #.… Referencias de especificaciones: https://30k.co/hj
Ruby Gems - Primero las pruebas TDD Primero las pruebas
TDD require 'minitest/autorun' require 'rails_girls' class RailsGirlsTest < Minitest::Test def test_hi_without_name assert_equal "Hola !!", RailsGirls.hi end def test_with_name assert_equal "Hola Angel!!", RailsGirls.hi('Angel') end end test/test_rails_girls.rb
Ruby Gems - Un poco de codigo Un poco de
codigo lib/rails_girls.rb require "rails_girls/version" module RailsGirls def self.hi(name = nil) "Hola #{name}!!".strip end end
Ruby Gems - Que tal un ejecutable Que tal un
ejecutable $ ruby -I lib ./bin/rails_girls Hola !! $ ruby -I lib ./bin/rails_girls Angel Hola Angel!! #!/usr/bin/env ruby require ‘rails_girls’ puts RailsGirls.hi(ARGV[0]) mkdir bin touch bin/rails_girls chmod a+x bin/rails_girls
¿COMO PUBLICO MI GEMA? Ruby Gems - ¿Como publico mi
gema?
Ruby Gems - rubyGems.org rubyGems.org $ open http://rubygems.org/users/new $ rake
release $ gem push pkg/rails_girls-0.0.1.gem $ gem install rails_girls
RECURSOS ADICIONALES Ruby Gems - recursos adicionales Asciicasts: https://30k.co/hk RubyGems:
https://30k.co/hl
¿PREGUNTAS? Ruby Gems - ¿preguntas?
Ruby Gems - gracias GRACIAS