butler-mainframe 0.7.5 → 0.8.0

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: 9647666615fef70e24eb285f5fcfb19db6921380
4
- data.tar.gz: 15dd4daa101efd4ab615221b61b48ab96f1c18b0
3
+ metadata.gz: 905103b0a75c74a621416783ca7640547705ffc8
4
+ data.tar.gz: 96016897c77be9676a6fe2de3bd6871e004a6ce7
5
5
  SHA512:
6
- metadata.gz: a4ea76d2b23706ab40dfc75cbcfacd795cdd589445ab9c915fdb903cdf9595d1131d7e710cae0409cdcfd44e63b0a295eab409c139c319a0c99554409249db9f
7
- data.tar.gz: 47c6ea2a0192a2e43ac3a3bee7623e2aac4c11447931a23d7fe56d286cf66e87ddcb4070ba9c0953f304fe20f393558a77f878a054be130c8af95b0b7a0984f8
6
+ metadata.gz: 1c859409e7690859468559bfa7bd5f25bdb884d0c0f28305e45bf953df01e508b86bd4fe3198f1f6d8c4f51439ec67c102fb8169a48c0ecf28aa681a51395661
7
+ data.tar.gz: 28ccc959ee5931b50d123e2d173be2ba6f898c136f4ccb6c5c068a0b5219622801b366ad16058c26fdf78347979e89c677eb6171ef6506582a79fd4cfc959ca5
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
+ 0.8.0 [☰](https://github.com/marcomd/butler-mainframe/compare/v0.7.5...v0.8.0) May 3th, 2016
2
+ ------------------------------
3
+ * PComm emulator: the write param 'clean_chars_before_writing' didn't work
4
+ * Improved write with params clean_chars_before_writing:
5
+ * now switch off erase_before_writing because there might be a conflict
6
+ * now switch off check protect param which use SendKey and it could provide an unexpected result
7
+
1
8
  0.7.5 [☰](https://github.com/marcomd/butler-mainframe/compare/v0.7.4...v0.7.5) April 19th, 2016
2
9
  ------------------------------
3
- * Fixed a bug (Stack level too deep) on the write command when was passed the parameter :clean_first_chars
10
+ * Fixed a bug (Stack level too deep) on the write command when was passed the parameter :clean_chars_before_writing
4
11
 
5
12
  0.7.4 [☰](https://github.com/marcomd/butler-mainframe/compare/v0.7.3...v0.7.4) April 13th, 2016
6
13
  ------------------------------
@@ -101,6 +101,7 @@ module ButlerMainframe
101
101
  else
102
102
  @space.SetText(text, y, x)
103
103
  end
104
+ true
104
105
  end
105
106
 
106
107
  # Wait text at given coordinates and wait the session is available again
@@ -112,7 +112,7 @@ module ButlerMainframe
112
112
  # :check => true,
113
113
  # :raise_error_on_check => true,
114
114
  # :sensible_data => nil,
115
- # :clean_chars_before_writing => nil, # clean x chars before writing a value
115
+ # :clean_chars_before_writing => nil, # clean x chars before writing a value, it switch off erase_before_writing
116
116
  # :erase_before_writing => nil # execute an erase until end of field before write a text
117
117
  def write text, options={}
118
118
  options = show_deprecated_param(:erase_field_first, :erase_before_writing, options) if options[:erase_field_first]
@@ -127,6 +127,7 @@ module ButlerMainframe
127
127
  :clean_chars_before_writing => nil,
128
128
  :erase_before_writing => @erase_before_writing
129
129
  }.merge(options)
130
+ options[:erase_before_writing] = false if options[:clean_chars_before_writing]
130
131
 
131
132
  y = options[:y]
132
133
  x = options[:x]
@@ -267,20 +268,16 @@ module ButlerMainframe
267
268
  :check => true,
268
269
  :raise_error_on_check => true,
269
270
  :sensible_data => nil,
270
- :clean_first_chars => nil,
271
+ :clean_chars_before_writing => nil,
271
272
  :erase_before_writing => nil
272
273
  }.merge(options)
273
274
  raise "Impossible to write beyond row #{MAX_TERMINAL_ROWS}" if y > MAX_TERMINAL_ROWS
274
275
  raise "Impossible to write beyond column #{MAX_TERMINAL_COLUMNS}" if x > MAX_TERMINAL_COLUMNS
275
276
  raise "Impossible to write a null value" unless text
276
277
 
277
- if options[:clean_first_chars] && options[:clean_first_chars].to_i > 0
278
- puts "write_text_on_map: Clean #{options[:clean_first_chars]} char#{options[:clean_first_chars] == 1 ? '' : 's'} y:#{y} x:#{x}" if @debug
279
- bol_cleaned = sub_write_text(" " * options[:clean_first_chars], y, x, :check_protect => options[:check])
280
- unless bol_cleaned
281
- puts "write_text_on_map: EHI! Impossible to clean the area specified" if @debug
282
- return false
283
- end
278
+ if options[:clean_chars_before_writing] && options[:clean_chars_before_writing].to_i > 0
279
+ puts "write_text_on_map: Clean #{options[:clean_chars_before_writing]} char#{options[:clean_chars_before_writing] == 1 ? '' : 's'} y:#{y} x:#{x}" if @debug
280
+ sub_write_text(" " * options[:clean_chars_before_writing], y, x, :check_protect => false)
284
281
  end
285
282
 
286
283
  if options[:erase_before_writing]
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.5
4
+ version: 0.8.0
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-04-19 00:00:00.000000000 Z
11
+ date: 2016-05-03 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