utils 0.10.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20d9627d09064fc9ea8ef765a51265c94b50a5ad94305a7ed6b65ebbf6a39324
4
- data.tar.gz: 6e14fc5108b6b1c9890be2df2df9e953bde1e4ddc2a0478aa4b8193bfc1f5a4f
3
+ metadata.gz: 3809eaf7bad02676dfb6af1ea42d81eccdb8c736844259c643d7c664f09deae4
4
+ data.tar.gz: ddbeb6bf9c0ef761f4178b214128450a5aab0f3f3410350d1f0221c0699c231a
5
5
  SHA512:
6
- metadata.gz: 23e8e683a1627fe70523b4ea16af5a53596b722dea03d5795c06f5aa0eadf2ec80a7cbab57f6b6fa84593924d9de588a2b8946ffe20dc2e6501391af385a1294
7
- data.tar.gz: 947e497ffaf52ff7339f40d14210e88e814cc48d15bae943c38d3a2e79be4702c546a444acd40efe96033bea922ef3e1cba2103fb1dbe6532f9627546845985c
6
+ metadata.gz: 037bad1cf871c2f1eba57bc9b0206262105e6b481fd2de1fee7f18b5602cb283e3219ba5a254ec60f0dca3c54b2ac5d63e035a75c0cb910d42279ca4c2329749
7
+ data.tar.gz: c655f58309f4aca09eccfc35b440daed4d4e7de35b8300e530231e15dc896c90fe11dc027a34404b7ede8fefdd167cb795a91e27830dc628427fd2c8922d69d8
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.10.1
1
+ 0.11.0
data/bin/probe CHANGED
@@ -35,9 +35,8 @@ def cmd(*args)
35
35
  system(*args) or exit $?.exitstatus
36
36
  end
37
37
 
38
- def find_cmd(*cmds)
39
- cmds.map { |c| `which #{c}`.full?(:chomp) }.compact.first or
40
- raise fail "no #{cmds * '|'} command found"
38
+ def find_cmd(*cmds, on_fail: -> *cmds { raise fail "no #{cmds * '|'} command found" })
39
+ cmds.map { |c| `which #{c}`.full?(:chomp) }.compact.first or on_fail.(*cmds)
41
40
  end
42
41
 
43
42
  def spring?
@@ -129,23 +128,25 @@ when :rspec
129
128
  cmd 'ruby', '-I', $config.probe.include_dirs_argument, *rspec,
130
129
  *($args + testrunner_args)
131
130
  when :'test-unit'
132
- testrb = find_cmd('testrb')
133
131
  if testname = $opts[?n]
134
- cmd 'ruby', '-I', $config.probe.include_dirs_argument, *testrb,
135
- '-n', testname, *($args + testrunner_args)
132
+ cmd 'ruby', '-I', $config.probe.include_dirs_argument,
133
+ *($args + testrunner_args), '-n', testname
136
134
  else
135
+ $args = $args.inject([]) { |args, a|
136
+ args.push(*File.directory?(a) ? Dir[File.join(a, ?*)] : a)
137
+ }
137
138
  for filename in $args
138
139
  sl = filename.source_location
139
140
  if sl.linenumber
140
141
  lf = Tins::LinesFile.for_filename(*sl)
141
142
  if testname = lf.match_backward(/def\s+(\S+?)(?:\(|\s*$)/).full?(:first)
142
- cmd 'ruby', '-I', $config.probe.include_dirs_argument, *testrb,
143
- '-n', testname, sl.filename, *testrunner_args
143
+ cmd 'ruby', '-I', $config.probe.include_dirs_argument,
144
+ sl.filename, *testrunner_args, '-n', testname
144
145
  else
145
146
  warn "no test found before line #{sl.linenumber}"
146
147
  end
147
148
  else
148
- cmd 'ruby', '-I', $config.probe.include_dirs_argument, *testrb,
149
+ cmd 'ruby', '-I', $config.probe.include_dirs_argument,
149
150
  sl.filename, *testrunner_args
150
151
  end
151
152
  end
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.10.1'
3
+ VERSION = '0.11.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/utils.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: utils 0.10.1 ruby lib
2
+ # stub: utils 0.11.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "utils".freeze
6
- s.version = "0.10.1"
6
+ s.version = "0.11.0"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2018-10-17"
11
+ s.date = "2018-10-31"
12
12
  s.description = "This ruby gem provides some useful command line utilities".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["discover".freeze, "classify".freeze, "sedit".freeze, "irb_connect".freeze, "ascii7".freeze, "path".freeze, "enum".freeze, "unquarantine_apps".freeze, "ssh-tunnel".freeze, "xmp".freeze, "brakeman2err".freeze, "search".freeze, "chroot-exec".freeze, "edit".freeze, "tmproc".freeze, "json_check".freeze, "edit_wait".freeze, "errf".freeze, "untest".freeze, "blameline".freeze, "remote_copy".freeze, "git-empty".freeze, "vacuum_firefox_sqlite".freeze, "same_files".freeze, "chroot-libs".freeze, "git-versions".freeze, "strip_spaces".freeze, "number_files".freeze, "rssr".freeze, "serve".freeze, "vcf2alias".freeze, "on_change".freeze, "utils-utilsrc".freeze, "myex".freeze, "long_lines".freeze, "dialog-pick".freeze, "probe".freeze, "create_tags".freeze]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-17 00:00:00.000000000 Z
11
+ date: 2018-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar