ronin-core 0.1.1 → 0.1.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: 632034dea1307157efadc601fa99bfb2b1eaf3cf81506392f2a68733d68645d4
4
- data.tar.gz: 32f82f08f6692163e22f55ecc37666e2cc1655e37127bd578009fed61a3b4cbe
3
+ metadata.gz: 3559cfe4b363098b635feda4b7683bf8daaadc472930dfc6cf4dba201377d268
4
+ data.tar.gz: 7ed63d78b2e76011337af47250d4c672d25ee95a9e0e8a8cecdb21c0217c8a6d
5
5
  SHA512:
6
- metadata.gz: cba7b2829ba506c61c028d6961a5040b026640a3f60d46f2cdbf96649b6de4385a07d171835ab19e687837e9936bc757a832cd58ca71217e2d186433fdfcb3ab
7
- data.tar.gz: 64684f9aa1a7e46348b1596ed941b2056c0262806c5310a17991f6e2e43de179dd9d9988315f55a03be079f26b3f8452ec3f009ef09a3f58d236f9b4e8a238f0
6
+ metadata.gz: a9871e52ebff905fb72779c9aeac53001fdea14257e40ac2b03b628d8a5996636e703faf529149b37a2207c19c84b3726bf9481ae7aa2f4dd078d802db0d25fe
7
+ data.tar.gz: 5e1e9ce2f010510f948577ff6e24328a1d0e1191ddd1ba51485a61cb6580073f4fbd514125bda1cc1895be6b48f2dd8fde6204a75ac580e4ee59a9c9d97ae589
data/ChangeLog.md CHANGED
@@ -1,3 +1,12 @@
1
+ ### 0.1.2 / 2023-07-18
2
+
3
+ #### CLI
4
+
5
+ * Changed {Ronin::Core::CLI::RubyShell#initialize} to wrap a `Module` `context:`
6
+ value in an `Object` instance which includes the module. This allows the
7
+ IRB session to gain access to the module's constants and instances methods,
8
+ as well as correctly define and call instance methods in the IRB session.
9
+
1
10
  ### 0.1.1 / 2023-03-01
2
11
 
3
12
  #### CLI
@@ -48,7 +48,7 @@ module Ronin
48
48
  # @param [String] name
49
49
  # The name of the IRB console.
50
50
  #
51
- # @param [Object] context
51
+ # @param [Object, Module] context
52
52
  # Custom context to launch IRB from within.
53
53
  #
54
54
  # @param [Hash{Symbol => Object}] kwargs
@@ -58,7 +58,18 @@ module Ronin
58
58
  super(**kwargs)
59
59
 
60
60
  @name = name
61
- @context = context
61
+ @context = case context
62
+ when Module
63
+ Object.new.tap do |obj|
64
+ obj.singleton_class.include(context)
65
+ obj.singleton_class.define_singleton_method(:const_missing,&context.method(:const_missing))
66
+ obj.define_singleton_method(:inspect) do
67
+ "#<#{context}>"
68
+ end
69
+ end
70
+ else
71
+ context
72
+ end
62
73
  end
63
74
 
64
75
  #
@@ -29,7 +29,7 @@ module Ronin
29
29
  module Core
30
30
  module Params
31
31
  #
32
- # Contains all {Param::Type} classes.
32
+ # Contains all {Types} classes.
33
33
  #
34
34
  module Types
35
35
  # Mapping of ruby core classes to param types.
@@ -19,6 +19,6 @@
19
19
  module Ronin
20
20
  module Core
21
21
  # ronin-core version
22
- VERSION = '0.1.1'
22
+ VERSION = '0.1.2'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ronin-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Postmodern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-02 00:00:00.000000000 Z
11
+ date: 2023-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reline