streamdal 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/spec_helper.rb +11 -1
  3. data/lib/wasm_spec.rb +6 -6
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff825b88dbb81240b3ea5c3fd2cf264a88ecdafbb197ba886ed11acfe098ab93
4
- data.tar.gz: 11a9e57851f4296c715b393d8c3ca7f33506d0050e6a4bf74121f92c141288c4
3
+ metadata.gz: bd49e6aba633028e6bd0af296c6ed7a69ca00f2b4bc9c26646d40bdd1e19d313
4
+ data.tar.gz: 745eb525e4290b1d23bda53000683e9a8761fe070a4b50bb011605f2f03d64a5
5
5
  SHA512:
6
- metadata.gz: e9a744de7a691f637c48289c4647a3b369e89659c02ba4140b57addd8dbf5c3b98e769016b8cdd9158563622570aa82e98bd36fba237f6ec8802590c6c63f943
7
- data.tar.gz: 698cdc39714da510b577bd7bc98d8da174da6c13c32c32c47041e51c64d444e7d5368d3f090b3ec239092fa3db01c93248a7ef14512491c0d6e2122b2446d58c
6
+ metadata.gz: c65cd7b9a1342e31092bbb183e55537b26cb1be2ca34609d5df44ae763ec6bdcf514febb0d85f95a02107ec5d6b65f66b02956ef2b4516cce178e4185af6712e
7
+ data.tar.gz: 22319f8bffbafea0aa41748f7a745f44698c6061589ebe1ba8ee2621127e0f4fb3b4d5990d476e172d3e54f45c66f88310c7d295becab73ae0cc0172a79bc432
data/lib/spec_helper.rb CHANGED
@@ -1,2 +1,12 @@
1
1
  require 'simplecov'
2
- SimpleCov.start
2
+ SimpleCov.start
3
+
4
+ # This environment variable exists so that we can run WASM tests
5
+ # via the CI process for libs/wasm* and not just through the CI
6
+ # of the ruby-sdk
7
+ WASM_DIR = ENV['WASM_DIR'] || File.join(File.dirname(__FILE__), '..', 'test-assets', 'wasm')
8
+
9
+ # Load the WebAssembly module
10
+ def load_wasm(name)
11
+ File.read(File.join(WASM_DIR, name))
12
+ end
data/lib/wasm_spec.rb CHANGED
@@ -41,7 +41,7 @@ RSpec.describe 'WASM' do
41
41
 
42
42
  context 'detective.wasm' do
43
43
  before(:each) do
44
- wasm_bytes = File.read(File.join(File.dirname(__FILE__), '..', 'test-assets', 'wasm', 'detective.wasm'))
44
+ wasm_bytes = load_wasm('detective.wasm')
45
45
 
46
46
  @step = Streamdal::Protos::PipelineStep.new
47
47
  @step.name = 'detective'
@@ -77,7 +77,7 @@ RSpec.describe 'WASM' do
77
77
 
78
78
  context 'httprequest.wasm' do
79
79
  before(:each) do
80
- wasm_bytes = File.read(File.join(File.dirname(__FILE__), '..', 'test-assets', 'wasm', 'httprequest.wasm'))
80
+ wasm_bytes = load_wasm('httprequest.wasm')
81
81
 
82
82
  http_req_step = Streamdal::Protos::HttpRequestStep.new
83
83
  http_req_step.request = Streamdal::Protos::HttpRequest.new
@@ -104,7 +104,7 @@ RSpec.describe 'WASM' do
104
104
 
105
105
  context 'inferschema.wasm' do
106
106
  before(:each) do
107
- wasm_bytes = File.read(File.join(File.dirname(__FILE__), '..', 'test-assets', 'wasm', 'inferschema.wasm'))
107
+ wasm_bytes = load_wasm('inferschema.wasm')
108
108
 
109
109
  @step = Streamdal::Protos::PipelineStep.new
110
110
  @step.name = 'schema inference'
@@ -130,7 +130,7 @@ RSpec.describe 'WASM' do
130
130
 
131
131
  context 'transform.wasm' do
132
132
  before(:each) do
133
- wasm_bytes = File.read(File.join(File.dirname(__FILE__), '..', 'test-assets', 'wasm', 'transform.wasm'))
133
+ wasm_bytes = load_wasm('transform.wasm')
134
134
 
135
135
  @step = Streamdal::Protos::PipelineStep.new
136
136
  @step.name = 'transform'
@@ -194,7 +194,7 @@ RSpec.describe 'WASM' do
194
194
 
195
195
  context 'validjson.wasm' do
196
196
  before(:each) do
197
- wasm_bytes = File.read(File.join(File.dirname(__FILE__), '..', 'test-assets', 'wasm', 'validjson.wasm'))
197
+ wasm_bytes = load_wasm('validjson.wasm')
198
198
 
199
199
  @step = Streamdal::Protos::PipelineStep.new
200
200
  @step.name = 'validate json'
@@ -226,7 +226,7 @@ RSpec.describe 'WASM' do
226
226
 
227
227
  context 'kv.wasm' do
228
228
  before(:each) do
229
- wasm_bytes = File.read(File.join(File.dirname(__FILE__), '..', 'test-assets', 'wasm', 'kv.wasm'))
229
+ wasm_bytes = load_wasm('kv.wasm')
230
230
 
231
231
  client.kv.set('test', 'test')
232
232
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: streamdal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Gregan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-19 00:00:00.000000000 Z
11
+ date: 2024-06-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: mark@streamdal.com
@@ -46,7 +46,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.0.3
49
+ version: 0.0.4
50
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="