guard-jessie 0.1.1 → 0.1.2

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.
data/CHANGELOG.md CHANGED
@@ -11,4 +11,10 @@
11
11
 
12
12
  - Travis configuration added. ([@mehowte])
13
13
 
14
+ ## 0.1.2 - October 15, 2011
15
+
16
+ ### Improvements:
17
+
18
+ - Run only changed paths. ([@mehowte])
19
+
14
20
  [@mehowte]: https://github.com/mehowte
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Guard::Jessie
2
2
  =============
3
3
 
4
- [![Build Status](http://travis-ci.org/mehowte/guard-jessie.png)](http://travis-ci.org/mehowte/guard-jessie)
4
+ [![Build Status](https://secure.travis-ci.org/mehowte/guard-jessie.png)](http://travis-ci.org/mehowte/guard-jessie)
5
5
 
6
6
 
7
7
  Jessie guard allows to automatically run you jasmine specs under node using jessie runner.
@@ -15,6 +15,7 @@ module Guard
15
15
 
16
16
  cmd_parts.join(" ")
17
17
  end
18
+
18
19
  end
19
20
  end
20
21
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module JessieVersion
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
data/lib/guard/jessie.rb CHANGED
@@ -11,9 +11,11 @@ module Guard
11
11
  end
12
12
 
13
13
  def run_on_change paths
14
- paths_string = paths.map {|path| "#{path}" }.join(' ')
15
- puts "Running #{paths_string}"
16
- Runner.run paths
14
+ paths = paths.select {|path| File.exists?(path) }
15
+ if paths.any?
16
+ puts "Running #{paths.join(' ')}"
17
+ Runner.run paths
18
+ end
17
19
  end
18
20
  end
19
21
  end
@@ -9,11 +9,15 @@ module Guard
9
9
  subject.run_all
10
10
  end
11
11
  end
12
+
12
13
  describe "#run_on_change" do
13
- it "runs changed files" do
14
- Jessie::Runner.should_receive(:run).with(paths)
14
+ it "runs all existing paths" do
15
+ File.stub(:exists?) { true }
16
+ File.stub(:exists?).with(paths[1]) { false }
17
+ Jessie::Runner.should_receive(:run).with(paths - [paths[1]])
15
18
  subject.run_on_change paths
16
19
  end
17
20
  end
21
+
18
22
  end
19
23
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: guard-jessie
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.1
5
+ version: 0.1.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Micha\xC5\x82 Taszycki"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-03 00:00:00 Z
13
+ date: 2011-10-15 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: guard
@@ -116,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - ">="
118
118
  - !ruby/object:Gem::Version
119
- hash: 3678453556759483249
119
+ hash: 3190592616395552802
120
120
  segments:
121
121
  - 0
122
122
  version: "0"
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  requirements:
126
126
  - - ">="
127
127
  - !ruby/object:Gem::Version
128
- hash: 3678453556759483249
128
+ hash: 3190592616395552802
129
129
  segments:
130
130
  - 0
131
131
  version: "0"