u-case 2.3.0 → 2.3.1

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: e4b75e85c821351da3ee8298a9c9d97980be292488746a25a48510d6ad43b1d5
4
- data.tar.gz: e8bd964807111d6895f113e0951d0d2c643664110646f433edb35883e0d585a9
3
+ metadata.gz: 9f5a28fb237f74e009225d20bcc65115e6d8159818a3cfdbfcb7e23c3726aef4
4
+ data.tar.gz: fa34ab50f7b2d0df65ba75f4b59734e0326d8431652823ad35e406d243801853
5
5
  SHA512:
6
- metadata.gz: 7395bdc572be3cce61d7358333e2bade896e9c240012c443e6015f02bae8022cad7d90323866b0229341729375ff63d381860418fcd2cac3a0f6608669fe59c5
7
- data.tar.gz: 448b78286a29b60ae3bf79f7786011572bbb39cd5f9cf2091f32be7b8d1017b7e8973c2bea1e0a1d1f9c65c5e96c764261d1a3b9d7584b765ea937aca998291b
6
+ metadata.gz: cd2a5fd871fd561ab98d96297e474f3ea251cdee866d5b14cc69e5e04bf654b98c3b2f75ef55d4c774f0d91ca6297a89746c923a29cd1fd1985e5761db6848b3
7
+ data.tar.gz: 12c467840bab805b562ae9de9fe6c80ccda0129672989d6b14f844e916fd270f0f5f9c2f213fed508c439e6d17142712f2013475bbc6f0f9a22066ab0aeb84ef
data/.travis.sh CHANGED
@@ -11,3 +11,8 @@ if [[ ! $ruby_v =~ '2.2.0' ]]; then
11
11
  ACTIVEMODEL_VERSION='5.2' bundle update
12
12
  ACTIVEMODEL_VERSION='5.2' bundle exec rake test
13
13
  fi
14
+
15
+ if [[ $ruby_v =~ '2.5.' ]] || [[ $ruby_v =~ '2.6.' ]] || [[ $ruby_v =~ '2.7.' ]]; then
16
+ ACTIVEMODEL_VERSION='6.0' bundle update
17
+ ACTIVEMODEL_VERSION='6.0' bundle exec rake test
18
+ fi
data/.travis.yml CHANGED
@@ -9,6 +9,7 @@ rvm:
9
9
  - 2.4.0
10
10
  - 2.5.0
11
11
  - 2.6.0
12
+ - 2.7.0
12
13
 
13
14
  cache: bundler
14
15
 
data/Gemfile CHANGED
@@ -7,6 +7,7 @@ activemodel_version = ENV.fetch('ACTIVEMODEL_VERSION', '6.1.0')
7
7
  activemodel = case activemodel_version
8
8
  when '3.2' then '3.2.22'
9
9
  when '5.2' then '5.2.3'
10
+ when '6.0' then '6.0.2'
10
11
  end
11
12
 
12
13
  if activemodel_version < '6.1.0'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Micro
4
4
  class Case
5
- VERSION = '2.3.0'.freeze
5
+ VERSION = '2.3.1'.freeze
6
6
  end
7
7
  end
@@ -22,12 +22,14 @@ module Micro
22
22
 
23
23
  private
24
24
 
25
- def __call
26
- return __call_use_case_flow if __call_use_case_flow?
27
-
25
+ def __call_use_case
28
26
  return failure_by_validation_error(self) if !self.class.auto_validation_disabled? && invalid?
29
27
 
30
- __call_use_case
28
+ result = call!
29
+
30
+ return result if result.is_a?(Result)
31
+
32
+ raise Error::UnexpectedResult.new(self.class)
31
33
  end
32
34
 
33
35
  def failure_by_validation_error(object)
data/u-case.gemspec CHANGED
@@ -14,20 +14,8 @@ Gem::Specification.new do |spec|
14
14
  spec.homepage = 'https://github.com/serradura/u-case'
15
15
  spec.license = 'MIT'
16
16
 
17
- # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
- # to allow pushing to a single host or delete this section to allow pushing to any host.
19
- if spec.respond_to?(:metadata)
20
- # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
21
-
22
- # spec.metadata["homepage_uri"] = spec.homepage
23
- # spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
24
- # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
25
- else
26
- raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.'
27
- end
17
+ raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.' unless spec.respond_to?(:metadata)
28
18
 
29
- # Specify which files should be added to the gem when it is released.
30
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
31
19
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
32
20
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|assets|benchmarks|comparisons|examples)/}) }
33
21
  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: 2.3.0
4
+ version: 2.3.1
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-12-18 00:00:00.000000000 Z
11
+ date: 2019-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: u-attributes