wally-client 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/wally +10 -8
- data/lib/wally/client/version.rb +1 -1
- metadata +1 -1
data/bin/wally
CHANGED
@@ -6,15 +6,17 @@ if ARGV.first == "push"
|
|
6
6
|
require "json"
|
7
7
|
require "wally/parses_features"
|
8
8
|
features = []
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
ARGV[2..-1].each do |arg|
|
10
|
+
Dir.glob(File.join("#{arg}", "**/*.feature")).each do |feature_path|
|
11
|
+
begin
|
12
|
+
gherkin = Wally::ParsesFeatures.new.parse(File.read(feature_path))
|
13
|
+
rescue
|
14
|
+
puts "Couldn't parse '#{feature_path}'"
|
15
|
+
puts "Contents:"
|
16
|
+
puts File.read(feature_path)
|
17
|
+
end
|
18
|
+
features << {:path => feature_path, :gherkin => gherkin}
|
16
19
|
end
|
17
|
-
features << {:path => feature_path, :gherkin => gherkin}
|
18
20
|
end
|
19
21
|
RestClient.put "#{ARGV[1]}/features/?authentication_code=#{File.read(".wally").strip}", features.to_json, {:content_type => :json, :accept => :json}
|
20
22
|
elsif ARGV[0] == "destroy"
|
data/lib/wally/client/version.rb
CHANGED