deployagram-minitest 0.1.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 +7 -0
- data/LICENSE +14 -0
- data/README.md +9 -0
- data/lib/deployagram/minitest.rb +54 -0
- metadata +77 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 2035492041874d26b483540587ad662f41890d132c1f0a01d41b67ffbcbc0899
|
|
4
|
+
data.tar.gz: 648ba315a985c43f7f939220c215cab86bbceabb48e8248d9aeec38b519b1c25
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 2e1c7d4e316ef2bed89f788314cfda1f4c7ad82f46d2fd7c79c7211f79d7c52b6440fd2d505b31c65c6755d882befa91ae2cd2ba9cdde358be79e2af5a81a988
|
|
7
|
+
data.tar.gz: ea171dfb31aff766499af6b28b50119b3367d69babf51bbecc6f7ee5af002f88af04a232f76ba38956d42758d6c05729cc222c65b51b0188a9acb7854e03cbaa
|
data/LICENSE
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
DEPLOYAGRAM PROPRIETARY LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Deployagram, Cookiebit and Andy Muir.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted to use this software solely for its intended purpose.
|
|
6
|
+
|
|
7
|
+
RESTRICTIONS:
|
|
8
|
+
- No modification of the software is permitted
|
|
9
|
+
- No reverse engineering, decompilation, or disassembly
|
|
10
|
+
- No redistribution without explicit written permission
|
|
11
|
+
- Source code remains proprietary and confidential
|
|
12
|
+
- Usage is limited to the compiled npm package (the distributed tarball) artifact only
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
data/README.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# deployagram-minitest
|
|
2
|
+
|
|
3
|
+
Minitest adapter for Deployagram service tests.
|
|
4
|
+
|
|
5
|
+
Starts the Collector and Proxy once per run, posts the Proxy configuration before each test, and ends each test's sequence diagram. Requires the minitest gem.
|
|
6
|
+
|
|
7
|
+
Depends on: `deployagram-environment`, `deployagram-core`.
|
|
8
|
+
|
|
9
|
+
Part of the Deployagram Ruby packages. See `../../README.md`.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
require "minitest"
|
|
2
|
+
require "deployagram/environment"
|
|
3
|
+
require "deployagram/proxy_config"
|
|
4
|
+
|
|
5
|
+
module Deployagram
|
|
6
|
+
# Minitest adapter. Call Deployagram::Minitest.install from test_helper.rb. Minitest has no suite-level
|
|
7
|
+
# hook, so the environment starts lazily, before the first test, and stops in Minitest.after_run.
|
|
8
|
+
# Each test posts the Proxy configuration in before_setup, and ends its sequence diagram in after_teardown.
|
|
9
|
+
# Names are "<TestClass>.<test method>".
|
|
10
|
+
module Minitest
|
|
11
|
+
module Hooks
|
|
12
|
+
def before_setup
|
|
13
|
+
super
|
|
14
|
+
Deployagram::Minitest.start
|
|
15
|
+
ProxyConfig.post(Deployagram::Minitest.environment.proxy.url, Deployagram::Minitest.proxy_config) if
|
|
16
|
+
Deployagram::Minitest.proxy? && !Deployagram::Minitest.proxy_config.empty?
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def after_teardown
|
|
20
|
+
Deployagram::Minitest.environment.logger_client.mark_end("#{self.class.name}.#{name}")
|
|
21
|
+
super
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class << self
|
|
26
|
+
attr_reader :environment, :proxy_config
|
|
27
|
+
|
|
28
|
+
def install(proxy_config: {}, proxy: true, logger_environment: {})
|
|
29
|
+
@proxy_config = proxy_config
|
|
30
|
+
@proxy = proxy
|
|
31
|
+
@logger_environment = logger_environment
|
|
32
|
+
::Minitest::Test.prepend(Hooks) unless ::Minitest::Test.include?(Hooks)
|
|
33
|
+
::Minitest.after_run { stop }
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def proxy?
|
|
37
|
+
@proxy
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def start
|
|
41
|
+
@environment ||= Environment.start(
|
|
42
|
+
proxy: @proxy,
|
|
43
|
+
proxy_config: @proxy_config,
|
|
44
|
+
logger_environment: @logger_environment,
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def stop
|
|
49
|
+
@environment&.stop
|
|
50
|
+
@environment = nil
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: deployagram-minitest
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Deployagram
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: deployagram-environment
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
-
|
|
17
|
+
- "="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 0.1.0
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
-
|
|
25
|
+
- "="
|
|
26
|
+
- !ruby/object:Gem::Version
|
|
27
|
+
version: 0.1.0
|
|
28
|
+
- !ruby/object:Gem::Dependency
|
|
29
|
+
name: deployagram-core
|
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
|
31
|
+
requirements:
|
|
32
|
+
-
|
|
33
|
+
- "="
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: 0.1.0
|
|
36
|
+
type: :runtime
|
|
37
|
+
prerelease: false
|
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
-
|
|
41
|
+
- "="
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: 0.1.0
|
|
44
|
+
description: "Starts the Collector and Proxy once per run, posts the Proxy configuration before each test, and ends each test's sequence diagram. Requires the minitest gem."
|
|
45
|
+
email:
|
|
46
|
+
- andy@deployagram.com
|
|
47
|
+
executables: []
|
|
48
|
+
extensions: []
|
|
49
|
+
extra_rdoc_files: []
|
|
50
|
+
files:
|
|
51
|
+
- LICENSE
|
|
52
|
+
- README.md
|
|
53
|
+
- lib/deployagram/minitest.rb
|
|
54
|
+
licenses:
|
|
55
|
+
- SEE LICENSE IN LICENSE
|
|
56
|
+
metadata:
|
|
57
|
+
rubygems_mfa_required: "true"
|
|
58
|
+
rdoc_options: []
|
|
59
|
+
require_paths:
|
|
60
|
+
- lib
|
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
|
+
requirements:
|
|
63
|
+
-
|
|
64
|
+
- ">="
|
|
65
|
+
- !ruby/object:Gem::Version
|
|
66
|
+
version: "3.2"
|
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
|
+
requirements:
|
|
69
|
+
-
|
|
70
|
+
- ">="
|
|
71
|
+
- !ruby/object:Gem::Version
|
|
72
|
+
version: "0"
|
|
73
|
+
requirements: []
|
|
74
|
+
rubygems_version: 4.1.0
|
|
75
|
+
specification_version: 4
|
|
76
|
+
summary: Minitest adapter for Deployagram service tests
|
|
77
|
+
test_files: []
|