Permalink
Browse files

bundlerify

  • Loading branch information...
1 parent 868f940 commit dbf3e7cb8664cbb4c1d374e135caaae195051512 @grosser committed Feb 9, 2012
Showing with 29 additions and 49 deletions.
  1. +2 −2 Gemfile
  2. +6 −6 Gemfile.lock
  3. +15 −12 Rakefile
  4. +6 −29 zombie_passenger_killer.gemspec
View
@@ -1,7 +1,7 @@
source :rubygems
+gemspec
-group :dev do # not development <-> would add unneeded development dependencies in gemspec
+group :development do
gem 'rake'
gem 'rspec', '~>2'
- gem 'jeweler'
end
View
@@ -1,12 +1,12 @@
+PATH
+ remote: .
+ specs:
+ zombie_passenger_killer (0.1.3)
+
GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.3)
- git (1.2.5)
- jeweler (1.6.4)
- bundler (~> 1.0)
- git (>= 1.2.5)
- rake
rake (0.9.2)
rspec (2.6.0)
rspec-core (~> 2.6.0)
@@ -21,6 +21,6 @@ PLATFORMS
ruby
DEPENDENCIES
- jeweler
rake
rspec (~> 2)
+ zombie_passenger_killer!
View
@@ -1,18 +1,21 @@
+require 'bundler/gem_tasks'
+
task :default do
sh "rspec spec/"
end
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = 'zombie_passenger_killer'
- gem.summary = "Guaranteed zombie passengers death"
- gem.email = "michael@grosser.it"
- gem.homepage = "http://github.com/grosser/#{gem.name}"
- gem.authors = ["Michael Grosser"]
- end
+rule /^version:bump:.*/ do |t|
+ sh "git status | grep 'nothing to commit'" # ensure we are not dirty
+ index = ['major', 'minor','patch'].index(t.name.split(':').last)
+ file = 'lib/zombie_passenger_killer/version.rb'
+
+ version_file = File.read(file)
+ old_version, *version_parts = version_file.match(/(\d+)\.(\d+)\.(\d+)/).to_a
+ version_parts[index] = version_parts[index].to_i + 1
+ version_parts[2] = 0 if index < 2 # remove patch for minor
+ version_parts[1] = 0 if index < 1 # remove minor for major
+ new_version = version_parts * '.'
+ File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler, or one of its dependencies, is not available. Install it with: gem install jeweler"
+ sh "bundle && git add #{file} Gemfile.lock && git commit -m 'bump version to #{new_version}'"
end
@@ -1,35 +1,12 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
-# -*- encoding: utf-8 -*-
-$:.push File.expand_path("../lib", __FILE__)
+$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
require 'zombie_passenger_killer/version'
-Gem::Specification.new do |s|
- s.name = "zombie_passenger_killer"
- s.version = ZombiePassengerKiller::Version
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+Gem::Specification.new "zombie_passenger_killer", ZombiePassengerKiller::VERSION do |s|
+ s.summary = "Guaranteed zombie passengers death"
s.authors = ["Michael Grosser"]
- s.date = "2012-01-05"
s.email = "michael@grosser.it"
- s.executables = ["zombie_passenger_killer"]
- s.extra_rdoc_files = ["README.md"]
-
- s.files = `git ls-files`.split("\n")
- s.files -= ['.rvmrc', '.gitignore']
s.homepage = "http://github.com/grosser/zombie_passenger_killer"
- s.require_paths = ["lib"]
- s.rubygems_version = "1.8.10"
- s.summary = "Guaranteed zombie passengers death"
-
- if s.respond_to? :specification_version then
- s.specification_version = 3
-
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- else
- end
- else
- end
+ s.files = `git ls-files`.split("\n")
+ s.executables = ["zombie_passenger_killer"]
+ s.license = "MIT"
end
-

0 comments on commit dbf3e7c

Please sign in to comment.