utils 0.61.0 → 0.62.0

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
2
  SHA256:
3
- metadata.gz: c49b13b25be28b485a47834d29a84674332532062a752b3cae2da1877fca4b38
4
- data.tar.gz: a2a8292a3b73c5527915f81218be45a9f48af681827aa342c0d79bfc2172ce9d
3
+ metadata.gz: cb608b3d361742306cafe1b44729d2de4d4dcd01df60ae727d6317e4225e932e
4
+ data.tar.gz: d3a0e74795e6dd0b84d0482b65c654e215d748e8631898850a3b6d6c84fe75f4
5
5
  SHA512:
6
- metadata.gz: 9233604e38ee99da756da940174ccaadf801fef1be301e4cd58bdbfd076fc448a412e48d436ccb8f607729c521bb32096e459282607815888c582be72cded64a
7
- data.tar.gz: 60f5a01d279a88784aa6c717b2baf11396d0fc5703f30b1353144e650bfba49c9b473114f8817fbfd70326358e99cf6952d18c8a301d233035ef1d095e37d18f
6
+ metadata.gz: 60dc92c6645f507de9ccc6ecc46eed3c7575d5a6ad8f095747059768fb8ffb984442c8421475813f3c960a99ae9724d1a6a2e4ddf54364f4c7c03a9a73bb0190
7
+ data.tar.gz: 52cbbc17bf192017e1f6d271f1891039b5e1a06717582da89ccd8af3596145a8f0d5c9997612d871d3c523982c2d3ab1b116e04dbee82c70ca9e95a19a84085e
data/bin/discover CHANGED
@@ -63,7 +63,6 @@ Term::ANSIColor.coloring = (STDIN.tty? && ENV['TERM'] !~ /dumb/) && !args[?c]
63
63
  STDOUT.sync = true
64
64
  config = Utils::ConfigFile.new
65
65
  config.configure_from_paths
66
- args[?b] ||= config.discover.binary
67
66
  args[?n] ||= (args[?l] || args[?L]) ? 1 << 60 : config.discover.max_matches
68
67
 
69
68
  if args[?s]
data/bin/search CHANGED
@@ -134,7 +134,6 @@ def usage
134
134
  -e open the matching files with edit command
135
135
  -E pick one file to edit
136
136
  -r REPLACE replace the searched match with REPLACE
137
- -b also search binary files
138
137
  -g use git to determine author of the line
139
138
  -G AUTHOR only display lines authored by AUTHOR
140
139
  -a CSET use only character set CSET from PATTERN
@@ -146,7 +145,7 @@ def usage
146
145
  exit 1
147
146
  end
148
147
 
149
- args = go 'r:p:I:A:B:C:s:S:n:N:a:i:G:cfFlLeEvbgh'
148
+ args = go 'r:p:I:A:B:C:s:S:n:N:a:i:G:cfFlLeEvgh'
150
149
  args[?h] and usage
151
150
  pattern = ARGV.shift or usage
152
151
  roots = (ARGV.empty? ? [ Dir.pwd ] : ARGV).map { |f| File.expand_path(f) }
data/bin/strip_spaces CHANGED
@@ -6,7 +6,6 @@ require 'tins/secure_write'
6
6
  include Tins::SecureWrite
7
7
  require 'tins/find'
8
8
  include Tins::Find
9
- require 'tins/xt/file_binary'
10
9
  require 'utils'
11
10
 
12
11
  def usage
@@ -132,8 +132,6 @@ class Utils::ConfigFile
132
132
 
133
133
  config :skip_files, /(\A\.|\.sw[pon]\z|\.log\z|~\z)/
134
134
 
135
- config :binary, false
136
-
137
135
  config :max_matches, 10
138
136
 
139
137
  config :index_expire_after
@@ -150,8 +148,6 @@ class Utils::ConfigFile
150
148
  config :prune_dirs, /\A(\.svn|\.git|CVS|tmp)\z/
151
149
 
152
150
  config :skip_files, /(\A\.|\.sw[pon]\z|\.log\z|~\z)/
153
-
154
- config :binary, false
155
151
  end
156
152
 
157
153
  def scope(&block)
data/lib/utils/grepper.rb CHANGED
@@ -72,15 +72,11 @@ class Utils::Grepper
72
72
  (!@name_pattern || @name_pattern.match(bn))
73
73
  then
74
74
  File.open(filename, 'rb', encoding: Encoding::UTF_8) do |file|
75
- if @args[?b] && !@args[?g] || file.binary? != true
76
- @args[?v] and warn "Matching #{filename.inspect}."
77
- if @args[?f]
78
- @output << filename
79
- else
80
- match_lines file
81
- end
75
+ @args[?v] and warn "Matching #{filename.inspect}."
76
+ if @args[?f]
77
+ @output << filename
82
78
  else
83
- @args[?v] and warn "Skipping binary file #{filename.inspect}."
79
+ match_lines file
84
80
  end
85
81
  end
86
82
  else
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.61.0'
3
+ VERSION = '0.62.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.61.0 ruby lib
2
+ # stub: utils 0.62.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "utils".freeze
6
- s.version = "0.61.0".freeze
6
+ s.version = "0.62.0".freeze
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 = "2024-12-14"
11
+ s.date = "2025-01-10"
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 = ["ascii7".freeze, "blameline".freeze, "changes".freeze, "classify".freeze, "code_comment".freeze, "commit_message".freeze, "create_cstags".freeze, "create_tags".freeze, "discover".freeze, "edit".freeze, "edit_wait".freeze, "enum".freeze, "git-empty".freeze, "git-versions".freeze, "json_check".freeze, "long_lines".freeze, "myex".freeze, "number_files".freeze, "on_change".freeze, "path".freeze, "print_method".freeze, "probe".freeze, "rd2md".freeze, "search".freeze, "sedit".freeze, "serve".freeze, "ssh-tunnel".freeze, "strip_spaces".freeze, "sync_dir".freeze, "untest".freeze, "utils-utilsrc".freeze, "vcf2alias".freeze, "yaml_check".freeze]
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.homepage = "http://github.com/flori/utils".freeze
18
18
  s.licenses = ["GPL-2.0".freeze]
19
19
  s.rdoc_options = ["--title".freeze, "Utils - Some useful command line utilities".freeze, "--main".freeze, "README.md".freeze]
20
- s.rubygems_version = "3.5.23".freeze
20
+ s.rubygems_version = "3.6.2".freeze
21
21
  s.summary = "Some useful command line utilities".freeze
22
22
 
23
23
  s.specification_version = 4
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.61.0
4
+ version: 0.62.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-14 00:00:00.000000000 Z
10
+ date: 2025-01-10 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: gem_hadar
@@ -318,7 +317,6 @@ homepage: http://github.com/flori/utils
318
317
  licenses:
319
318
  - GPL-2.0
320
319
  metadata: {}
321
- post_install_message:
322
320
  rdoc_options:
323
321
  - "--title"
324
322
  - Utils - Some useful command line utilities
@@ -337,8 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
337
335
  - !ruby/object:Gem::Version
338
336
  version: '0'
339
337
  requirements: []
340
- rubygems_version: 3.5.23
341
- signing_key:
338
+ rubygems_version: 3.6.2
342
339
  specification_version: 4
343
340
  summary: Some useful command line utilities
344
341
  test_files: []