Sha256: 24047c439148cc4629739e1d3a6345b783e81d0412fc31544eed73c0de4c0f3b
Contents?: true
Size: 1.21 KB
Versions: 4
Compression:
Stored size: 1.21 KB
Contents
#!/usr/bin/env ruby require 'retest' $stdout.sync = true Signal.trap(:INT) { $stdout.puts "Goodbye"; exit } options = Retest::Options.new(ARGV) if options.help? $stdout.puts options.help return end if options.version? $stdout.puts Retest::VERSION return end prompt = Retest::Prompt.new repository = Retest::Repository.new(files: Retest::VersionControl.files, prompt: prompt) command = Retest::Command.for_options(options) runner = Retest::Runners.runner_for(command.to_s) sounds = Retest::Sounds.for(options) sounds.play(:start) runner.add_observer(sounds) prompt.add_observer(sounds) program = Retest::Program.new( repository: repository, command: command, runner: runner ) if options.params[:diff] program.diff(options.params[:diff]) return end launching_message = "Launching Retest..." if options.force_polling? launching_message = "Launching Retest with polling method..." end # Main action $stdout.puts launching_message Retest.listen(options) do |modified, added, removed| begin program.run(modified, added, removed) rescue => e $stdout.puts "Something went wrong: #{e.message}" end end $stdout.puts "Ready to refactor! You can make file changes now" # not blocking sleep
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
retest-1.13.2 | exe/retest |
retest-1.13.1 | exe/retest |
retest-1.13.0 | exe/retest |
retest-1.12.0 | exe/retest |