3scale_toolbox 0.15.0 → 0.16.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.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/3scale_toolbox.gemspec +1 -1
  3. data/README.md +4 -1
  4. data/lib/3scale_toolbox.rb +0 -1
  5. data/lib/3scale_toolbox/cli.rb +4 -0
  6. data/lib/3scale_toolbox/cli/custom_table_printer.rb +32 -0
  7. data/lib/3scale_toolbox/cli/json_printer.rb +13 -0
  8. data/lib/3scale_toolbox/cli/output_flag.rb +20 -0
  9. data/lib/3scale_toolbox/cli/yaml_printer.rb +13 -0
  10. data/lib/3scale_toolbox/commands.rb +5 -1
  11. data/lib/3scale_toolbox/commands/activedocs_command/apply_command.rb +33 -10
  12. data/lib/3scale_toolbox/commands/activedocs_command/create_command.rb +22 -7
  13. data/lib/3scale_toolbox/commands/activedocs_command/list_command.rb +10 -17
  14. data/lib/3scale_toolbox/commands/application_command/apply_command.rb +27 -4
  15. data/lib/3scale_toolbox/commands/application_command/create_command.rb +16 -1
  16. data/lib/3scale_toolbox/commands/application_command/list_command.rb +10 -13
  17. data/lib/3scale_toolbox/commands/application_command/show_command.rb +8 -14
  18. data/lib/3scale_toolbox/commands/backend_command.rb +22 -0
  19. data/lib/3scale_toolbox/commands/backend_command/copy_command.rb +65 -0
  20. data/lib/3scale_toolbox/commands/backend_command/copy_command/copy_mapping_rules_task.rb +52 -0
  21. data/lib/3scale_toolbox/commands/backend_command/copy_command/copy_methods_task.rb +40 -0
  22. data/lib/3scale_toolbox/commands/backend_command/copy_command/copy_metrics_task.rb +30 -0
  23. data/lib/3scale_toolbox/commands/backend_command/copy_command/create_or_update_target_backend_task.rb +45 -0
  24. data/lib/3scale_toolbox/commands/backend_command/copy_command/task.rb +89 -0
  25. data/lib/3scale_toolbox/commands/copy_command.rb +2 -2
  26. data/lib/3scale_toolbox/commands/copy_command/service_command.rb +40 -0
  27. data/lib/3scale_toolbox/commands/import_command/openapi.rb +3 -2
  28. data/lib/3scale_toolbox/commands/methods_command/apply_command.rb +26 -4
  29. data/lib/3scale_toolbox/commands/methods_command/create_command.rb +23 -1
  30. data/lib/3scale_toolbox/commands/methods_command/list_command.rb +11 -9
  31. data/lib/3scale_toolbox/commands/metrics_command/apply_command.rb +26 -4
  32. data/lib/3scale_toolbox/commands/metrics_command/create_command.rb +23 -1
  33. data/lib/3scale_toolbox/commands/metrics_command/list_command.rb +7 -12
  34. data/lib/3scale_toolbox/commands/plans_command/apply_command.rb +36 -7
  35. data/lib/3scale_toolbox/commands/plans_command/create_command.rb +23 -1
  36. data/lib/3scale_toolbox/commands/plans_command/list_command.rb +8 -13
  37. data/lib/3scale_toolbox/commands/plans_command/show_command.rb +6 -14
  38. data/lib/3scale_toolbox/commands/product_command.rb +22 -0
  39. data/lib/3scale_toolbox/commands/product_command/copy_command.rb +78 -0
  40. data/lib/3scale_toolbox/commands/product_command/copy_command/copy_backends_task.rb +71 -0
  41. data/lib/3scale_toolbox/commands/product_command/copy_command/delete_target_backend_usages_task.rb +48 -0
  42. data/lib/3scale_toolbox/commands/proxy_config_command/list_command.rb +13 -29
  43. data/lib/3scale_toolbox/commands/proxy_config_command/show_command.rb +20 -23
  44. data/lib/3scale_toolbox/commands/service_command.rb +7 -5
  45. data/lib/3scale_toolbox/commands/service_command/apply_command.rb +69 -58
  46. data/lib/3scale_toolbox/commands/service_command/copy_command.rb +95 -0
  47. data/lib/3scale_toolbox/commands/service_command/copy_command/bump_proxy_version_task.rb +36 -0
  48. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_activedocs_task.rb +46 -0
  49. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_app_plans_task.rb +35 -0
  50. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_limits_task.rb +39 -0
  51. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_mapping_rules_task.rb +35 -0
  52. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_methods_task.rb +40 -0
  53. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_metrics_task.rb +37 -0
  54. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_policies_task.rb +17 -0
  55. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_pricingrules_task.rb +44 -0
  56. data/lib/3scale_toolbox/commands/service_command/copy_command/copy_service_proxy_task.rb +17 -0
  57. data/lib/3scale_toolbox/commands/service_command/copy_command/create_or_update_service_task.rb +48 -0
  58. data/lib/3scale_toolbox/commands/service_command/copy_command/destroy_mapping_rules_task.rb +34 -0
  59. data/lib/3scale_toolbox/commands/service_command/copy_command/task.rb +99 -0
  60. data/lib/3scale_toolbox/commands/service_command/create_command.rb +58 -44
  61. data/lib/3scale_toolbox/commands/service_command/delete_command.rb +31 -33
  62. data/lib/3scale_toolbox/commands/service_command/list_command.rb +24 -34
  63. data/lib/3scale_toolbox/commands/service_command/show_command.rb +39 -44
  64. data/lib/3scale_toolbox/commands/update_command.rb +2 -2
  65. data/lib/3scale_toolbox/commands/update_command/{update_service.rb → service_command.rb} +19 -16
  66. data/lib/3scale_toolbox/commands/update_command/service_command/copy_service_settings_task.rb +35 -0
  67. data/lib/3scale_toolbox/commands/update_command/service_command/delete_activedocs_task.rb +26 -0
  68. data/lib/3scale_toolbox/entities.rb +5 -0
  69. data/lib/3scale_toolbox/entities/backend.rb +152 -0
  70. data/lib/3scale_toolbox/entities/backend_mapping_rule.rb +76 -0
  71. data/lib/3scale_toolbox/entities/backend_method.rb +90 -0
  72. data/lib/3scale_toolbox/entities/backend_metric.rb +88 -0
  73. data/lib/3scale_toolbox/entities/backend_usage.rb +99 -0
  74. data/lib/3scale_toolbox/entities/service.rb +18 -3
  75. data/lib/3scale_toolbox/error.rb +3 -0
  76. data/lib/3scale_toolbox/helper.rb +20 -0
  77. data/lib/3scale_toolbox/proxy_logger.rb +1 -1
  78. data/lib/3scale_toolbox/version.rb +1 -1
  79. data/licenses.xml +3 -3
  80. metadata +42 -22
  81. data/lib/3scale_toolbox/commands/copy_command/copy_service.rb +0 -144
  82. data/lib/3scale_toolbox/tasks.rb +0 -15
  83. data/lib/3scale_toolbox/tasks/bump_proxy_version_task.rb +0 -32
  84. data/lib/3scale_toolbox/tasks/copy_activedocs_task.rb +0 -42
  85. data/lib/3scale_toolbox/tasks/copy_app_plans_task.rb +0 -31
  86. data/lib/3scale_toolbox/tasks/copy_limits_task.rb +0 -36
  87. data/lib/3scale_toolbox/tasks/copy_mapping_rules_task.rb +0 -32
  88. data/lib/3scale_toolbox/tasks/copy_methods_task.rb +0 -36
  89. data/lib/3scale_toolbox/tasks/copy_metrics_task.rb +0 -33
  90. data/lib/3scale_toolbox/tasks/copy_policies_task.rb +0 -13
  91. data/lib/3scale_toolbox/tasks/copy_pricingrules_task.rb +0 -41
  92. data/lib/3scale_toolbox/tasks/copy_service_proxy_task.rb +0 -13
  93. data/lib/3scale_toolbox/tasks/copy_service_settings_task.rb +0 -38
  94. data/lib/3scale_toolbox/tasks/copy_task.rb +0 -66
  95. data/lib/3scale_toolbox/tasks/delete_activedocs_task.rb +0 -22
  96. data/lib/3scale_toolbox/tasks/destroy_mapping_rules_task.rb +0 -22
  97. data/lib/3scale_toolbox/tasks/helper_task.rb +0 -25
