xqsr3 0.12.1 → 0.12.2

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: eed03c5b9c2f91c7de5bd5296e8f62a8476b076f
4
- data.tar.gz: 8c7dca9f8d9ded07ef666f6b648db4772830edc1
3
+ metadata.gz: 44bdb62fca711d8ee10e0da50888cae988043f26
4
+ data.tar.gz: 22b017fcf0f07ef6395c123d4ed81650d27d3967
5
5
  SHA512:
6
- metadata.gz: fb1f52836cc8d7daf89b2b04bbd9034ab643a635bf898abec355274d707acd1634161150ed0094fb03c217eb0fb6be219c942f45b6fb35af190bff5948e0916b
7
- data.tar.gz: d840b9ee19383973b2f5251319f301e70ed1066197d71551e88030b1f0d50863eb39cbcf65c68737dc853926e6cec6f338023cc1ea364cebd8e4e55c6ff78eeb
6
+ metadata.gz: 49916563cc5b10a5103716b0555d8d2dcea1b38481d8d6b7bdf951834505a10a79aac39f8e5c6bbba513966da207f2a2f57e90aef7fa28e1563a39d6a68ab453
7
+ data.tar.gz: 3e03a355c86b3227d7a9c5f4966c99f55c3ab5953569becc6f2d1696ff08ee1de5ab7a9fbc9c76dd598159846b48aa3e113fe211a529f1c8142980686897be77
@@ -5,13 +5,13 @@
5
5
  # Purpose: Definition of the ExceptionUtilities module
6
6
  #
7
7
  # Created: 12th February 2015
8
- # Updated: 10th June 2016
8
+ # Updated: 22nd June 2017
9
9
  #
10
10
  # Home: http://github.com/synesissoftware/xqsr3
11
11
  #
12
12
  # Author: Matthew Wilson
13
13
  #
14
- # Copyright (c) 2015-2016, Matthew Wilson and Synesis Software
14
+ # Copyright (c) 2015-2017, Matthew Wilson and Synesis Software
15
15
  # All rights reserved.
16
16
  #
17
17
  # Redistribution and use in source and binary forms, with or without
@@ -165,7 +165,7 @@ module ExceptionUtilities
165
165
 
166
166
  xargs << args.shift unless args.empty?
167
167
 
168
- x = exception_class_or_instance_or_message_string.new *xargs, **options
168
+ x = exception_class_or_instance_or_message_string.new(*xargs, **options)
169
169
 
170
170
  rargs = []
171
171
  rargs << x
@@ -175,7 +175,7 @@ module ExceptionUtilities
175
175
 
176
176
  begin
177
177
 
178
- Kernel.raise *rargs
178
+ Kernel.raise(*rargs)
179
179
  rescue => x
180
180
 
181
181
  bt = x.backtrace
@@ -199,7 +199,7 @@ module ExceptionUtilities
199
199
 
200
200
  begin
201
201
 
202
- Kernel.raise *args
202
+ Kernel.raise(*args)
203
203
  rescue => x
204
204
 
205
205
  bt = x.backtrace
@@ -5,13 +5,13 @@
5
5
  # Purpose: Adds a raise_with_options() method to the Kernel module
6
6
  #
7
7
  # Created: 12th February 2015
8
- # Updated: 3rd April 2016
8
+ # Updated: 22nd June 2017
9
9
  #
10
10
  # Home: http://github.com/synesissoftware/xqsr3
11
11
  #
12
12
  # Author: Matthew Wilson
13
13
  #
14
- # Copyright (c) 2015-2016, Matthew Wilson and Synesis Software
14
+ # Copyright (c) 2015-2017, Matthew Wilson and Synesis Software
15
15
  # All rights reserved.
16
16
  #
17
17
  # Redistribution and use in source and binary forms, with or without
@@ -60,7 +60,7 @@ module Kernel
60
60
 
61
61
  options ||= {}
62
62
 
63
- ::Xqsr3::Diagnostics::ExceptionUtilities.raise_with_options *args, **(options.merge({ :called_indirectly_06d353cb_5a6c_47ca_8dbe_ff76359c7e96 => 1}))
63
+ ::Xqsr3::Diagnostics::ExceptionUtilities.raise_with_options(*args, **(options.merge({ :called_indirectly_06d353cb_5a6c_47ca_8dbe_ff76359c7e96 => 1})))
64
64
  end
65
65
  end # module Kernel
66
66
 
@@ -6,7 +6,7 @@
6
6
  # module
7
7
  #
8
8
  # Created: 3rd June 2017
9
- # Updated: 7th June 2017
9
+ # Updated: 22nd June 2017
10
10
  #
