butler-mainframe 0.7.3 → 0.7.4

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: 584e7daebabd56842bf77991014705e4d6ffab12
4
- data.tar.gz: 6ac836fd5345d15b47d87c3410573dc1d108e3ad
3
+ metadata.gz: 085b558f62f9e73d71a58c099a92d7b828423c26
4
+ data.tar.gz: 0d12a14211f14239d4e2f529ff43f08b68b46069
5
5
  SHA512:
6
- metadata.gz: 9129d7293a4c6db02dbd068b9606b5162d8b5ad88be4a178be9fdfc0e6be6137a467b844de90f7b18364a3a20834309264ecab8832e182e2fc7cb92e2ff2277a
7
- data.tar.gz: f379c6be4ab6f2787bb4a3247b3fc48514d9374313391267cf9ca9c5ebbfaf790f5dc465f87fe5a1269a69960c654c0ddf2330877a35dc1bbc00ba70184fe196
6
+ metadata.gz: 9d32a0fbdfbf5a18db0cd23dad43faa60fb742fe15308a06b5d1473fc62ee3b293d42dfa6e011f1efcbf2c0f8cc2c9cd6c07752f8103ce455cb0e48f2f01ee2f
7
+ data.tar.gz: 239c066d0da603a86c8794d79688fcde4f4f85aea0dce5df711143b21cc512a158c037bd866c22c8c8480736402a865ac039ba2501e6d87264f8ac063f200e71
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ 0.7.4 [☰](https://github.com/marcomd/butler-mainframe/compare/v0.7.3...v0.7.4) April 13th, 2016
2
+ ------------------------------
3
+ * You can now let the session open with the new quit parameter :never
4
+ * Now you can change the close session parameter after the object was created
5
+ * Improved documentation
6
+ * PComm emulator: removed StopCommunication from quit due to session stuck if it will not be closed
7
+
1
8
  0.7.3 [☰](https://github.com/marcomd/butler-mainframe/compare/v0.7.2...v0.7.3) March 29th, 2016
2
9
  ------------------------------
3
10
  * PComm emulator: fixed a bug when closing the session with ruby 1.8
data/README.md CHANGED
@@ -13,7 +13,7 @@ Developed on a windows plaftorm.
13
13
 
14
14
  ## Install
15
15
 
16
- Instal the gem from rubygems
16
+ Install the gem from rubygems
17
17
 
18
18
  gem install butler-mainframe
19
19
 
@@ -49,7 +49,7 @@ ButlerMainframe.configure do |config|
49
49
  config.browser_path = 'c:/Program Files (x86)/Internet Explorer/iexplore.exe'
50
50
  config.session_path = 'https://localhost/zephyr/Ecomes.zwh?sessionprofile=3270dsp/Sessions/host3270'
51
51
  config.session_tag = 1
52
- config.timeout = 3000
52
+ config.timeout = 6000
53
53
  end
54
54
  ```
55
55
 
@@ -58,9 +58,12 @@ Example to configure Personal communication:
58
58
  ```ruby
59
59
  ButlerMainframe.configure do |config|
60
60
  config.host_gateway = :pcomm
61
- config.session_path = '"C:/Program Files (x86)/IBM/Personal Communications/pcsws.exe" "C:/Users/Marco/AppData/Roaming/IBM/Personal Communications/host3270.ws"'
61
+ config.session_path = '"C:/Program Files (x86)/IBM/Personal Communications/pcsws.exe" "C:/Users/Marco/AppData/Roaming/IBM/Personal Communications/host3270.ws" /Q /H /S=A'
62
+ # /Q to suppress starting logo
63
+ # /H for hidden session
64
+ # /S=A to select the session A (WARNING: must be the same in session_tag)
62
65
  config.session_tag = 'A'
63
- config.timeout = 3000
66
+ config.timeout = 6000
64
67
  end
65
68
  ```
66
69
 
@@ -70,7 +73,7 @@ Example to configure X3270:
70
73
  ButlerMainframe.configure do |config|
71
74
  config.host_gateway = :x3270
72
75
  config.session_path = '"C:/Program Files (x86)/wc3270/ws3270.exe" 127.0.0.1 -model 2 --'
73
- config.timeout = 5 # In seconds
76
+ config.timeout = 6 # In seconds
74
77
  end
75
78
  ```
76
79
 
@@ -162,6 +165,23 @@ This is possible because it is configured in the navigate method which have to b
162
165
 
163
166
  My advice is to use navigate method for generic navigation and use a specific module (or rails model) for each task.
164
167
 
168
+ ### Quit
169
+
170
+ At the end butler close the session considering how it is opened:
171
+
172
+ ```ruby
173
+ host.quit
174
+ ```
175
+
176
+ The default closing method is `evaluate` but you can force `always` (alias yes) or `never` (alias no)
177
+
178
+ ```ruby
179
+ # How to force close session parameter
180
+ host = ButlerMainframe::Host.new(close_session: :always)
181
+ # or simply
182
+ host.close_session = :always
183
+ ```
184
+
165
185
  ## With Rails
166
186
 
167
187
  This gem can be use on rails project.
@@ -1,10 +1,9 @@
1
1
  ButlerMainframe.configure do |config|
2
2
  config.host_gateway = :pcomm
3
- # These the used parameters:
3
+ config.session_path = '"C:/Program Files (x86)/IBM/Personal Communications/pcsws.exe" "C:/Users/YOUR_USER/AppData/Roaming/IBM/Personal Communications/host3270.ws" /Q /H /S=A'
4
4
  # /Q to suppress starting logo
5
5
  # /H for hidden session
6
- # /S=A to select the session A (must be the same in session_tag)
7
- config.session_path = '"C:/Program Files (x86)/IBM/Personal Communications/pcsws.exe" "C:/Users/YOUR_USER/AppData/Roaming/IBM/Personal Communications/host3270.ws" /Q /H /S=A'
6
+ # /S=A to select the session A (WARNING: must be the same in session_tag)
8
7
  config.session_tag = 'A'
9
8
  config.timeout = 6000
10
9
  #config.env = 'production'
@@ -43,7 +43,7 @@ module ButlerMainframe
43
43
 
44
44
  #Ends the connection and closes the session
45
45
  def sub_close_session
46
- @action[:object].StopCommunication
46
+ #@action[:object].StopCommunication #Removed due to session stuck if it will not be closed
47
47
  @action[:object] = nil
48
48
  if @pid
49
49
  # See http://www-01.ibm.com/support/knowledgecenter/SSEQ5Y_6.0.0/com.ibm.pcomm.doc/books/html/admin_guide10.htm?lang=en
@@ -7,7 +7,7 @@ module ButlerMainframe
7
7
  include ButlerMainframe::GenericFunctions
8
8
 
9
9
  attr_reader :action, :wait
10
- attr_accessor :debug
10
+ attr_accessor :debug, :close_session
11
11
 
12
12
  MAX_TERMINAL_COLUMNS = 80
13
13
  MAX_TERMINAL_ROWS = 24
@@ -51,10 +51,16 @@ module ButlerMainframe
51
51
  def quit
52
52
  puts "Closing session with criterion \"#{@close_session}\"" if @debug
53
53
  case @close_session
54
- when :always
54
+ when :always, :yes
55
55
  sub_close_session
56
56
  puts "Session closed" if @debug
57
57
  wait_session 0.1
58
+ when :never, :no
59
+ if @pid
60
+ puts "Session forced to stay open" if @debug
61
+ else
62
+ puts "Session not closed because it was already existing anyway it would not been closed" if @debug
63
+ end
58
64
  when :evaluate
59
65
  if @pid
60
66
  sub_close_session
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: butler-mainframe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Mastrodonato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-29 00:00:00.000000000 Z
11
+ date: 2016-04-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem provides a virtual butler which can perform your custom tasks
14
14
  on a 3270 emulator. Choose your emulator, configure your task and discover a new