runfile-tasks 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/runfile-tasks/testing/cucumber.rb +27 -13
- data/lib/runfile-tasks/testing/rspec.rb +1 -1
- data/lib/runfile-tasks/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 080bcca159673d76ef9021befb30c2a6946ba144
|
4
|
+
data.tar.gz: e1e420951bdd8697751d50414f4a8baf9de6d0a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05ab7e50d71a2705d6c55f7e97359ae6bbaee8afff8e70963ea19db64012d5714abf51f4ce826c7cd3ff7a098ca4670e69efb14516e41ed714c250f37e7742cf
|
7
|
+
data.tar.gz: 9d0ace9a5265aebc9eb78a8a6b1a66df52c00029cfdcf31470215ecbab9ac4c829d3d753051beb3cab9e04deb1f585033e0d92ece49e7500be2a9d23db23dc13
|
@@ -3,21 +3,15 @@ module RunfileTasks
|
|
3
3
|
extend self
|
4
4
|
|
5
5
|
def cucumber
|
6
|
-
usage "(feature|features) [<tag_or_file>]"
|
6
|
+
usage "(feature|features) [<tag_or_file> --list]"
|
7
7
|
help "Run cucumber feature tests. Optionally, specify a tag or a filename to run. Tags should be prefixed with @."
|
8
|
+
option "--list", "Show list of available features"
|
8
9
|
action :feature, :features do |args|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
say "!txtgrn!Running features tagged #{single}"
|
14
|
-
cmd = "#{cmd} --tags #{single}"
|
15
|
-
else
|
16
|
-
say "!txtgrn!Running #{single} features"
|
17
|
-
cmd = "#{cmd} 'features/#{single}.feature'"
|
18
|
-
end
|
10
|
+
if args['--list']
|
11
|
+
show_cucumber_features
|
12
|
+
else
|
13
|
+
run_cucumber_features args['<tag_or_file>']
|
19
14
|
end
|
20
|
-
exec cmd
|
21
15
|
end
|
22
16
|
end
|
23
17
|
|
@@ -52,8 +46,28 @@ module RunfileTasks
|
|
52
46
|
File.write filename, doc
|
53
47
|
say "Generated #{filename}"
|
54
48
|
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def show_cucumber_features
|
52
|
+
say "!txtgrn!Available Features:"
|
53
|
+
Dir['features/**/*.feature'].each do |file|
|
54
|
+
say "- " + File.basename("#{file}", '.feature')
|
55
|
+
end
|
56
|
+
end
|
55
57
|
|
58
|
+
def run_cucumber_features(tag_or_file)
|
59
|
+
cmd = "cucumber"
|
60
|
+
if tag_or_file
|
61
|
+
if tag_or_file[0] == '@'
|
62
|
+
say "!txtgrn!Running features tagged #{tag_or_file}"
|
63
|
+
cmd = "#{cmd} --tags #{tag_or_file}"
|
64
|
+
else
|
65
|
+
say "!txtgrn!Running #{tag_or_file} features"
|
66
|
+
cmd = "#{cmd} 'features/#{tag_or_file}.feature'"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
exec cmd
|
56
70
|
end
|
57
|
-
|
71
|
+
|
58
72
|
end
|
59
73
|
end
|
@@ -12,7 +12,7 @@ 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. If you wish to provide a tag only, without a file pattern, simply prefix the tag with a colon
|
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
18
|
tag = args['<tag>']
|
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.6
|
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: 2017-
|
11
|
+
date: 2017-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: runfile
|
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
67
|
rubyforge_project:
|
68
|
-
rubygems_version: 2.
|
68
|
+
rubygems_version: 2.5.1
|
69
69
|
signing_key:
|
70
70
|
specification_version: 4
|
71
71
|
summary: Runfile tasks collection
|