Sha256: 6527e566ca97cc0c3425df689b6ed52924027568d9a3c18d44b3801705706cce
Contents?: true
Size: 806 Bytes
Versions: 14
Compression:
Stored size: 806 Bytes
Contents
#!/usr/bin/env ruby $:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib') if ARGV.first == "server" require "wally" Sinatra::Application.run! elsif ARGV[0] == "push" require "restclient" require "json" require "wally/parses_features" features = [] Dir.glob(File.join("#{ARGV[2]}", "**/*.feature")).each do |feature_path| begin gherkin = Wally::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(".wally")}", features.to_json, {:content_type => :json, :accept => :json} end
Version data entries
14 entries across 14 versions & 1 rubygems