hoodoo 3.3.3 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e10dc0e43d699ef1b3dc98b05b0918e69eacd48bef5cb3f22b440499b1c8cbf0
4
- data.tar.gz: 65e8ccd1832b46d3a8bde6992819f779d1cd49913244c233ad3ece8549a72d36
3
+ metadata.gz: d0ce9b935640b43e6a2e65428781f655eec52f069b2d9c604cd0c0e52089779b
4
+ data.tar.gz: 137774dd9fc3a5b5580e9864b0955ff36c17d29d3c5c45dccb5063e501a02f05
5
5
  SHA512:
6
- metadata.gz: a20c94b81ee5eb4876a862963d98aa6e2ee2af806fb680e6b8e9212d5cbde31f879ed66c5eee510bb24caf4af3142745329fde5a3fe54ae7e97643430bba006b
7
- data.tar.gz: 63cd8d52d68fd6c8a1808e6064c670767785d4dda403cfade8759976a67c38fa0043e716c4dc9dbed92bfd4b9bc5c80e1ca5c1fbb08e8ac14ed07c40c19f1145
6
+ metadata.gz: ddb038ba26da7edd8ed67fd4f9e88ecb789ebe5f5d0985fed3c957ee059178ce6a09c0450e7fde9a8eaef12922211f0d4e70e56f660855051e5c6247d21f114a
7
+ data.tar.gz: fbb195e8d45f3e68cb562f31283b7ed2c5bc44a66564bf5273bb3871af4d572d4ad7ef454f010a32807f0e4671a9fcc0af3ea269dccd3f84e2025d59c00878f8
@@ -19,6 +19,7 @@ module Hoodoo
19
19
  internationalised
20
20
 
21
21
  text :authentication_secret
22
+ text :authentication_secret_parameter_store_path, :required => false
22
23
  text :name
23
24
  uuid :fingerprint, :required => false
24
25
 
@@ -16,7 +16,7 @@ module Hoodoo
16
16
  module Patch
17
17
 
18
18
  begin
19
- require 'ddtrace' # Raises LoadError if Datadog is absent
19
+ require 'datadog/tracing' # Raises LoadError if Datadog is absent
20
20
 
21
21
  # Wrap Hoodoo::Client::Endpoint::AMQP using Datadog transaction
22
22
  # tracing so that over-queue inter-resource calls get connected
@@ -43,7 +43,7 @@ module Hoodoo
43
43
  def monkey_send_request( http_message, full_uri )
44
44
  amqp_response = nil
45
45
 
46
- Datadog.tracer.trace( 'alchemy.request' ) do |span|
46
+ Datadog::Tracing.trace( 'alchemy.request' ) do |span|
47
47
  span.service = 'alchemy'
48
48
  span.span_type = 'alchemy'
49
49
  span.resource = http_message[ 'verb' ]
@@ -12,11 +12,11 @@ module Hoodoo
12
12
  # The Hoodoo gem version. If this changes, be sure to re-run
13
13
  # <tt>bundle install</tt> or <tt>bundle update</tt>.
14
14
  #
15
- VERSION = '3.3.3'
15
+ VERSION = '3.5.0'
16
16
 
17
17
  # The Hoodoo gem date. If this changes, be sure to re-run
18
18
  # <tt>bundle install</tt> or <tt>bundle update</tt>.
19
19
  #
20
- DATE = '2023-08-16'
20
+ DATE = '2024-01-25'
21
21
 
22
22
  end
@@ -6,9 +6,10 @@ describe Hoodoo::Data::Resources::Caller do
6
6
 
7
7
  expect(schema.is_internationalised?()).to eq(true)
8
8
 
9
- expect(schema.properties.count).to eq(6)
9
+ expect(schema.properties.count).to eq(7)
10
10
 
11
11
  expect(schema.properties['authentication_secret']).to be_a(Hoodoo::Presenters::Text)
12
+ expect(schema.properties['authentication_secret_parameter_store_path']).to be_a(Hoodoo::Presenters::Text)
12
13
  expect(schema.properties['name']).to be_a(Hoodoo::Presenters::Text)
13
14
  expect(schema.properties['fingerprint']).to be_a(Hoodoo::Presenters::UUID)
14
15
  expect(schema.properties['identity']).to be_a(Hoodoo::Presenters::Hash)