@@ -0,0 +1,76 @@
1
+ module ThreeScaleToolbox
2
+ module Entities
3
+ class BackendMappingRule
4
+ VALID_PARAMS = %w[metric_id pattern http_method delta position last].freeze
5
+ public_constant :VALID_PARAMS
6
+
7
+ class << self
8
+ def create(backend:, attrs:)
9
+ mapping_rule = backend.remote.create_backend_mapping_rule(
10
+ backend.id,
11
+ Helper.filter_params(VALID_PARAMS, attrs)
12
+ )
13
+ if (errors = mapping_rule['errors'])
14
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend mapping rule has not been created',
15
+ errors)
16
+ end
17
+
18
+ new(id: mapping_rule.fetch('id'), backend: backend, attrs: mapping_rule)
19
+ end
20
+ end
21
+
22
+ attr_reader :id, :backend, :remote
23
+
24
+ def initialize(id:, backend:, attrs: nil)
25
+ @id = id.to_i
26
+ @backend = backend
27
+ @remote = backend.remote
28
+ @attrs = attrs
29
+ end
30
+
31
+ def attrs
32
+ @attrs ||= mapping_rule_attrs
33
+ end
34
+
35
+ def metric_id
36
+ @attrs['metric_id']
37
+ end
38
+
39
+ def metric_id=(metric_id)
40
+ @attrs['metric_id'] = metric_id
41
+ end
42
+
43
+ def update(mr_attrs)
44
+ new_attrs = remote.update_backend_mapping_rule(
45
+ backend.id, id,
46
+ Helper.filter_params(VALID_PARAMS, mr_attrs)
47
+ )
48
+ if (errors = new_attrs['errors'])
49
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend mapping rule has not been updated', errors)
50
+ end
51
+
52
+ # update current attrs
53
+ @attrs = new_attrs
54
+
55
+ new_attrs
56
+ end
57
+
58
+ def delete
59
+ remote.delete_backend_mapping_rule backend.id, id
60
+ end
61
+
62
+ private
63
+
64
+ def mapping_rule_attrs
65
+ raise ThreeScaleToolbox::InvalidIdError if id.zero?
66
+
67
+ mapping_rule = remote.backend_mapping_rule backend.id, id
68
+ if (errors = mapping_rule['errors'])
69
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend mapping rule not read', errors)
70
+ end
71
+
72
+ mapping_rule
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,90 @@
1
+ module ThreeScaleToolbox
2
+ module Entities
3
+ class BackendMethod
4
+ VALID_PARAMS = %w[friendly_name system_name description].freeze
5
+ public_constant :VALID_PARAMS
6
+
7
+ class << self
8
+ def create(backend:, parent_id:, attrs:)
9
+ method = backend.remote.create_backend_method(backend.id, parent_id,
10
+ Helper.filter_params(VALID_PARAMS, attrs))
11
+ if (errors = method['errors'])
12
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend Method has not been created',
13
+ errors)
14
+ end
15
+
16
+ new(id: method.fetch('id'), parent_id: parent_id, backend: backend, attrs: method)
17
+ end
18
+
19
+ # ref can be system_name or method_id
20
+ def find(backend:, parent_id:, ref:)
21
+ new(id: ref, parent_id: parent_id, backend: backend).tap(&:attrs)
22
+ rescue ThreeScaleToolbox::InvalidIdError, ThreeScale::API::HttpClient::NotFoundError
23
+ find_by_system_name(backend: backend, parent_id: parent_id, system_name: ref)
24
+ end
25
+
26
+ def find_by_system_name(backend:, parent_id:, system_name:)
27
+ backend.methods(parent_id).find { |m| m.system_name == system_name }
28
+ end
29
+ end
30
+
31
+ attr_reader :id, :parent_id, :backend, :remote
32
+
33
+ def initialize(id:, parent_id:, backend:, attrs: nil)
34
+ @id = id.to_i
35
+ @backend = backend
36
+ @parent_id = parent_id
37
+ @remote = backend.remote
38
+ @attrs = process_attrs(attrs)
39
+ end
40
+
41
+ def attrs
42
+ @attrs ||= process_attrs(method_attrs)
43
+ end
44
+
45
+ def system_name
46
+ @attrs['system_name']
47
+ end
48
+
49
+ def friendly_name
50
+ @attrs['friendly_name']
51
+ end
52
+
53
+ def update(m_attrs)
54
+ new_attrs = remote.update_backend_method(backend.id, parent_id, id,
55
+ Helper.filter_params(VALID_PARAMS, m_attrs))
56
+ if (errors = new_attrs['errors'])
57
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend Method has not been updated',
58
+ errors)
59
+ end
60
+
61
+ # update current attrs
62
+ @attrs = process_attrs(new_attrs)
63
+ end
64
+
65
+ def delete
66
+ remote.delete_backend_method backend.id, parent_id, id
67
+ end
68
+
69
+ private
70
+
71
+ def process_attrs(metric_attrs)
72
+ return if metric_attrs.nil?
73
+
74
+ # system_name: my_metric_02.45498 -> system_name: my_metric_02
75
+ metric_attrs.merge('system_name' => metric_attrs.fetch('system_name', '').partition('.').first)
76
+ end
77
+
78
+ def method_attrs
79
+ raise ThreeScaleToolbox::InvalidIdError if id.zero?
80
+
81
+ method = remote.backend_method backend.id, parent_id, id
82
+ if (errors = method['errors'])
83
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend method not read', errors)
84
+ end
85
+
86
+ method
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,88 @@
1
+ module ThreeScaleToolbox
2
+ module Entities
3
+ class BackendMetric
4
+ VALID_PARAMS = %w[friendly_name system_name unit description].freeze
5
+ public_constant :VALID_PARAMS
6
+
7
+ class << self
8
+ def create(backend:, attrs:)
9
+ metric = backend.remote.create_backend_metric(backend.id,
10
+ Helper.filter_params(VALID_PARAMS, attrs))
11
+ if (errors = metric['errors'])
12
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend metric has not been created',
13
+ errors)
14
+ end
15
+
16
+ new(id: metric.fetch('id'), backend: backend, attrs: metric)
17
+ end
18
+
19
+ # ref can be system_name or metric_id
20
+ def find(backend:, ref:)
21
+ new(id: ref, backend: backend).tap(&:attrs)
22
+ rescue ThreeScaleToolbox::InvalidIdError, ThreeScale::API::HttpClient::NotFoundError
23
+ find_by_system_name(backend: backend, system_name: ref)
24
+ end
25
+
26
+ def find_by_system_name(backend:, system_name:)
27
+ backend.metrics.find { |m| m.system_name == system_name }
28
+ end
29
+ end
30
+
31
+ attr_reader :id, :backend, :remote
32
+
33
+ def initialize(id:, backend:, attrs: nil)
34
+ @id = id.to_i
35
+ @backend = backend
36
+ @remote = backend.remote
37
+ @attrs = process_attrs(attrs)
38
+ end
39
+
40
+ def attrs
41
+ @attrs ||= process_attrs(metric_attrs)
42
+ end
43
+
44
+ def system_name
45
+ @attrs['system_name']
46
+ end
47
+
48
+ def friendly_name
49
+ @attrs['friendly_name']
50
+ end
51
+
52
+ def update(m_attrs)
53
+ new_attrs = remote.update_backend_metric(backend.id, id,
54
+ Helper.filter_params(VALID_PARAMS, m_attrs))
55
+ if (errors = new_attrs['errors'])
56
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend metric has not been updated', errors)
57
+ end
58
+
59
+ # update current attrs
60
+ @attrs = process_attrs(new_attrs)
61
+ end
62
+
63
+ def delete
64
+ remote.delete_backend_metric backend.id, id
65
+ end
66
+
67
+ private
68
+
69
+ def process_attrs(metric_attrs)
70
+ return if metric_attrs.nil?
71
+
72
+ # system_name: my_metric_02.45498 -> system_name: my_metric_02
73
+ metric_attrs.merge('system_name' => metric_attrs.fetch('system_name', '').partition('.').first)
74
+ end
75
+
76
+ def metric_attrs
77
+ raise ThreeScaleToolbox::InvalidIdError if id.zero?
78
+
79
+ metric = remote.backend_metric backend.id, id
80
+ if (errors = metric['errors'])
81
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend metric not read', errors)
82
+ end
83
+
84
+ metric
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,99 @@
1
+ module ThreeScaleToolbox
2
+ module Entities
3
+ ##
4
+ # BackendUsage represents Product - Backend mapping entry
5
+ class BackendUsage
6
+ CREATE_PARAMS = %w[path backend_api_id].freeze
7
+ public_constant :CREATE_PARAMS
8
+ UPDATE_PARAMS = %w[path].freeze
9
+ public_constant :UPDATE_PARAMS
10
+
11
+ class << self
12
+ def create(product:, attrs:)
13
+ resp = product.remote.create_backend_usage(
14
+ product.id,
15
+ Helper.filter_params(CREATE_PARAMS, attrs)
16
+ )
17
+ if (errors = resp['errors'])
18
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend usage has not been created',
19
+ errors)
20
+ end
21
+
22
+ new(id: resp.fetch('id'), product: product, attrs: resp)
23
+ end
24
+
25
+ def find_by_path(product:, path:)
26
+ resp = product.remote.list_backend_usages product.id
27
+ if resp.respond_to?(:has_key?) && (errors = resp['errors'])
28
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend usage list error', errors)
29
+ end
30
+
31
+ backend_usage_attrs = resp.find { |bus| bus['path'] == path }
32
+ return if backend_usage_attrs.nil?
33
+
34
+ new(id: backend_usage_attrs.fetch('id'), product: product, attrs: backend_usage_attrs)
35
+ end
36
+ end
37
+
38
+ attr_reader :id, :product, :remote
39
+
40
+ def initialize(id:, product:, attrs: nil)
41
+ @id = id.to_i
42
+ @product = product
43
+ @remote = product.remote
44
+ @attrs = attrs
45
+ end
46
+
47
+ def attrs
48
+ @attrs ||= fetch_attrs
49
+ end
50
+
51
+ def path
52
+ attrs['path']
53
+ end
54
+
55
+ def backend_id
56
+ # 3scale API returns 'backend_id'
57
+ # 3scale API only accepts 'backend_api_id' as params
58
+ # good job
59
+ attrs['backend_id']
60
+ end
61
+
62
+ def update(usage_attrs)
63
+ new_attrs = remote.update_backend_usage(
64
+ product.id, id,
65
+ Helper.filter_params(UPDATE_PARAMS, usage_attrs)
66
+ )
67
+ if (errors = new_attrs['errors'])
68
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Backend usage not been updated', errors)
69
+ end
70
+
71
+ if new_attrs['service_id'] != product.id
72
+ raise ThreeScaleToolbox::Error, 'Backend usage product updated'
73
+ end
74
+
75
+ # update current attrs
76
+ @attrs = new_attrs
77
+
78
+ new_attrs
79
+ end
80
+
81
+ def delete
82
+ remote.delete_backend_usage product.id, id
83
+ end
84
+
85
+ private
86
+
87
+ def fetch_attrs
88
+ raise ThreeScaleToolbox::InvalidIdError if id.zero?
89
+
90
+ resp = remote.backend_usage product.id, id
91
+ if (errors = resp['errors'])
92
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Product backend usage not read', errors)
93
+ end
94
+
95
+ resp
96
+ end
97
+ end
98
+ end
99
+ end
@@ -24,7 +24,7 @@ module ThreeScaleToolbox
24
24
  # ref can be system_name or service_id
