Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add -v flag to spin and kick off integration testing

  • Loading branch information...
commit eee1dbddb22bf996d9fc3f8b6b533b658a8d5e74 1 parent a5fadc2
@grosser grosser authored
View
1  .gitignore
@@ -1,2 +1,3 @@
*.gem
docs/
+spec/tmp
View
4 Rakefile
@@ -1 +1,5 @@
require 'bundler/gem_tasks'
+
+task :default do
+ sh "rspec spec/"
+end
View
4 bin/spin
@@ -339,6 +339,10 @@ options = OptionParser.new do |opts|
opts.separator "General Options:"
opts.on('-e', 'Stub to keep kicker happy')
+ opts.on('-v', '--version', 'Show Version') do
+ require 'spin/version'
+ puts Spin::VERSION; exit
+ end
opts.on('-h', '--help') do
$stderr.puts opts
exit 1
View
3  lib/spin/version.rb
@@ -0,0 +1,3 @@
+module Spin
+ VERSION = "0.5.3"
+end
View
16 spec/integration_spec.rb
@@ -0,0 +1,16 @@
+describe "Spin" do
+ def root
+ File.expand_path '../..', __FILE__
+ end
+
+ def spin(command, options={})
+ command = "ruby -I #{root}/lib #{root}/bin/spin #{command} 2>&1"
+ result = `#{command}`
+ raise "FAILED #{command}\n#{result}" if $?.success? == !!options[:fail]
+ result
+ end
+
+ it "can show current version" do
+ spin("--version").should =~ /^\d+\.\d+\.\d+/
+ end
+end
View
9 spin.gemspec
@@ -1,11 +1,12 @@
-Gem::Specification.new do |s|
- s.name = "spin"
- s.version = '0.5.3'
+$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
+require "spin/version"
+
+Gem::Specification.new "spin", Spin::VERSION do |s|
s.authors = ["Jesse Storimer"]
s.email = ["jstorimer@gmail.com"]
s.homepage = "http://jstorimer.github.com/spin"
s.summary = %q{Spin preloads your Rails environment to speed up your autotest(ish) workflow.}
- s.description = %q{Spin preloads your Rails environment to speed up your autotest(ish) workflow.
+ s.description = %Q{#{s.summary}
By preloading your Rails environment for testing you don't load the same code over and over and over... Spin works best for an autotest(ish) workflow.}
Please sign in to comment.
Something went wrong with that request. Please try again.