utils 0.44.0 → 0.45.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: 825b9fd0dbbb5410f80f85ecec639484f6e96bd1c240d8f830a7e85961c6e1c3
4
- data.tar.gz: 93d42d80cbbf23773c93cc41feaac88f0ae5e7ca44e791ed8faff6363eaa53b2
3
+ metadata.gz: 0ba83a3d4301571d5cefae45b004dbc83ac40d4e96844b66d2e9f53e70dfa326
4
+ data.tar.gz: 87b84b9c9f1ee5fde106c521bebd6cff73653f2c172a6acf38615d1d7ce6b266
5
5
  SHA512:
6
- metadata.gz: b33cc91d12d7e0141e08ee7f83bef104ede6fb32df27ab4ecd29575932a4197a3172e6e90acb7647aeac27ef64d24a7969b73e98f32ebf1b4e10c9716ac1f950
7
- data.tar.gz: fc980bc204f19f9ed4492f15c8b692b1ab3ae98e069a7e0687cb53dbba66e4df866cefe5110e5caa9d7ad69be473b896583b3023660aaa3cbf64700e08e2cba6
6
+ metadata.gz: 27e8d0af4da40ee35153d82288df743a74fa58e3477ba7ff100dba07237d29138ae49b79e060ab7628d7b96c63d52a1d9b42edeaa4872e56e230d81c8477c12c
7
+ data.tar.gz: 679e3ab9e2039895ac417ec86d5f6af0205f9cc8171c8e27622d5231670595b0ee25f3978b215ad2e9c8e0a4162f573315b685dc3618d5faab5496b763fdb5f4
data/lib/utils/irb.rb CHANGED
@@ -11,8 +11,6 @@ $pager = ENV['PAGER'] || 'less -r'
11
11
 
12
12
  module Utils
13
13
  module IRB
14
- require 'utils/irb/service'
15
-
16
14
  module Shell
17
15
  require 'fileutils'
18
16
  include FileUtils
@@ -71,16 +69,6 @@ module Utils
71
69
  end
72
70
  end
73
71
 
74
- # Start an irb server.
75
- def irb_server(uri = nil)
76
- Utils::IRB::Service.start(uri) {}
77
- end
78
-
79
- # Connect to an irb server.
80
- def irb_connect(uri = nil)
81
- Utils::IRB::Service.connect(uri)
82
- end
83
-
84
72
  # TODO: change the API of this stuff
85
73
 
86
74
  # Return all instance methods of obj's class.
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.44.0'
3
+ VERSION = '0.45.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,23 +1,23 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: utils 0.44.0 ruby lib
2
+ # stub: utils 0.45.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "utils".freeze
6
- s.version = "0.44.0".freeze
6
+ s.version = "0.45.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-07-03"
11
+ s.date = "2024-07-08"
12
12
  s.description = "This ruby gem provides some useful command line utilities".freeze
13
13
  s.email = "flori@ping.de".freeze
