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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e108883404b4ea4c1849388ce2c7e1ab36cb8f4f893134f046c91b3204c9d49
4
- data.tar.gz: f41450431f042f8ef0f4914847a20e23326573da2beea73d480aa0fa9b07698a
3
+ metadata.gz: da971d93b095041982057a4cb6fb16f08c005491d8f1e24b72116d1c446b18c9
4
+ data.tar.gz: 6f9a9b4969b3717fdd6a1f70c6cb80bd0d4eabd1823a3aab56e493bcc1c70cdf
5
5
  SHA512:
6
- metadata.gz: 8965e8dc1d07753fb4d28178f878cd3269108d1605daa61d23051b57e740a6f617635076d1710efc4aff81db9aabf71354b653ec763842a337f068581b2361ed
7
- data.tar.gz: 93d5ae3f2ed78280248cebd8a54f7a14b3d4405c85e5c7f983f8145f0866fe11c235f55e8903c5f64d6d89adb6a555ff1419fa64f7fd4a95937341a82f26334e
6
+ metadata.gz: 0a3c6526b61cd1ac8940970ad1848d25962a2c198fa2c0a4ac581809e13f1e264d1ad20d67ef338caed3d563c707964b22134a350ff9d065dd0136e1b3a048b5
7
+ data.tar.gz: b7edf1a66d8d3ac8b6849639e587dd7a2b3215fcf9db256a0ec815a7ecab22ef6e47180d3c93ca69ddc6131ef6372f1ba1fc98de9b5d59b9af8e1efac0118710
@@ -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(Outputs.new,
462
- Errors.new(status, topmost_runner.class.raise_fatal_errors?))
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!
@@ -1,3 +1,3 @@
1
1
  module Lev
2
- VERSION = '9.0.4'
2
+ VERSION = '10.0.0'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe CreateSprocket do
4
-
3
+ RSpec.describe CreateSprocket do
4
+
5
5
  it "should transfer errors appropriately" do
6
6
  result = CreateSprocket.call(1,"42")
7
7
  errors = result.errors.collect { |error| error.translate }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Lev::Utilities do
3
+ RSpec.describe Lev::Utilities do
4
4
 
5
5
  it "should merge properly" do
6
6
  default_options = {
@@ -38,4 +38,4 @@ describe Lev::Utilities do
38
38
  expect(merged).to eq expected
39
39
  end
40
40
 
41
- end
41
+ end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe DelegatingRoutine do
3
+ RSpec.describe DelegatingRoutine do
4
4
 
5
5
  it "should delegate" do
6
6
  result = DelegatingRoutine.call(1,8)
@@ -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 }
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Lev::Routine do
3
+ RSpec.describe Lev::Routine do
4
4
 
5
5
  before do
6
6
  stub_const 'RaiseRuntimeError', Class.new
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe SprocketHandler do
3
+ RSpec.describe SprocketHandler do
4
4
  it 'should return fatal error messages' do
5
5
  allow_any_instance_of(SprocketHandler).to(
6
6
  receive(:params).and_return({
@@ -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: 9.0.4
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: 2019-11-25 00:00:00.000000000 Z
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.0.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.