doublesplat 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efa2c4a50c1890f6783cbf663ba0e0c36a69f670
4
- data.tar.gz: 437e92de940a857d4466bde4bbdb145657b8dfcd
3
+ metadata.gz: 94c912e984b4612b0d015c6518f8faf6706503d9
4
+ data.tar.gz: 7e1a1ea5122e9cc85c4d3d1553e8ee99c3e7670c
5
5
  SHA512:
6
- metadata.gz: ef21610c225f5cad703d37e4e684c55b6a68ab33171744b44e6d793e680f4b4eba05107ecfde4211c2cb2ed24e7629b1741c1b12edaddcd9b310a896044aeb7d
7
- data.tar.gz: c41cf58ce96a52754bdd14308443a93f4aa7a228ae903cd714bc68bee6767fad24aec7defdd97a1656735c3ebf72b9b1a8624c49f79296c8da708076a8757dba
6
+ metadata.gz: e9cdca7f14aeaecfaf5d1183a51382120c33df7f20fd5af86c4fd7d97ee1eb5160a2b812316334ae8fa1c368533b9139bfbe9e60f7fc78e8894b824c62a719e6
7
+ data.tar.gz: 406d782c24af77a91e1dd3409e78a696fe09ddd636354992d5095ab4f4cd97fbd11e564fdfc214dc45334b242b0a4bff9e904873fc96dc24c3ff22a6b92f6c2e
data/lib/doublesplat.rb CHANGED
@@ -36,31 +36,19 @@ module Doublesplat
36
36
  listener = Listen.to(directory, only: /#{phrase}\.rb$/) do |modified, added, removed|
37
37
  unless modified.empty?
38
38
  # Run Tests
39
- new_text = String.new
40
- File.open("#{directory}/#{phrase}.rb").each do |line|
41
- unless line.strip.chars.empty?
42
- new_text << "#{line.strip};"
43
- end
44
- end
45
-
46
- new_base_64 = Base64.encode64(new_text)
39
+ new_base_64 = Base64.encode64(File.read("#{directory}/#{phrase}.rb"))
47
40
  print "\n--> Running Tests || "
48
41
  response = RestClient.post "#{ENDPOINT}/test", :phrase => phrase, :code => new_base_64
49
42
  response_hash = JSON.parse(response)
50
- print Rainbow("#{response_hash['passed_count']} Passed").green
51
- print Rainbow(" | ").yellow
52
- print Rainbow("#{response_hash['failed_count']} Failed").red
53
43
 
54
- if response_hash['failed_count'] > 0 || response_hash['passed_count'] < 1
44
+ if response_hash['passed'] == false
45
+ print Rainbow("Failed").red
55
46
  puts "\n\n"
56
- response_hash['failed_string'].split(",").each do |error|
57
- puts Rainbow(error).red
58
- end
59
47
 
60
- if response_hash["passed_count"] < 1 && response_hash["failed_count"] < 1
61
- puts Rainbow("Check your code for syntax errors or missing closing indicators.").red
62
- end
48
+ puts Rainbow(response_hash['msg']).red
63
49
  else
50
+ print Rainbow("Passed").green
51
+
64
52
  puts "\n\n"
65
53
  puts Rainbow("You did it!!!").white
66
54
  exit
@@ -1,4 +1,4 @@
1
1
  module Doublesplat
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  ENDPOINT = "http://api.doublesplat.com:8080"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doublesplat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Mulligan