muina 0.2.8 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +25 -0
- data/README.md +0 -35
- data/lib/muina/maybe/none.rb +57 -0
- data/lib/muina/maybe/some.rb +61 -0
- data/lib/muina/maybe.rb +13 -0
- data/lib/muina/version.rb +1 -2
- data/lib/muina.rb +0 -32
- metadata +24 -228
- data/.github/workflows/main.yml +0 -16
- data/.gitignore +0 -5
- data/.mutant.yml +0 -38
- data/.rspec +0 -4
- data/.rubocop.yml +0 -181
- data/.ruby-version +0 -1
- data/.simplecov +0 -14
- data/CHANGELOG.md +0 -38
- data/Gemfile +0 -34
- data/Gemfile.lock +0 -265
- data/Guardfile +0 -24
- data/Rakefile +0 -13
- data/SECURITY.md +0 -14
- data/bin/bundle +0 -114
- data/bin/console +0 -15
- data/bin/flay +0 -29
- data/bin/flog +0 -29
- data/bin/guard +0 -29
- data/bin/irb +0 -29
- data/bin/lefthook +0 -29
- data/bin/mutant +0 -29
- data/bin/parlour +0 -29
- data/bin/rake +0 -29
- data/bin/rspec +0 -29
- data/bin/rubocop +0 -29
- data/bin/setup +0 -8
- data/bin/srb +0 -29
- data/bin/srb-rbi +0 -29
- data/bin/tapioca +0 -29
- data/exe/muina +0 -11
- data/lefthook.yml +0 -39
- data/lib/muina/action/params_factory.rb +0 -17
- data/lib/muina/action/step/command.rb +0 -33
- data/lib/muina/action/step/failure.rb +0 -18
- data/lib/muina/action/step/query.rb +0 -35
- data/lib/muina/action/step/result.rb +0 -56
- data/lib/muina/action/step.rb +0 -13
- data/lib/muina/action.rb +0 -73
- data/lib/muina/any.rb +0 -7
- data/lib/muina/classes.rb +0 -7
- data/lib/muina/deprecator.rb +0 -93
- data/lib/muina/entity.rb +0 -20
- data/lib/muina/module.rb +0 -6
- data/lib/muina/parameters.rb +0 -7
- data/lib/muina/params.rb +0 -19
- data/lib/muina/private_creation.rb +0 -12
- data/lib/muina/result/factory.rb +0 -37
- data/lib/muina/result/failure.rb +0 -31
- data/lib/muina/result/null.rb +0 -25
- data/lib/muina/result/success.rb +0 -31
- data/lib/muina/result.rb +0 -17
- data/lib/muina/service.rb +0 -25
- data/lib/muina/symbol_hash.rb +0 -7
- data/lib/muina/unit.rb +0 -10
- data/lib/muina/untyped_array.rb +0 -7
- data/lib/muina/untyped_hash.rb +0 -7
- data/lib/muina/value.rb +0 -24
- data/muina.gemspec +0 -35
- data/rbi/muina.rbi +0 -311
- data/sorbet/config +0 -2
- data/sorbet/rbi/gems/actionpack@6.1.4.rbi +0 -5045
- data/sorbet/rbi/gems/actionview@6.1.4.rbi +0 -2416
- data/sorbet/rbi/gems/activesupport@6.1.4.rbi +0 -3778
- data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -54
- data/sorbet/rbi/gems/awesome_print@1.9.2.rbi +0 -322
- data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -8
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -18
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -8
- data/sorbet/rbi/gems/colorize@0.8.1.rbi +0 -39
- data/sorbet/rbi/gems/commander@4.6.0.rbi +0 -8
- data/sorbet/rbi/gems/concurrent-ruby@1.1.9.rbi +0 -2403
- data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -123
- data/sorbet/rbi/gems/diff-lcs@1.4.4.rbi +0 -185
- data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -54
- data/sorbet/rbi/gems/erubi@1.10.0.rbi +0 -36
- data/sorbet/rbi/gems/erubis@2.7.0.rbi +0 -8
- data/sorbet/rbi/gems/faker@2.18.0.rbi +0 -2469
- data/sorbet/rbi/gems/ffi@1.15.3.rbi +0 -8
- data/sorbet/rbi/gems/flay@2.12.1.rbi +0 -178
- data/sorbet/rbi/gems/flog@4.6.4.rbi +0 -70
- data/sorbet/rbi/gems/formatador@0.3.0.rbi +0 -8
- data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +0 -49
- data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +0 -233
- data/sorbet/rbi/gems/guard-rubocop@1.4.0.rbi +0 -66
- data/sorbet/rbi/gems/guard-shell@0.7.2.rbi +0 -69
- data/sorbet/rbi/gems/guard@2.18.0.rbi +0 -617
- data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -8
- data/sorbet/rbi/gems/i18n@1.8.10.rbi +0 -616
- data/sorbet/rbi/gems/io-console@0.5.9.rbi +0 -8
- data/sorbet/rbi/gems/irb@1.3.6.rbi +0 -452
- data/sorbet/rbi/gems/lefthook@0.7.6.rbi +0 -8
- data/sorbet/rbi/gems/listen@3.6.0.rbi +0 -476
- data/sorbet/rbi/gems/loofah@2.10.0.rbi +0 -223
- data/sorbet/rbi/gems/lumberjack@1.2.8.rbi +0 -431
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -8
- data/sorbet/rbi/gems/minitest@5.14.4.rbi +0 -344
- data/sorbet/rbi/gems/mutant-license@0.1.1.1.4043027289354708743625974235631451632228.0.rbi +0 -8
- data/sorbet/rbi/gems/mutant-rspec@0.10.32.rbi +0 -8
- data/sorbet/rbi/gems/mutant@0.10.32.rbi +0 -4154
- data/sorbet/rbi/gems/nenv@0.3.0.rbi +0 -88
- data/sorbet/rbi/gems/nokogiri@1.11.7.rbi +0 -1422
- data/sorbet/rbi/gems/notiffany@0.1.3.rbi +0 -331
- data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -113
- data/sorbet/rbi/gems/parlour@6.0.1.rbi +0 -1726
- data/sorbet/rbi/gems/parser@3.0.2.0.rbi +0 -1683
- data/sorbet/rbi/gems/path_expander@1.1.0.rbi +0 -24
- data/sorbet/rbi/gems/polyfill@1.9.0.rbi +0 -393
- data/sorbet/rbi/gems/pry@0.14.1.rbi +0 -8
- data/sorbet/rbi/gems/racc@1.5.2.rbi +0 -47
- data/sorbet/rbi/gems/rack-test@1.1.0.rbi +0 -272
- data/sorbet/rbi/gems/rack@2.2.3.rbi +0 -1618
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +0 -92
- data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +0 -183
- data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -153
- data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -808
- data/sorbet/rbi/gems/rb-fsevent@0.11.0.rbi +0 -8
- data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +0 -8
- data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -1120
- data/sorbet/rbi/gems/reline@0.2.6.rbi +0 -662
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -672
- data/sorbet/rbi/gems/rspec-core@3.10.1.rbi +0 -2509
- data/sorbet/rbi/gems/rspec-expectations@3.10.1.rbi +0 -1574
- data/sorbet/rbi/gems/rspec-mocks@3.10.2.rbi +0 -1462
- data/sorbet/rbi/gems/rspec-support@3.10.2.rbi +0 -509
- data/sorbet/rbi/gems/rspec@3.10.0.rbi +0 -38
- data/sorbet/rbi/gems/rubocop-ast@1.8.0.rbi +0 -2194
- data/sorbet/rbi/gems/rubocop-performance@1.11.4.rbi +0 -899
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -118
- data/sorbet/rbi/gems/rubocop-rspec@2.4.0.rbi +0 -1805
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.2.rbi +0 -288
- data/sorbet/rbi/gems/rubocop@1.18.4.rbi +0 -13197
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -405
- data/sorbet/rbi/gems/ruby_parser@3.16.0.rbi +0 -4528
- data/sorbet/rbi/gems/safe_type@1.1.1.rbi +0 -157
- data/sorbet/rbi/gems/sexp_processor@4.15.3.rbi +0 -359
- data/sorbet/rbi/gems/shellany@0.0.1.rbi +0 -28
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -89
- data/sorbet/rbi/gems/simplecov@0.21.2.rbi +0 -577
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +0 -8
- data/sorbet/rbi/gems/sorbet-coerce@0.5.0.rbi +0 -42
- data/sorbet/rbi/gems/sorbet-rails@0.7.4.rbi +0 -8
- data/sorbet/rbi/gems/sorbet-struct-comparable@1.1.0.rbi +0 -17
- data/sorbet/rbi/gems/spoom@1.1.1.rbi +0 -1193
- data/sorbet/rbi/gems/tapioca@0.4.23.rbi +0 -1826
- data/sorbet/rbi/gems/thor@1.1.0.rbi +0 -838
- data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +0 -856
- data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +0 -26
- data/sorbet/rbi/gems/unparser@0.6.0.rbi +0 -2037
- data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +0 -173
- data/sorbet/rbi/todo.rbi +0 -8
- data/sorbet/rbi/typed_params.rbi +0 -7
- data/sorbet/tapioca/require.rb +0 -16
data/rbi/muina.rbi
DELETED
@@ -1,311 +0,0 @@
|
|
1
|
-
# typed: strong
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
M = Muina
|
5
|
-
|
6
|
-
class Module
|
7
|
-
include T::Sig
|
8
|
-
end
|
9
|
-
|
10
|
-
module Muina
|
11
|
-
Any = T.type_alias { T.untyped }
|
12
|
-
Classes = T.type_alias { T.any(Class, T::Array[Class]) }
|
13
|
-
Parameters = T.type_alias { T.any(UntypedHash, ActionController::Parameters) }
|
14
|
-
SymbolHash = T.type_alias { T::Hash[Symbol, T.untyped] }
|
15
|
-
UntypedArray = T.type_alias { T::Array[T.untyped] }
|
16
|
-
UntypedHash = T.type_alias { T::Hash[T.untyped, T.untyped] }
|
17
|
-
UNIT = T.let(Unit.instance, Unit)
|
18
|
-
VERSION = '0.2.7'
|
19
|
-
|
20
|
-
class Error < StandardError; end
|
21
|
-
|
22
|
-
sig { params(value: T.untyped).returns(Muina::Result::Success) }
|
23
|
-
def self.Success(value); end
|
24
|
-
|
25
|
-
sig { params(error: T.untyped).returns(Muina::Result::Failure) }
|
26
|
-
def self.Failure(error); end
|
27
|
-
|
28
|
-
sig { params(blk: T.untyped).returns(T.any(Muina::Result::Success, Muina::Result::Failure)) }
|
29
|
-
def self.Result(&blk); end
|
30
|
-
|
31
|
-
class Action
|
32
|
-
include T::Props
|
33
|
-
include T::Props::Constructor
|
34
|
-
|
35
|
-
class DoubleResultError < Error
|
36
|
-
end
|
37
|
-
|
38
|
-
@steps = T.let(@steps, T.nilable(T::Array[Muina::Action::Step]))
|
39
|
-
@parameters = T.let(@parameters, T.untyped)
|
40
|
-
@__result_set__ = T.let(@__result_set__, T::Boolean)
|
41
|
-
@__failure_set__ = T.let(@__failure_set__, T::Boolean)
|
42
|
-
|
43
|
-
def initialize(hash)
|
44
|
-
@__failure__ = T.let(@__failure__, T.nilable(Muina::Result::Failure))
|
45
|
-
@__result__ = T.let(@__result__, T.nilable(Muina::Result::Success))
|
46
|
-
end
|
47
|
-
|
48
|
-
sig { returns(T::Array[Muina::Action::Step]) }
|
49
|
-
def self.steps; end
|
50
|
-
|
51
|
-
sig { params(params: T.untyped).returns(T.untyped) }
|
52
|
-
def self.extract(params); end
|
53
|
-
|
54
|
-
sig { params(blk: T.untyped).returns(T.untyped) }
|
55
|
-
def self.result(&blk); end
|
56
|
-
|
57
|
-
sig { params(blk: T.untyped).returns(T.untyped) }
|
58
|
-
def self.failure(&blk); end
|
59
|
-
|
60
|
-
sig { params(_name: T.untyped, blk: T.untyped).returns(T.untyped) }
|
61
|
-
def self.command(_name = nil, &blk); end
|
62
|
-
|
63
|
-
sig { params(name: T.untyped, type: T.untyped, blk: T.untyped).returns(T.untyped) }
|
64
|
-
def self.query(name, type, &blk); end
|
65
|
-
|
66
|
-
sig { params(blk: T.untyped).returns(T.untyped) }
|
67
|
-
def self.parameters(&blk); end
|
68
|
-
|
69
|
-
sig { params(hash: SymbolHash).returns(T.untyped) }
|
70
|
-
def self.call(hash = {}); end
|
71
|
-
|
72
|
-
sig { returns(T.untyped) }
|
73
|
-
def perform; end
|
74
|
-
|
75
|
-
module ParamsFactory
|
76
|
-
sig { params(params: T.untyped).returns(T.untyped) }
|
77
|
-
def self.build(params); end
|
78
|
-
end
|
79
|
-
|
80
|
-
class Step < Value
|
81
|
-
const :step, T.untyped
|
82
|
-
|
83
|
-
sig { params(action: T.untyped).returns(T.untyped) }
|
84
|
-
def call(action); end
|
85
|
-
|
86
|
-
class Command < self
|
87
|
-
sig { params(action: T.untyped).returns(T.untyped) }
|
88
|
-
def call(action); end
|
89
|
-
|
90
|
-
private
|
91
|
-
|
92
|
-
sig { void }
|
93
|
-
def success; end
|
94
|
-
|
95
|
-
sig { params(action: T.untyped, result: T.untyped).void }
|
96
|
-
def failure(action, result); end
|
97
|
-
end
|
98
|
-
|
99
|
-
class Failure < self
|
100
|
-
sig { params(action: T.untyped).returns(T.untyped) }
|
101
|
-
def call(action); end
|
102
|
-
end
|
103
|
-
|
104
|
-
class Query < self
|
105
|
-
const :name, Symbol
|
106
|
-
|
107
|
-
sig { params(action: T.untyped).void }
|
108
|
-
def call(action); end
|
109
|
-
|
110
|
-
private
|
111
|
-
|
112
|
-
sig { params(action: T.untyped, result: T.untyped).void }
|
113
|
-
def success(action, result); end
|
114
|
-
|
115
|
-
sig { params(action: T.untyped, result: T.untyped).void }
|
116
|
-
def failure(action, result); end
|
117
|
-
end
|
118
|
-
|
119
|
-
class Result < self
|
120
|
-
class Caller
|
121
|
-
class Successful
|
122
|
-
sig { params(action: T.untyped, result: T.untyped).void }
|
123
|
-
def initialize(action, result)
|
124
|
-
@action = T.let(@action, Muina::Action)
|
125
|
-
@result = T.let(@result, Muina::Result)
|
126
|
-
end
|
127
|
-
|
128
|
-
sig { void }
|
129
|
-
def call; end
|
130
|
-
end
|
131
|
-
|
132
|
-
class Failed
|
133
|
-
sig { params(action: T.untyped, result: T.untyped).void }
|
134
|
-
def initialize(action, result)
|
135
|
-
@action = T.let(@action, Muina::Action)
|
136
|
-
@result = T.let(@result, Muina::Result)
|
137
|
-
end
|
138
|
-
|
139
|
-
sig { void }
|
140
|
-
def call; end
|
141
|
-
end
|
142
|
-
|
143
|
-
sig do
|
144
|
-
params(action: T.untyped, step: T.untyped)
|
145
|
-
.returns(
|
146
|
-
T.any(Muina::Action::Step::Result::Caller::Successful, Muina::Action::Step::Result::Caller::Failed)
|
147
|
-
)
|
148
|
-
end
|
149
|
-
def self.for(action, step); end
|
150
|
-
end
|
151
|
-
|
152
|
-
sig { params(action: T.untyped).void }
|
153
|
-
def call(action); end
|
154
|
-
|
155
|
-
private
|
156
|
-
|
157
|
-
sig { params(action: T.untyped, value: T.untyped).void }
|
158
|
-
def success(action, value); end
|
159
|
-
|
160
|
-
sig { params(action: T.untyped, value: T.untyped).void }
|
161
|
-
def failure(action, value); end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
end
|
165
|
-
|
166
|
-
class Entity
|
167
|
-
sig { returns(Muina::SymbolHash) }
|
168
|
-
def serialize; end
|
169
|
-
|
170
|
-
sig { params(hash: SymbolHash).returns(Muina::Entity) }
|
171
|
-
def with(hash); end
|
172
|
-
end
|
173
|
-
|
174
|
-
class Params
|
175
|
-
include T::Props
|
176
|
-
include T::Props::Constructor
|
177
|
-
|
178
|
-
sig { params(params: Parameters).returns(T.attached_class) }
|
179
|
-
def self.extract(params); end
|
180
|
-
|
181
|
-
sig { params(other: Class).returns(T::Boolean) }
|
182
|
-
def self.<(other); end
|
183
|
-
end
|
184
|
-
|
185
|
-
module PrivateCreation
|
186
|
-
sig { params(klass: Class).void }
|
187
|
-
def self.included(klass); end
|
188
|
-
end
|
189
|
-
|
190
|
-
class Result < Value
|
191
|
-
include PrivateCreation
|
192
|
-
|
193
|
-
sig { returns(Muina::Result::Null) }
|
194
|
-
def self.Null; end
|
195
|
-
|
196
|
-
sig { params(success_klass: T.untyped, error_klass: T.untyped).returns(T.untyped) }
|
197
|
-
def self.[](success_klass, error_klass); end
|
198
|
-
|
199
|
-
sig { returns(T.untyped) }
|
200
|
-
def value!; end
|
201
|
-
|
202
|
-
class Factory < T::Struct
|
203
|
-
prop :success_klass, T.any(Classes, T::Types::Base)
|
204
|
-
prop :error_klass, T.any(Classes, T::Types::Base)
|
205
|
-
|
206
|
-
sig { params(value: T.untyped).returns(Success) }
|
207
|
-
def success(value); end
|
208
|
-
|
209
|
-
sig { params(error: T.untyped).returns(Failure) }
|
210
|
-
def failure(error); end
|
211
|
-
|
212
|
-
private
|
213
|
-
|
214
|
-
sig { returns(Class) }
|
215
|
-
def success_subclass; end
|
216
|
-
|
217
|
-
sig { returns(Class) }
|
218
|
-
def failure_subclass; end
|
219
|
-
|
220
|
-
sig { params(klass: Class, symbol: Symbol, sklass: T.untyped).returns(Class) }
|
221
|
-
def klass_factory(klass, symbol, sklass); end
|
222
|
-
end
|
223
|
-
|
224
|
-
class Failure < self
|
225
|
-
ValueCalledOnFailureError = Class.new(Error)
|
226
|
-
|
227
|
-
const :error, T.untyped
|
228
|
-
|
229
|
-
sig { returns(T.noreturn) }
|
230
|
-
def value!; end
|
231
|
-
|
232
|
-
sig { returns(T.untyped) }
|
233
|
-
def error!; end
|
234
|
-
|
235
|
-
sig { params(_block: T.untyped).returns(Muina::Result::Failure) }
|
236
|
-
def and_then(&_block); end
|
237
|
-
|
238
|
-
sig { params(block: T.untyped).returns(Muina::Result::Failure) }
|
239
|
-
def or_else(&block); end
|
240
|
-
end
|
241
|
-
|
242
|
-
class Null < self
|
243
|
-
sig { returns(T.noreturn) }
|
244
|
-
def value!; end
|
245
|
-
|
246
|
-
sig { returns(T.noreturn) }
|
247
|
-
def error!; end
|
248
|
-
|
249
|
-
sig { returns(Null) }
|
250
|
-
def and_then(&_block); end
|
251
|
-
|
252
|
-
sig { returns(Null) }
|
253
|
-
def or_else(&_block); end
|
254
|
-
end
|
255
|
-
|
256
|
-
class Success < self
|
257
|
-
ErrorCalledOnSuccessError = Class.new(Error)
|
258
|
-
|
259
|
-
const :value, T.untyped
|
260
|
-
|
261
|
-
sig { returns(T.untyped) }
|
262
|
-
def value!; end
|
263
|
-
|
264
|
-
sig { returns(T.noreturn) }
|
265
|
-
def error!; end
|
266
|
-
|
267
|
-
sig { params(block: T.untyped).returns(T.untyped) }
|
268
|
-
def and_then(&block); end
|
269
|
-
|
270
|
-
sig { params(_block: T.untyped).returns(T.untyped) }
|
271
|
-
def or_else(&_block); end
|
272
|
-
end
|
273
|
-
end
|
274
|
-
|
275
|
-
class Service
|
276
|
-
include T::Props
|
277
|
-
include T::Props::Constructor
|
278
|
-
include PrivateCreation
|
279
|
-
|
280
|
-
sig { params(hash: SymbolHash).returns(T.untyped) }
|
281
|
-
def self.call(hash = {}); end
|
282
|
-
class << self; alias_method :[], :call; end
|
283
|
-
|
284
|
-
sig { params(args: Symbol, opts: T.untyped).void }
|
285
|
-
def self.arguments(*args, **opts); end
|
286
|
-
|
287
|
-
private
|
288
|
-
|
289
|
-
sig { returns(T.untyped) }
|
290
|
-
def perform; end
|
291
|
-
end
|
292
|
-
|
293
|
-
class Unit
|
294
|
-
include Singleton
|
295
|
-
end
|
296
|
-
|
297
|
-
class Value
|
298
|
-
include T::Props
|
299
|
-
include T::Props::Constructor
|
300
|
-
include T::Struct::ActsAsComparable
|
301
|
-
|
302
|
-
sig { params(hash: SymbolHash).void }
|
303
|
-
def initialize(hash = {}); end
|
304
|
-
|
305
|
-
sig { returns(Muina::SymbolHash) }
|
306
|
-
def serialize; end
|
307
|
-
|
308
|
-
sig { params(hash: SymbolHash).returns(Muina::Value) }
|
309
|
-
def with(hash); end
|
310
|
-
end
|
311
|
-
end
|
data/sorbet/config
DELETED