rubyshell 1.3.1 → 1.3.2

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: 71600c3dfe95d34a08ae287a966739973ec61f50510dab8c40a99bb4bc6941ad
4
- data.tar.gz: 0b8869b6abd73e47bb9991e7b37d4b8c2a819a7126b506d951c41436449c4df6
3
+ metadata.gz: 11208bfa2670078a1665b386260f125f0ddd313f53ea4cba06d057b3fd7d58c4
4
+ data.tar.gz: '08c133def7ce9b41cfbef1e17183e7962a57bf4e8a06ac0d64c4b3a337dc3c83'
5
5
  SHA512:
6
- metadata.gz: a5a707cc81ff623438bf32b2bf64c25a29fe2ebad7d6684ffe0900d64b911570553d3c647b9ea967c7c3b23c77a1a59d4db149783519283f3937f2ef2e8e243d
7
- data.tar.gz: decee58de77cbbbe82586c16f4c3a1b92d4097598c38145eb7ea2b394bd6d2a0c4b7d83681f51d321084c687441e63a98094f552288c5bdbdfb6f93810b75df5
6
+ metadata.gz: 34f26ad513a3ff7133bb0b6240945d62d1f35090c0fbd29c09946b23cf5b1728d573df7ae7f898f02ba2a2b0acfa4e9b6156ecb442a6f3148c60880e94364923
7
+ data.tar.gz: d71f115c187835d5f44ace7159a95c1025e511d6d31f299febb92d7ff5ac1cb03a0cf9a2085398ed9b4e19cb7c89cad6c3e996d8b4cc4e7b0e100cbd7a6e40e6
data/Rakefile CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
- require "bundler/gem_tasks"
6
5
 
7
6
  RSpec::Core::RakeTask.new(:spec)
8
7
 
@@ -9,9 +9,5 @@ module RubyShell
9
9
  def cd(path, &block)
10
10
  Dir.chdir(path, &block)
11
11
  end
12
-
13
- def ls(*args)
14
- method_missing(:ls, *args)
15
- end
16
12
  end
17
13
  end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RubyShell
4
+ module Tty
5
+ module IrbWorkspace
6
+ def initialize(*args, **kwargs)
7
+ super
8
+
9
+ main.define_singleton_method(:to_s) do
10
+ Dir.pwd.split("/").last(2).join("/")
11
+ end
12
+
13
+ @main.extend(RubyShell::Executor)
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ IRB::WorkSpace.prepend(RubyShell::Tty::IrbWorkspace)
20
+
21
+ IRB.conf[:IRB_RC] = proc do |ctx|
22
+ if defined?(IRB::Command) && IRB::Command.respond_to?(:commands)
23
+ IRB::Command.commands.delete(:cd)
24
+ elsif defined?(IRB::ExtendCommand) && IRB::ExtendCommand.respond_to?(:commands)
25
+ IRB::ExtendCommand.commands.delete(:cd)
26
+ end
27
+
28
+ ctx.command_aliases.delete(:cd) if ctx.respond_to?(:command_aliases) && ctx.command_aliases
29
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubyShell
4
- VERSION = "1.3.1"
4
+ VERSION = "1.3.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyshell
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - albertalef
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-19 00:00:00.000000000 Z
11
+ date: 2026-01-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A rubist way to run shell commands
14
14
  email:
@@ -31,6 +31,7 @@ files:
31
31
  - lib/rubyshell/error.rb
32
32
  - lib/rubyshell/executor.rb
33
33
  - lib/rubyshell/overwrited_commands.rb
34
+ - lib/rubyshell/tty/irb.rb
34
35
  - lib/rubyshell/version.rb
35
36
  homepage: https://github.com/albertalef/rubyshell
36
37
  licenses: