Browse files

Use Bundler gem conventions.

  • Loading branch information...
1 parent b8d3455 commit c74077cc23234ae1d35ead4d4708579528c90fba @gabebw gabebw committed Nov 12, 2011
Showing with 19 additions and 27 deletions.
  1. +2 −4 Gemfile
  2. +1 −4 Rakefile
  3. +15 −18 cocaine.gemspec
  4. +1 −1 lib/cocaine/version.rb
View
6 Gemfile
@@ -1,5 +1,3 @@
source 'http://rubygems.org'
-group :development do
- gem 'rake'
- gemspec :name => "cocaine"
-end
+
+gemspec
View
5 Rakefile
@@ -1,6 +1,4 @@
-require 'rubygems'
-require 'bundler/setup'
-require 'rake'
+require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
desc 'Default: Run specs.'
@@ -12,4 +10,3 @@ namespace :spec do
t.pattern = 'spec/cocaine/**/*_spec.rb'
end
end
-
View
33 cocaine.gemspec
@@ -1,27 +1,24 @@
-$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
+$LOAD_PATH.push File.expand_path("../lib", __FILE__)
require 'cocaine/version'
-include_files = ["README*", "LICENSE", "Rakefile", "{lib,spec}/**/*"].map do |glob|
- Dir[glob]
-end.flatten
-exclude_files = ["**/*.rbc"].map do |glob|
- Dir[glob]
-end.flatten
-
-spec = Gem::Specification.new do |s|
+Gem::Specification.new do |s|
s.name = "cocaine"
- s.version = Cocaine::VERSION
+ s.version = Cocaine::VERSION.dup
+ s.platform = Gem::Platform::RUBY
s.author = "Jon Yurek"
s.email = "jyurek@thoughtbot.com"
s.homepage = "http://www.thoughtbot.com/projects/cocaine"
- s.description = "A small library for doing (command) lines"
- s.platform = Gem::Platform::RUBY
s.summary = "A small library for doing (command) lines"
- s.files = include_files - exclude_files
- s.require_path = "lib"
- s.test_files = Dir["spec/**/*_spec.rb"]
- s.add_development_dependency 'rspec'
- s.add_development_dependency 'bourne'
- s.add_development_dependency 'mocha'
+ s.description = "A small library for doing (command) lines"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ s.add_development_dependency('rspec')
+ s.add_development_dependency('bourne')
+ s.add_development_dependency('mocha')
+ s.add_development_dependency('rake')
end
View
2 lib/cocaine/version.rb
@@ -1,3 +1,3 @@
module Cocaine
- VERSION = "0.2.0"
+ VERSION = "0.2.0".freeze
end

0 comments on commit c74077c

Please sign in to comment.