11
11
  # Home: http://github.com/synesissoftware/xqsr3
12
12
  #
@@ -67,8 +67,8 @@ module DeepTransform
67
67
  h =
68
68
  Hash[h.map do |k, v|
69
69
 
70
- k = k.deep_transform &block if ::Hash === k
71
- v = v.deep_transform &block if ::Hash === v
70
+ k = k.deep_transform(&block) if ::Hash === k
71
+ v = v.deep_transform(&block) if ::Hash === v
72
72
 
73
73
  [yield(k), v]
74
74
  end]
@@ -77,8 +77,8 @@ module DeepTransform
77
77
  h =
78
78
  Hash[h.map do |k, v|
79
79
 
80
- k = k.deep_transform &block if ::Hash === k
81
- v = v.deep_transform &block if ::Hash === v
80
+ k = k.deep_transform(&block) if ::Hash === k
81
+ v = v.deep_transform(&block) if ::Hash === v
82
82
 
83
83
  yield(k, v)
84
84
  end]
@@ -101,8 +101,8 @@ module DeepTransform
101
101
 
102
102
  v = self.delete k
103
103
 
104
- k = k.deep_transform &block if ::Hash === k
105
- v = v.deep_transform &block if ::Hash === v
104
+ k = k.deep_transform(&block) if ::Hash === k
105
+ v = v.deep_transform(&block) if ::Hash === v
106
106
 
107
107
  self[yield(k)] = v
108
108
  end
@@ -112,8 +112,8 @@ module DeepTransform
112
112
 
113
113
  v = self.delete k
114
114
 
115
- k = k.deep_transform &block if ::Hash === k
116
- v = v.deep_transform &block if ::Hash === v
115
+ k = k.deep_transform(&block) if ::Hash === k
116
+ v = v.deep_transform(&block) if ::Hash === v
117
117
 
118
118
  k, v = yield(k, v)
119
119
  end
@@ -130,7 +130,7 @@ module DeepTransform
130
130
  # block) or keys and values (2-parameter block) are transformed.
131
131
  def deep_transform &block
132
132
 
133
- DeepTransform.do_deep_transform_on_hashlike_ self, &block
133
+ DeepTransform.do_deep_transform_on_hashlike_(self, &block)
134
134
  end
135
135
 
136
136
  # Executes the given mandatory 1- or 2-parameter block on the receiving
@@ -142,7 +142,7 @@ module DeepTransform
142
142
  # transformation can result in a partially transformed instance
143
143
  def deep_transform! &block
144
144
 
145
- do_deep_transform_on_self_ &block
145
+ do_deep_transform_on_self_(&block)
146
146
  end
147
147
 
148
148
  end # module DeepTransform
@@ -141,7 +141,6 @@ module ParameterChecking
141
141
 
142
142
  types = options[:types] || []
143
143
  types = [value.class] if types.empty?
144
- type_found = false
145
144
 
146
145
  warn "#{self}::check_parameter: options[:types] of type #{types.class} - should be #{::Array}" unless types.is_a?(Array)
147
146
  warn "#{self}::check_parameter: options[:types] should contain only classes or arrays of classes" if types.is_a?(::Array) && !types.all? { |c| ::Class === c || (::Array === c || c.all? { |c2| ::Class === c2 }) }
@@ -168,7 +167,6 @@ module ParameterChecking
168
167
  unless message
169
168
 
170
169
  s_name = name.is_a?(String) ? "'#{name}' " : ''
171
- s_be = 'be' #::Array === value ? 'contain' : 'be'
172
170
 
173
171
  types_0 = types.select { |t| ::Class === t }.uniq
174
172
  types_ar = types.select { |t| ::Array === t }.flatten.uniq
data/lib/xqsr3/version.rb CHANGED
@@ -5,7 +5,7 @@
5
5
  # Purpose: Version for Xqsr3 library
6
6
  #
7
7
  # Created: 3rd April 2016
8
- # Updated: 7th June 2017
8
+ # Updated: 22nd June 2017
9
9
  #
10
10
  # Home: http://github.com/synesissoftware/xqsr3
11
11
  #
@@ -50,7 +50,7 @@
50
50
  module Xqsr3
51
51
 
52
52
  # Current version of the Xqsr3 library
53
- VERSION = '0.12.1'
53
+ VERSION = '0.12.2'
54
54
 
55
55
  private
56
56
  VERSION_PARTS_ = VERSION.split(/[.]/).collect { |n| n.to_i } # :nodoc:
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -57,13 +57,13 @@ class Test_String_ends_with < Test::Unit::TestCase
57
57
 
58
58
  prefixes = %w{ a c def }
