dirty 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/dirty +1 -1
- data/lib/dirty/version.rb +1 -1
- data/lib/dirty.rb +15 -7
- metadata +2 -2
data/bin/dirty
CHANGED
data/lib/dirty/version.rb
CHANGED
data/lib/dirty.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
module Dirty
|
2
|
+
extend self
|
3
|
+
|
2
4
|
def status
|
3
5
|
`git status --porcelain`.split("\n")
|
4
6
|
end
|
@@ -8,14 +10,20 @@ class Dirty
|
|
8
10
|
end
|
9
11
|
|
10
12
|
def dirty_features
|
11
|
-
dirty_files.map
|
12
|
-
|
13
|
-
|
14
|
-
def self.run
|
15
|
-
new.perform
|
13
|
+
dirty_files.map do |s|
|
14
|
+
s[/(features.*\.feature)/]
|
15
|
+
end.compact
|
16
16
|
end
|
17
17
|
|
18
18
|
def perform
|
19
|
-
|
19
|
+
return 0 if dirty_features.empty?
|
20
|
+
|
21
|
+
command = "cucumber #{dirty_features * ' '}"
|
22
|
+
puts command
|
23
|
+
system command
|
24
|
+
|
25
|
+
# Return cucumber's error status.
|
26
|
+
$?.exitstatus
|
20
27
|
end
|
28
|
+
|
21
29
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: dirty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Robert Pitts
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-10 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|