cuprum 1.3.0.rc.0 → 1.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +8 -1
- data/lib/cuprum/result.rb +1 -1
- data/lib/cuprum/rspec/be_a_result_matcher.rb +2 -2
- data/lib/cuprum/version.rb +3 -3
- metadata +13 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14265461b44d0a9546c04be4d5a66605d285e35ead5740e346875287b88e38b7
|
|
4
|
+
data.tar.gz: 3730d8d83bf5382cdedd1fb8cb88684f615e2e3082ae4ae00cc61d77caa392d5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0fd517bac27cad11527308fbb2aa1a65b85b42e9ae10e870583eb5f52be807b913a3931dc15ce2d11ef576824b9220a46ba23466a402080d6e15d3832c55f59a
|
|
7
|
+
data.tar.gz: 0e5330ab7482b7ed596a09159fff5ad2bd8600410e9a8381759d965a2f6ee902295220748d6e1d335dcca025d8c40d20bca313abb0119eb814b8cf61d3fbfed0
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
# Cuprum
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Cuprum is a toolkit for defining business logic as a first-class member of your application. It bridges object-oriented and functional programming techniques to provide a structured approach to defining actions, state transitions, and other processes for your application.
|
|
4
|
+
|
|
5
|
+
<blockquote>
|
|
6
|
+
Read The
|
|
7
|
+
<a href="https://www.sleepingkingstudios.com/cuprum" target="_blank">
|
|
8
|
+
Documentation
|
|
9
|
+
</a>
|
|
10
|
+
</blockquote>
|
|
4
11
|
|
|
5
12
|
Cuprum defines a Command object, which is a callable object that encapsulates some piece of business logic. Each call to a Command returns a Result with a status and optionally data or an error object. As objects, Commands can be passed as parameters, returned from methods (or other Commands). Commands also define a #step method, which can be used to gracefully handle failure states and define complex operations by combining simpler components.
|
|
6
13
|
|
data/lib/cuprum/result.rb
CHANGED
|
@@ -104,7 +104,7 @@ module Cuprum::RSpec
|
|
|
104
104
|
# @param actual [Object] the actual object to match.
|
|
105
105
|
#
|
|
106
106
|
# @return [Boolean] false if the actual object is a result; otherwise true.
|
|
107
|
-
def does_not_match?(actual) # rubocop:disable Naming/
|
|
107
|
+
def does_not_match?(actual) # rubocop:disable Naming/PredicatePrefix
|
|
108
108
|
@actual = actual
|
|
109
109
|
|
|
110
110
|
raise ArgumentError, negated_matcher_warning if expected_properties?
|
|
@@ -210,7 +210,7 @@ module Cuprum::RSpec
|
|
|
210
210
|
result.error.is_a?(Cuprum::Errors::OperationNotCalled)
|
|
211
211
|
end
|
|
212
212
|
|
|
213
|
-
def compare_items(expected, actual)
|
|
213
|
+
def compare_items(expected, actual) # rubocop:disable Naming/PredicateMethod
|
|
214
214
|
return expected.matches?(actual) if expected.respond_to?(:matches?)
|
|
215
215
|
|
|
216
216
|
expected == actual
|
data/lib/cuprum/version.rb
CHANGED
|
@@ -12,11 +12,11 @@ module Cuprum
|
|
|
12
12
|
# Minor version.
|
|
13
13
|
MINOR = 3
|
|
14
14
|
# Patch version.
|
|
15
|
-
PATCH =
|
|
15
|
+
PATCH = 1
|
|
16
16
|
# Prerelease version.
|
|
17
|
-
PRERELEASE =
|
|
17
|
+
PRERELEASE = nil
|
|
18
18
|
# Build metadata.
|
|
19
|
-
BUILD =
|
|
19
|
+
BUILD = nil
|
|
20
20
|
|
|
21
21
|
class << self
|
|
22
22
|
# Generates the gem version string from the Version constants.
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cuprum
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rob "Merlin" Smith
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: sleeping_king_studios-tools
|
|
@@ -16,6 +16,9 @@ dependencies:
|
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
18
|
version: '1.2'
|
|
19
|
+
- - ">="
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 1.2.1
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -23,6 +26,9 @@ dependencies:
|
|
|
23
26
|
- - "~>"
|
|
24
27
|
- !ruby/object:Gem::Version
|
|
25
28
|
version: '1.2'
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: 1.2.1
|
|
26
32
|
description: |-
|
|
27
33
|
An opinionated implementation of the Command pattern for Ruby applications.
|
|
28
34
|
Cuprum wraps your business logic in a consistent, object-oriented interface
|
|
@@ -94,16 +100,19 @@ require_paths:
|
|
|
94
100
|
- lib
|
|
95
101
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
96
102
|
requirements:
|
|
97
|
-
- - "
|
|
103
|
+
- - ">="
|
|
98
104
|
- !ruby/object:Gem::Version
|
|
99
105
|
version: '3.1'
|
|
106
|
+
- - "<"
|
|
107
|
+
- !ruby/object:Gem::Version
|
|
108
|
+
version: '5'
|
|
100
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
110
|
requirements:
|
|
102
111
|
- - ">="
|
|
103
112
|
- !ruby/object:Gem::Version
|
|
104
113
|
version: '0'
|
|
105
114
|
requirements: []
|
|
106
|
-
rubygems_version:
|
|
115
|
+
rubygems_version: 4.0.2
|
|
107
116
|
specification_version: 4
|
|
108
117
|
summary: An opinionated implementation of the Command pattern.
|
|
109
118
|
test_files: []
|