Rakefile in screw-unit-server-0.3.0 vs Rakefile in screw-unit-server-0.5.3
- old
+ new
@@ -1,11 +1,32 @@
-require "rake"
-require 'rake/gempackagetask'
-require 'rake/contrib/rubyforgepublisher'
-require 'rake/clean'
-require 'rake/testtask'
-require 'rake/rdoctask'
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |s|
+ s.name = "screw-unit-server"
+ s.executables = ["screw_unit", "screw_unit_server"]
+ s.summary = "Server and helpers for your Screw Unit tests."
+ s.email = "pivotallabsopensource@googlegroups.com"
+ s.homepage = "http://github.com/pivotal/screw-unit-server"
+ s.description = "The Screw Unit server conveniently serves your Screw Unit specs and javascript files and css stylesheets."
+ s.authors = ["Pivotal Labs", "Brian Takita"]
+ s.files = Dir["[A-Z]*"] +
+ Dir["*.rb"] +
+ Dir["lib/**/*.rb"] +
+ Dir["core/**/**"] +
+ Dir["bin/**"] +
+ Dir["vendor/**/**"] +
+ Dir["spec/**"]
+ s.test_files = Dir['spec/**/*.rb']
+ s.rdoc_options = ["--main", "README.markdown"]
+ s.extra_rdoc_files = ["README.markdown", "CHANGES"]
+ s.add_dependency("thin", ">=1.2.1")
+ s.add_dependency("erector", ">=0.6.6")
+ s.add_dependency("selenium-client")
+ end
+rescue LoadError
+ puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
+end
desc "Runs the Rspec suite"
task(:default) do
run_suite
end
@@ -13,58 +34,9 @@
desc "Runs the Rspec suite"
task(:spec) do
run_suite
end
-desc "Copies the trunk to a tag with the name of the current release"
-task(:tag_release) do
- tag_release
-end
-
def run_suite
dir = File.dirname(__FILE__)
system("ruby #{dir}/spec/spec_suite.rb") || raise("Example Suite failed")
-end
-
-PKG_NAME = "screw_unit"
-PKG_VERSION = "0.1.0"
-PKG_FILES = FileList[
- '[A-Z]*',
- '*.rb',
- 'lib/**/*.rb',
- 'core/**',
- 'bin/**',
- 'spec/**/*.rb'
-]
-
-spec = Gem::Specification.new do |s|
- s.name = PKG_NAME
- s.version = PKG_VERSION
- s.summary = "The ScrewUnit client library (http://github.com/nkallen/screw-unit) plus a convenient ruby server."
- s.test_files = "spec/spec_suite.rb"
- s.description = s.summary
-
- s.files = PKG_FILES.to_a
- s.require_path = 'lib'
-
- s.has_rdoc = true
- s.extra_rdoc_files = [ "README", "CHANGES" ]
- s.rdoc_options = ["--main", "README", "--inline-source", "--line-numbers"]
-
- s.test_files = Dir.glob('spec/*_spec.rb')
- s.require_path = 'lib'
- s.author = "Brian Takita"
- s.email = "brian@pivotallabs.com"
- s.homepage = "http://pivotallabs.com"
- s.rubyforge_project = "pivotalrb"
- s.add_dependency('Selenium')
- s.add_dependency('thin', '>=0.8.0')
-end
-
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.need_zip = true
- pkg.need_tar = true
-end
-
-def tag_release
- system("git tag #{dashed_version} -m 'Version #{PKG_VERSION}'")
end