te3270 0.1-x86-mingw32 → 0.2-x86-mingw32

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
  SHA1:
3
- metadata.gz: 43a4597d3e0372918c7aa435c1e5382acb1da399
4
- data.tar.gz: b33dd3a8d4a7c0a3beb388c829783ef87ea7c635
3
+ metadata.gz: 5102faea87997e857762e741ce242ab0bb77de92
4
+ data.tar.gz: 42d1444622dbdcee26eba2c661f88856111817f8
5
5
  SHA512:
6
- metadata.gz: b191bae8db8652acb276e4c72ae2f568b52d410d3f6aee02a2f4c4d2d29d23e82c3e0b33dea0b1f84cdbe1ca2de721c0743b3e2a168bdefe82119b3a7e4b1723
7
- data.tar.gz: 225c1a950743da301bdefa346e62fe2b7e9f2f7aa4e526521210f1b0a64dd1e52d7ed52f5c87793faebc4778c36c101d8f2d5cb6609fec9f99414eac8c6845f2
6
+ metadata.gz: 66f689c9e4a9f2468dfd3dada7943201bce3267a7ac0b5cf582b9a898a86d54ee21c1e6b42c8e3752f8d65b03df42c1f519da5f29046e9d8b997d3a38c633ecc
7
+ data.tar.gz: dc73b6477a9e93df44071f4172514d97f5053c34cbfbe5f42b812f81ac1ac944f07cbe8c52e2e55642a152e387d3c26d14ffb2d7371c3cc4f95cc3551570f4c3
data/ChangeLog CHANGED
@@ -1,2 +1,6 @@
1
+ === Version 0.2 / 2014-2-9
2
+ * Enhancements
3
+ * Added populate_screen_with method to TE3270 to populate all fields that are included in provided Hash
4
+
1
5
  === Version 0.1 / 2014-2-7
2
6
  * Initial release with basic functionality for EXTRA X-treme! and Quick3270
data/README.md CHANGED
@@ -9,7 +9,7 @@ emulators as time permits.
9
9
 
10
10
  ## Documentation
11
11
 
12
- You can view the RDocs for this project [here](http://rdoc.info/github/cheezy/te3270/master/frames).
12
+ You can view the RDocs for this project [here](http://rdoc.info/gems/te3270/frames).
13
13
 
14
14
  ## Installation
15
15
 
@@ -1,6 +1,7 @@
1
1
  require 'te3270/version'
2
2
  require 'te3270/accessors'
3
3
  require 'te3270/screen_factory'
4
+ require 'te3270/screen_populator'
4
5
  require 'te3270/function_keys'
5
6
  require 'te3270/emulator_factory'
6
7
  require 'te3270/emulators/extra'
@@ -53,6 +54,7 @@ require 'te3270/emulators/quick3270'
53
54
  # @see #TE3270::ScreenFactory for more details on using the factory and navigation methods
54
55
  #
55
56
  module TE3270
57
+ include ScreenPopulator
56
58
  extend FunctionKeys
57
59
 
58
60
  def self.included(cls)
@@ -0,0 +1,11 @@
1
+
2
+ module TE3270
3
+ module ScreenPopulator
4
+
5
+ def populate_screen_with(hsh)
6
+ hsh.each do |key, value|
7
+ self.send("#{key}=", value) if self.respond_to? "#{key}=".to_sym
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,4 +1,4 @@
1
1
  module TE3270
2
- VERSION = "0.1"
2
+ VERSION = "0.2"
3
3
  end
4
4
 
@@ -0,0 +1,30 @@
1
+ require 'spec_helper'
2
+
3
+ class ScreenPopulatorScreen
4
+ include TE3270
5
+
6
+ text_field(:editable, 1, 2, 10, true)
7
+ text_field(:read_only, 2, 3, 12, false)
8
+ end
9
+
10
+ describe TE3270::ScreenPopulator do
11
+
12
+ let(:platform) { double('platform') }
13
+ let(:screen_object) { ScreenPopulatorScreen.new platform }
14
+
15
+ it 'should set a value in a text field' do
16
+ platform.should_receive(:put_string).with('the_value', 1, 2)
17
+ screen_object.populate_screen_with editable: 'the_value'
18
+ end
19
+
20
+ it 'should not set a value when a text field is read only' do
21
+ platform.should_not_receive(:put_string)
22
+ screen_object.populate_screen_with read_only: 'the_value'
23
+ end
24
+
25
+ it 'should attempt to set all values from the provided Hash' do
26
+ platform.should_receive(:put_string).with('the_value', 1, 2)
27
+ platform.should_not_receive(:put_string).with('read_only', 2, 3)
28
+ screen_object.populate_screen_with(editable: 'the_value', read_only: 'read_only')
29
+ end
30
+ 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.1'
4
+ version: '0.2'
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-08 00:00:00.000000000 Z
12
+ date: 2014-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: page_navigation
@@ -105,11 +105,13 @@ files:
105
105
  - lib/te3270/emulators/quick3270.rb
106
106
  - lib/te3270/function_keys.rb
107
107
  - lib/te3270/screen_factory.rb
108
+ - lib/te3270/screen_populator.rb
108
109
  - lib/te3270/version.rb
109
110
  - spec/lib/te3270/accessors_spec.rb
110
111
  - spec/lib/te3270/emulators/extra_spec.rb
111
112
  - spec/lib/te3270/emulators/quick3270_spec.rb
112
113
  - spec/lib/te3270/screen_factory_spec.rb
114
+ - spec/lib/te3270/screen_populator_spec.rb
113
115
  - spec/lib/te3270_spec.rb
114
116
  - spec/spec_helper.rb
115
117
  - te3270.gemspec
@@ -142,6 +144,7 @@ test_files:
142
144
  - spec/lib/te3270/emulators/extra_spec.rb
143
145
  - spec/lib/te3270/emulators/quick3270_spec.rb
144
146
  - spec/lib/te3270/screen_factory_spec.rb
147
+ - spec/lib/te3270/screen_populator_spec.rb
145
148
  - spec/lib/te3270_spec.rb
146
149
  - spec/spec_helper.rb
147
150
  has_rdoc: