Skip to content

Commit

Permalink
Merge branch 'master' into spec-framework
Browse files Browse the repository at this point in the history
Conflicts:
	Gemfile
	Gemfile.lock
  • Loading branch information
winton committed Oct 8, 2011
2 parents 6de2df7 + 5e2dd99 commit 5d657f1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 90 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,5 +1,7 @@
.DS_Store .DS_Store
*.gem *.gem
.bundle
Gemfile.lock
pkg pkg
spec/fixtures/builds spec/fixtures/builds
spec/fixtures/builds/* spec/fixtures/builds/*
Expand Down
6 changes: 1 addition & 5 deletions Gemfile
@@ -1,7 +1,3 @@
source "http://rubygems.org" source "http://rubygems.org"


gem 'rake', '>=0.8.7', :group => :rakefile gemspec
gem 'rspec', '~>1.0', :group => [ :rakefile, :spec ]

gem 'framework_fixture', '=0.1.3', :group => :spec
gem 'rack-test', '=0.6.1', :group => :spec
18 changes: 0 additions & 18 deletions Gemfile.lock

This file was deleted.

62 changes: 1 addition & 61 deletions Rakefile
@@ -1,64 +1,4 @@
require 'rubygems' require 'bundler/gem_tasks'
require 'bundler'

Bundler.require(:rakefile)

require 'rake'

begin
require 'spec/rake/spectask'
rescue Exception => e
end

def gemspec
@gemspec ||= begin
file = File.expand_path('../gem_template.gemspec', __FILE__)
eval(File.read(file), binding, file)
end
end

if defined?(Spec::Rake::SpecTask)
desc "Run specs"
Spec::Rake::SpecTask.new do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = %w(-fs --color)
t.warning = true
end
task :spec
task :default => :spec
end

desc "Build gem(s)"
task :gem do
root = File.expand_path('../', __FILE__)
pkg = "#{root}/pkg"
system "rm -Rf #{pkg}"
system "cd #{root} && gem build gem_template.gemspec"
system "mkdir -p #{pkg} && mv *.gem pkg"
end

namespace :gem do
desc "Install gem(s)"
task :install do
Rake::Task['gem'].invoke
Dir["#{File.dirname(__FILE__)}/pkg/*.gem"].each do |pkg|
system "gem install #{pkg} --no-ri --no-rdoc"
end
end

desc "Push gem(s)"
task :push do
Rake::Task['gem'].invoke
Dir["#{File.dirname(__FILE__)}/pkg/*.gem"].each do |pkg|
system "gem push #{pkg}"
end
end
end

desc "Validate the gemspec"
task :gemspec do
gemspec.validate
end


# DELETE AFTER USING # DELETE AFTER USING
desc "Rename project" desc "Rename project"
Expand Down
4 changes: 4 additions & 0 deletions gem_template.gemspec
Expand Up @@ -18,4 +18,8 @@ Gem::Specification.new do |s|
s.files = `cd #{root} && git ls-files`.split("\n") s.files = `cd #{root} && git ls-files`.split("\n")
s.require_paths = %w(lib) s.require_paths = %w(lib)
s.test_files = `cd #{root} && git ls-files -- {features,test,spec}/*`.split("\n") s.test_files = `cd #{root} && git ls-files -- {features,test,spec}/*`.split("\n")

s.add_development_dependency "framework_fixture", "= 0.1.3"
s.add_development_dependency "rack-test", "= 0.6.1"
s.add_development_dependency "rspec", "~> 1.0"
end end
5 changes: 0 additions & 5 deletions lib/gem_template.rb
@@ -1,8 +1,3 @@
require "rubygems"
require "bundler"

Bundler.require(:default)

$:.unshift File.dirname(__FILE__) $:.unshift File.dirname(__FILE__)


module GemTemplate module GemTemplate
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
@@ -1,7 +1,7 @@
require "pp" require "pp"
require "bundler" require "bundler"


Bundler.require(:spec) Bundler.require(:development)


$root = File.expand_path('../../', __FILE__) $root = File.expand_path('../../', __FILE__)


Expand Down

0 comments on commit 5d657f1

Please sign in to comment.