guard-bacon 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3c7438db25a96979760c72a060051384409cb3db
4
+ data.tar.gz: 682e4131c96680df45b170b49a4e516a1c77f2e7
5
+ SHA512:
6
+ metadata.gz: 5966d82c94f0310b1e782bb2a498e2a4b31bf5892086e48beacfedc8758540a3731ba0bc7927419c9e292d6a5d94b8ea6673ff145764d3a13a88d030ed743ef4
7
+ data.tar.gz: 383385742008d50156aec2856c3ce937bb0c6c1badb7eacd82f1497689ca10f38fbb5093fade592086964cd5dc7e0bbd321816baebf54990465041acd3c1de84
data/guard-bacon.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.files = `git ls-files`.split("\n")
16
16
  s.require_paths = ["lib"]
17
17
 
18
- s.add_runtime_dependency "guard", "~> 1.5.1"
18
+ s.add_runtime_dependency "guard", "~> 1.8.0"
19
19
  s.add_runtime_dependency "schmurfy-bacon", "~> 1.4.2"
20
20
 
21
21
  s.add_development_dependency 'rake'
data/lib/guard/bacon.rb CHANGED
@@ -10,6 +10,7 @@ module Guard
10
10
  class Bacon < Guard
11
11
 
12
12
  def initialize(watchers= [], options= {})
13
+ @last_run_spec = nil
13
14
  super
14
15
  if options[:output]
15
16
  puts "Bacon: Using output #{options[:output]}."
@@ -48,28 +49,35 @@ module Guard
48
49
  end
49
50
 
50
51
  def run_spec(path)
52
+ if !File.exists?(path) && @last_run_spec
53
+ puts "spec not found: #{path}"
54
+ puts "running last one."
55
+ path = @last_run_spec
56
+ end
57
+
51
58
  if File.exists?(path)
52
- pid = Kernel.fork do
53
- puts "\n●●➤ Running spec: #{path}"
54
- counters = ::Bacon.run_file(path)
55
- # system "bundle exec bacon -o TestUnit #{path}"
56
- # {:installed_summary=>1, :specifications=>19, :depth=>0, :requirements=>30, :failed=>2, :errors => 1}
57
-
58
- all_specs = counters[:specifications]
59
- failed = counters[:failed].to_i + counters[:errors].to_i
60
-
61
- if failed > 0
62
- Notifier.notify("Specs: #{failed} Failures (#{all_specs} specs)",
63
- :image => :failed,
64
- :title => File.basename(path)
65
- )
66
- else
67
- Notifier.notify("Specs: OK (#{all_specs} specs)",
68
- :image => :success,
69
- :title => File.basename(path)
70
- )
71
- end
72
- end
59
+ @last_run_spec = path
60
+ pid = Kernel.fork do
61
+ puts "\n●●➤ Running spec: #{path}"
62
+ counters = ::Bacon.run_file(path)
63
+ # system "bundle exec bacon -o TestUnit #{path}"
64
+ # {:installed_summary=>1, :specifications=>19, :depth=>0, :requirements=>30, :failed=>2, :errors => 1}
65
+
66
+ all_specs = counters[:specifications]
67
+ failed = counters[:failed].to_i + counters[:errors].to_i
68
+
69
+ if failed > 0
70
+ Notifier.notify("Specs: #{failed} Failures (#{all_specs} specs)",
71
+ :image => :failed,
72
+ :title => File.basename(path)
73
+ )
74
+ else
75
+ Notifier.notify("Specs: OK (#{all_specs} specs)",
76
+ :image => :success,
77
+ :title => File.basename(path)
78
+ )
79
+ end
80
+ end
73
81
 
74
82
  Process.wait(pid)
75
83
  else
@@ -1,3 +1,3 @@
1
1
  module Guard
2
- BACON_GUARD_VERSION = "1.1.0"
2
+ BACON_GUARD_VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,36 +1,32 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-bacon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
5
- prerelease:
4
+ version: 1.1.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Julien Ammous
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-01 00:00:00.000000000 Z
11
+ date: 2013-06-06 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: guard
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: 1.5.1
19
+ version: 1.8.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: 1.5.1
26
+ version: 1.8.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: schmurfy-bacon
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,17 +41,15 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rake
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  description: Run your bacon specs on file change
@@ -77,27 +70,25 @@ files:
77
70
  - lib/guard/bacon/version.rb
78
71
  homepage: ''
79
72
  licenses: []
73
+ metadata: {}
80
74
  post_install_message:
81
75
  rdoc_options: []
82
76
  require_paths:
83
77
  - lib
84
78
  required_ruby_version: !ruby/object:Gem::Requirement
85
- none: false
86
79
  requirements:
87
- - - ! '>='
80
+ - - '>='
88
81
  - !ruby/object:Gem::Version
89
82
  version: '0'
90
83
  required_rubygems_version: !ruby/object:Gem::Requirement
91
- none: false
92
84
  requirements:
93
- - - ! '>='
85
+ - - '>='
94
86
  - !ruby/object:Gem::Version
95
87
  version: '0'
96
88
  requirements: []
97
89
  rubyforge_project: guard-bacon
98
- rubygems_version: 1.8.24
90
+ rubygems_version: 2.0.3
99
91
  signing_key:
100
- specification_version: 3
92
+ specification_version: 4
101
93
  summary: Guard for bacon
102
94
  test_files: []
103
- has_rdoc: