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

Version Path
wally-0.0.44 bin/wally
wally-0.0.43 bin/wally
wally-0.0.42 bin/wally
wally-0.0.41 bin/wally
wally-0.0.40 bin/wally
wally-0.0.39 bin/wally
wally-0.0.38 bin/wally
wally-0.0.37 bin/wally
wally-0.0.36 bin/wally
wally-0.0.35 bin/wally
wally-0.0.34 bin/wally
wally-0.0.33 bin/wally
wally-0.0.32 bin/wally
wally-0.0.31 bin/wally