lev 9.0.4 → 10.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lev/routine.rb +5 -5
- data/lib/lev/version.rb +1 -1
- data/spec/create_sprocket_spec.rb +2 -2
- data/spec/deep_merge_spec.rb +2 -2
- data/spec/delegates_to_spec.rb +1 -1
- data/spec/outputs_spec.rb +4 -4
- data/spec/paramify_handler_spec.rb +2 -2
- data/spec/routine_spec.rb +1 -1
- data/spec/sprocket_handler_spec.rb +1 -1
- data/spec/sprocket_spec.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da971d93b095041982057a4cb6fb16f08c005491d8f1e24b72116d1c446b18c9
|
4
|
+
data.tar.gz: 6f9a9b4969b3717fdd6a1f70c6cb80bd0d4eabd1823a3aab56e493bcc1c70cdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a3c6526b61cd1ac8940970ad1848d25962a2c198fa2c0a4ac581809e13f1e264d1ad20d67ef338caed3d563c707964b22134a350ff9d065dd0136e1b3a048b5
|
7
|
+
data.tar.gz: b7edf1a66d8d3ac8b6849639e587dd7a2b3215fcf9db256a0ec815a7ecab22ef6e47180d3c93ca69ddc6131ef6372f1ba1fc98de9b5d59b9af8e1efac0118710
|
data/lib/lev/routine.rb
CHANGED
@@ -377,8 +377,7 @@ module Lev
|
|
377
377
|
input_mapper = new_term_mapper(options[:translations][:inputs]) ||
|
378
378
|
new_term_mapper({ scope: symbol })
|
379
379
|
|
380
|
-
output_mapper = new_term_mapper(options[:translations][:outputs])
|
381
|
-
new_term_mapper({ scope: symbol })
|
380
|
+
output_mapper = new_term_mapper(options[:translations][:outputs])
|
382
381
|
|
383
382
|
#
|
384
383
|
# Set up the ignored errors in the routine instance
|
@@ -397,7 +396,7 @@ module Lev
|
|
397
396
|
|
398
397
|
run_result.outputs.transfer_to(outputs) do |name|
|
399
398
|
output_mapper.map(name)
|
400
|
-
end
|
399
|
+
end unless output_mapper.nil?
|
401
400
|
|
402
401
|
options[:errors_are_fatal] = true if !options.has_key?(:errors_are_fatal)
|
403
402
|
transfer_errors_from(run_result.errors, input_mapper, options[:errors_are_fatal])
|
@@ -458,8 +457,9 @@ module Lev
|
|
458
457
|
end
|
459
458
|
|
460
459
|
def result
|
461
|
-
@result ||= Result.new(
|
462
|
-
|
460
|
+
@result ||= Result.new(
|
461
|
+
Outputs.new, Errors.new(status, topmost_runner.class.raise_fatal_errors?)
|
462
|
+
)
|
463
463
|
end
|
464
464
|
|
465
465
|
def reset_result!
|
data/lib/lev/version.rb
CHANGED
data/spec/deep_merge_spec.rb
CHANGED
data/spec/delegates_to_spec.rb
CHANGED
data/spec/outputs_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Lev::Outputs do
|
3
|
+
RSpec.describe Lev::Outputs do
|
4
4
|
|
5
5
|
let(:outputs) { Lev::Outputs.new }
|
6
6
|
|
@@ -60,7 +60,7 @@ describe Lev::Outputs do
|
|
60
60
|
:y
|
61
61
|
end
|
62
62
|
|
63
|
-
other_outputs.add(:y, 6)
|
63
|
+
other_outputs.add(:y, 6)
|
64
64
|
expect(other_outputs.y).to eq [4,5,6]
|
65
65
|
end
|
66
66
|
|
@@ -72,9 +72,9 @@ describe Lev::Outputs do
|
|
72
72
|
|
73
73
|
outputs.transfer_to(other_outputs)
|
74
74
|
|
75
|
-
other_outputs.add(:y, 6)
|
75
|
+
other_outputs.add(:y, 6)
|
76
76
|
expect(other_outputs.x).to eq [4,5]
|
77
77
|
expect(other_outputs.y).to eq 6
|
78
78
|
end
|
79
79
|
|
80
|
-
end
|
80
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe ParamifyHandlerA do
|
3
|
+
RSpec.describe ParamifyHandlerA do
|
4
4
|
it 'should error out on badly formatted params' do
|
5
5
|
result = ParamifyHandlerA.handle(params: {terms: {type: 'blah'}})
|
6
6
|
errors = result.errors.collect { |error| error.translate }
|
@@ -8,7 +8,7 @@ describe ParamifyHandlerA do
|
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
-
describe ParamifyHandlerB do
|
11
|
+
RSpec.describe ParamifyHandlerB do
|
12
12
|
it 'should error out on badly formatted ungrouped params' do
|
13
13
|
result = ParamifyHandlerB.handle(params: {type: 'blah'})
|
14
14
|
errors = result.errors.collect { |error| error.translate }
|
data/spec/routine_spec.rb
CHANGED
data/spec/sprocket_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper.rb'
|
2
2
|
|
3
|
-
describe Sprocket do
|
3
|
+
RSpec.describe Sprocket do
|
4
4
|
|
5
5
|
it "should not be valid with bad inputs" do
|
6
6
|
sprocket = Sprocket.new(integer_gt_2: 1, text_only_letters: 'abcd4')
|
@@ -8,4 +8,4 @@ describe Sprocket do
|
|
8
8
|
expect(sprocket.errors.count).to eq 2
|
9
9
|
end
|
10
10
|
|
11
|
-
end
|
11
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 10.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -293,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
293
293
|
- !ruby/object:Gem::Version
|
294
294
|
version: '0'
|
295
295
|
requirements: []
|
296
|
-
rubygems_version: 3.
|
296
|
+
rubygems_version: 3.1.1
|
297
297
|
signing_key:
|
298
298
|
specification_version: 4
|
299
299
|
summary: Ride the rails but don't touch them.
|