@@ -63,6 +64,7 @@ describe Hoodoo::Data::Resources::Caller do
63
64
  json = described_class.render(
64
65
  {
65
66
  "name" => "Test Caller",
67
+ "authentication_secret_parameter_store_path" => "/path/to/secret",
66
68
  "identity" => {
67
69
  "array" => [],
68
70
  "integer" => 1,
@@ -99,6 +101,7 @@ describe Hoodoo::Data::Resources::Caller do
99
101
  'created_at' => Hoodoo::Utilities.standard_datetime( created_at ),
100
102
  'kind' => 'Caller',
101
103
  "name" => "Test Caller",
104
+ "authentication_secret_parameter_store_path" => "/path/to/secret",
102
105
  "identity" => {
103
106
  "array" => [],
104
107
  "integer" => 1,
@@ -18,9 +18,8 @@ describe Hoodoo::Monkey::Patch::DatadogTracedAMQP, :order => :defined do
18
18
  CounterAMQ.datadog_trace_count = 0
19
19
 
20
20
  # Stub Datadog
21
- class Datadog
22
- def self.tracer
23
- Datadog.new
21
+ module Datadog
22
+ module Tracing
24
23
  end
25
24
  end
26
25
 
@@ -29,7 +28,7 @@ describe Hoodoo::Monkey::Patch::DatadogTracedAMQP, :order => :defined do
29
28
 
30
29
  after :all do
31
30
  Hoodoo::Monkey.disable( extension_module: Hoodoo::Monkey::Patch::DatadogTracedAMQP )
32
- Object.send( :remove_const, :Datadog )
31
+ Datadog.send( :remove_const, :Tracing )
33
32
  end
34
33
 
35
34
  before :each do
@@ -43,8 +42,8 @@ describe Hoodoo::Monkey::Patch::DatadogTracedAMQP, :order => :defined do
43
42
  result
44
43
  end
45
44
 
46
- allow_any_instance_of( Datadog ).to receive( :trace ) do | &block |
47
- # Datadog Trace method responds with a yielded span this is here to mock tha
45
+ allow( Datadog::Tracing ).to receive( :trace ) do | &block |
46
+ # Datadog Trace method responds with a yielded span this is here to mock that
48
47
  span = double('span', trace_id: 'trace_id', span_id: 'span_id').as_null_object
49
48
  CounterAMQ.datadog_trace_count += 1
50
49
  block.call(span)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoodoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.3
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loyalty New Zealand
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-16 00:00:00.000000000 Z
11
+ date: 2024-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dalli
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: ddtrace
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: activerecord
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -304,6 +318,20 @@ dependencies:
304
318
  - - "~>"
305
319
  - !ruby/object:Gem::Version
306
320
  version: '3.4'
321
+ - !ruby/object:Gem::Dependency
322
+ name: debug
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - ">="
326
+ - !ruby/object:Gem::Version
327
+ version: 1.0.0
328
+ type: :development
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - ">="
333
+ - !ruby/object:Gem::Version
334
+ version: 1.0.0
307
335
  description: Simplify the implementation of consistent services within an API-based
308
336
  software platform.
309
337
  email:
@@ -587,126 +615,126 @@ signing_key:
587
615
  specification_version: 4
588
616
  summary: Opinionated APIs
589
617
  test_files:
590
- - spec/utilities/uuid_spec.rb
591
618
  - spec/utilities/utilities_spec.rb
592
- - spec/new_relic/agent/method_tracer.rb
593
- - spec/new_relic/agent/logger.rb
594
- - spec/new_relic/agent/transaction.rb
595
- - spec/active/active_record/secure_spec.rb
596
- - spec/active/active_record/manually_dated_spec.rb
597
- - spec/active/active_record/uuid_spec.rb
598
- - spec/active/active_record/security_helper_spec.rb
599
- - spec/active/active_record/finder_spec.rb
600
- - spec/active/active_record/dated_spec.rb
601
- - spec/active/active_record/writer_spec.rb
602
- - spec/active/active_record/support_spec.rb
603
- - spec/active/active_record/creator_spec.rb
604
- - spec/active/active_record/search_helper_spec.rb
605
- - spec/active/active_record/base_spec.rb
606
- - spec/active/active_record/error_mapping_shared_context.rb
607
- - spec/active/active_record/error_mapping_spec.rb
608
- - spec/active/active_record/translated_spec.rb
609
- - spec/transient_store/transient_store/redis_spec.rb
610
- - spec/transient_store/transient_store/memcached_spec.rb
611
- - spec/transient_store/transient_store/mocks/redis_spec.rb
612
- - spec/transient_store/transient_store/mocks/dalli_client_spec.rb
613
- - spec/transient_store/transient_store/base_spec.rb
614
- - spec/transient_store/transient_store/memcached_redis_mirror_spec.rb
615
- - spec/transient_store/transient_store_spec.rb
619
+ - spec/utilities/uuid_spec.rb
620
+ - spec/errors/errors_spec.rb
621
+ - spec/errors/error_descriptions_spec.rb
622
+ - spec/services/middleware/middleware_assumed_identity_spec.rb
623
+ - spec/services/middleware/string_inquirer_spec.rb
624
+ - spec/services/middleware/middleware_public_spec.rb
625
+ - spec/services/middleware/middleware_exotic_communication_spec.rb
626
+ - spec/services/middleware/middleware_cors_spec.rb
627
+ - spec/services/middleware/middleware_multi_remote_spec.rb
628
+ - spec/services/middleware/middleware_dated_at_spec.rb
629
+ - spec/services/middleware/endpoints/inter_resource_local_spec.rb
630
+ - spec/services/middleware/endpoints/inter_resource_remote_spec.rb
631
+ - spec/services/middleware/middleware_create_update_spec.rb
632
+ - spec/services/middleware/amqp_log_writer_spec.rb
633
+ - spec/services/middleware/middleware_spec.rb
634
+ - spec/services/middleware/middleware_permissions_spec.rb
635
+ - spec/services/middleware/middleware_logging_spec.rb
636
+ - spec/services/middleware/exception_reporting/exception_reporting_spec.rb
637
+ - spec/services/middleware/exception_reporting/reporters/airbrake_reporter_spec.rb
638
+ - spec/services/middleware/exception_reporting/base_reporter_spec.rb
639
+ - spec/services/middleware/middleware_multi_local_spec.rb
640
+ - spec/services/services/response_spec.rb
641
+ - spec/services/services/implementation_spec.rb
642
+ - spec/services/services/permissions_spec.rb
643
+ - spec/services/services/request_spec.rb
644
+ - spec/services/services/session_spec.rb
645
+ - spec/services/services/interface_spec.rb
646
+ - spec/services/services/context_spec.rb
647
+ - spec/services/services/application_spec.rb
648
+ - spec/services/discovery/discovery_spec.rb
649
+ - spec/services/discovery/discoverers/by_drb/by_drb_spec.rb
650
+ - spec/services/discovery/discoverers/by_drb/drb_server_spec.rb
651
+ - spec/services/discovery/discoverers/by_flux_spec.rb
652
+ - spec/services/discovery/discoverers/by_convention_spec.rb
653
+ - spec/services/discovery/results/for_remote_spec.rb
654
+ - spec/services/discovery/results/for_http_spec.rb
655
+ - spec/services/discovery/results/for_local_spec.rb
656
+ - spec/services/discovery/results/for_amqp_spec.rb
657
+ - spec/communicators/pool_spec.rb
658
+ - spec/communicators/slow_spec.rb
659
+ - spec/communicators/fast_spec.rb
660
+ - spec/client/augmented_hash_spec.rb
661
+ - spec/client/augmented_array_spec.rb
662
+ - spec/client/paginated_enumeration_spec.rb
663
+ - spec/client/endpoint/endpoint_spec.rb
664
+ - spec/client/endpoint/endpoints/http_based_spec.rb
665
+ - spec/client/endpoint/endpoints/http_spec.rb
666
+ - spec/client/endpoint/endpoints/not_found_spec.rb
667
+ - spec/client/endpoint/endpoints/auto_session_spec.rb
668
+ - spec/client/endpoint/endpoints/amqp_spec.rb
669
+ - spec/client/headers_spec.rb
670
+ - spec/client/augmented_base_spec.rb
671
+ - spec/client/client_spec.rb
616
672
  - spec/integration/service_actions_spec.rb
673
+ - spec/shared_examples/middleware_amqp.rb
674
+ - spec/ddtrace.rb
617
675
  - spec/spec_helper.rb
618
- - spec/presenters/types/uuid_spec.rb
676
+ - spec/presenters/embedding_spec.rb
677
+ - spec/presenters/common_resource_fields_spec.rb
678
+ - spec/presenters/types/hash_spec.rb
679
+ - spec/presenters/types/array_spec.rb
619
680
  - spec/presenters/types/date_time_spec.rb
620
681
  - spec/presenters/types/tags_spec.rb
682
+ - spec/presenters/types/enum_spec.rb
683
+ - spec/presenters/types/string_spec.rb
684
+ - spec/presenters/types/float_spec.rb
685
+ - spec/presenters/types/object_spec.rb
686
+ - spec/presenters/types/field_spec.rb
687
+ - spec/presenters/types/uuid_spec.rb
688
+ - spec/presenters/types/boolean_spec.rb
621
689
  - spec/presenters/types/integer_spec.rb
622
- - spec/presenters/types/array_spec.rb
623
690
  - spec/presenters/types/decimal_spec.rb
624
- - spec/presenters/types/float_spec.rb
625
691
  - spec/presenters/types/date_spec.rb
626
- - spec/presenters/types/enum_spec.rb
627
- - spec/presenters/types/object_spec.rb
628
- - spec/presenters/types/string_spec.rb
629
692
  - spec/presenters/types/text_spec.rb
630
- - spec/presenters/types/hash_spec.rb
631
- - spec/presenters/types/boolean_spec.rb
632
- - spec/presenters/types/field_spec.rb
633
- - spec/presenters/common_resource_fields_spec.rb
634
- - spec/presenters/base_dsl_spec.rb
635
- - spec/presenters/base_spec.rb
636
- - spec/presenters/embedding_spec.rb
637
693
  - spec/presenters/walk_spec.rb
694
+ - spec/presenters/base_spec.rb
695
+ - spec/presenters/base_dsl_spec.rb
696
+ - spec/logger/logger_spec.rb
638
697
  - spec/logger/slow_writer_spec.rb
639
- - spec/logger/fast_writer_spec.rb
640
- - spec/logger/writers/file_writer_spec.rb
641
698
  - spec/logger/writers/log_entries_dot_com_writer_spec.rb
642
699
  - spec/logger/writers/stream_writer_spec.rb
643
- - spec/logger/logger_spec.rb
700
+ - spec/logger/writers/file_writer_spec.rb
701
+ - spec/logger/fast_writer_spec.rb
702
+ - spec/monkey/monkey_spec.rb
703
+ - spec/monkey/patch/datadog_traced_amqp_spec.rb
704
+ - spec/monkey/patch/newrelic_traced_amqp_spec.rb
705
+ - spec/monkey/patch/newrelic_middleware_analytics_spec.rb
706
+ - spec/newrelic_rpm.rb
707
+ - spec/active/active_record/writer_spec.rb
708
+ - spec/active/active_record/security_helper_spec.rb
709
+ - spec/active/active_record/manually_dated_spec.rb
710
+ - spec/active/active_record/error_mapping_spec.rb
711
+ - spec/active/active_record/translated_spec.rb
712
+ - spec/active/active_record/error_mapping_shared_context.rb
713
+ - spec/active/active_record/search_helper_spec.rb
714
+ - spec/active/active_record/uuid_spec.rb
715
+ - spec/active/active_record/creator_spec.rb
716
+ - spec/active/active_record/support_spec.rb
717
+ - spec/active/active_record/finder_spec.rb
718
+ - spec/active/active_record/secure_spec.rb
719
+ - spec/active/active_record/base_spec.rb
720
+ - spec/active/active_record/dated_spec.rb
644
721
  - spec/files/regenerate.rb
645
- - spec/data/types/error_primitive_spec.rb
646
- - spec/data/types/permissions_spec.rb
722
+ - spec/transient_store/transient_store/mocks/redis_spec.rb
723
+ - spec/transient_store/transient_store/mocks/dalli_client_spec.rb
724
+ - spec/transient_store/transient_store/redis_spec.rb
725
+ - spec/transient_store/transient_store/memcached_redis_mirror_spec.rb
726
+ - spec/transient_store/transient_store/base_spec.rb
727
+ - spec/transient_store/transient_store/memcached_spec.rb
728
+ - spec/transient_store/transient_store_spec.rb
729
+ - spec/data/types/permissions_full_spec.rb
647
730
  - spec/data/types/permissions_resources_spec.rb
731
+ - spec/data/types/permissions_spec.rb
648
732
  - spec/data/types/permissions_defaults_spec.rb
649
- - spec/data/types/permissions_full_spec.rb
650
- - spec/data/resources/errors_spec.rb
733
+ - spec/data/types/error_primitive_spec.rb
651
734
  - spec/data/resources/log_spec.rb
652
- - spec/data/resources/session_spec.rb
735
+ - spec/data/resources/errors_spec.rb
653
736
  - spec/data/resources/caller_spec.rb
654
- - spec/newrelic_rpm.rb
655
- - spec/communicators/slow_spec.rb
656
- - spec/communicators/pool_spec.rb
657
- - spec/communicators/fast_spec.rb
658
- - spec/client/augmented_hash_spec.rb
659
- - spec/client/client_spec.rb
660
- - spec/client/augmented_base_spec.rb
661
- - spec/client/endpoint/endpoint_spec.rb
662
- - spec/client/endpoint/endpoints/auto_session_spec.rb
663
- - spec/client/endpoint/endpoints/http_spec.rb
664
- - spec/client/endpoint/endpoints/amqp_spec.rb
665
- - spec/client/endpoint/endpoints/not_found_spec.rb
666
- - spec/client/endpoint/endpoints/http_based_spec.rb
667
- - spec/client/augmented_array_spec.rb
668
- - spec/client/headers_spec.rb
669
- - spec/client/paginated_enumeration_spec.rb
670
- - spec/monkey/patch/newrelic_traced_amqp_spec.rb
671
- - spec/monkey/patch/datadog_traced_amqp_spec.rb
672
- - spec/monkey/patch/newrelic_middleware_analytics_spec.rb
673
- - spec/monkey/monkey_spec.rb
674
- - spec/ddtrace.rb
675
- - spec/services/middleware/middleware_exotic_communication_spec.rb
676
- - spec/services/middleware/endpoints/inter_resource_remote_spec.rb
677
- - spec/services/middleware/endpoints/inter_resource_local_spec.rb
678
- - spec/services/middleware/exception_reporting/base_reporter_spec.rb
679
- - spec/services/middleware/exception_reporting/exception_reporting_spec.rb
680
- - spec/services/middleware/exception_reporting/reporters/airbrake_reporter_spec.rb
681
- - spec/services/middleware/middleware_create_update_spec.rb
682
- - spec/services/middleware/middleware_public_spec.rb
683
- - spec/services/middleware/middleware_assumed_identity_spec.rb
684
- - spec/services/middleware/middleware_cors_spec.rb
685
- - spec/services/middleware/middleware_logging_spec.rb
686
- - spec/services/middleware/string_inquirer_spec.rb
687
- - spec/services/middleware/middleware_dated_at_spec.rb
688
- - spec/services/middleware/middleware_multi_remote_spec.rb
689
- - spec/services/middleware/middleware_multi_local_spec.rb
690
- - spec/services/middleware/middleware_permissions_spec.rb
691
- - spec/services/middleware/middleware_spec.rb
692
- - spec/services/middleware/amqp_log_writer_spec.rb
693
- - spec/services/discovery/results/for_http_spec.rb
694
- - spec/services/discovery/results/for_amqp_spec.rb
695
- - spec/services/discovery/results/for_local_spec.rb
696
- - spec/services/discovery/results/for_remote_spec.rb
697
- - spec/services/discovery/discoverers/by_flux_spec.rb
698
- - spec/services/discovery/discoverers/by_drb/by_drb_spec.rb
699
- - spec/services/discovery/discoverers/by_drb/drb_server_spec.rb
700
- - spec/services/discovery/discoverers/by_convention_spec.rb
701
- - spec/services/discovery/discovery_spec.rb
702
- - spec/services/services/implementation_spec.rb
703
- - spec/services/services/interface_spec.rb
704
- - spec/services/services/request_spec.rb
705
- - spec/services/services/application_spec.rb
706
- - spec/services/services/response_spec.rb
707
- - spec/services/services/permissions_spec.rb
708
- - spec/services/services/context_spec.rb
709
- - spec/services/services/session_spec.rb
710
- - spec/shared_examples/middleware_amqp.rb
711
- - spec/errors/error_descriptions_spec.rb
712
- - spec/errors/errors_spec.rb
737
+ - spec/data/resources/session_spec.rb
738
+ - spec/new_relic/agent/logger.rb
739
+ - spec/new_relic/agent/transaction.rb
740
+ - spec/new_relic/agent/method_tracer.rb