Your SlideShare is downloading. ×
HOW TO BUILD GEMS #shibuyarb
HOW TO BUILD GEMS #shibuyarb
HOW TO BUILD GEMS #shibuyarb
HOW TO BUILD GEMS #shibuyarb
HOW TO BUILD GEMS #shibuyarb
HOW TO BUILD GEMS #shibuyarb
HOW TO BUILD GEMS #shibuyarb
HOW TO BUILD GEMS #shibuyarb
HOW TO BUILD GEMS #shibuyarb
HOW TO BUILD GEMS #shibuyarb
HOW TO BUILD GEMS #shibuyarb
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

HOW TO BUILD GEMS #shibuyarb

2,187

Published on

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,187
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
6
Comments
0
Likes
6
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. How to build gems Shibuya.rb[:20120620] 2012/06/20 @tagomoris NHN Japan Corp.12年6月20日水曜日
  • 2. @tagomoris NHN Japan Corp Web Service Division12年6月20日水曜日
  • 3. Skeleton gemname.gemspec lib/gemname.rb Files you need Gemfile, Rakefile, test, spec AUTHORS, LICENSE, README(.rdoc/.md/...)12年6月20日水曜日
  • 4. 3 ways to make gems Handmake from scratch jeweler bundler12年6月20日水曜日
  • 5. Jeweler Latest release: January 25, 2012 Init: directory tree & github repository Gemfile Rakefile with many tasks (test, rcov, ...) test/helper.rb sometimes doesnt work correctly.... Versioning: rake version:bump:major Release: rake release12年6月20日水曜日
  • 6. Bundler What we all installed Init: directory tree only Gemfile (refers .gemspec only) Rakefile (a few tasks) lib/gemname/version.rb Versioning: edit version.rb (or .gemspec directly) Release: rake release12年6月20日水曜日
  • 7. Which we should use? Bundler, i think simple fully configurable with gemspec file free from xxxxxx code and rake tasks12年6月20日水曜日
  • 8. Steps to build gem: directory tree bundle gem foobar cd foobar vi foobar.gemspec vi .gitignore git remote add origin URL git add .... git commit -m ... git push -u origin master12年6月20日水曜日
  • 9. Steps to build gem: write tests and code mkdir spec # or mkdir test vi spec/spec_helper.rb # or test/test_helper.rb WRITE TESTS WRITE CODE git add .... git commit -m .... rake install # and use it by yourself12年6月20日水曜日
  • 10. Steps to build gem: release vi lib/foobar/version.rb # or gem.version in gemspec vi foobar.gemspec vi README.md git add .... git commit -m .... rake release12年6月20日水曜日
  • 11. # -*- encoding: utf-8 -*- Gem::Specification.new do |gem| gem.name = "mysql2-cs-bind" gem.version = "0.0.2" gem.authors = ["TAGOMORI Satoshi"] gem.email = ["tagomoris@gmail.com"] gem.homepage = "https://github.com/tagomoris/mysql2-cs-bind" gem.summary = %q{.... } gem.description = %q{.... } gem.files = `git ls-files`.split($) gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) gem.require_paths = ["lib"] gem.add_runtime_dependency "mysql2" # tests gem.add_development_dependency "mysql2" gem.add_development_dependency eventmachine gem.add_development_dependency rake-compiler, "~> 0.7.7" gem.add_development_dependency rake, 0.8.7 gem.add_development_dependency rspec end12年6月20日水曜日

×