runfile-tasks 0.4.4 → 0.4.5
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 +4 -4
- data/README.md +1 -1
- data/lib/runfile-tasks/testing/rspec.rb +16 -4
- data/lib/runfile-tasks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24fa844b5d7e0e75ec185e910b064432e83d11bf
|
4
|
+
data.tar.gz: 4414ec39abbe15fe863084ada9917356f0916fce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d9ff290fc5d693b1f537dbf1eb2fb53d69bb805fec5f6981941cee0b08bb41167afa354633156cf62320d2871fe6a9a1cc121c41cbf39f7567a755f05e9aeed
|
7
|
+
data.tar.gz: 29846065b3b70554a0141b9c66e13f9d87f6b3b57961afdb804bfeeccd9176d0081d8446e48d29f10bb6532484b23ef00987ee368ba6403315bb61f59f56c80f
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ require 'runfile-tasks/testing'
|
|
25
25
|
```
|
26
26
|
|
27
27
|
|
28
|
-
Requiring the task packs does not make
|
28
|
+
Requiring the task packs does not make them available in your Runfile
|
29
29
|
immediately. You need to activate any of the tasks you want as described
|
30
30
|
below.
|
31
31
|
|
@@ -12,18 +12,30 @@ module RunfileTasks
|
|
12
12
|
}.merge opts
|
13
13
|
|
14
14
|
usage "#{opts[:action]} [<name>] [<tag>]"
|
15
|
-
help "Run all specs or a single spec file matching a regex. You can provide a tag to run only specific tests."
|
15
|
+
help "Run all specs or a single spec file matching a regex. You can provide a tag to run only specific tests. If you wish to provide a tag only, without a file pattern, simply prefix the tag with a colon (like 'run spec :focus')"
|
16
16
|
action opts[:action].to_sym do |args|
|
17
|
-
|
17
|
+
file = args['<name>']
|
18
|
+
tag = args['<tag>']
|
19
|
+
|
20
|
+
if file and file[0] == ':'
|
21
|
+
tag = file
|
22
|
+
file = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
if tag and tag[0] == ':'
|
26
|
+
tag = tag[1..-1]
|
27
|
+
end
|
28
|
+
|
29
|
+
if file
|
18
30
|
files = Dir[opts[:pattern]]
|
19
|
-
files.select! { |
|
31
|
+
files.select! { |f| f =~ /#{file}/i }
|
20
32
|
abort "Cannot find a matching spec file with #{opts[:pattern]}" if files.empty?
|
21
33
|
file = files.first
|
22
34
|
cmd = "#{opts[:command]} \"#{file}\""
|
23
35
|
else
|
24
36
|
cmd = "#{opts[:command]}"
|
25
37
|
end
|
26
|
-
cmd = "#{cmd} --tag #{
|
38
|
+
cmd = "#{cmd} --tag #{tag}" if tag
|
27
39
|
say "!txtgrn!Running: !txtpur!#{cmd}"
|
28
40
|
system cmd
|
29
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runfile-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: runfile
|