alchemy-flux 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alchemy-flux/flux_rack_handler.rb +6 -8
- data/lib/alchemy-flux/version.rb +2 -2
- data/spec/rack_handler_spec.rb +5 -5
- metadata +20 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b40feac9286e3843a20248f5ba0e70a8a5db3fd9df6eca9ce1df968b9b458179
|
4
|
+
data.tar.gz: ae88bee65195ec19bc89ae75aaea4ed17dca0c201640458f5c0c1aa21de9bdef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e9d22876b1adc7f87d253a5993d55dae5408e122646af106e0fa715df40d46c69b38e85a158995deae211e2330157e1abd29378551111b8ef0def7bdf3a9292
|
7
|
+
data.tar.gz: aee7a73143e64fd269504cebc956f541002441a265f66a66e85fd072f074249e7de297bb1ddb3a7cdd41f7b1daba25cbff9f6fbe92d4f2db9342bcdb3d146a6a
|
@@ -1,16 +1,15 @@
|
|
1
1
|
# This file creates a Service that Talks Rack
|
2
2
|
require 'rack'
|
3
|
+
require 'rackup'
|
3
4
|
require 'alchemy-flux'
|
4
5
|
|
5
|
-
# The
|
6
|
-
module
|
7
|
-
# The
|
6
|
+
# The Rackup namespace
|
7
|
+
module Rackup
|
8
|
+
# The Rackup Handlers namespace
|
8
9
|
module Handler
|
9
10
|
# Alchemy Rack handler
|
10
11
|
class AlchemyFlux
|
11
12
|
|
12
|
-
|
13
|
-
|
14
13
|
# Start the app server with the supplied Rack application and options
|
15
14
|
#
|
16
15
|
# +app+ [Rack Application] The Application to run.
|
@@ -71,7 +70,6 @@ module Rack
|
|
71
70
|
}
|
72
71
|
end
|
73
72
|
|
74
|
-
|
75
73
|
@@service.start
|
76
74
|
end
|
77
75
|
|
@@ -128,7 +126,7 @@ module Rack
|
|
128
126
|
# Rack-specific variables
|
129
127
|
|
130
128
|
# The Array representing this version of Rack See Rack::VERSION
|
131
|
-
rack_env['rack.version'] =
|
129
|
+
rack_env['rack.version'] = Rackup::VERSION
|
132
130
|
|
133
131
|
# http or https, depending on the request URL.
|
134
132
|
rack_env['rack.url_scheme'] = message['scheme']
|
@@ -155,6 +153,6 @@ module Rack
|
|
155
153
|
end
|
156
154
|
end
|
157
155
|
|
158
|
-
register :alchemy,
|
156
|
+
register :alchemy, Rackup::Handler::AlchemyFlux
|
159
157
|
end
|
160
158
|
end
|
data/lib/alchemy-flux/version.rb
CHANGED
data/spec/rack_handler_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe Rackup::Handler::AlchemyFlux do
|
4
4
|
|
5
5
|
after(:each) do
|
6
6
|
# This will stop EventMachine and disconnect RabbitMQ, reseting each test
|
@@ -16,13 +16,13 @@ describe Rack::Handler::AlchemyFlux do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
service_a = AlchemyFlux::Service.new("fluxa.service", :timeout => 200)
|
19
|
-
|
19
|
+
Rackup::Handler::AlchemyFlux.start app
|
20
20
|
service_a.start
|
21
21
|
sleep(0.5)
|
22
22
|
response = service_a.send_request_to_service("rack.service", {})
|
23
23
|
expect(response['body']).to eq "hi Bob"
|
24
24
|
service_a.stop
|
25
|
-
|
25
|
+
Rackup::Handler::AlchemyFlux.stop
|
26
26
|
end
|
27
27
|
|
28
28
|
it 'should register resources with ALCHEMY_RESOURCE_PATHS env variable' do
|
@@ -33,7 +33,7 @@ describe Rack::Handler::AlchemyFlux do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
service_a = AlchemyFlux::Service.new("fluxa.service", :timeout => 200)
|
36
|
-
|
36
|
+
Rackup::Handler::AlchemyFlux.start app
|
37
37
|
|
38
38
|
service_a.start
|
39
39
|
sleep(0.5)
|
@@ -45,7 +45,7 @@ describe Rack::Handler::AlchemyFlux do
|
|
45
45
|
expect(response['body']).to eq "hi /bob"
|
46
46
|
|
47
47
|
service_a.stop
|
48
|
-
|
48
|
+
Rackup::Handler::AlchemyFlux.stop
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy-flux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.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: 2024-
|
11
|
+
date: 2024-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '3.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rackup
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.1'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: eventmachine
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -163,15 +177,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
163
177
|
requirements:
|
164
178
|
- - ">="
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: 2.
|
180
|
+
version: '2.4'
|
167
181
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
168
182
|
requirements:
|
169
183
|
- - ">="
|
170
184
|
- !ruby/object:Gem::Version
|
171
185
|
version: '0'
|
172
186
|
requirements: []
|
173
|
-
|
174
|
-
rubygems_version: 2.7.10
|
187
|
+
rubygems_version: 3.1.6
|
175
188
|
signing_key:
|
176
189
|
specification_version: 4
|
177
190
|
summary: Ruby implementation of the Alchemy micro-service framework
|