Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Gemas en ruby
Search
Angel Celis Botto
August 14, 2015
Programming
69
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Gemas en ruby
Charla sobre gemas en ruby
Angel Celis Botto
August 14, 2015
More Decks by Angel Celis Botto
See All by Angel Celis Botto
Liftit Sttorage
angelbotto
0
48
Growth optional
angelbotto
0
180
Infiniteloops bogota-ruby-meetup
angelbotto
0
61
Cheers presentation
angelbotto
0
84
Pitch Desk
angelbotto
1
160
Landmoda pitch
angelbotto
0
69
LandModa - Manual de Identidad Corporativa
angelbotto
1
85
Raffi krikorian twitter timelines at scale
angelbotto
1
170
Beu desk pith june 2013
angelbotto
0
150
Other Decks in Programming
See All in Programming
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
230
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
110
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
1
280
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
620
SREの越境 / SRE Collaboration
y0hgi
0
180
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
280
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
170
Security issues being discussed on Web Platforms
petamoriken
0
940
XHTMLが残したもの
yosuke_furukawa
PRO
2
800
GKE で Pod の見方を変えたら、スケールアウト時の挙動を真に捉えられた話
stkk
0
120
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
240
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
How to build a perfect <img>
jonoalderson
1
6k
Balancing Empowerment & Direction
lara
6
1.3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
From π to Pie charts
rasagy
1
370
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
240
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
YesSQL, Process and Tooling at Scale
rocio
174
15k
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