easy_command 1.0.0.pre.rc3 → 1.0.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 +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +16 -0
- data/README.md +53 -36
- data/lib/easy_command/spec_helpers/mock_command_helper.rb +3 -3
- data/lib/easy_command/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b45f334c0c48dfc490d81c9000ab136aa0fa088b533a7a86be8158a8256c869
|
4
|
+
data.tar.gz: 960fc70115c7b808907afd19d1351071d4e80a5f4bc2257983596b950daef2ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49ac077ef6479ec840f616c7490558d42e9c7d2542216cd3af21c77bdbb6db00aba5d09cce90d36d9f6723440894b385269a3b84755c0ecf22c49152e61c0f53
|
7
|
+
data.tar.gz: f4a57dcdd044e6ce596e8eabf9b7fbdf55a63b267a0332ceb0ca24dfe532effa339e7961742e3387ad7e411b7513c66c6bc9ac4c9e8ff05667a5b3fefdde40d9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.0.1](https://github.com/Swile/easy_command/compare/v1.0.0...v1.0.1) (2024-08-07)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* Refresh Table of Contents ([25f496f](https://github.com/Swile/easy_command/commit/25f496f91266f1b70c372a6e75c66e4dcfdcfb31))
|
9
|
+
* rename last uses of `Command` into `EasyCommand` ([#22](https://github.com/Swile/easy_command/issues/22)) ([d7ec6ff](https://github.com/Swile/easy_command/commit/d7ec6ffad0014c6514dda76d189120c3df38238d))
|
10
|
+
|
11
|
+
## [1.0.0](https://github.com/Swile/easy_command/compare/v1.0.0-rc3...v1.0.0) (2024-06-20)
|
12
|
+
|
13
|
+
|
14
|
+
### Features
|
15
|
+
|
16
|
+
* Official 1.0 release ([f6efbf9](https://github.com/Swile/easy_command/commit/f6efbf937f903b5e1febfe7955997b6c669d33ca))
|
17
|
+
* Update README with attribution in view of official release ([4891f17](https://github.com/Swile/easy_command/commit/4891f176c1a2ef81848c5aad2ac24275a48080d5))
|
18
|
+
|
3
19
|
## [1.0.0-rc3](https://github.com/Swile/easy_command/compare/v1.0.0-rc2...v1.0.0-rc3) (2024-06-20)
|
4
20
|
|
5
21
|
|
data/README.md
CHANGED
@@ -5,42 +5,38 @@ A simple, standardized way to build and use _Service Objects_ in Ruby.
|
|
5
5
|
Table of Contents
|
6
6
|
=================
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
- [Usage](#usage-2)
|
41
|
-
|
42
|
-
|
43
|
-
Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
|
8
|
+
* [Requirements](#requirements)
|
9
|
+
* [Installation](#installation)
|
10
|
+
* [Contributing](#contributing)
|
11
|
+
* [Publication](#publication)
|
12
|
+
* [Automated](#automated)
|
13
|
+
* [Usage](#usage)
|
14
|
+
* [Returned objects](#returned-objects)
|
15
|
+
* [Subcommand](#subcommand)
|
16
|
+
* [Command chaining](#command-chaining)
|
17
|
+
* [Flow success callbacks](#flow-success-callbacks)
|
18
|
+
* [Merge errors from ActiveRecord instance](#merge-errors-from-activerecord-instance)
|
19
|
+
* [Stopping execution of the command](#stopping-execution-of-the-command)
|
20
|
+
* [abort](#abort)
|
21
|
+
* [assert](#assert)
|
22
|
+
* [ExitError](#exiterror)
|
23
|
+
* [Callback](#callback)
|
24
|
+
* [#on_success](#on_success)
|
25
|
+
* [Error message](#error-message)
|
26
|
+
* [Default scope](#default-scope)
|
27
|
+
* [Example](#example)
|
28
|
+
* [Test with Rspec](#test-with-rspec)
|
29
|
+
* [Mock](#mock)
|
30
|
+
* [Setup](#setup)
|
31
|
+
* [Usage](#usage-1)
|
32
|
+
* [Matchers](#matchers)
|
33
|
+
* [Setup](#setup-1)
|
34
|
+
* [Rails project](#rails-project)
|
35
|
+
* [Usage](#usage-2)
|
36
|
+
* [Using as Command](#using-as-command)
|
37
|
+
* [Acknowledgements](#acknowledgements)
|
38
|
+
|
39
|
+
<!-- Created by https://github.com/ekalinin/github-markdown-toc -->
|
44
40
|
|
45
41
|
# Requirements
|
46
42
|
|
@@ -749,3 +745,24 @@ Requiring `easy_command/as_command` defines a `Command` alias that should provid
|
|
749
745
|
|
750
746
|
**Also: do remember that any other `require`s should still be updated to `easy_command` though.**
|
751
747
|
For example `require 'easy_command/spec_helpers'`.
|
748
|
+
|
749
|
+
# Acknowledgements
|
750
|
+
|
751
|
+
This gem is a fork of the [simple_command](https://github.com/nebulab/simple_command) gem. Thanks for their initial work.
|
752
|
+
|
753
|
+
We also thank all the contributors at Swile that took part in the internal development of this gem:
|
754
|
+
- Jérémie Bonal
|
755
|
+
- Alexandre Lamandé
|
756
|
+
- Champier Cyril
|
757
|
+
- Dorian Coffinet
|
758
|
+
- Guillaume Charneau
|
759
|
+
- Matthew Nguyen
|
760
|
+
- Benoît Barbe
|
761
|
+
- Cédric Murer
|
762
|
+
- Marine Sourin
|
763
|
+
- Jean-Yves Rivallan
|
764
|
+
- Houssem Eddine Bousselmi
|
765
|
+
- Julien Bouyoud
|
766
|
+
- Didier Bernaudeau
|
767
|
+
- Charles Duporge
|
768
|
+
- Pierre-Julien D'alberto
|
@@ -31,7 +31,7 @@ module EasyCommand
|
|
31
31
|
klass = Object.const_get('FakeCommandErrors')
|
32
32
|
else
|
33
33
|
klass = Object.const_set 'FakeCommandErrors', Class.new
|
34
|
-
klass.prepend
|
34
|
+
klass.prepend EasyCommand
|
35
35
|
end
|
36
36
|
fake_command = klass.new
|
37
37
|
if errors.any?
|
@@ -46,9 +46,9 @@ module EasyCommand
|
|
46
46
|
allow(double).to receive(:errors).and_return(fake_command.errors)
|
47
47
|
monad =
|
48
48
|
if success
|
49
|
-
|
49
|
+
EasyCommand::Success.new(result)
|
50
50
|
else
|
51
|
-
|
51
|
+
EasyCommand::Failure.new(result).with_errors(fake_command.errors)
|
52
52
|
end
|
53
53
|
allow(double).to receive(:call).and_return(monad)
|
54
54
|
allow(double).to receive(:on_success).and_return(double)
|
data/lib/easy_command/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_command
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swile
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -92,9 +92,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
92
92
|
version: '2.7'
|
93
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - "
|
95
|
+
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version:
|
97
|
+
version: '0'
|
98
98
|
requirements: []
|
99
99
|
rubygems_version: 3.1.6
|
100
100
|
signing_key:
|