console1984 0.1.28 → 0.1.30

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: 1dec1a2f85d270490c4fe77d24da5e585853091518178d62c7913918635095c8
4
- data.tar.gz: bf2d29345953a97aee5a738a3b190df832f36f75aa1815f125ae28da78e027e5
3
+ metadata.gz: edc219593c4db79d9abb483cb91fb2da5f229fbbb6729fecede09bd12a9a5c1f
4
+ data.tar.gz: 874b307704da2c60e082cd2eb0e9ad02b32fc85eb986b7f607975781328b8fe7
5
5
  SHA512:
6
- metadata.gz: fb45296dc92dc31e81ebf71117eb4e409b89f60bf7030e5084362c2a3927a70d55780e77dddb5b93363661892a4db4421e5ac8e4c413206d80e66125e65e926a
7
- data.tar.gz: bfab360df792a88bbebb762f1406575e96dd7565ca5e38ed2b006e285e9bf0e26ac1b8f6fd99bb32f5ca6e88932a16684de8afb6940167bc19d4b56103eb0e4f
6
+ metadata.gz: c6b1423d81bced6b0e6e430537d8da90574d4d13cf7a1f191a7c63fd943435e74c5842c94cc468d8e6389a9b4b84fef3472c095be25264ad8a50f8a66009e9ba
7
+ data.tar.gz: ed1b618301bd46e5479b046b34d8f1bc4f94b2bc919e4b5553240b4c77252fa827abc395eb4efd3b262047e19da6e66cf3007fca8a714e6b519df59c231eb726
@@ -29,6 +29,8 @@ class Console1984::CommandExecutor
29
29
  # We detected that a forbidden command was executed. We exit IRB right away.
30
30
  flag_suspicious(commands, error: error)
31
31
  Console1984.supervisor.exit_irb
32
+ rescue => error
33
+ raise encrypting_error(error)
32
34
  ensure
33
35
  run_as_system { session_logger.after_executing commands }
34
36
  end
@@ -97,4 +99,16 @@ class Console1984::CommandExecutor
97
99
  ensure
98
100
  @executing_user_command = original_value
99
101
  end
102
+
103
+ def encrypting_error(error)
104
+ def error.inspect
105
+ Console1984.command_executor.execute_in_protected_mode { super }
106
+ end
107
+
108
+ def error.to_s
109
+ Console1984.command_executor.execute_in_protected_mode { super }
110
+ end
111
+
112
+ error
113
+ end
100
114
  end
@@ -12,7 +12,7 @@ module Console1984::Ext::Irb::Context
12
12
  end
13
13
 
14
14
  #
15
- def evaluate(line, line_no, exception: nil)
15
+ def evaluate(line, ...)
16
16
  Console1984.command_executor.execute(Array(line)) do
17
17
  super
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module Console1984
2
- VERSION = "0.1.28"
2
+ VERSION = "0.1.30"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console1984
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.28
4
+ version: 0.1.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Manrubia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-15 00:00:00.000000000 Z
11
+ date: 2023-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rainbow