butler-mainframe 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +0 -2
- data/README.md +13 -2
- data/lib/config/config.rb +1 -1
- data/lib/mainframe/emulators/x3270.rb +1 -0
- data/lib/mainframe/host_base.rb +6 -4
- data/test/test.rake +0 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e16b62e1fe43ac913e3abf67d472103f7cfb1a6
|
4
|
+
data.tar.gz: b9939a2aeea193b0fa8e1fa398d615796044a481
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 913d2e2e8ee7bf21878261a1a883afaef16bce3eabb4a65cf70f5d7624d2dbc081db01b88f071d525435cb2d7e49b9f2e96056955905b1e061a367f84ac294bf
|
7
|
+
data.tar.gz: dd1c7ab32a76f4448d32fe859e22a31d7c520dd9ef4e60883a3906781f17ca3ef616682dcfcba1967559b6ac6520276ade306531142a8f7eb7d78dd6d7797785
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
0.4.0 [☰](https://github.com/marcomd/butler-mainframe/compare/v0.3.0...v0.4.0) October 22th, 2015
|
2
|
+
------------------------------
|
3
|
+
* Improved x3270 sub class stability. Added a delay after session starting
|
4
|
+
* Several little improvements
|
5
|
+
|
1
6
|
0.3.0 [☰](https://github.com/marcomd/butler-mainframe/compare/v0.2.0...v0.3.0) October 22th, 2015
|
2
7
|
------------------------------
|
3
8
|
* Improved the host base class code to make it simpler
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -242,6 +242,18 @@ Each iteration uses different latency times, we start from high and therefore si
|
|
242
242
|
It is not so easy make more complex sequence to share because mainframe screens are strongly diversified but everyone can add their own and iterate as many times as deemed appropriate.
|
243
243
|
|
244
244
|
|
245
|
+
## Production environment
|
246
|
+
|
247
|
+
Which emulator choose? Well, it depends on the platform on which the application will run.
|
248
|
+
|
249
|
+
I'll try to comment supported emulators based on my experience of about 11 years in the production environment:
|
250
|
+
|
251
|
+
1. **Passport Web to Host**: on Windows 2008 R2 is stable but it can run only if scheduler user is logged in, for a production environment is a big constraint. The newer version on windows 2012 (old 2008 version cannot be installed on windows 2012 server) is even worse because there are problems of stability causing crash after long use. We are divesting.
|
252
|
+
|
253
|
+
2. **IBM Personal communication**: it happened that the session got stuck even if it was extremely rare event and i could not never attribute the blame to it. I must also mention the fact that two different processes creates only troubles. High price but at the moment seems to be the best choice.
|
254
|
+
|
255
|
+
3. **x3270**: support is improving, it's free and open source. In future may become the best choice.
|
256
|
+
|
245
257
|
## More informations about supported emulators
|
246
258
|
|
247
259
|
I hope this can help to support my work or yours if you need something different
|
@@ -384,8 +396,7 @@ Custom files are yours and not under license.
|
|
384
396
|
|
385
397
|
## Found a bug?
|
386
398
|
|
387
|
-
If you are having a problem please
|
388
|
-
* m.mastrodonato@gmail.com
|
399
|
+
If you are having a problem please open an issue. You can also send an email to m.mastrodonato@gmail.com
|
389
400
|
|
390
401
|
|
391
402
|
|
data/lib/config/config.rb
CHANGED
@@ -14,6 +14,7 @@ module ButlerMainframe
|
|
14
14
|
puts "#{Time.now.strftime "%H:%M:%S"} Creating object #{str_obj}..." if @debug == :full
|
15
15
|
@action = {}
|
16
16
|
@action[:in], @action[:out], @action[:thr] = Open3.popen2e(str_obj)
|
17
|
+
sleep WAIT_AFTER_START_SESSION
|
17
18
|
@pid = @action[:thr].pid
|
18
19
|
end
|
19
20
|
|
data/lib/mainframe/host_base.rb
CHANGED
@@ -6,8 +6,9 @@ module ButlerMainframe
|
|
6
6
|
attr_reader :action, :wait
|
7
7
|
attr_accessor :debug
|
8
8
|
|
9
|
-
MAX_TERMINAL_COLUMNS
|
10
|
-
MAX_TERMINAL_ROWS
|
9
|
+
MAX_TERMINAL_COLUMNS = 80
|
10
|
+
MAX_TERMINAL_ROWS = 24
|
11
|
+
WAIT_AFTER_START_SESSION = 3 #SECONDS
|
11
12
|
|
12
13
|
def initialize options={}
|
13
14
|
options = {
|
@@ -169,8 +170,6 @@ module ButlerMainframe
|
|
169
170
|
start_terminal_session options
|
170
171
|
|
171
172
|
# New connection attempts after starting session...
|
172
|
-
puts "Starting session with process id #{@pid}, wait please..." if @debug
|
173
|
-
sleep 2
|
174
173
|
connection_attempts.times do
|
175
174
|
puts "Detecting session #{@session_tag}, wait please..." if @debug
|
176
175
|
sub_create_object
|
@@ -224,6 +223,9 @@ module ButlerMainframe
|
|
224
223
|
#It works only on ruby 1.9+
|
225
224
|
@pid = Process.spawn *[executable, args].compact
|
226
225
|
end
|
226
|
+
|
227
|
+
sleep WAIT_AFTER_START_SESSION
|
228
|
+
puts "Started session with process id #{@pid}, wait please..." if @debug
|
227
229
|
end
|
228
230
|
|
229
231
|
#It reads one line on the screen
|
data/test/test.rake
CHANGED
@@ -6,22 +6,17 @@ namespace :butler do
|
|
6
6
|
desc "Test butler mainframe gem"
|
7
7
|
task(:test) do |task_name, args|
|
8
8
|
|
9
|
-
host = nil
|
10
9
|
begin
|
11
10
|
require 'butler-mainframe'
|
12
|
-
wait_between_iterations = 3
|
13
11
|
|
14
12
|
# SLOW
|
15
13
|
simple_iteration :wait => 0.6
|
16
|
-
sleep(wait_between_iterations)
|
17
14
|
|
18
15
|
# MEDIUM
|
19
16
|
simple_iteration :wait => 0.08
|
20
|
-
sleep(wait_between_iterations)
|
21
17
|
|
22
18
|
# FAST (default 0.01 atm)
|
23
19
|
simple_iteration
|
24
|
-
sleep(wait_between_iterations)
|
25
20
|
|
26
21
|
puts "*** RAKE TESTS COMPLETE SUCCESSFULLY ***"
|
27
22
|
rescue
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: butler-mainframe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marco Mastrodonato
|
@@ -11,8 +11,8 @@ cert_chain: []
|
|
11
11
|
date: 2015-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem provides a virtual butler which can perform your custom tasks
|
14
|
-
on a 3270 emulator.
|
15
|
-
|
14
|
+
on a 3270 emulator. Choose your emulator, configure your task and discover a new
|
15
|
+
world!
|
16
16
|
email:
|
17
17
|
- m.mastrodonato@gmail.com
|
18
18
|
executables: []
|