te3270 0.3-x86-mingw32 → 0.4-x86-mingw32

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
  SHA1:
3
- metadata.gz: 884918d1a9dfbd02b28e27f4c912259c853d6461
4
- data.tar.gz: f9f4db002c0330631fd3430bf2f7cfa4b27f041b
3
+ metadata.gz: 8015201ba99f63448f2a1ca9a7cc3a60ef09d306
4
+ data.tar.gz: c77d02f904877ba1f94a49c615840125d3ddb582
5
5
  SHA512:
6
- metadata.gz: 98a5d58f45f2516b1740f693608acbc43feebe21b516ff1574c6735caf597ee78b081edb3e6f770ef75219d4382fbd7967161f2a3d3b9912aac45b7b6fa7602d
7
- data.tar.gz: d06e262c90a2d1f72e1b55a4fa2e4e15bda00a8da01817bc396629cca1457319f4cdb128a96679e8dd55b520449828a386dc77280e404a30432b61928e47d100
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
@@ -1,4 +1,4 @@
1
1
  module TE3270
2
- VERSION = "0.3"
2
+ VERSION = "0.4"
3
3
  end
4
4
 
@@ -4,7 +4,14 @@ class ScreenFactoryScreen
4
4
  include TE3270
5
5
  end
6
6
 
7
- class World
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.3'
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-25 00:00:00.000000000 Z
12
+ date: 2014-02-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: page_navigation