25
25
  def find(remote:, ref:)
26
26
  new(id: ref, remote: remote).tap(&:attrs)
27
- rescue ThreeScale::API::HttpClient::NotFoundError
27
+ rescue ThreeScaleToolbox::InvalidIdError, ThreeScale::API::HttpClient::NotFoundError
28
28
  find_by_system_name(remote: remote, system_name: ref)
29
29
  end
30
30
 
@@ -72,7 +72,7 @@ module ThreeScaleToolbox
72
72
  end
73
73
 
74
74
  def attrs
75
- @attrs ||= service_attrs
75
+ @attrs ||= fetch_attrs
76
76
  end
77
77
 
78
78
  def update_proxy(proxy)
@@ -249,6 +249,19 @@ module ThreeScaleToolbox
249
249
  end
250
250
  end
251
251
 
252
+ def backend_usage_list
253
+ resp = remote.list_backend_usages id
254
+ if resp.respond_to?(:has_key?) && (errors = resp['errors'])
255
+ raise ThreeScaleToolbox::ThreeScaleApiError.new('Product backend usage not read', errors)
256
+ end
257
+
258
+ resp.map do |backend_usage_attrs|
259
+ Entities::BackendUsage.new(id: backend_usage_attrs.fetch('id'),
260
+ product: self,
261
+ attrs: backend_usage_attrs)
262
+ end
263
+ end
264
+
252
265
  def ==(other)
