u-case 1.0.0 → 1.1.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: 5e2edbea7a42870996f51a198a3ad2533756cf6543b518132c9c3d6d1fbd9c10
4
- data.tar.gz: c3edba8bcc6655ae24efdcb39c34a22de774f5cac4527b0e32c2ed994e8a9827
3
+ metadata.gz: 6f82733e98f4f7e6d43edcd3134b4a8d8b75b6847ad21149b449111696d0b2ae
4
+ data.tar.gz: 5577b62e6dea66980ef4277ed219dbd440eaf0888a2c8897d55e9d2cb9e40e08
5
5
  SHA512:
6
- metadata.gz: 6b0a68671afa734a6efb1c202c6a288a9cbcf433208ed1c542d546b86b49573dc8945bdb80f2bac72a898025b32efa96d48771307b8d00a3e19fac21b06db57c
7
- data.tar.gz: dca26fcc010a0b2a34d4819cd3cedb8eb02f1e2a261da6869b65ce91c141c66920c427b0ef2fd9f7b577a4e20af1e78479a0cfbf019d4df577a84d48a160af74
6
+ metadata.gz: a398f2c05a509bc35d6b8391107c21a9c0994d38bc0684895d0e0e4fc3ae25ea142ce9b11f7cf8c8e40df60623b2a5bf24a4c384803bbf504cc076f96db82105
7
+ data.tar.gz: f271749d8790cfc12dce63a5605f35ebfc127e0f46a411064cca6c15fd6f01e638afee5fcdf8a38a82bcf4416764793e282a82b416cd99547045312ccd22146b
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  [![Gem](https://img.shields.io/gem/v/u-case.svg?style=flat-square)](https://rubygems.org/gems/u-case)
2
2
  [![Build Status](https://travis-ci.com/serradura/u-case.svg?branch=master)](https://travis-ci.com/serradura/u-case)
3
- [![Maintainability](https://api.codeclimate.com/v1/badges/a30b18528a317435c2ee/maintainability)](https://codeclimate.com/github/serradura/u-case/maintainability)
4
- [![Test Coverage](https://api.codeclimate.com/v1/badges/a30b18528a317435c2ee/test_coverage)](https://codeclimate.com/github/serradura/u-case/test_coverage)
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/5c3c8ad1b0b943f88efd/maintainability)](https://codeclimate.com/github/serradura/u-case/maintainability)
4
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/5c3c8ad1b0b943f88efd/test_coverage)](https://codeclimate.com/github/serradura/u-case/test_coverage)
5
5
 
6
6
  μ-case (Micro::Case)
7
7
  ==========================
@@ -622,7 +622,7 @@ class Multiply < Micro::Case::Base
622
622
  validates :a, :b, presence: true, numericality: true
623
623
 
624
624
  def call!
625
- return Failure(:validation_error) { self.errors } unless valid?
625
+ return Failure(:validation_error) { {errors: self.errors} } unless valid?
626
626
 
627
627
  Success(number: a * b)
628
628
  end
@@ -9,7 +9,7 @@ module Micro
9
9
  end
10
10
 
11
11
  def flow(*args)
12
- @__flow= flow_reducer.build(args)
12
+ @__flow = flow_reducer.build(args)
13
13
  end
14
14
 
15
15
  def call(options = {})
@@ -20,7 +20,7 @@ module Micro
20
20
  CONSTRUCTOR = <<-RUBY
21
21
  def initialize(options)
22
22
  @options = options
23
- flow= self.class.__flow__
23
+ flow = self.class.__flow__
24
24
  raise Error::UndefinedFlow unless flow
25
25
  end
26
26
  RUBY
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Micro
4
4
  module Case
5
- VERSION = '1.0.0'.freeze
5
+ VERSION = '1.1.0'.freeze
6
6
  end
7
7
  end
@@ -8,7 +8,7 @@ module Micro
8
8
  include Micro::Attributes::Features::ActiveModelValidations
9
9
 
10
10
  def call
11
- return Failure(:validation_error) { self.errors } unless valid?
11
+ return Failure(:validation_error) { {errors: self.errors} } unless valid?
12
12
 
13
13
  __call
14
14
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: u-case
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Serradura
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-15 00:00:00.000000000 Z
11
+ date: 2019-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: u-attributes