Skip to content
Browse files

removed warmsnake binary. moved to hydra-console gem

  • Loading branch information...
1 parent ba2d10c commit 248221f5c712fd2bacdf9304f5e881e1b3ec7a2e Nick Gauthier committed
Showing with 0 additions and 79 deletions.
  1. +0 −76 bin/warmsnake.rb
  2. +0 −3 hydra.gemspec
View
76 bin/warmsnake.rb
@@ -1,76 +0,0 @@
-#!/usr/bin/env ruby
-#
-# warmsnake.rb
-#
-# This is a first attempt at making a hydra binary.
-#
-# Currently, all it does is run the files you pass into it. When you
-# press Enter it will run them again, maintaining your rails environment.
-# When you type 'r' and hit Enter it will reboot the rails environment.
-#
-# It is extremely specific about its behavior and only works in rails.
-#
-# It is not really ready for any kind of release, but it is useful, so
-# it's included.
-#
-require 'rubygems'
-require 'hydra'
-
-@files = ARGV.inject([]){|memo,f| memo += Dir.glob f}
-
-if @files.empty?
- puts "You must specify a list of files to run"
- puts "If you specify a pattern, it must be in quotes"
- puts %{USAGE: #{$0} test/unit/my_test.rb "test/functional/**/*_test.rb"}
- exit(1)
-end
-
-Signal.trap("TERM", "KILL") do
- puts "Warm Snake says bye bye"
- exit(0)
-end
-
-bold_yellow = "\033[1;33m"
-reset = "\033[0m"
-
-
-loop do
- env_proc = Process.fork do
- puts "#{bold_yellow}Booting Environment#{reset}"
- start = Time.now
- ENV['RAILS_ENV']='test'
- require 'config/environment'
- require 'test/test_helper'
- finish = Time.now
- puts "#{bold_yellow}Environment Booted (#{finish-start})#{reset}"
-
- loop do
- puts "#{bold_yellow}Running#{reset} [#{@files.inspect}]"
- start = Time.now
- Hydra::Master.new(
- :files => @files.dup,
- :listeners => Hydra::Listener::ProgressBar.new(STDOUT),
- :workers => [{:type => :local, :runners => 4}]
- )
- finish = Time.now
- puts "#{bold_yellow}Tests finished#{reset} (#{finish-start})"
-
- puts ""
-
- $stdout.write "Press #{bold_yellow}ENTER#{reset} to retest. Type #{bold_yellow}r#{reset} then hit enter to reboot environment. #{bold_yellow}CTRL-C#{reset} to quit\n> "
- begin
- command = $stdin.gets
- rescue Interrupt
- exit(0)
- end
- break if !command.nil? and command.chomp == "r"
- end
- end
- begin
- Process.wait env_proc
- rescue Interrupt
- puts "\n#{bold_yellow}SSsssSsssSSssSs#{reset}"
- break
- end
-end
-
View
3 hydra.gemspec
@@ -10,10 +10,8 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Nick Gauthier"]
s.date = %q{2010-11-03}
- s.default_executable = %q{warmsnake.rb}
s.description = %q{Spread your tests over multiple machines to test your code faster.}
s.email = %q{nick@smartlogicsolutions.com}
- s.executables = ["warmsnake.rb"]
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc",
@@ -27,7 +25,6 @@ Gem::Specification.new do |s|
"Rakefile",
"TODO",
"VERSION",
- "bin/warmsnake.rb",
"caliper.yml",
"hydra-icon-64x64.png",
"hydra.gemspec",

0 comments on commit 248221f

Please sign in to comment.
Something went wrong with that request. Please try again.