[DRE-commits] [ruby-rspec-instafail] 67/108: switch to bundler version management and MIT

Hideki Yamane henrich at moszumanska.debian.org
Sun Nov 15 18:36:21 UTC 2015


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository ruby-rspec-instafail.

commit 7eeeb4f5a391e58a47c03fdda15e04e5d9d49e36
Author: grosser <grosser.michael at gmail.com>
Date:   Thu Oct 27 15:48:15 2011 -0700

    switch to bundler version management and MIT
---
 Rakefile                       | 37 +++++++++++++++++--------------
 Readme.md                      |  2 +-
 VERSION                        |  1 -
 lib/rspec/instafail.rb         |  2 +-
 lib/rspec/instafail/version.rb |  2 ++
 rspec-instafail.gemspec        | 50 ++++++++----------------------------------
 6 files changed, 33 insertions(+), 61 deletions(-)

diff --git a/Rakefile b/Rakefile
index 27e51cc..82ef61f 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,20 +1,23 @@
-task :default => :spec
-require 'spec/rake/spectask'
-Spec::Rake::SpecTask.new {|t| t.spec_opts = ['--color --backtrace --debug']}
+require "bundler"
+Bundler::GemHelper.install_tasks
 
-begin
-  require 'jeweler'
-  project_name = 'rspec-instafail'
+task :default do
+  sh "cd spec/rspec_1 && (bundle || bundle install) > /dev/null"
+  sh "cd spec/rspec_2 && (bundle || bundle install) > /dev/null"
+  sh "rspec spec/"
+end
 
-  Jeweler::Tasks.new do |gem|
-    gem.name = project_name
-    gem.summary = "Show failing specs instantly"
-    gem.email = "grosser.michael at gmail.com"
-    gem.homepage = "http://github.com/grosser/#{project_name}"
-    gem.authors = ["Michael Grosser"]
-  end
+rule /^version:bump:.*/ do |t|
+  file = 'lib/rspec/instafail/version.rb'
 
-  Jeweler::GemcutterTasks.new
-rescue LoadError
-  puts "Jeweler, or one of its dependencies, is not available. Install it with: gem install jeweler"
-end
\ No newline at end of file
+  sh "git status | grep 'nothing to commit'" # ensure we are not dirty
+  index = ['major', 'minor','patch'].index(t.name.split(':').last)
+
+  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
+  new_version = version_parts * '.'
+  File.open(file,'w'){|f| f.write(version_file.sub(old_version, new_version)) }
+
+  sh "git add #{file} && git commit -m 'bump version to #{new_version}'"
+end
diff --git a/Readme.md b/Readme.md
index 20833fa..405e330 100644
--- a/Readme.md
+++ b/Readme.md
@@ -47,4 +47,4 @@ Authors
 
 [Michael Grosser](http://grosser.it)<br/>
 michael at grosser.it<br/>
-Hereby placed under public domain, do what you want, just do not hold me accountable...
+License: MIT
diff --git a/VERSION b/VERSION
deleted file mode 100644
index 84aa3a7..0000000
--- a/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-0.1.8
\ No newline at end of file
diff --git a/lib/rspec/instafail.rb b/lib/rspec/instafail.rb
index 9eca4c8..8a83767 100644
--- a/lib/rspec/instafail.rb
+++ b/lib/rspec/instafail.rb
@@ -8,5 +8,5 @@ module RSpec
     require "#{lib}/rspec/instafail/rspec_1"
   end
 
-  Instafail::VERSION = File.read( File.join(File.dirname(__FILE__),'..','..','VERSION') ).strip
+  require 'rspec/instafail/version'
 end
diff --git a/lib/rspec/instafail/version.rb b/lib/rspec/instafail/version.rb
new file mode 100644
index 0000000..21b11f0
--- /dev/null
+++ b/lib/rspec/instafail/version.rb
@@ -0,0 +1,2 @@
+require 'rspec/instafail'
+RSpec::Instafail::VERSION = '0.1.9'
diff --git a/rspec-instafail.gemspec b/rspec-instafail.gemspec
index e4db188..d02b261 100644
--- a/rspec-instafail.gemspec
+++ b/rspec-instafail.gemspec
@@ -1,44 +1,12 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
-# -*- encoding: utf-8 -*-
+$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
+name = 'rspec-instafail'
+require "rspec/instafail/version"
 
-Gem::Specification.new do |s|
-  s.name = %q{rspec-instafail}
-  s.version = "0.1.8"
-
-  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+Gem::Specification.new name, RSpec::Instafail::VERSION do |s|
+  s.summary = "Show failing specs instantly"
   s.authors = ["Michael Grosser"]
-  s.date = %q{2011-06-06}
-  s.email = %q{grosser.michael at gmail.com}
-  s.files = [
-    "Rakefile",
-    "Readme.md",
-    "VERSION",
-    "lib/rspec/instafail.rb",
-    "lib/rspec/instafail/rspec_1.rb",
-    "lib/rspec/instafail/rspec_2.rb",
-    "rspec-instafail.gemspec",
-    "spec/instafail_spec.rb",
-    "spec/rspec_1/Gemfile",
-    "spec/rspec_1/Gemfile.lock",
-    "spec/rspec_1/a_test.rb",
-    "spec/rspec_2/Gemfile",
-    "spec/rspec_2/Gemfile.lock",
-    "spec/rspec_2/a_test.rb"
-  ]
-  s.homepage = %q{http://github.com/grosser/rspec-instafail}
-  s.require_paths = ["lib"]
-  s.rubygems_version = %q{1.6.2}
-  s.summary = %q{Show failing specs instantly}
-
-  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.email = "michael at grosser.it"
+  s.homepage = "http://github.com/grosser/#{name}"
+  s.files = `git ls-files`.split("\n")
+  s.license = "MIT"
 end
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rspec-instafail.git



More information about the Pkg-ruby-extras-commits mailing list