59
59
 
60
- assert_not ''.ends_with? *prefixes
61
- assert_nil ''.ends_with? *prefixes
62
- assert ''.ends_with? *prefixes, ''
63
- assert 'abc'.ends_with? *prefixes
64
- assert_not 'd'.ends_with? *prefixes
65
- assert_nil 'd'.ends_with? *prefixes
66
- assert 'abcdef'.ends_with? *prefixes
60
+ assert_not ''.ends_with?(*prefixes)
61
+ assert_nil ''.ends_with?(*prefixes)
62
+ assert ''.ends_with?(*prefixes), ''
63
+ assert 'abc'.ends_with?(*prefixes)
64
+ assert_not 'd'.ends_with?(*prefixes)
65
+ assert_nil 'd'.ends_with?(*prefixes)
66
+ assert 'abcdef'.ends_with?(*prefixes)
67
67
  end
68
68
  end
69
69
 
@@ -57,13 +57,13 @@ class Test_String_starts_with < Test::Unit::TestCase
57
57
 
58
58
  prefixes = %w{ a c def }
59
59
 
60
- assert_not ''.starts_with? *prefixes
61
- assert_nil ''.starts_with? *prefixes
62
- assert ''.starts_with? *prefixes, ''
63
- assert 'abc'.starts_with? *prefixes
64
- assert_not 'd'.starts_with? *prefixes
65
- assert_nil 'd'.starts_with? *prefixes
66
- assert 'defghi'.starts_with? *prefixes
60
+ assert_not ''.starts_with?(*prefixes)
61
+ assert_nil ''.starts_with?(*prefixes)
62
+ assert ''.starts_with?(*prefixes), ''
63
+ assert 'abc'.starts_with?(*prefixes)
64
+ assert_not 'd'.starts_with?(*prefixes)
65
+ assert_nil 'd'.starts_with?(*prefixes)
66
+ assert 'defghi'.starts_with?(*prefixes)
67
67
  end
68
68
  end
69
69
 
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
@@ -156,7 +156,7 @@ end
156
156
  assert(false, 'should not get here')
157
157
  rescue TypeError => ax
158
158
 
159
- assert_match /^parameter 'a' \(String\) must be an instance of Hash$/, ax.message
159
+ assert_match(/^parameter 'a' \(String\) must be an instance of Hash$/, ax.message)
160
160
  rescue => x
161
161
 
162
162
  assert(false, "wrong exception type #{x.class} (with message '#{x.message}')")
@@ -169,7 +169,7 @@ end
169
169
  assert(false, 'should not get here')
170
170
  rescue ArgumentError => ax
171
171
 
172
- assert_match /^parameter 'a' value '' not found equal\/within any of required values or ranges$/, ax.message
172
+ assert_match(/^parameter 'a' value '' not found equal\/within any of required values or ranges$/, ax.message)
173
173
  rescue => x
174
174
 
175
175
  assert(false, "wrong exception type #{x.class} (with message '#{x.message}')")
@@ -203,7 +203,7 @@ end
203
203
  assert(false, 'should not get here')
204
204
  rescue TypeError => ax
205
205
 
206
- assert_match /^parameter 'a' \(Array\) must be an instance of Symbol or Hash, or an array containing instance\(s\) of Regexp or Symbol$/, ax.message
206
+ assert_match(/^parameter 'a' \(Array\) must be an instance of Symbol or Hash, or an array containing instance\(s\) of Regexp or Symbol$/, ax.message)
207
207
  rescue => x
208
208
 
209
209
  assert(false, "wrong exception type #{x.class}) (with message '#{x.message}'")
@@ -216,7 +216,7 @@ end
216
216
  assert(false, 'should not get here')
217
217
  rescue TypeError => ax
218
218
 
219
- assert_match /^parameter 'a' \(Array\) must be an array containing instance\(s\) of Regexp or Symbol$/, ax.message
219
+ assert_match(/^parameter 'a' \(Array\) must be an array containing instance\(s\) of Regexp or Symbol$/, ax.message)
220
220
  rescue => x
221
221
 
222
222
  assert(false, "wrong exception type #{x.class}) (with message '#{x.message}'")
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
data/test/unit/ts_all.rb CHANGED
@@ -2,7 +2,6 @@
2
2
  #
3
3
  # executes all other tests
4
4
 
5
- this_file = File.expand_path(__FILE__)
6
5
  this_dir = File.expand_path(File.dirname(__FILE__))
7
6
 
8
7
  # all tc_*rb in current directory
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xqsr3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Wilson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-08 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  eXtensions by fine Quantum for Standard Ruby and 3rd-party libraries is a