14
- s.executables = ["ascii7".freeze, "blameline".freeze, "check-yaml".freeze, "classify".freeze, "create_cstags".freeze, "create_tags".freeze, "discover".freeze, "edit".freeze, "edit_wait".freeze, "enum".freeze, "fix-brew".freeze, "git-empty".freeze, "git-versions".freeze, "irb_connect".freeze, "json_check".freeze, "long_lines".freeze, "myex".freeze, "number_files".freeze, "on_change".freeze, "path".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]
15
- s.extra_rdoc_files = ["README.md".freeze, "lib/utils.rb".freeze, "lib/utils/config_file.rb".freeze, "lib/utils/editor.rb".freeze, "lib/utils/file_xt.rb".freeze, "lib/utils/finder.rb".freeze, "lib/utils/grepper.rb".freeze, "lib/utils/irb.rb".freeze, "lib/utils/irb/service.rb".freeze, "lib/utils/line_blamer.rb".freeze, "lib/utils/line_formatter.rb".freeze, "lib/utils/md5.rb".freeze, "lib/utils/patterns.rb".freeze, "lib/utils/probe_server.rb".freeze, "lib/utils/ssh_tunnel_specification.rb".freeze, "lib/utils/version.rb".freeze, "lib/utils/xt/source_location_extension.rb".freeze]
16
- s.files = [".github/dependabot.yml".freeze, ".github/workflows/codeql-analysis.yml".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "bin/ascii7".freeze, "bin/blameline".freeze, "bin/check-yaml".freeze, "bin/classify".freeze, "bin/create_cstags".freeze, "bin/create_tags".freeze, "bin/discover".freeze, "bin/edit".freeze, "bin/edit_wait".freeze, "bin/enum".freeze, "bin/fix-brew".freeze, "bin/git-empty".freeze, "bin/git-versions".freeze, "bin/irb_connect".freeze, "bin/json_check".freeze, "bin/long_lines".freeze, "bin/myex".freeze, "bin/number_files".freeze, "bin/on_change".freeze, "bin/path".freeze, "bin/probe".freeze, "bin/rd2md".freeze, "bin/search".freeze, "bin/sedit".freeze, "bin/serve".freeze, "bin/ssh-tunnel".freeze, "bin/strip_spaces".freeze, "bin/sync_dir".freeze, "bin/untest".freeze, "bin/utils-utilsrc".freeze, "bin/vcf2alias".freeze, "lib/utils.rb".freeze, "lib/utils/config_file.rb".freeze, "lib/utils/editor.rb".freeze, "lib/utils/file_xt.rb".freeze, "lib/utils/finder.rb".freeze, "lib/utils/grepper.rb".freeze, "lib/utils/irb.rb".freeze, "lib/utils/irb/service.rb".freeze, "lib/utils/line_blamer.rb".freeze, "lib/utils/line_formatter.rb".freeze, "lib/utils/md5.rb".freeze, "lib/utils/patterns.rb".freeze, "lib/utils/probe_server.rb".freeze, "lib/utils/ssh_tunnel_specification.rb".freeze, "lib/utils/version.rb".freeze, "lib/utils/xt/source_location_extension.rb".freeze, "utils.gemspec".freeze]
14
+ s.executables = ["ascii7".freeze, "blameline".freeze, "check-yaml".freeze, "classify".freeze, "create_cstags".freeze, "create_tags".freeze, "discover".freeze, "edit".freeze, "edit_wait".freeze, "enum".freeze, "fix-brew".freeze, "git-empty".freeze, "git-versions".freeze, "json_check".freeze, "long_lines".freeze, "myex".freeze, "number_files".freeze, "on_change".freeze, "path".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]
15
+ s.extra_rdoc_files = ["README.md".freeze, "lib/utils.rb".freeze, "lib/utils/config_file.rb".freeze, "lib/utils/editor.rb".freeze, "lib/utils/file_xt.rb".freeze, "lib/utils/finder.rb".freeze, "lib/utils/grepper.rb".freeze, "lib/utils/irb.rb".freeze, "lib/utils/line_blamer.rb".freeze, "lib/utils/line_formatter.rb".freeze, "lib/utils/md5.rb".freeze, "lib/utils/patterns.rb".freeze, "lib/utils/probe_server.rb".freeze, "lib/utils/ssh_tunnel_specification.rb".freeze, "lib/utils/version.rb".freeze, "lib/utils/xt/source_location_extension.rb".freeze]
16
+ s.files = [".github/dependabot.yml".freeze, ".github/workflows/codeql-analysis.yml".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "bin/ascii7".freeze, "bin/blameline".freeze, "bin/check-yaml".freeze, "bin/classify".freeze, "bin/create_cstags".freeze, "bin/create_tags".freeze, "bin/discover".freeze, "bin/edit".freeze, "bin/edit_wait".freeze, "bin/enum".freeze, "bin/fix-brew".freeze, "bin/git-empty".freeze, "bin/git-versions".freeze, "bin/json_check".freeze, "bin/long_lines".freeze, "bin/myex".freeze, "bin/number_files".freeze, "bin/on_change".freeze, "bin/path".freeze, "bin/probe".freeze, "bin/rd2md".freeze, "bin/search".freeze, "bin/sedit".freeze, "bin/serve".freeze, "bin/ssh-tunnel".freeze, "bin/strip_spaces".freeze, "bin/sync_dir".freeze, "bin/untest".freeze, "bin/utils-utilsrc".freeze, "bin/vcf2alias".freeze, "lib/utils.rb".freeze, "lib/utils/config_file.rb".freeze, "lib/utils/editor.rb".freeze, "lib/utils/file_xt.rb".freeze, "lib/utils/finder.rb".freeze, "lib/utils/grepper.rb".freeze, "lib/utils/irb.rb".freeze, "lib/utils/line_blamer.rb".freeze, "lib/utils/line_formatter.rb".freeze, "lib/utils/md5.rb".freeze, "lib/utils/patterns.rb".freeze, "lib/utils/probe_server.rb".freeze, "lib/utils/ssh_tunnel_specification.rb".freeze, "lib/utils/version.rb".freeze, "lib/utils/xt/source_location_extension.rb".freeze, "utils.gemspec".freeze]
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.11".freeze
20
+ s.rubygems_version = "3.5.14".freeze
21
21
  s.summary = "Some useful command line utilities".freeze
