async-service 0.20.1 → 0.21.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
  SHA256:
3
- metadata.gz: 2d1b7a93421f685e9a7b545f73facbe3182d2e8da3458f7c70f43902dae2ce5a
4
- data.tar.gz: a251e23004b48a5993665692e54037e2079f1e9176ba283fc1eb2f34b6388995
3
+ metadata.gz: de59afc9bb1a297f08d89797f5cc1cab814aadb6fd867773a70a3c2b83bcf1d7
4
+ data.tar.gz: 07c8402c361ae967fd593616d1777367118687fa490b9bb8e5cb5e64003280c0
5
5
  SHA512:
6
- metadata.gz: bffe72b2c92b84fe2ecda60023ab1efc9c46f996e62e0ccda98a230d716ead4893879c78000eb2980c50a7dd0b9391b3158561f820e2dc3d5d6af2d17dec85c8
7
- data.tar.gz: 8644d5b85ce7d4e40c04002c61432eb956ff75fd227435f45fe32b13c3e50973282b6c72b92e8b8eb3da99fe8ef876845c14a4830d09cd828cac921a43e7a308
6
+ metadata.gz: 777190197a4272ce2f8c726abdbf1b018e46af424ca68d9fbfa4eba8490912e3c9cbb9579490743bbddf384a3b4fa2159f38ec9d58c013badd9ce4642f9bfb68
7
+ data.tar.gz: 5976d4d560ddcb71e781bdd1ec9a304f7851ed3cb76f1f1d82fb590765fd4137cd463afabb4da78abead51f328ce5d55cd3b45d272056fa765be086c1531c835
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2024-2025, by Samuel Williams.
5
+
6
+ def initialize(context)
7
+ super
8
+
9
+ require "async/service/configuration"
10
+
11
+ @configuration = Async::Service::Configuration.new
12
+ end
13
+
14
+ attr :configuration
15
+
16
+ # Load the configuration from the given path.
17
+ # @parameter path [String] The path to the configuration file.
18
+ def load(path)
19
+ @configuration.load_file(path)
20
+ end
21
+
22
+ # List the available environments (all named environments).
23
+ def list
24
+ @configuration.environments.map(&:to_h)
25
+ end
26
+
27
+ # List the available services (those that define a service class).
28
+ def services
29
+ @configuration.services.map(&:to_h)
30
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2024-2026, by Samuel Williams.
5
+
6
+ def initialize(context)
7
+ super
8
+
9
+ require "async/service/controller"
10
+ end
11
+
12
+ def run
13
+ controller.run
14
+ end
15
+
16
+ private
17
+
18
+ def controller
19
+ configuration = context.lookup("async:service:configuration").instance.configuration
20
+
21
+ return configuration.make_controller
22
+ end
@@ -7,6 +7,6 @@
7
7
  module Async
8
8
  # @namespace
9
9
  module Service
10
- VERSION = "0.20.1"
10
+ VERSION = "0.21.0"
11
11
  end
12
12
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.1
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -85,6 +85,8 @@ executables:
85
85
  extensions: []
86
86
  extra_rdoc_files: []
87
87
  files:
88
+ - bake/async/service/configuration.rb
89
+ - bake/async/service/controller.rb
88
90
  - bin/async-service
89
91
  - context/best-practices.md
90
92
  - context/deployment.md
@@ -124,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
126
  requirements:
125
127
  - - ">="
126
128
  - !ruby/object:Gem::Version
127
- version: '3.2'
129
+ version: '3.3'
128
130
  required_rubygems_version: !ruby/object:Gem::Requirement
129
131
  requirements:
130
132
  - - ">="
metadata.gz.sig CHANGED
Binary file