metaractor 3.3.4 → 3.3.5
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/.github/workflows/release.yml +37 -0
- data/.github/workflows/specs.yml +6 -5
- data/.gitignore +0 -5
- data/.ruby-version +1 -1
- data/lib/metaractor/context_errors.rb +10 -0
- data/lib/metaractor/context_methods.rb +29 -0
- data/lib/metaractor/version.rb +1 -1
- data/lib/metaractor.rb +1 -3
- data/metaractor.gemspec +6 -5
- metadata +29 -24
- data/.envrc +0 -5
- data/flake.lock +0 -417
- data/flake.nix +0 -67
- data/lib/metaractor/context_has_key.rb +0 -9
- data/lib/metaractor/context_validity.rb +0 -17
- data/lib/metaractor/fail_from_context.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba4a53b90f455fc6e2940aaabe62e2a88b64657feb57cba562b7456c68ed5cc8
|
4
|
+
data.tar.gz: c0f76bccfd5ad86a9ed9a2e0212b84512ceb56ab26426c0ea67251531a7e7498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0be2757b00ef748691d6d62b3021e6ce2fe481826d042da3ab27da93ba8ce1eaed4aabe73c069082683409cccdfd6510b3b8a137689ecc87ac1a3f641ed3892d
|
7
|
+
data.tar.gz: '090b6cba71a3b1a48c322ffb110dcb09b6eb77f87c6ac153b3a143c13e1525310fe3694aa50435a18dd5bc8b9ceb120087f9a8b65d6f74eee0a8c0c96b4820c7'
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
workflow_dispatch:
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
push:
|
8
|
+
name: Push gem
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
environment: rubygems
|
11
|
+
|
12
|
+
permissions:
|
13
|
+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
14
|
+
contents: write # IMPORTANT: this permission is required for `rake release` to push the release tag
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v4
|
18
|
+
- uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
21
|
+
ruby-version: ruby # Use latest ruby
|
22
|
+
|
23
|
+
- name: Set Environment Variables
|
24
|
+
run: |
|
25
|
+
version=$(ruby -e 'require_relative "lib/metaractor/version.rb"; puts Metaractor::VERSION')
|
26
|
+
echo "APP_VERSION=$version" >> $GITHUB_ENV
|
27
|
+
|
28
|
+
# Release
|
29
|
+
- uses: rubygems/release-gem@v1
|
30
|
+
|
31
|
+
# GitHub release
|
32
|
+
- uses: ncipollo/release-action@v1
|
33
|
+
with:
|
34
|
+
artifacts: "pkg/*.gem"
|
35
|
+
generateReleaseNotes: true
|
36
|
+
skipIfReleaseExists: true
|
37
|
+
tag: ${{ env.APP_VERSION }}
|
data/.github/workflows/specs.yml
CHANGED
@@ -6,8 +6,9 @@ jobs:
|
|
6
6
|
test:
|
7
7
|
runs-on: ubuntu-latest
|
8
8
|
steps:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
- uses: actions/checkout@v4
|
10
|
+
- uses: ruby/setup-ruby@v1
|
11
|
+
with:
|
12
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
13
|
+
|
14
|
+
- run: bundle exec rspec spec
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.4.4
|
@@ -27,6 +27,8 @@ module Metaractor
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def add_errors(messages: [], errors: {}, **args)
|
30
|
+
retry! if args.delete(:retry)
|
31
|
+
|
30
32
|
if !messages.empty?
|
31
33
|
self.errors.add(errors: {base: messages}, **args)
|
32
34
|
else
|
@@ -37,6 +39,14 @@ module Metaractor
|
|
37
39
|
def error_messages
|
38
40
|
errors.full_messages
|
39
41
|
end
|
42
|
+
|
43
|
+
def fail_from_context(context:)
|
44
|
+
return if context.equal?(self)
|
45
|
+
|
46
|
+
invalidate! if context.invalid?
|
47
|
+
add_errors(errors: context.errors.to_h)
|
48
|
+
@failure = true
|
49
|
+
end
|
40
50
|
end
|
41
51
|
end
|
42
52
|
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Metaractor
|
2
|
+
module ContextMethods
|
3
|
+
def valid?
|
4
|
+
!invalid?
|
5
|
+
end
|
6
|
+
|
7
|
+
def invalid?
|
8
|
+
@invalid || false
|
9
|
+
end
|
10
|
+
|
11
|
+
def invalidate!
|
12
|
+
@invalid = true
|
13
|
+
end
|
14
|
+
|
15
|
+
def has_key?(key)
|
16
|
+
@table.has_key?(key.to_sym)
|
17
|
+
end
|
18
|
+
|
19
|
+
def retry?
|
20
|
+
@retry || false
|
21
|
+
end
|
22
|
+
|
23
|
+
def retry!
|
24
|
+
@retry = true
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
Interactor::Context.send(:include, Metaractor::ContextMethods)
|
data/lib/metaractor/version.rb
CHANGED
data/lib/metaractor.rb
CHANGED
@@ -3,12 +3,10 @@ require "interactor"
|
|
3
3
|
require "metaractor/errors"
|
4
4
|
require "metaractor/handle_errors"
|
5
5
|
require "metaractor/context_errors"
|
6
|
+
require "metaractor/context_methods"
|
6
7
|
require "metaractor/parameters"
|
7
8
|
require "metaractor/run_with_context"
|
8
|
-
require "metaractor/context_validity"
|
9
9
|
require "metaractor/chain_failures"
|
10
|
-
require "metaractor/fail_from_context"
|
11
|
-
require "metaractor/context_has_key"
|
12
10
|
require "metaractor/failure_output"
|
13
11
|
require "i18n"
|
14
12
|
require "metaractor/namespace"
|
data/metaractor.gemspec
CHANGED
@@ -22,12 +22,13 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.add_runtime_dependency "interactor", "~> 3.1"
|
24
24
|
spec.add_runtime_dependency "metaractor-sycamore", "~> 0.4", ">= 0.4.3"
|
25
|
-
spec.add_runtime_dependency "i18n", "~> 1.
|
25
|
+
spec.add_runtime_dependency "i18n", "~> 1.14"
|
26
|
+
spec.add_runtime_dependency "ostruct", "~> 0.6"
|
26
27
|
|
27
28
|
spec.add_development_dependency "bundler", "~> 2"
|
28
29
|
spec.add_development_dependency "rake", "~> 13.0"
|
29
|
-
spec.add_development_dependency "rspec", "~> 3.
|
30
|
-
spec.add_development_dependency "
|
31
|
-
spec.add_development_dependency "
|
32
|
-
spec.add_development_dependency "activemodel", "~>
|
30
|
+
spec.add_development_dependency "rspec", "~> 3.13"
|
31
|
+
spec.add_development_dependency "amazing_print", "~> 1.8"
|
32
|
+
spec.add_development_dependency "debug", "~> 1.10"
|
33
|
+
spec.add_development_dependency "activemodel", "~> 8"
|
33
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metaractor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Schlesinger
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: interactor
|
@@ -50,14 +49,28 @@ dependencies:
|
|
50
49
|
requirements:
|
51
50
|
- - "~>"
|
52
51
|
- !ruby/object:Gem::Version
|
53
|
-
version: '1.
|
52
|
+
version: '1.14'
|
54
53
|
type: :runtime
|
55
54
|
prerelease: false
|
56
55
|
version_requirements: !ruby/object:Gem::Requirement
|
57
56
|
requirements:
|
58
57
|
- - "~>"
|
59
58
|
- !ruby/object:Gem::Version
|
60
|
-
version: '1.
|
59
|
+
version: '1.14'
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: ostruct
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0.6'
|
67
|
+
type: :runtime
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0.6'
|
61
74
|
- !ruby/object:Gem::Dependency
|
62
75
|
name: bundler
|
63
76
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,16 +105,16 @@ dependencies:
|
|
92
105
|
requirements:
|
93
106
|
- - "~>"
|
94
107
|
- !ruby/object:Gem::Version
|
95
|
-
version: '3.
|
108
|
+
version: '3.13'
|
96
109
|
type: :development
|
97
110
|
prerelease: false
|
98
111
|
version_requirements: !ruby/object:Gem::Requirement
|
99
112
|
requirements:
|
100
113
|
- - "~>"
|
101
114
|
- !ruby/object:Gem::Version
|
102
|
-
version: '3.
|
115
|
+
version: '3.13'
|
103
116
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
117
|
+
name: amazing_print
|
105
118
|
requirement: !ruby/object:Gem::Requirement
|
106
119
|
requirements:
|
107
120
|
- - "~>"
|
@@ -115,41 +128,40 @@ dependencies:
|
|
115
128
|
- !ruby/object:Gem::Version
|
116
129
|
version: '1.8'
|
117
130
|
- !ruby/object:Gem::Dependency
|
118
|
-
name:
|
131
|
+
name: debug
|
119
132
|
requirement: !ruby/object:Gem::Requirement
|
120
133
|
requirements:
|
121
134
|
- - "~>"
|
122
135
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
136
|
+
version: '1.10'
|
124
137
|
type: :development
|
125
138
|
prerelease: false
|
126
139
|
version_requirements: !ruby/object:Gem::Requirement
|
127
140
|
requirements:
|
128
141
|
- - "~>"
|
129
142
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
143
|
+
version: '1.10'
|
131
144
|
- !ruby/object:Gem::Dependency
|
132
145
|
name: activemodel
|
133
146
|
requirement: !ruby/object:Gem::Requirement
|
134
147
|
requirements:
|
135
148
|
- - "~>"
|
136
149
|
- !ruby/object:Gem::Version
|
137
|
-
version: '
|
150
|
+
version: '8'
|
138
151
|
type: :development
|
139
152
|
prerelease: false
|
140
153
|
version_requirements: !ruby/object:Gem::Requirement
|
141
154
|
requirements:
|
142
155
|
- - "~>"
|
143
156
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
145
|
-
description:
|
157
|
+
version: '8'
|
146
158
|
email:
|
147
159
|
- ryan@ryanschlesinger.com
|
148
160
|
executables: []
|
149
161
|
extensions: []
|
150
162
|
extra_rdoc_files: []
|
151
163
|
files:
|
152
|
-
- ".
|
164
|
+
- ".github/workflows/release.yml"
|
153
165
|
- ".github/workflows/specs.yml"
|
154
166
|
- ".gitignore"
|
155
167
|
- ".rspec"
|
@@ -158,15 +170,11 @@ files:
|
|
158
170
|
- LICENSE
|
159
171
|
- README.md
|
160
172
|
- Rakefile
|
161
|
-
- flake.lock
|
162
|
-
- flake.nix
|
163
173
|
- lib/metaractor.rb
|
164
174
|
- lib/metaractor/chain_failures.rb
|
165
175
|
- lib/metaractor/context_errors.rb
|
166
|
-
- lib/metaractor/
|
167
|
-
- lib/metaractor/context_validity.rb
|
176
|
+
- lib/metaractor/context_methods.rb
|
168
177
|
- lib/metaractor/errors.rb
|
169
|
-
- lib/metaractor/fail_from_context.rb
|
170
178
|
- lib/metaractor/failure_output.rb
|
171
179
|
- lib/metaractor/handle_errors.rb
|
172
180
|
- lib/metaractor/namespace.rb
|
@@ -176,13 +184,11 @@ files:
|
|
176
184
|
- lib/metaractor/spec.rb
|
177
185
|
- lib/metaractor/version.rb
|
178
186
|
- metaractor.gemspec
|
179
|
-
homepage:
|
180
187
|
licenses:
|
181
188
|
- Apache-2.0
|
182
189
|
metadata:
|
183
190
|
homepage_uri: https://github.com/metaractor/metaractor
|
184
191
|
source_code_uri: https://github.com/metaractor/metaractor
|
185
|
-
post_install_message:
|
186
192
|
rdoc_options: []
|
187
193
|
require_paths:
|
188
194
|
- lib
|
@@ -197,8 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
203
|
- !ruby/object:Gem::Version
|
198
204
|
version: '0'
|
199
205
|
requirements: []
|
200
|
-
rubygems_version: 3.
|
201
|
-
signing_key:
|
206
|
+
rubygems_version: 3.6.7
|
202
207
|
specification_version: 4
|
203
208
|
summary: Adds parameter validation and error control to interactor
|
204
209
|
test_files: []
|
data/.envrc
DELETED
data/flake.lock
DELETED
@@ -1,417 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"nodes": {
|
3
|
-
"dev-cli": {
|
4
|
-
"inputs": {
|
5
|
-
"flake-compat": "flake-compat",
|
6
|
-
"flake-parts": "flake-parts",
|
7
|
-
"nixpkgs": [
|
8
|
-
"nixpkgs"
|
9
|
-
]
|
10
|
-
},
|
11
|
-
"locked": {
|
12
|
-
"lastModified": 1688133858,
|
13
|
-
"narHash": "sha256-UeibsB2V5vozsqJAazx36d9oRmzXqlid8cpRdE9Hj1c=",
|
14
|
-
"owner": "detaso",
|
15
|
-
"repo": "dev-cli",
|
16
|
-
"rev": "bb6f0c892a67e90efd8119d5ceb0873b48b28e68",
|
17
|
-
"type": "github"
|
18
|
-
},
|
19
|
-
"original": {
|
20
|
-
"owner": "detaso",
|
21
|
-
"repo": "dev-cli",
|
22
|
-
"type": "github"
|
23
|
-
}
|
24
|
-
},
|
25
|
-
"devenv": {
|
26
|
-
"inputs": {
|
27
|
-
"flake-compat": "flake-compat_2",
|
28
|
-
"nix": "nix",
|
29
|
-
"nixpkgs": "nixpkgs",
|
30
|
-
"pre-commit-hooks": "pre-commit-hooks"
|
31
|
-
},
|
32
|
-
"locked": {
|
33
|
-
"lastModified": 1688639977,
|
34
|
-
"narHash": "sha256-nLpc6Qr3HB+xGVTkl9lrEpr06vGf4khuxG/7ay3gNuI=",
|
35
|
-
"owner": "cachix",
|
36
|
-
"repo": "devenv",
|
37
|
-
"rev": "b98d24ddc6d46252df1920fea44241f8fb6e45b2",
|
38
|
-
"type": "github"
|
39
|
-
},
|
40
|
-
"original": {
|
41
|
-
"owner": "cachix",
|
42
|
-
"repo": "devenv",
|
43
|
-
"type": "github"
|
44
|
-
}
|
45
|
-
},
|
46
|
-
"flake-compat": {
|
47
|
-
"flake": false,
|
48
|
-
"locked": {
|
49
|
-
"lastModified": 1673956053,
|
50
|
-
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
51
|
-
"owner": "edolstra",
|
52
|
-
"repo": "flake-compat",
|
53
|
-
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
54
|
-
"type": "github"
|
55
|
-
},
|
56
|
-
"original": {
|
57
|
-
"owner": "edolstra",
|
58
|
-
"repo": "flake-compat",
|
59
|
-
"type": "github"
|
60
|
-
}
|
61
|
-
},
|
62
|
-
"flake-compat_2": {
|
63
|
-
"flake": false,
|
64
|
-
"locked": {
|
65
|
-
"lastModified": 1673956053,
|
66
|
-
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
67
|
-
"owner": "edolstra",
|
68
|
-
"repo": "flake-compat",
|
69
|
-
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
70
|
-
"type": "github"
|
71
|
-
},
|
72
|
-
"original": {
|
73
|
-
"owner": "edolstra",
|
74
|
-
"repo": "flake-compat",
|
75
|
-
"type": "github"
|
76
|
-
}
|
77
|
-
},
|
78
|
-
"flake-compat_3": {
|
79
|
-
"flake": false,
|
80
|
-
"locked": {
|
81
|
-
"lastModified": 1673956053,
|
82
|
-
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
83
|
-
"owner": "edolstra",
|
84
|
-
"repo": "flake-compat",
|
85
|
-
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
86
|
-
"type": "github"
|
87
|
-
},
|
88
|
-
"original": {
|
89
|
-
"owner": "edolstra",
|
90
|
-
"repo": "flake-compat",
|
91
|
-
"type": "github"
|
92
|
-
}
|
93
|
-
},
|
94
|
-
"flake-parts": {
|
95
|
-
"inputs": {
|
96
|
-
"nixpkgs-lib": "nixpkgs-lib"
|
97
|
-
},
|
98
|
-
"locked": {
|
99
|
-
"lastModified": 1687762428,
|
100
|
-
"narHash": "sha256-DIf7mi45PKo+s8dOYF+UlXHzE0Wl/+k3tXUyAoAnoGE=",
|
101
|
-
"owner": "hercules-ci",
|
102
|
-
"repo": "flake-parts",
|
103
|
-
"rev": "37dd7bb15791c86d55c5121740a1887ab55ee836",
|
104
|
-
"type": "github"
|
105
|
-
},
|
106
|
-
"original": {
|
107
|
-
"owner": "hercules-ci",
|
108
|
-
"repo": "flake-parts",
|
109
|
-
"type": "github"
|
110
|
-
}
|
111
|
-
},
|
112
|
-
"flake-parts_2": {
|
113
|
-
"inputs": {
|
114
|
-
"nixpkgs-lib": "nixpkgs-lib_2"
|
115
|
-
},
|
116
|
-
"locked": {
|
117
|
-
"lastModified": 1688466019,
|
118
|
-
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=",
|
119
|
-
"owner": "hercules-ci",
|
120
|
-
"repo": "flake-parts",
|
121
|
-
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec",
|
122
|
-
"type": "github"
|
123
|
-
},
|
124
|
-
"original": {
|
125
|
-
"id": "flake-parts",
|
126
|
-
"type": "indirect"
|
127
|
-
}
|
128
|
-
},
|
129
|
-
"flake-utils": {
|
130
|
-
"inputs": {
|
131
|
-
"systems": "systems"
|
132
|
-
},
|
133
|
-
"locked": {
|
134
|
-
"lastModified": 1685518550,
|
135
|
-
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
136
|
-
"owner": "numtide",
|
137
|
-
"repo": "flake-utils",
|
138
|
-
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
139
|
-
"type": "github"
|
140
|
-
},
|
141
|
-
"original": {
|
142
|
-
"owner": "numtide",
|
143
|
-
"repo": "flake-utils",
|
144
|
-
"type": "github"
|
145
|
-
}
|
146
|
-
},
|
147
|
-
"flake-utils_2": {
|
148
|
-
"locked": {
|
149
|
-
"lastModified": 1667395993,
|
150
|
-
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
151
|
-
"owner": "numtide",
|
152
|
-
"repo": "flake-utils",
|
153
|
-
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
154
|
-
"type": "github"
|
155
|
-
},
|
156
|
-
"original": {
|
157
|
-
"owner": "numtide",
|
158
|
-
"repo": "flake-utils",
|
159
|
-
"type": "github"
|
160
|
-
}
|
161
|
-
},
|
162
|
-
"gitignore": {
|
163
|
-
"inputs": {
|
164
|
-
"nixpkgs": [
|
165
|
-
"devenv",
|
166
|
-
"pre-commit-hooks",
|
167
|
-
"nixpkgs"
|
168
|
-
]
|
169
|
-
},
|
170
|
-
"locked": {
|
171
|
-
"lastModified": 1660459072,
|
172
|
-
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
173
|
-
"owner": "hercules-ci",
|
174
|
-
"repo": "gitignore.nix",
|
175
|
-
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
176
|
-
"type": "github"
|
177
|
-
},
|
178
|
-
"original": {
|
179
|
-
"owner": "hercules-ci",
|
180
|
-
"repo": "gitignore.nix",
|
181
|
-
"type": "github"
|
182
|
-
}
|
183
|
-
},
|
184
|
-
"lowdown-src": {
|
185
|
-
"flake": false,
|
186
|
-
"locked": {
|
187
|
-
"lastModified": 1633514407,
|
188
|
-
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
|
189
|
-
"owner": "kristapsdz",
|
190
|
-
"repo": "lowdown",
|
191
|
-
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
|
192
|
-
"type": "github"
|
193
|
-
},
|
194
|
-
"original": {
|
195
|
-
"owner": "kristapsdz",
|
196
|
-
"repo": "lowdown",
|
197
|
-
"type": "github"
|
198
|
-
}
|
199
|
-
},
|
200
|
-
"nix": {
|
201
|
-
"inputs": {
|
202
|
-
"lowdown-src": "lowdown-src",
|
203
|
-
"nixpkgs": [
|
204
|
-
"devenv",
|
205
|
-
"nixpkgs"
|
206
|
-
],
|
207
|
-
"nixpkgs-regression": "nixpkgs-regression"
|
208
|
-
},
|
209
|
-
"locked": {
|
210
|
-
"lastModified": 1676545802,
|
211
|
-
"narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=",
|
212
|
-
"owner": "domenkozar",
|
213
|
-
"repo": "nix",
|
214
|
-
"rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f",
|
215
|
-
"type": "github"
|
216
|
-
},
|
217
|
-
"original": {
|
218
|
-
"owner": "domenkozar",
|
219
|
-
"ref": "relaxed-flakes",
|
220
|
-
"repo": "nix",
|
221
|
-
"type": "github"
|
222
|
-
}
|
223
|
-
},
|
224
|
-
"nixpkgs": {
|
225
|
-
"locked": {
|
226
|
-
"lastModified": 1678875422,
|
227
|
-
"narHash": "sha256-T3o6NcQPwXjxJMn2shz86Chch4ljXgZn746c2caGxd8=",
|
228
|
-
"owner": "NixOS",
|
229
|
-
"repo": "nixpkgs",
|
230
|
-
"rev": "126f49a01de5b7e35a43fd43f891ecf6d3a51459",
|
231
|
-
"type": "github"
|
232
|
-
},
|
233
|
-
"original": {
|
234
|
-
"owner": "NixOS",
|
235
|
-
"ref": "nixpkgs-unstable",
|
236
|
-
"repo": "nixpkgs",
|
237
|
-
"type": "github"
|
238
|
-
}
|
239
|
-
},
|
240
|
-
"nixpkgs-lib": {
|
241
|
-
"locked": {
|
242
|
-
"dir": "lib",
|
243
|
-
"lastModified": 1685564631,
|
244
|
-
"narHash": "sha256-8ywr3AkblY4++3lIVxmrWZFzac7+f32ZEhH/A8pNscI=",
|
245
|
-
"owner": "NixOS",
|
246
|
-
"repo": "nixpkgs",
|
247
|
-
"rev": "4f53efe34b3a8877ac923b9350c874e3dcd5dc0a",
|
248
|
-
"type": "github"
|
249
|
-
},
|
250
|
-
"original": {
|
251
|
-
"dir": "lib",
|
252
|
-
"owner": "NixOS",
|
253
|
-
"ref": "nixos-unstable",
|
254
|
-
"repo": "nixpkgs",
|
255
|
-
"type": "github"
|
256
|
-
}
|
257
|
-
},
|
258
|
-
"nixpkgs-lib_2": {
|
259
|
-
"locked": {
|
260
|
-
"dir": "lib",
|
261
|
-
"lastModified": 1688049487,
|
262
|
-
"narHash": "sha256-100g4iaKC9MalDjUW9iN6Jl/OocTDtXdeAj7pEGIRh4=",
|
263
|
-
"owner": "NixOS",
|
264
|
-
"repo": "nixpkgs",
|
265
|
-
"rev": "4bc72cae107788bf3f24f30db2e2f685c9298dc9",
|
266
|
-
"type": "github"
|
267
|
-
},
|
268
|
-
"original": {
|
269
|
-
"dir": "lib",
|
270
|
-
"owner": "NixOS",
|
271
|
-
"ref": "nixos-unstable",
|
272
|
-
"repo": "nixpkgs",
|
273
|
-
"type": "github"
|
274
|
-
}
|
275
|
-
},
|
276
|
-
"nixpkgs-regression": {
|
277
|
-
"locked": {
|
278
|
-
"lastModified": 1643052045,
|
279
|
-
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
|
280
|
-
"owner": "NixOS",
|
281
|
-
"repo": "nixpkgs",
|
282
|
-
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
|
283
|
-
"type": "github"
|
284
|
-
},
|
285
|
-
"original": {
|
286
|
-
"owner": "NixOS",
|
287
|
-
"repo": "nixpkgs",
|
288
|
-
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
|
289
|
-
"type": "github"
|
290
|
-
}
|
291
|
-
},
|
292
|
-
"nixpkgs-ruby": {
|
293
|
-
"inputs": {
|
294
|
-
"flake-compat": "flake-compat_3",
|
295
|
-
"flake-utils": "flake-utils_2",
|
296
|
-
"nixpkgs": [
|
297
|
-
"nixpkgs"
|
298
|
-
]
|
299
|
-
},
|
300
|
-
"locked": {
|
301
|
-
"lastModified": 1688103575,
|
302
|
-
"narHash": "sha256-VkkUAm6U9sogXYFGhru0xIb0KI+mrVbk5PKjCD8rnV4=",
|
303
|
-
"owner": "bobvanderlinden",
|
304
|
-
"repo": "nixpkgs-ruby",
|
305
|
-
"rev": "e6ae16647947d0858a99e033ce695c33d6212852",
|
306
|
-
"type": "github"
|
307
|
-
},
|
308
|
-
"original": {
|
309
|
-
"owner": "bobvanderlinden",
|
310
|
-
"repo": "nixpkgs-ruby",
|
311
|
-
"type": "github"
|
312
|
-
}
|
313
|
-
},
|
314
|
-
"nixpkgs-stable": {
|
315
|
-
"locked": {
|
316
|
-
"lastModified": 1685801374,
|
317
|
-
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
|
318
|
-
"owner": "NixOS",
|
319
|
-
"repo": "nixpkgs",
|
320
|
-
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
|
321
|
-
"type": "github"
|
322
|
-
},
|
323
|
-
"original": {
|
324
|
-
"owner": "NixOS",
|
325
|
-
"ref": "nixos-23.05",
|
326
|
-
"repo": "nixpkgs",
|
327
|
-
"type": "github"
|
328
|
-
}
|
329
|
-
},
|
330
|
-
"nixpkgs_2": {
|
331
|
-
"locked": {
|
332
|
-
"lastModified": 1688585123,
|
333
|
-
"narHash": "sha256-+xFOB4WaRUHuZI7H1tWHTrwY4BnbPmh8M1n/XhPRH0w=",
|
334
|
-
"owner": "NixOS",
|
335
|
-
"repo": "nixpkgs",
|
336
|
-
"rev": "23de9f3b56e72632c628d92b71c47032e14a3d4d",
|
337
|
-
"type": "github"
|
338
|
-
},
|
339
|
-
"original": {
|
340
|
-
"owner": "NixOS",
|
341
|
-
"ref": "nixpkgs-unstable",
|
342
|
-
"repo": "nixpkgs",
|
343
|
-
"type": "github"
|
344
|
-
}
|
345
|
-
},
|
346
|
-
"pre-commit-hooks": {
|
347
|
-
"inputs": {
|
348
|
-
"flake-compat": [
|
349
|
-
"devenv",
|
350
|
-
"flake-compat"
|
351
|
-
],
|
352
|
-
"flake-utils": "flake-utils",
|
353
|
-
"gitignore": "gitignore",
|
354
|
-
"nixpkgs": [
|
355
|
-
"devenv",
|
356
|
-
"nixpkgs"
|
357
|
-
],
|
358
|
-
"nixpkgs-stable": "nixpkgs-stable"
|
359
|
-
},
|
360
|
-
"locked": {
|
361
|
-
"lastModified": 1688056373,
|
362
|
-
"narHash": "sha256-2+SDlNRTKsgo3LBRiMUcoEUb6sDViRNQhzJquZ4koOI=",
|
363
|
-
"owner": "cachix",
|
364
|
-
"repo": "pre-commit-hooks.nix",
|
365
|
-
"rev": "5843cf069272d92b60c3ed9e55b7a8989c01d4c7",
|
366
|
-
"type": "github"
|
367
|
-
},
|
368
|
-
"original": {
|
369
|
-
"owner": "cachix",
|
370
|
-
"repo": "pre-commit-hooks.nix",
|
371
|
-
"type": "github"
|
372
|
-
}
|
373
|
-
},
|
374
|
-
"root": {
|
375
|
-
"inputs": {
|
376
|
-
"dev-cli": "dev-cli",
|
377
|
-
"devenv": "devenv",
|
378
|
-
"flake-parts": "flake-parts_2",
|
379
|
-
"nixpkgs": "nixpkgs_2",
|
380
|
-
"nixpkgs-ruby": "nixpkgs-ruby",
|
381
|
-
"systems": "systems_2"
|
382
|
-
}
|
383
|
-
},
|
384
|
-
"systems": {
|
385
|
-
"locked": {
|
386
|
-
"lastModified": 1681028828,
|
387
|
-
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
388
|
-
"owner": "nix-systems",
|
389
|
-
"repo": "default",
|
390
|
-
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
391
|
-
"type": "github"
|
392
|
-
},
|
393
|
-
"original": {
|
394
|
-
"owner": "nix-systems",
|
395
|
-
"repo": "default",
|
396
|
-
"type": "github"
|
397
|
-
}
|
398
|
-
},
|
399
|
-
"systems_2": {
|
400
|
-
"locked": {
|
401
|
-
"lastModified": 1681028828,
|
402
|
-
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
403
|
-
"owner": "nix-systems",
|
404
|
-
"repo": "default",
|
405
|
-
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
406
|
-
"type": "github"
|
407
|
-
},
|
408
|
-
"original": {
|
409
|
-
"owner": "nix-systems",
|
410
|
-
"repo": "default",
|
411
|
-
"type": "github"
|
412
|
-
}
|
413
|
-
}
|
414
|
-
},
|
415
|
-
"root": "root",
|
416
|
-
"version": 7
|
417
|
-
}
|
data/flake.nix
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
{
|
2
|
-
inputs = {
|
3
|
-
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
4
|
-
systems.url = "github:nix-systems/default";
|
5
|
-
devenv.url = "github:cachix/devenv";
|
6
|
-
nixpkgs-ruby.url = "github:bobvanderlinden/nixpkgs-ruby";
|
7
|
-
nixpkgs-ruby.inputs.nixpkgs.follows = "nixpkgs";
|
8
|
-
dev-cli.url = "github:detaso/dev-cli";
|
9
|
-
dev-cli.inputs.nixpkgs.follows = "nixpkgs";
|
10
|
-
};
|
11
|
-
|
12
|
-
outputs = inputs@{ flake-parts, ... }:
|
13
|
-
flake-parts.lib.mkFlake { inherit inputs; } {
|
14
|
-
imports = [
|
15
|
-
inputs.devenv.flakeModule
|
16
|
-
];
|
17
|
-
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
|
18
|
-
|
19
|
-
perSystem = { config, self', inputs', pkgs, system, ... }: {
|
20
|
-
# Per-system attributes can be defined here. The self' and inputs'
|
21
|
-
# module parameters provide easy access to attributes of the same
|
22
|
-
# system.
|
23
|
-
|
24
|
-
devenv.shells.default = let
|
25
|
-
dev-cli = inputs.dev-cli.packages.${system}.default;
|
26
|
-
in {
|
27
|
-
# https://devenv.sh/reference/options/
|
28
|
-
|
29
|
-
packages = with pkgs; [
|
30
|
-
git
|
31
|
-
nodejs-18_x
|
32
|
-
yarn
|
33
|
-
postgresql_14
|
34
|
-
zlib
|
35
|
-
zstd
|
36
|
-
libiconv
|
37
|
-
tmux
|
38
|
-
tmuxPlugins.sensible
|
39
|
-
tmuxPlugins.yank
|
40
|
-
reattach-to-user-namespace
|
41
|
-
] ++ [
|
42
|
-
dev-cli
|
43
|
-
];
|
44
|
-
|
45
|
-
languages.ruby.enable = true;
|
46
|
-
languages.ruby.bundler.enable = false;
|
47
|
-
languages.ruby.version = "3.2.2";
|
48
|
-
|
49
|
-
enterShell = ''
|
50
|
-
export BUNDLE_BIN="$DEVENV_ROOT/.devenv/bin"
|
51
|
-
export PATH="$DEVENV_PROFILE/bin:$DEVENV_ROOT/bin:$BUNDLE_BIN:$PATH"
|
52
|
-
export BOOTSNAP_CACHE_DIR="$DEVENV_ROOT/.devenv/state"
|
53
|
-
|
54
|
-
if [ ! -f ~/.tmux.conf ] && [ ! -f ~/.config/tmux/tmux.conf ] && [ -f "$DEVENV_ROOT/.overmind.tmux.conf" ]; then
|
55
|
-
export OVERMIND_TMUX_CONFIG="$DEVENV_ROOT/.overmind.tmux.conf"
|
56
|
-
fi
|
57
|
-
'';
|
58
|
-
|
59
|
-
env.OVERMIND_NO_PORT=1;
|
60
|
-
env.OVERMIND_ANY_CAN_DIE=1;
|
61
|
-
process.implementation = "overmind";
|
62
|
-
|
63
|
-
env.RUBY_DEBUG_SOCK_DIR = "/tmp/";
|
64
|
-
};
|
65
|
-
};
|
66
|
-
};
|
67
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
module Metaractor
|
2
|
-
module ContextValidity
|
3
|
-
def valid?
|
4
|
-
!invalid?
|
5
|
-
end
|
6
|
-
|
7
|
-
def invalid?
|
8
|
-
@invalid || false
|
9
|
-
end
|
10
|
-
|
11
|
-
def invalidate!
|
12
|
-
@invalid = true
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
Interactor::Context.send(:include, Metaractor::ContextValidity)
|
@@ -1,13 +0,0 @@
|
|
1
|
-
module Metaractor
|
2
|
-
module FailFromContext
|
3
|
-
def fail_from_context(context:)
|
4
|
-
return if context.equal?(self)
|
5
|
-
|
6
|
-
invalidate! if context.invalid?
|
7
|
-
add_errors(errors: context.errors.to_h)
|
8
|
-
@failure = true
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
Interactor::Context.send(:include, Metaractor::FailFromContext)
|