bitgirder-platform 0.1.24 → 0.1.25
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.
- data/lib/bitgirder/irb.rb +32 -21
- data/lib/doc-gen18.rb +1 -1
- data/lib/doc-gen20.rb +1 -1
- metadata +2 -2
data/lib/bitgirder/irb.rb
CHANGED
|
@@ -5,31 +5,42 @@ require 'irb'
|
|
|
5
5
|
module BitGirder
|
|
6
6
|
module Irb
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
include BitGirder::Core
|
|
9
|
+
|
|
10
|
+
class Session < BitGirderClass
|
|
11
|
+
|
|
12
|
+
bg_attr :setup,
|
|
13
|
+
required: false,
|
|
14
|
+
description:
|
|
15
|
+
"Init block to be run in context of irb main object before"
|
|
16
|
+
|
|
17
|
+
# This is a slimmed down version of the standard IRB run loop setup and
|
|
18
|
+
# execution, with our own setup and control logic spliced in. See the source
|
|
19
|
+
# for irb.rb in the ruby distro for the original details.
|
|
20
|
+
#
|
|
21
|
+
# One note is that we seem to need to set the global :MAIN_CONTEXT value
|
|
22
|
+
# for things to work correctly. This may not be the case and we may find
|
|
23
|
+
# later that there are ways to correctly use the library for multiple IRBs.
|
|
24
|
+
# That being said, we run interactively, so there's not a compelling need
|
|
25
|
+
# right now to have more than one for us.
|
|
26
|
+
public
|
|
27
|
+
def run
|
|
28
|
+
|
|
29
|
+
if IRB.conf[ :MAIN_CONTEXT ]
|
|
30
|
+
raise "IRB session already running (a MAIN_CONTEXT is set)?"
|
|
31
|
+
end
|
|
15
32
|
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
IRB.setup( nil )
|
|
34
|
+
irb = IRB::Irb.new
|
|
35
|
+
IRB.conf[ :MAIN_CONTEXT ] = irb.context
|
|
18
36
|
|
|
19
|
-
|
|
37
|
+
@setup.call( irb.context.workspace.main ) if @setup
|
|
20
38
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
BG_EVAL_INPUT_ORIG = instance_method( :eval_input )
|
|
24
|
-
|
|
25
|
-
def eval_input( *argv )
|
|
26
|
-
|
|
27
|
-
if ( script = BitGirder::Irb::STATE[ :init_eval ] )
|
|
28
|
-
@context.evaluate( script, 1 )
|
|
29
|
-
end
|
|
39
|
+
trap( "SIGINT" ) { irb.signal_handle }
|
|
30
40
|
|
|
31
|
-
|
|
32
|
-
end
|
|
41
|
+
catch( :IRB_EXIT ) { irb.eval_input }
|
|
33
42
|
end
|
|
43
|
+
end
|
|
34
44
|
|
|
35
45
|
end
|
|
46
|
+
end
|
data/lib/doc-gen18.rb
CHANGED
data/lib/doc-gen20.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bitgirder-platform
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.25
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
12
|
+
date: 2013-05-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: Contains core classes and interfaces for building event logger implementations.
|
|
15
15
|
Also includes helper classes for incorporating assertions about event logging into
|