253
266
  remote.http_client.endpoint == other.remote.http_client.endpoint && id == other.id
254
267
  end
@@ -262,7 +275,9 @@ module ThreeScaleToolbox
262
275
  hits_metric
263
276
  end
264
277
 
265
- def service_attrs
278
+ def fetch_attrs
279
+ raise ThreeScaleToolbox::InvalidIdError if id.zero?
280
+
266
281
  svc = remote.show_service id
267
282
  if (errors = svc['errors'])
268
283
  raise ThreeScaleToolbox::ThreeScaleApiError.new('Service attrs not read', errors)
@@ -26,4 +26,7 @@ module ThreeScaleToolbox
26
26
  "#{super}. Errors: #{apierrors}"
27
27
  end
28
28
  end
29
+
30
+ class InvalidIdError < Error
31
+ end
29
32
  end
@@ -50,6 +50,26 @@ module ThreeScaleToolbox
50
50
  def period_already_taken_error?(error)
51
51
  Array(Hash(error)['period']).any? { |msg| msg.match(/has already been taken/) }
52
52
  end
53
+
54
+ def metrics_mapping(source_metrics, target_metrics)
55
+ target_metrics.map do |target|
56
+ source = source_metrics.find do |m|
57
+ compare_hashes(m, target, ['system_name'])
58
+ end || {}
59
+
60
+ [source['id'], target['id']]
61
+ end.to_h
62
+ end
63
+
64
+ def application_plan_mapping(source_app_plans, target_app_plans)
65
+ mapping = target_app_plans.map do |target|
66
+ source = source_app_plans.find do |app_plan|
67
+ compare_hashes(app_plan, target, ['system_name'])
68
+ end || {}
69
+ [source['id'], target]
70
+ end
71
+ mapping.reject { |key, _| key.nil? }
72
+ end
53
73
  end
54
74
 
55
75
  class BooleanTransformer
@@ -9,7 +9,7 @@ module ThreeScaleToolbox
9
9
  result = @subject.public_send(name, *args)
10
10
  ensure
11
11
  end_time = ::Process.clock_gettime(::Process::CLOCK_MONOTONIC) - start_time
12
- ::Kernel.warn "-- call #{name} args |#{args.inspect[0..200]}| response |#{result.inspect[0..200]}| - (#{end_time}s)"
12
+ ::Kernel.warn "-- call #{name} args |#{args.inspect[0..2000]}| response |#{result.inspect[0..2000]}| - (#{end_time}s)"
13
13
  result
14
14
  end
15
15