22
22
 
23
23
  s.specification_version = 4
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.44.0
4
+ version: 0.45.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: 2024-07-03 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -166,7 +166,6 @@ executables:
166
166
  - fix-brew
167
167
  - git-empty
168
168
  - git-versions
169
- - irb_connect
170
169
  - json_check
171
170
  - long_lines
172
171
  - myex
@@ -194,7 +193,6 @@ extra_rdoc_files:
194
193
  - lib/utils/finder.rb
195
194
  - lib/utils/grepper.rb
196
195
  - lib/utils/irb.rb
197
- - lib/utils/irb/service.rb
198
196
  - lib/utils/line_blamer.rb
199
197
  - lib/utils/line_formatter.rb
200
198
  - lib/utils/md5.rb
@@ -223,7 +221,6 @@ files:
223
221
  - bin/fix-brew
224
222
  - bin/git-empty
225
223
  - bin/git-versions
226
- - bin/irb_connect
227
224
  - bin/json_check
228
225
  - bin/long_lines
229
226
  - bin/myex
@@ -248,7 +245,6 @@ files:
248
245
  - lib/utils/finder.rb
249
246
  - lib/utils/grepper.rb
250
247
  - lib/utils/irb.rb
251
- - lib/utils/irb/service.rb
252
248
  - lib/utils/line_blamer.rb
253
249
  - lib/utils/line_formatter.rb
254
250
  - lib/utils/md5.rb
@@ -281,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
277
  - !ruby/object:Gem::Version
282
278
  version: '0'
283
279
  requirements: []
284
- rubygems_version: 3.5.11
280
+ rubygems_version: 3.5.14
285
281
  signing_key:
286
282
  specification_version: 4
287
283
  summary: Some useful command line utilities
data/bin/irb_connect DELETED
@@ -1,37 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # encoding: UTF-8
3
-
4
- require 'tins/xt'
5
- include Tins::GO
6
- require 'utils/irb'
7
- require 'drb'
8
-
9
- def usage
10
- puts <<-EOT
11
- Usage: #{File.basename($0)} [OPTS]
12
-
13
- Options are
14
-
15
- -e CODE CODE is execute on the remote irb
16
- -l PATH load file PATH into remote irb context
17
- -u URL druby url to connect to
18
- -h display this help
19
-
20
- Version is #{File.basename($0)} #{Utils::VERSION}.
21
- EOT
22
- exit 1
23
- end
24
-
25
-
26
- $opts = go 'e:u:l:h'
27
- $opts[?h] and usage
28
-
29
- proxy = Utils::IRB::Service.connect($opts[?u])
30
- case
31
- when load_path = $opts[?l]
32
- proxy.load(load_path)
33
- when code = $opts[?e]
34
- p proxy.eval(code)
35
- else
36
- puts proxy.eval(STDIN.read)
37
- end
@@ -1,39 +0,0 @@
1
- require 'drb'
2
-
3
- module Utils::IRB::Service
4
- class << self
5
- attr_accessor :hostname
6
-
7
- attr_accessor :port
8
-
9
- def start(uri = nil, &block)
10
- uri ||= "druby://localhost:6642"
11
- block ||= proc {}
12
- puts "Starting IRB server listening to #{uri.inspect}."
13
- DRb.start_service(uri, eval('irb_current_working_binding', block.binding))
14
- end
15
-
16
- def connect(uri = nil)
17
- uri ||= "druby://localhost:6642"
18
- irb = DRbObject.new_with_uri(uri)
19
- Proxy.new(irb)
20
- end
21
- end
22
-
23
- class Proxy
24
- def initialize(irb)
25
- @irb = irb
26
- end
27
-
28
- def eval(code)
29
- @irb.conf.workspace.evaluate nil, code
30
- end
31
-
32
- def load(filename)
33
- unless filename.start_with?('/')
34
- filename = File.expand_path filename
35
- end
36
- @irb.load filename
37
- end
38
- end
39
- end