Gem::Specification.new do |s| # The attributes end Gem Speci ication In order to create a gem, you need to define a gem specification, commonly called a “gemspec”.
Required gemspec attributes name This gem’s name summary A short summary of this gem’s description. Displayed in `gem list -d`. version This gem’s version s.required_ruby_version = ">= 1.8.7" Required Ruby Version
Name, Summary and Version s.name = "pinch" s.summary = "Retrieve a file from" + "inside a zip file, over" + "the network!" s.version = Pinch::VERSION I generally add a ProjectName::VERSION constant to all of my projects, this makes it easy to show the current version at runtime.
s.add_development_dependency 'yard', '~> 0.7' s.add_development_dependency 'minitest','~> 2.8' s.add_development_dependency 'fakeweb', '~> 1.3' s.add_development_dependency 'vcr', '~> 1.11' Dependencies No runtime dependencies in this particular project, otherwise I’d need a few calls to s.add_dependency