runfile-tasks 0.4.7 → 0.4.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 71f9f225c68e22aecfa5561efffcb6b691820530
4
- data.tar.gz: 564bbba81dca357050564d586208aef2b2fe7813
2
+ SHA256:
3
+ metadata.gz: e8aef7820d14db9860e4c39edebd2d9ec93ce6e499e70715e7b91973278f5eef
4
+ data.tar.gz: 2d38de90135227ebb7ac28aec14d7fe558c2d4177b19838c7798a310c800a0e8
5
5
  SHA512:
6
- metadata.gz: 553366c04cfe265bc6fa378b8ba2d6aa4f98ddf577cef0f150b0668f959959dfed7ca428d067acc097a6b8bb8c5f27b480e7d003bed49affeb7b62c53d6760e5
7
- data.tar.gz: 617bd22763e585c924ee5c5e07a61b0cc876c522a88e2597eec42e9fd561bb5d74676f5e3d902d4374a443073cdc9fa66448903fe11265d49797c4f7e75e5c9d
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 [-- <options>...]"
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['<options>']
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 [<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
- gemver = spec.version.to_s
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) [<tag_or_file> --list --fast]"
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['<tag_or_file>'], args['--fast']
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 [<name>]"
6
+ usage "test [NAME]"
7
7
  help "Run all tests or a single test file."
8
8
  action :test do |args|
9
- if args['<name>']
10
- file = pattern.sub "*", args['<name>']
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]} [<name>] [<tag>]"
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['<name>']
18
- tag = args['<tag>']
17
+ file = args['NAME']
18
+ tag = args['TAG']
19
19
 
20
20
  if file and file[0] == ':'
21
21
  tag = file
@@ -1,3 +1,3 @@
1
1
  module RunfileTasks
2
- VERSION = "0.4.7"
2
+ VERSION = "0.4.8"
3
3
  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.7
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: 2017-09-03 00:00:00.000000000 Z
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
- rubyforge_project:
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