functional-light-service 0.2.4 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -4
- data/Appraisals +2 -2
- data/CHANGELOG.md +63 -0
- data/README.md +1 -1
- data/VERSION +1 -1
- data/functional-light-service.gemspec +4 -2
- data/gemfiles/dry_inflector_0_2.gemfile +8 -0
- data/gemfiles/{activesupport_5.gemfile → i18n_1_8.gemfile} +1 -1
- data/lib/functional-light-service/action.rb +3 -4
- data/lib/functional-light-service/configuration.rb +1 -1
- data/lib/functional-light-service/context.rb +4 -15
- data/lib/functional-light-service/functional/enum.rb +1 -1
- data/lib/functional-light-service/functional/result.rb +2 -8
- data/lib/functional-light-service/localization_adapter.rb +5 -2
- data/lib/functional-light-service/organizer/iterate.rb +4 -1
- data/lib/functional-light-service/organizer/verify_call_method_exists.rb +3 -2
- data/lib/functional-light-service/organizer.rb +4 -5
- data/lib/functional-light-service/version.rb +1 -1
- data/lib/functional-light-service.rb +0 -1
- data/spec/acceptance/include_warning_spec.rb +14 -14
- data/spec/acceptance/not_having_call_method_warning_spec.rb +4 -11
- data/spec/spec_helper.rb +0 -4
- metadata +52 -12
- data/gemfiles/activesupport_5.gemfile.lock +0 -82
- data/spec/acceptance/skip_all_warning_spec.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbd6d85820481b017787b786621b2ec4ea950a25441943178ca63ff6d1e8df09
|
4
|
+
data.tar.gz: abef7ed68f213011a17d8a063e1feb56a10ac215a54e9ff5c53da1b43ca8018c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47ea3d6474cb79479ba662f046163df649085ebb0038308b538b733531cc34fc0ba830cb789b13e0a776269ac82063dfdec916c6a3bba659c36fec2da2a9eeda
|
7
|
+
data.tar.gz: fddb927ea9f7b4ba30484093dd50966137fcb8639d6558fdde4d156e41a0e42cc37f4c1bfeb951ee99b4e10631c270fe5f16f438ae047bbf780426c9d26822f7
|
data/.travis.yml
CHANGED
@@ -4,14 +4,15 @@ env:
|
|
4
4
|
- RUN_COVERAGE_REPORT=true
|
5
5
|
|
6
6
|
rvm:
|
7
|
-
- 2.5.
|
7
|
+
- 2.5.3
|
8
8
|
- 2.6.0
|
9
|
+
- 2.7.0
|
9
10
|
|
10
11
|
before_install:
|
11
12
|
- 'echo ''gem: --no-ri --no-rdoc'' > ~/.gemrc'
|
13
|
+
- yes | gem update --system --force
|
12
14
|
- gem install bundler
|
13
|
-
- bundle
|
14
|
-
- bundle install --path vendor/bundle
|
15
|
+
- bundle install --gemfile=Gemfile --clean --path vendor/bundle
|
15
16
|
|
16
17
|
# uncomment this line if your project needs to run something other than `rake`:
|
17
18
|
script:
|
@@ -19,4 +20,5 @@ script:
|
|
19
20
|
- bundle exec rubocop
|
20
21
|
|
21
22
|
gemfile:
|
22
|
-
- gemfiles/
|
23
|
+
- gemfiles/dry_inflector_0_2.gemfile
|
24
|
+
- gemfiles/i18n_1_8.gemfile
|
data/Appraisals
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
appraise "
|
2
|
-
gem "
|
1
|
+
appraise "dry-inflector-0.2.0" do
|
2
|
+
gem "dry-inflector", "~> 0.2.0"
|
3
3
|
end
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,66 @@
|
|
1
|
+
## 0.3.4 (2021-12-15)
|
2
|
+
|
3
|
+
|
4
|
+
## 0.3.3 (2021-12-15)
|
5
|
+
### Fixed
|
6
|
+
- Corretto il problema di passare un hash per avere il dettaglio dell'errore quando fallisce ( 2021-12-15 ) [ sphynx]
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
## 0.3.2 (2020-07-17)
|
11
|
+
### Changed
|
12
|
+
- Ottimizzato performance di Deterministic [enum,result] ( 2020-07-17 ) [ sphynx79]
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
## 0.3.1 (2020-02-16)
|
17
|
+
|
18
|
+
|
19
|
+
## 0.3.0 (2020-02-16)
|
20
|
+
### Removed
|
21
|
+
- Rimosso completamente activesupport ( 2020-02-16 ) [ sphynx79]
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
## 0.2.9.2 (2020-02-16)
|
26
|
+
### Removed
|
27
|
+
- Rimosso ActiveSupport::Deprecation per i warning di deprecation ( 2020-02-16 ) [ sphynx79]
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
## 0.2.9.1 (2020-02-16)
|
32
|
+
### Fixed
|
33
|
+
- Sto cercando di sistemate il problema di travis che da errore per activesupport ( 2020-02-16 ) [ sphynx79]
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
## 0.2.9 (2020-02-16)
|
38
|
+
### Fixed
|
39
|
+
- Travis va in errore aggiunt activesupport al mio gemfile ( 2020-02-16 ) [ sphynx79]
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
## 0.2.8 (2020-02-16)
|
44
|
+
### Removed
|
45
|
+
- rimosso supporto a activesupport 5 ( 2020-02-16 ) [ sphynx79]
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
## 0.2.7 (2020-02-16)
|
50
|
+
### Fix
|
51
|
+
- Risolto problema travis bundle update ( 2020-02-16 ) [ sphynx79]
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
## 0.2.6 (2020-02-16)
|
56
|
+
### Fixed
|
57
|
+
- FiFix problem /dev/null windows, e corretto il bug sul metodo failure? ( 2020-02-16 ) [ sphynx79]
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
## 0.2.5 (2019-02-24)
|
62
|
+
|
63
|
+
|
1
64
|
## 0.2.4 (2019-02-24)
|
2
65
|
|
3
66
|
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# FunctionalLightService
|
2
|
-
[![Gem Version](https://img.shields.io/gem/v/light-service.svg)](https://rubygems.org/gems/light-service)
|
2
|
+
[![Gem Version](https://img.shields.io/gem/v/functional-light-service.svg)](https://rubygems.org/gems/functional-light-service)
|
3
3
|
[![Build Status](https://travis-ci.org/sphynx79/functional-light-service.svg?branch=master)](https://travis-ci.org/sphynx79/functional-light-service)
|
4
4
|
[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)
|
5
5
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.4
|
@@ -16,9 +16,11 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.require_paths = ["lib"]
|
17
17
|
gem.version = FunctionalLightService::VERSION
|
18
18
|
|
19
|
-
|
19
|
+
gem.add_dependency("dry-inflector", ">= 0.2.0")
|
20
|
+
gem.add_dependency("i18n", ">= 1.8.2")
|
20
21
|
|
21
|
-
gem.add_development_dependency("
|
22
|
+
gem.add_development_dependency("i18n", ">= 1.8.2")
|
23
|
+
gem.add_development_dependency("dry-inflector", ">= 0.2.0")
|
22
24
|
gem.add_development_dependency("rspec", "~> 3.0")
|
23
25
|
gem.add_development_dependency("simplecov", "~> 0.16.1")
|
24
26
|
gem.add_development_dependency("rubocop", "~> 0.63.1")
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'active_support/deprecation'
|
2
|
-
|
3
1
|
module FunctionalLightService
|
4
2
|
module Action
|
5
3
|
def self.extended(base_class)
|
@@ -8,9 +6,10 @@ module FunctionalLightService
|
|
8
6
|
end
|
9
7
|
|
10
8
|
def self.included(base_class)
|
11
|
-
msg = "
|
9
|
+
msg = "DEPRECATION WARNING:\n" \
|
10
|
+
"Including FunctionalLightService::Action is deprecated\n" \
|
12
11
|
"Please use `extend FunctionalLightService::Action` instead"
|
13
|
-
|
12
|
+
print msg
|
14
13
|
base_class.extend Macros
|
15
14
|
end
|
16
15
|
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'active_support/deprecation'
|
2
|
-
|
3
1
|
module FunctionalLightService
|
4
2
|
# rubocop:disable ClassLength
|
5
3
|
class Context < Hash
|
@@ -7,8 +5,7 @@ module FunctionalLightService
|
|
7
5
|
include FunctionalLightService::Prelude::Result
|
8
6
|
attr_accessor :outcome, :current_action
|
9
7
|
|
10
|
-
def initialize(context = {},
|
11
|
-
outcome = Success(:message => '', :error => nil))
|
8
|
+
def initialize(context = {}, outcome = Success(:message => '', :error => nil))
|
12
9
|
@outcome = outcome
|
13
10
|
@skip_remaining = false
|
14
11
|
context.to_hash.each { |k, v| self[k] = v }
|
@@ -35,7 +32,7 @@ module FunctionalLightService
|
|
35
32
|
end
|
36
33
|
|
37
34
|
def failure?
|
38
|
-
|
35
|
+
@outcome.failure?
|
39
36
|
end
|
40
37
|
|
41
38
|
def skip_remaining?
|
@@ -43,7 +40,7 @@ module FunctionalLightService
|
|
43
40
|
end
|
44
41
|
|
45
42
|
def reset_skip_remaining!
|
46
|
-
@outcome = Success(nil)
|
43
|
+
@outcome = Success(:message => '', :error => nil)
|
47
44
|
@skip_remaining = false
|
48
45
|
end
|
49
46
|
|
@@ -82,7 +79,7 @@ module FunctionalLightService
|
|
82
79
|
|
83
80
|
def fail_and_return!(*args)
|
84
81
|
fail!(*args)
|
85
|
-
throw(:jump_when_failed
|
82
|
+
throw(:jump_when_failed)
|
86
83
|
end
|
87
84
|
|
88
85
|
def fail_with_rollback!(message = nil, error_code = nil)
|
@@ -90,14 +87,6 @@ module FunctionalLightService
|
|
90
87
|
raise FailWithRollbackError
|
91
88
|
end
|
92
89
|
|
93
|
-
def skip_all!(message = nil)
|
94
|
-
warning_msg = "Using skip_all! has been deprecated, " \
|
95
|
-
"please use `skip_remaining!` instead."
|
96
|
-
ActiveSupport::Deprecation.warn(warning_msg)
|
97
|
-
|
98
|
-
skip_remaining!(message)
|
99
|
-
end
|
100
|
-
|
101
90
|
def skip_remaining!(message = nil)
|
102
91
|
@outcome = Success(:message => message)
|
103
92
|
@skip_remaining = true
|
@@ -17,20 +17,14 @@ module FunctionalLightService
|
|
17
17
|
# rubocop:disable Metrics/BlockLength
|
18
18
|
FunctionalLightService.impl(Result) do
|
19
19
|
def map(proc = nil, &block)
|
20
|
-
|
21
|
-
Success() { |_| bind(proc || block) }
|
22
|
-
Failure() { |_| self }
|
23
|
-
end
|
20
|
+
success? ? bind(proc || block) : self
|
24
21
|
end
|
25
22
|
|
26
23
|
alias :>> :map
|
27
24
|
alias :and_then :map
|
28
25
|
|
29
26
|
def map_err(proc = nil, &block)
|
30
|
-
|
31
|
-
Success() { |_| self }
|
32
|
-
Failure() { |_| bind(proc || block) }
|
33
|
-
end
|
27
|
+
failure? ? bind(proc || block) : self
|
34
28
|
end
|
35
29
|
|
36
30
|
alias :or_else :map_err
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'i18n'
|
2
|
+
|
1
3
|
module FunctionalLightService
|
2
4
|
class LocalizationAdapter
|
3
5
|
def failure(message_or_key, action_class, i18n_options = {})
|
@@ -34,11 +36,12 @@ module FunctionalLightService
|
|
34
36
|
scope = i18n_scope_from_class(action_class, type)
|
35
37
|
options[:scope] = scope
|
36
38
|
|
37
|
-
I18n.t(key, options)
|
39
|
+
I18n.t(key, **options)
|
38
40
|
end
|
39
41
|
|
40
42
|
def i18n_scope_from_class(action_class, type)
|
41
|
-
|
43
|
+
inflector = Dry::Inflector.new
|
44
|
+
"#{inflector.underscore(action_class.name)}.light_service.#{inflector.pluralize(type)}"
|
42
45
|
end
|
43
46
|
end
|
44
47
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "dry/inflector"
|
2
|
+
|
1
3
|
module FunctionalLightService
|
2
4
|
module Organizer
|
3
5
|
class Iterate
|
@@ -8,7 +10,8 @@ module FunctionalLightService
|
|
8
10
|
return ctx if ctx.stop_processing?
|
9
11
|
|
10
12
|
collection = ctx[collection_key]
|
11
|
-
|
13
|
+
inflector = Dry::Inflector.new
|
14
|
+
item_key = inflector.singularize(collection_key).to_sym
|
12
15
|
collection.each do |item|
|
13
16
|
ctx[item_key] = item
|
14
17
|
ctx = scoped_reduce(organizer, ctx, steps)
|
@@ -11,11 +11,12 @@ module FunctionalLightService
|
|
11
11
|
call_method_exists = klass.methods.include?(:call)
|
12
12
|
return if call_method_exists
|
13
13
|
|
14
|
-
warning_msg = "
|
14
|
+
warning_msg = "DEPRECATION WARNING:" \
|
15
|
+
"The <#{klass.name}> class is an organizer, " \
|
15
16
|
"its entry method (the one that calls with & reduce) " \
|
16
17
|
"should be named `call`. " \
|
17
18
|
"Please use #{klass}.call going forward."
|
18
|
-
|
19
|
+
print warning_msg
|
19
20
|
end
|
20
21
|
|
21
22
|
def self.caller_method(first_caller)
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'active_support/deprecation'
|
2
|
-
|
3
1
|
module FunctionalLightService
|
4
2
|
module Organizer
|
5
3
|
def self.extended(base_class)
|
@@ -8,9 +6,10 @@ module FunctionalLightService
|
|
8
6
|
end
|
9
7
|
|
10
8
|
def self.included(base_class)
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
msg = "DEPRECATION WARNING:\n" \
|
10
|
+
"Including FunctionalLightService::Organizer is deprecated\n" \
|
11
|
+
"Please use `extend FunctionalLightService::Organizer` instead"
|
12
|
+
print msg
|
14
13
|
extended(base_class)
|
15
14
|
end
|
16
15
|
|
@@ -3,27 +3,27 @@ require 'spec_helper'
|
|
3
3
|
describe "Including is discouraged" do
|
4
4
|
context "when including FunctionalLightService::Organizer" do
|
5
5
|
it "gives warning" do
|
6
|
-
expected_msg = "
|
6
|
+
expected_msg = "DEPRECATION WARNING:\n" \
|
7
|
+
"Including FunctionalLightService::Organizer is deprecated\n" \
|
7
8
|
"Please use `extend FunctionalLightService::Organizer` instead"
|
8
|
-
expect
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
end
|
9
|
+
expect do
|
10
|
+
class OrganizerIncludingLS
|
11
|
+
include FunctionalLightService::Organizer
|
12
|
+
end
|
13
|
+
end.to output(expected_msg).to_stdout
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
context "when including FunctionalLightService::Action" do
|
18
18
|
it "gives warning" do
|
19
|
-
expected_msg = "
|
19
|
+
expected_msg = "DEPRECATION WARNING:\n" \
|
20
|
+
"Including FunctionalLightService::Action is deprecated\n" \
|
20
21
|
"Please use `extend FunctionalLightService::Action` instead"
|
21
|
-
expect
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
end
|
22
|
+
expect do
|
23
|
+
class ActionIncludingLS
|
24
|
+
include FunctionalLightService::Action
|
25
|
+
end
|
26
|
+
end.to output(expected_msg).to_stdout
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
@@ -4,10 +4,6 @@ require 'test_doubles'
|
|
4
4
|
describe "Organizer should invoke with/reduce from a call method" do
|
5
5
|
context "when the organizer does not have a `call` method" do
|
6
6
|
it "gives warning" do
|
7
|
-
expect(ActiveSupport::Deprecation)
|
8
|
-
.to receive(:warn)
|
9
|
-
.with(/^The <OrganizerWithoutCallMethod> class is an organizer/)
|
10
|
-
|
11
7
|
class OrganizerWithoutCallMethod
|
12
8
|
extend FunctionalLightService::Organizer
|
13
9
|
|
@@ -15,16 +11,14 @@ describe "Organizer should invoke with/reduce from a call method" do
|
|
15
11
|
reduce([])
|
16
12
|
end
|
17
13
|
end
|
18
|
-
|
19
|
-
|
14
|
+
expect do
|
15
|
+
OrganizerWithoutCallMethod.do_something
|
16
|
+
end.to output(/The <OrganizerWithoutCallMethod> class is an organizer/).to_stdout
|
20
17
|
end
|
21
18
|
end
|
22
19
|
|
23
20
|
context "when the organizer has the `call` method" do
|
24
21
|
it "does not issue a warning" do
|
25
|
-
expect(ActiveSupport::Deprecation)
|
26
|
-
.not_to receive(:warn)
|
27
|
-
|
28
22
|
class OrganizerWithCallMethod
|
29
23
|
extend FunctionalLightService::Organizer
|
30
24
|
|
@@ -32,8 +26,7 @@ describe "Organizer should invoke with/reduce from a call method" do
|
|
32
26
|
reduce([])
|
33
27
|
end
|
34
28
|
end
|
35
|
-
|
36
|
-
OrganizerWithCallMethod.call
|
29
|
+
expect(OrganizerWithCallMethod.call).to be_a_kind_of(FunctionalLightService::Context)
|
37
30
|
end
|
38
31
|
end
|
39
32
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -15,10 +15,6 @@ end
|
|
15
15
|
require 'functional-light-service'
|
16
16
|
require 'functional-light-service/testing'
|
17
17
|
require "functional-light-service/functional/null"
|
18
|
-
require 'ostruct'
|
19
|
-
require 'pry'
|
20
18
|
require 'support'
|
21
19
|
require 'test_doubles'
|
22
20
|
require 'stringio'
|
23
|
-
|
24
|
-
I18n.enforce_available_locales = true
|
metadata
CHANGED
@@ -1,29 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: functional-light-service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boscolo Michele
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: dry-inflector
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: i18n
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
33
|
+
version: 1.8.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.8.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: i18n
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.8.2
|
20
48
|
type: :development
|
21
49
|
prerelease: false
|
22
50
|
version_requirements: !ruby/object:Gem::Requirement
|
23
51
|
requirements:
|
24
|
-
- - "
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.8.2
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: dry-inflector
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.2.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
25
67
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
68
|
+
version: 0.2.0
|
27
69
|
- !ruby/object:Gem::Dependency
|
28
70
|
name: rspec
|
29
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,8 +143,8 @@ files:
|
|
101
143
|
- Rakefile
|
102
144
|
- VERSION
|
103
145
|
- functional-light-service.gemspec
|
104
|
-
- gemfiles/
|
105
|
-
- gemfiles/
|
146
|
+
- gemfiles/dry_inflector_0_2.gemfile
|
147
|
+
- gemfiles/i18n_1_8.gemfile
|
106
148
|
- lib/functional-light-service.rb
|
107
149
|
- lib/functional-light-service/action.rb
|
108
150
|
- lib/functional-light-service/configuration.rb
|
@@ -152,7 +194,6 @@ files:
|
|
152
194
|
- spec/acceptance/organizer/reduce_until_spec.rb
|
153
195
|
- spec/acceptance/organizer/with_callback_spec.rb
|
154
196
|
- spec/acceptance/rollback_spec.rb
|
155
|
-
- spec/acceptance/skip_all_warning_spec.rb
|
156
197
|
- spec/acceptance/testing/context_factory_spec.rb
|
157
198
|
- spec/action_expected_keys_spec.rb
|
158
199
|
- spec/action_expects_and_promises_spec.rb
|
@@ -215,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
256
|
- !ruby/object:Gem::Version
|
216
257
|
version: '0'
|
217
258
|
requirements: []
|
218
|
-
rubygems_version: 3.
|
259
|
+
rubygems_version: 3.1.3
|
219
260
|
signing_key:
|
220
261
|
specification_version: 4
|
221
262
|
summary: A service skeleton with an emphasis on simplicity with a pinch a functional
|
@@ -239,7 +280,6 @@ test_files:
|
|
239
280
|
- spec/acceptance/organizer/reduce_until_spec.rb
|
240
281
|
- spec/acceptance/organizer/with_callback_spec.rb
|
241
282
|
- spec/acceptance/rollback_spec.rb
|
242
|
-
- spec/acceptance/skip_all_warning_spec.rb
|
243
283
|
- spec/acceptance/testing/context_factory_spec.rb
|
244
284
|
- spec/action_expected_keys_spec.rb
|
245
285
|
- spec/action_expects_and_promises_spec.rb
|
@@ -1,82 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../
|
3
|
-
specs:
|
4
|
-
light-service (0.6.1)
|
5
|
-
activesupport (>= 3.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activesupport (5.0.0.1)
|
11
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
-
i18n (~> 0.7)
|
13
|
-
minitest (~> 5.1)
|
14
|
-
tzinfo (~> 1.1)
|
15
|
-
appraisal (2.1.0)
|
16
|
-
bundler
|
17
|
-
rake
|
18
|
-
thor (>= 0.14.0)
|
19
|
-
ast (2.3.0)
|
20
|
-
coderay (1.1.1)
|
21
|
-
concurrent-ruby (1.0.2)
|
22
|
-
diff-lcs (1.2.5)
|
23
|
-
docile (1.1.5)
|
24
|
-
i18n (0.7.0)
|
25
|
-
json (2.0.2)
|
26
|
-
method_source (0.8.2)
|
27
|
-
minitest (5.9.0)
|
28
|
-
parser (2.3.1.2)
|
29
|
-
ast (~> 2.2)
|
30
|
-
powerpack (0.1.1)
|
31
|
-
pry (0.10.4)
|
32
|
-
coderay (~> 1.1.0)
|
33
|
-
method_source (~> 0.8.1)
|
34
|
-
slop (~> 3.4)
|
35
|
-
rainbow (2.1.0)
|
36
|
-
rake (11.2.2)
|
37
|
-
rspec (3.5.0)
|
38
|
-
rspec-core (~> 3.5.0)
|
39
|
-
rspec-expectations (~> 3.5.0)
|
40
|
-
rspec-mocks (~> 3.5.0)
|
41
|
-
rspec-core (3.5.2)
|
42
|
-
rspec-support (~> 3.5.0)
|
43
|
-
rspec-expectations (3.5.0)
|
44
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.5.0)
|
46
|
-
rspec-mocks (3.5.0)
|
47
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
-
rspec-support (~> 3.5.0)
|
49
|
-
rspec-support (3.5.0)
|
50
|
-
rubocop (0.42.0)
|
51
|
-
parser (>= 2.3.1.1, < 3.0)
|
52
|
-
powerpack (~> 0.1)
|
53
|
-
rainbow (>= 1.99.1, < 3.0)
|
54
|
-
ruby-progressbar (~> 1.7)
|
55
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
56
|
-
ruby-progressbar (1.8.1)
|
57
|
-
simplecov (0.12.0)
|
58
|
-
docile (~> 1.1.0)
|
59
|
-
json (>= 1.8, < 3)
|
60
|
-
simplecov-html (~> 0.10.0)
|
61
|
-
simplecov-html (0.10.0)
|
62
|
-
slop (3.6.0)
|
63
|
-
thor (0.19.1)
|
64
|
-
thread_safe (0.3.5)
|
65
|
-
tzinfo (1.2.2)
|
66
|
-
thread_safe (~> 0.1)
|
67
|
-
unicode-display_width (1.1.1)
|
68
|
-
|
69
|
-
PLATFORMS
|
70
|
-
ruby
|
71
|
-
|
72
|
-
DEPENDENCIES
|
73
|
-
activesupport (~> 5.0)
|
74
|
-
appraisal (~> 2.0)
|
75
|
-
light-service!
|
76
|
-
pry (~> 0.10)
|
77
|
-
rspec (~> 3.0)
|
78
|
-
rubocop (~> 0.36)
|
79
|
-
simplecov (~> 0.11)
|
80
|
-
|
81
|
-
BUNDLED WITH
|
82
|
-
1.12.5
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
RSpec.describe "skip_all! has been deprecated" do
|
4
|
-
it "is now skip_remaining!" do
|
5
|
-
class SkipAllDeprecatedAction
|
6
|
-
extend FunctionalLightService::Action
|
7
|
-
|
8
|
-
executed do |ctx|
|
9
|
-
ctx.skip_all!("No need to execute other actions.")
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
expected_msg = "Using skip_all! has been deprecated, " \
|
14
|
-
"please use `skip_remaining!` instead."
|
15
|
-
expect(ActiveSupport::Deprecation).to receive(:warn)
|
16
|
-
.with(expected_msg)
|
17
|
-
|
18
|
-
SkipAllDeprecatedAction.execute
|
19
|
-
end
|
20
|
-
end
|