Sha256: 13887b238bb9718f70bfcdb7e4e20c8a0bfcd32b445397bf3300f3ac68350efb
Contents?: true
Size: 944 Bytes
Versions: 1
Compression:
Stored size: 944 Bytes
Contents
#!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib') if ARGV.first == "server" require "nuker" Sinatra::Application.run! elsif ARGV[0] == "push" require "restclient" require "json" require "nuker/parses_features" features = [] Dir.glob(File.join("#{ARGV[2]}", "**/*.feature")).each do |feature_path| begin gherkin = Nuker::ParsesFeatures.new.parse(File.read(feature_path)) rescue puts "Couldn't parse '#{feature_path}'" puts "Contents:" puts File.read(feature_path) end features << {:path => feature_path, :gherkin => gherkin} end RestClient.put "#{ARGV[1]}/features/?authentication_code=#{File.read(".nuker").strip}", features.to_json, {:content_type => :json, :accept => :json} elsif ARGV[0] == "destroy" require "restclient" RestClient.delete "#{ARGV[1]}?authentication_code=#{File.read(".nuker").strip}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nuker-2.0.0 | bin/nuker |