runfile-tasks 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/runfile-tasks/docs/rdoc.rb +2 -2
- data/lib/runfile-tasks/rubygems/rubygems.rb +80 -80
- data/lib/runfile-tasks/testing/cucumber.rb +2 -2
- data/lib/runfile-tasks/testing/minitest.rb +3 -3
- data/lib/runfile-tasks/testing/rspec.rb +3 -3
- data/lib/runfile-tasks/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e8aef7820d14db9860e4c39edebd2d9ec93ce6e499e70715e7b91973278f5eef
|
4
|
+
data.tar.gz: 2d38de90135227ebb7ac28aec14d7fe558c2d4177b19838c7798a310c800a0e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45073b116d3ca788b9c34c0410c18e96dd48f448538a8831ba20c9b9bc1607f5e1be039d6de186a3a7fbb3eaac0bc9a5ed03aba9a25d34d9ca5593befa0fa399
|
7
|
+
data.tar.gz: d6e5bf5551d9634d5837b45c0b598b48e65f9a79b0895f11bfebd5b92d75684cb83d771b99d5e89557fb91a150632298f2275532f31571c81ab9d8178f7ed670
|
@@ -10,10 +10,10 @@ module RunfileTasks
|
|
10
10
|
def rdoc(files=nil, options=@@default_rdoc_options)
|
11
11
|
files or files = Dir['**/*.{rb,md}']
|
12
12
|
files = "'" + files.join("' '") + "'"
|
13
|
-
usage "rdoc [--
|
13
|
+
usage "rdoc [-- OPTIONS...]"
|
14
14
|
help "Generate documentation using the rdoc command line tool. To pass arguments to rdoc, place them after '--'."
|
15
15
|
action :rdoc do |args|
|
16
|
-
inopts = args['
|
16
|
+
inopts = args['OPTIONS']
|
17
17
|
options = inopts unless inopts.empty?
|
18
18
|
options = options.join(' ')
|
19
19
|
cmd = "rdoc #{options} #{files}"
|
@@ -1,81 +1,81 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
|
3
|
-
module RunfileTasks
|
4
|
-
module RubyGems
|
5
|
-
extend self
|
6
|
-
|
7
|
-
def all(gemname, gemdir="gems")
|
8
|
-
build gemname, gemdir
|
9
|
-
publish gemname, gemdir
|
10
|
-
end
|
11
|
-
|
12
|
-
def build(gemname, gemdir="gems")
|
13
|
-
gemver = get_gemver gemname
|
14
|
-
|
15
|
-
command "gem"
|
16
|
-
|
17
|
-
usage "build [--install]"
|
18
|
-
help "Build gem from gemspec and move it to '#{gemdir}' folder.\nUse --install to also install it."
|
19
|
-
action :build do |args|
|
20
|
-
say "!txtgrn!Building gem"
|
21
|
-
cmd = "gem build #{gemname}.gemspec"
|
22
|
-
say "!txtgrn!Running: !txtpur!#{cmd}"
|
23
|
-
system cmd
|
24
|
-
say "!txtgrn!Moving gem file to #{gemdir}"
|
25
|
-
files = Dir["*.gem"]
|
26
|
-
Dir.exist? gemdir or FileUtils.mkdir gemdir
|
27
|
-
files.each {|f| FileUtils.mv f, gemdir }
|
28
|
-
args['--install'] and execute "gem install"
|
29
|
-
end
|
30
|
-
|
31
|
-
usage "install [--remote]"
|
32
|
-
help "Install gem from local gem file or from rubygems (--remote)."
|
33
|
-
action :install do |args|
|
34
|
-
if args['--remote']
|
35
|
-
cmd = "gem install #{gemname}"
|
36
|
-
else
|
37
|
-
gemfile = "gems/#{gemname}-#{gemver}.gem"
|
38
|
-
cmd = "gem install #{gemfile}"
|
39
|
-
end
|
40
|
-
say "!txtgrn!Running: !txtpur!#{cmd}"
|
41
|
-
system cmd
|
42
|
-
end
|
43
|
-
|
44
|
-
endcommand
|
45
|
-
end
|
46
|
-
|
47
|
-
def publish(gemname, gemdir="gems")
|
48
|
-
gemver = get_gemver gemname
|
49
|
-
|
50
|
-
command "gem"
|
51
|
-
|
52
|
-
help "Publish gem to rubygems. Make sure to 'run gem build' before you publish."
|
53
|
-
action :publish do
|
54
|
-
gemfile = "gems/#{gemname}-#{gemver}.gem"
|
55
|
-
File.exist? gemfile or abort "File not found #{gemfile}"
|
56
|
-
cmd = "gem push #{gemfile}"
|
57
|
-
say "!txtgrn!Running: !txtpur!#{cmd}"
|
58
|
-
system cmd
|
59
|
-
end
|
60
|
-
|
61
|
-
usage "yank [
|
62
|
-
help "Yank gem from rubygems."
|
63
|
-
action :yank do |args|
|
64
|
-
ver = args['
|
65
|
-
cmd = "gem yank #{gemname} -v #{ver}"
|
66
|
-
say "!txtgrn!Running: !txtpur!#{cmd}"
|
67
|
-
system cmd
|
68
|
-
end
|
69
|
-
|
70
|
-
endcommand
|
71
|
-
end
|
72
|
-
|
73
|
-
def get_gemver(gemname)
|
74
|
-
spec = Gem::Specification::load "#{gemname}.gemspec"
|
75
|
-
spec or abort "Error loading #{gemname}.gemspec"
|
76
|
-
|
77
|
-
end
|
78
|
-
|
79
|
-
end
|
80
|
-
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
module RunfileTasks
|
4
|
+
module RubyGems
|
5
|
+
extend self
|
6
|
+
|
7
|
+
def all(gemname, gemdir="gems")
|
8
|
+
build gemname, gemdir
|
9
|
+
publish gemname, gemdir
|
10
|
+
end
|
11
|
+
|
12
|
+
def build(gemname, gemdir="gems")
|
13
|
+
gemver = get_gemver gemname
|
14
|
+
|
15
|
+
command "gem"
|
16
|
+
|
17
|
+
usage "build [--install]"
|
18
|
+
help "Build gem from gemspec and move it to '#{gemdir}' folder.\nUse --install to also install it."
|
19
|
+
action :build do |args|
|
20
|
+
say "!txtgrn!Building gem"
|
21
|
+
cmd = "gem build #{gemname}.gemspec"
|
22
|
+
say "!txtgrn!Running: !txtpur!#{cmd}"
|
23
|
+
system cmd
|
24
|
+
say "!txtgrn!Moving gem file to #{gemdir}"
|
25
|
+
files = Dir["*.gem"]
|
26
|
+
Dir.exist? gemdir or FileUtils.mkdir gemdir
|
27
|
+
files.each {|f| FileUtils.mv f, gemdir }
|
28
|
+
args['--install'] and execute "gem install"
|
29
|
+
end
|
30
|
+
|
31
|
+
usage "install [--remote]"
|
32
|
+
help "Install gem from local gem file or from rubygems (--remote)."
|
33
|
+
action :install do |args|
|
34
|
+
if args['--remote']
|
35
|
+
cmd = "gem install #{gemname}"
|
36
|
+
else
|
37
|
+
gemfile = "gems/#{gemname}-#{gemver}.gem"
|
38
|
+
cmd = "gem install #{gemfile}"
|
39
|
+
end
|
40
|
+
say "!txtgrn!Running: !txtpur!#{cmd}"
|
41
|
+
system cmd
|
42
|
+
end
|
43
|
+
|
44
|
+
endcommand
|
45
|
+
end
|
46
|
+
|
47
|
+
def publish(gemname, gemdir="gems")
|
48
|
+
gemver = get_gemver gemname
|
49
|
+
|
50
|
+
command "gem"
|
51
|
+
|
52
|
+
help "Publish gem to rubygems. Make sure to 'run gem build' before you publish."
|
53
|
+
action :publish do
|
54
|
+
gemfile = "gems/#{gemname}-#{gemver}.gem"
|
55
|
+
File.exist? gemfile or abort "File not found #{gemfile}"
|
56
|
+
cmd = "gem push #{gemfile}"
|
57
|
+
say "!txtgrn!Running: !txtpur!#{cmd}"
|
58
|
+
system cmd
|
59
|
+
end
|
60
|
+
|
61
|
+
usage "yank [VERSION]"
|
62
|
+
help "Yank gem from rubygems."
|
63
|
+
action :yank do |args|
|
64
|
+
ver = args['VERSION'] || gemver
|
65
|
+
cmd = "gem yank #{gemname} -v #{ver}"
|
66
|
+
say "!txtgrn!Running: !txtpur!#{cmd}"
|
67
|
+
system cmd
|
68
|
+
end
|
69
|
+
|
70
|
+
endcommand
|
71
|
+
end
|
72
|
+
|
73
|
+
def get_gemver(gemname)
|
74
|
+
spec = Gem::Specification::load "#{gemname}.gemspec"
|
75
|
+
spec or abort "Error loading #{gemname}.gemspec"
|
76
|
+
spec.version.to_s
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
81
|
end
|
@@ -3,7 +3,7 @@ module RunfileTasks
|
|
3
3
|
extend self
|
4
4
|
|
5
5
|
def cucumber
|
6
|
-
usage "(feature|features) [
|
6
|
+
usage "(feature|features) [TAG_OR_FILE --list --fast]"
|
7
7
|
help "Run cucumber feature tests. Optionally, specify a tag or a filename to run. Tags should be prefixed with @."
|
8
8
|
option "--list", "Show list of available features"
|
9
9
|
option "--fast", "Abort on first failure"
|
@@ -11,7 +11,7 @@ module RunfileTasks
|
|
11
11
|
if args['--list']
|
12
12
|
show_cucumber_features
|
13
13
|
else
|
14
|
-
run_cucumber_features args['
|
14
|
+
run_cucumber_features args['TAG_OR_FILE'], args['--fast']
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -3,11 +3,11 @@ module RunfileTasks
|
|
3
3
|
extend self
|
4
4
|
|
5
5
|
def minitest(pattern="./test/*_test.rb")
|
6
|
-
usage "test [
|
6
|
+
usage "test [NAME]"
|
7
7
|
help "Run all tests or a single test file."
|
8
8
|
action :test do |args|
|
9
|
-
if args['
|
10
|
-
file = pattern.sub "*", args['
|
9
|
+
if args['NAME']
|
10
|
+
file = pattern.sub "*", args['NAME']
|
11
11
|
say "!txtgrn!Using: !txtpur!#{file}"
|
12
12
|
require file
|
13
13
|
else
|
@@ -11,11 +11,11 @@ module RunfileTasks
|
|
11
11
|
command: 'rspec'
|
12
12
|
}.merge opts
|
13
13
|
|
14
|
-
usage "#{opts[:action]} [
|
14
|
+
usage "#{opts[:action]} [NAME] [TAG]"
|
15
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
|
-
file = args['
|
18
|
-
tag = args['
|
17
|
+
file = args['NAME']
|
18
|
+
tag = args['TAG']
|
19
19
|
|
20
20
|
if file and file[0] == ':'
|
21
21
|
tag = file
|
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.8
|
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: 2020-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: runfile
|
@@ -64,8 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
66
|
requirements: []
|
67
|
-
|
68
|
-
rubygems_version: 2.6.13
|
67
|
+
rubygems_version: 3.0.3
|
69
68
|
signing_key:
|
70
69
|
specification_version: 4
|
71
70
|
summary: Runfile tasks collection
|