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

HOW TO BUILD GEMS #shibuyarb

on

  • 2,514 views

 

Statistics

Views

Total Views
2,514
Views on SlideShare
1,578
Embed Views
936

Actions

Likes
6
Downloads
5
Comments
0

6 Embeds 936

http://d.hatena.ne.jp 913
http://us-w1.rockmelt.com 12
http://hatenatunnel.appspot.com 6
http://webcache.googleusercontent.com 2
http://translate.googleusercontent.com 2
http://ec2-176-34-18-86.ap-northeast-1.compute.amazonaws.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

HOW TO BUILD GEMS #shibuyarb HOW TO BUILD GEMS #shibuyarb Presentation Transcript

  • How to build gems Shibuya.rb[:20120620] 2012/06/20 @tagomoris NHN Japan Corp.12年6月20日水曜日
  • @tagomoris NHN Japan Corp Web Service Division12年6月20日水曜日
  • Skeleton gemname.gemspec lib/gemname.rb Files you need Gemfile, Rakefile, test, spec AUTHORS, LICENSE, README(.rdoc/.md/...)12年6月20日水曜日
  • 3 ways to make gems Handmake from scratch jeweler bundler12年6月20日水曜日
  • 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日水曜日
  • 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日水曜日
  • Which we should use? Bundler, i think simple fully configurable with gemspec file free from xxxxxx code and rake tasks12年6月20日水曜日
  • 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日水曜日
  • 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日水曜日
  • 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日水曜日
  • # -*- 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日水曜日