guard-phpunit2 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d973714f855f21aae92bff20a26d54d47668bde
4
- data.tar.gz: 3245c36341cbe47c2b462c0bfe22d63470bf491b
3
+ metadata.gz: 29049fcae5b8a04752ba78a2a8e4b99299fa282e
4
+ data.tar.gz: 5d74a651906f7d51085ca82faf7b0211a0967464
5
5
  SHA512:
6
- metadata.gz: d8fb222fc6595da42462255e26ab9ec291b6cd61ac665aaefa2e9d2c0aee0fe9ea25c94f3140c31c97445501ea25b3ec7f8abff806b5c4438d053ff8fcaf4a3e
7
- data.tar.gz: f0f1aa7d628f1fed05e6620b30f85a7533bc7658405e2f8f2107ddb13787e6fec1656ae60d924dd670ccd4960c8b0599f54afdc320dd91a5018908a0700c19a8
6
+ metadata.gz: a274812dc59206fc0f1edc7f2c7c654e35868477e989c513d29becd82f62f2a1c21ecb9eb69c64caa99a553a6513da9d5ccb2850cf4a43c4727c8bcb47a0e140
7
+ data.tar.gz: d7a39c5e0467acb4ae0a2298d5f4a4d12848e14ea1c11fc0411a3fee756c610e534613204678ffbe4f557e6fcd8686069ebda77550f865188ea8885e2cb8c3c2
@@ -53,10 +53,9 @@ module Guard
53
53
  # @return [Symbol] the image symbol
54
54
  #
55
55
  def image(results)
56
- case
57
- when results[:failures] + results[:errors] > 0
56
+ if results[:failures] + results[:errors] > 0
58
57
  :failed
59
- when results[:pending] > 0
58
+ elsif results[:pending] > 0
60
59
  :pending
61
60
  else
62
61
  :success
@@ -12,11 +12,11 @@ module Guard
12
12
 
13
13
  # The exittcode phpunit returns when the tests contain failures
14
14
  #
15
- PHPUNIT_FAILURES_EXITCODE = 1
15
+ PHPUNIT_FAILURES_EXITCODE = 3
16
16
 
17
17
  # The exittcode phpunit returns when the tests contain errors
18
18
  #
19
- PHPUNIT_ERRORS_EXITCODE = 2
19
+ PHPUNIT_ERRORS_EXITCODE = 4
20
20
 
21
21
  # Runs the PHPUnit tests and displays notifications
22
22
  # about the results.
@@ -72,7 +72,7 @@ module Guard
72
72
  end
73
73
 
74
74
  # print the output to the terminal
75
- UI.info output
75
+ puts output
76
76
 
77
77
  # return false in case the system call fails with no status!
78
78
  return false if $?.nil?
@@ -102,7 +102,6 @@ module Guard
102
102
  # @param (see #run)
103
103
  #
104
104
  def notify_results(output, options)
105
- return if options[:notification] == false
106
105
  results = Formatter.parse_output(output)
107
106
  Notifier.notify_results(results)
108
107
  end
@@ -112,7 +111,6 @@ module Guard
112
111
  # @param (see #run)
113
112
  #
114
113
  def notify_failure(options)
115
- return if options[:notification] == false
116
114
  Notifier.notify('Failed! Check the console', :title => 'PHPUnit results', :image => :failed)
117
115
  end
118
116
 
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module PHPUnit2
3
- VERSION = '0.2.2'
3
+ VERSION = '0.2.3'
4
4
  end
5
5
  end
@@ -18,7 +18,8 @@ module Guard
18
18
  :all_after_pass => true,
19
19
  :keep_failed => true,
20
20
  :cli => nil,
21
- :tests_path => Dir.pwd
21
+ :tests_path => Dir.pwd,
22
+ :notification => true
22
23
  }
23
24
 
24
25
  # Initialize Guard::PHPUnit.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-phpunit2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maher Sallam