Tag: Bundler/gemパッケージ作成
bundle gem demo
bundle gem demo -b -t
bundle gem dbtools -b --test=minitest
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'demo/version' Gem::Specification.new do |spec| spec.name = "demo" spec.version = Demo::VERSION spec.authors = ["src"] spec.email = ["tanaka@test.net"] spec.description = %q{TODO: Write a gem description} spec.summary = %q{TODO: Write a gem summary} spec.homepage = "" spec.license = "MIT" spec.files = `git ls-files`.split($/) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] spec.add_development_dependency "bundler", "~> 1.3" spec.add_development_dependency "rake" end
bundle install --path .bundle
require "demo/version" module Demo def self.hello_world p "hello world!!" end end
bundle exec bin/demo.rb
rake build
gem install pkg/demo-0.0.1.gem
require 'demo' puts Demo.hello_world