te3270 0.3-x86-mingw32 → 0.4-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/lib/te3270/screen_factory.rb +1 -0
- data/lib/te3270/version.rb +1 -1
- data/spec/lib/te3270/screen_factory_spec.rb +17 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8015201ba99f63448f2a1ca9a7cc3a60ef09d306
|
4
|
+
data.tar.gz: c77d02f904877ba1f94a49c615840125d3ddb582
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63029a49f6d4e5895ff07bab8ec2353e2d5774f1aa476351d1315f0922f708f4dddee423cb2af989f89afeaab32d1a8f182fdb11348d685d2dd2292c7c8b8e0f
|
7
|
+
data.tar.gz: 05ca50e5670ab7640a3fec1f06fc23db2c3f1c6c063925126df933a6101ee501c27d8758068b9083bb8ca562b73b88653d5498dafc17bd8186c3d8cbae141b20
|
data/ChangeLog
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
=== Version 0.4 / 2014-2-26
|
2
|
+
* Enhancements
|
3
|
+
* calling super when factory method called with class that is not from TE3270
|
4
|
+
|
1
5
|
=== Version 0.3 / 2014-2-25
|
2
6
|
* Enhancements
|
3
7
|
* disconnect does not close all open sessions with Extra now - only the one that connect opened
|
@@ -40,6 +40,7 @@ module TE3270
|
|
40
40
|
#
|
41
41
|
def on(screen_class, &block)
|
42
42
|
raise '@emulator instance variable must be available to use the ScreenFactory methods' unless @emulator
|
43
|
+
return super(screen_class, &block) unless screen_class.ancestors.include? TE3270
|
43
44
|
@current_screen = screen_class.new @emulator
|
44
45
|
block.call @current_screen if block
|
45
46
|
@current_screen
|
data/lib/te3270/version.rb
CHANGED
@@ -4,7 +4,14 @@ class ScreenFactoryScreen
|
|
4
4
|
include TE3270
|
5
5
|
end
|
6
6
|
|
7
|
-
class
|
7
|
+
class WorldSuper
|
8
|
+
attr_reader :super_called
|
9
|
+
def on(screen_class, &block)
|
10
|
+
@super_called = true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class World < WorldSuper
|
8
15
|
include TE3270::ScreenFactory
|
9
16
|
end
|
10
17
|
|
@@ -29,4 +36,13 @@ describe TE3270::ScreenFactory do
|
|
29
36
|
it 'should raise an error when an @emulator instance variable does not exist' do
|
30
37
|
expect { world.on(ScreenFactoryScreen) }.to raise_error("@emulator instance variable must be available to use the ScreenFactory methods")
|
31
38
|
end
|
39
|
+
|
40
|
+
it 'should pass control to super if passed a class that does not include TE3270' do
|
41
|
+
class NoTE
|
42
|
+
end
|
43
|
+
emulator = double('platform')
|
44
|
+
world.instance_variable_set('@emulator', emulator)
|
45
|
+
world.on(NoTE)
|
46
|
+
world.super_called.should be_true
|
47
|
+
end
|
32
48
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: te3270
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.4'
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Jeffrey S. Morgan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: page_navigation
|