From 0f6d5beed682d1659ce7cc4846cd17c4e936a79e Mon Sep 17 00:00:00 2001 From: Gabriel Horner Date: Mon, 12 Dec 2011 00:46:02 -0500 Subject: [PATCH] gem it --- .gemspec | 17 +++++++++++++++++ CHANGELOG.rdoc | 2 ++ LICENSE.txt | 22 ++++++++++++++++++++++ Rakefile | 35 +++++++++++++++++++++++++++++++++++ lib/bahia.rb | 2 ++ 5 files changed, 78 insertions(+) create mode 100644 .gemspec create mode 100644 CHANGELOG.rdoc create mode 100644 LICENSE.txt create mode 100644 Rakefile diff --git a/.gemspec b/.gemspec new file mode 100644 index 0000000..fe2c685 --- /dev/null +++ b/.gemspec @@ -0,0 +1,17 @@ +# -*- encoding: utf-8 -*- +require 'rubygems' unless Object.const_defined?(:Gem) +require File.dirname(__FILE__) + "/lib/bahia" + +Gem::Specification.new do |s| + s.name = "bahia" + s.version = Bahia::VERSION + s.authors = ["Gabriel Horner"] + s.email = "gabriel.horner@gmail.com" + s.homepage = "http://github.com/cldwalker/bahia" + s.summary = "aruba for non-cucumber test frameworks" + s.description = "Bahia - where commandline acceptance tests are easy, the people are festive and onde nasceu capoeira. In other words, aruba for any non-cucumber test framework." + s.required_rubygems_version = ">= 1.3.6" + s.files = Dir.glob(%w[{lib,test}/**/*.rb bin/* [A-Z]*.{md,txt,rdoc} ext/**/*.{rb,c} **/deps.rip]) + %w{Rakefile .gemspec} + s.extra_rdoc_files = ["README.md", "LICENSE.txt"] + s.license = 'MIT' +end diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc new file mode 100644 index 0000000..e50c096 --- /dev/null +++ b/CHANGELOG.rdoc @@ -0,0 +1,2 @@ +== 0.1 +* Bahia viva! diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..8dfd9b8 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,22 @@ +The MIT LICENSE + +Copyright (c) 2011 Gabriel Horner + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..a88c05a --- /dev/null +++ b/Rakefile @@ -0,0 +1,35 @@ +require 'rake' +require 'fileutils' + +def gemspec + @gemspec ||= eval(File.read('.gemspec'), binding, '.gemspec') +end + +desc "Build the gem" +task :gem=>:gemspec do + sh "gem build .gemspec" + FileUtils.mkdir_p 'pkg' + FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", 'pkg' +end + +desc "Install the gem locally" +task :install => :gem do + sh %{gem install pkg/#{gemspec.name}-#{gemspec.version}} +end + +desc "Generate the gemspec" +task :generate do + puts gemspec.to_ruby +end + +desc "Validate the gemspec" +task :gemspec do + gemspec.validate +end + +desc 'Run tests' +task :test do |t| + sh 'bacon -q -Ilib -I. test/*_test.rb' +end + +task :default => :test diff --git a/lib/bahia.rb b/lib/bahia.rb index 4522496..569b501 100644 --- a/lib/bahia.rb +++ b/lib/bahia.rb @@ -1,6 +1,8 @@ require 'open3' module Bahia + VERSION = '0.1.0' + class DetectionError < StandardError def initialize(name) super "Unable to detect #{name}. Set it with Bahia.#{name}"