muina 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/main.yml +16 -0
  3. data/.gitignore +5 -0
  4. data/.mutant.yml +38 -0
  5. data/.rspec +4 -0
  6. data/.rubocop.yml +172 -0
  7. data/.ruby-version +1 -0
  8. data/.simplecov +14 -0
  9. data/CHANGELOG.md +38 -0
  10. data/Gemfile +34 -0
  11. data/Gemfile.lock +265 -0
  12. data/Guardfile +24 -0
  13. data/README.md +36 -0
  14. data/Rakefile +13 -0
  15. data/SECURITY.md +14 -0
  16. data/bin/bundle +114 -0
  17. data/bin/console +15 -0
  18. data/bin/flay +29 -0
  19. data/bin/flog +29 -0
  20. data/bin/guard +29 -0
  21. data/bin/irb +29 -0
  22. data/bin/lefthook +29 -0
  23. data/bin/mutant +29 -0
  24. data/bin/parlour +29 -0
  25. data/bin/rake +29 -0
  26. data/bin/rspec +29 -0
  27. data/bin/rubocop +29 -0
  28. data/bin/setup +8 -0
  29. data/bin/srb +29 -0
  30. data/bin/srb-rbi +29 -0
  31. data/bin/tapioca +29 -0
  32. data/exe/muina +11 -0
  33. data/lefthook.yml +39 -0
  34. data/lib/muina/action/params_factory.rb +17 -0
  35. data/lib/muina/action/step/command.rb +31 -0
  36. data/lib/muina/action/step/failure.rb +18 -0
  37. data/lib/muina/action/step/query.rb +31 -0
  38. data/lib/muina/action/step/result.rb +51 -0
  39. data/lib/muina/action/step.rb +13 -0
  40. data/lib/muina/action.rb +73 -0
  41. data/lib/muina/any.rb +7 -0
  42. data/lib/muina/classes.rb +7 -0
  43. data/lib/muina/module.rb +6 -0
  44. data/lib/muina/parameters.rb +7 -0
  45. data/lib/muina/params.rb +19 -0
  46. data/lib/muina/private_creation.rb +12 -0
  47. data/lib/muina/result/factory.rb +37 -0
  48. data/lib/muina/result/failure.rb +31 -0
  49. data/lib/muina/result/null.rb +25 -0
  50. data/lib/muina/result/success.rb +31 -0
  51. data/lib/muina/result.rb +17 -0
  52. data/lib/muina/service.rb +37 -0
  53. data/lib/muina/symbol_hash.rb +7 -0
  54. data/lib/muina/unit.rb +10 -0
  55. data/lib/muina/untyped_array.rb +7 -0
  56. data/lib/muina/untyped_hash.rb +7 -0
  57. data/lib/muina/value.rb +16 -0
  58. data/lib/muina/version.rb +7 -0
  59. data/lib/muina.rb +42 -0
  60. data/muina.gemspec +35 -0
  61. data/rbi/muina.rbi +268 -0
  62. data/sorbet/config +2 -0
  63. data/sorbet/rbi/gems/actionpack@6.1.4.rbi +5045 -0
  64. data/sorbet/rbi/gems/actionview@6.1.4.rbi +2416 -0
  65. data/sorbet/rbi/gems/activesupport@6.1.4.rbi +3778 -0
  66. data/sorbet/rbi/gems/ast@2.4.2.rbi +54 -0
  67. data/sorbet/rbi/gems/awesome_print@1.9.2.rbi +322 -0
  68. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  69. data/sorbet/rbi/gems/byebug@11.1.3.rbi +18 -0
  70. data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
  71. data/sorbet/rbi/gems/colorize@0.8.1.rbi +39 -0
  72. data/sorbet/rbi/gems/commander@4.6.0.rbi +8 -0
  73. data/sorbet/rbi/gems/concurrent-ruby@1.1.9.rbi +2403 -0
  74. data/sorbet/rbi/gems/crass@1.0.6.rbi +123 -0
  75. data/sorbet/rbi/gems/diff-lcs@1.4.4.rbi +185 -0
  76. data/sorbet/rbi/gems/docile@1.4.0.rbi +54 -0
  77. data/sorbet/rbi/gems/erubi@1.10.0.rbi +36 -0
  78. data/sorbet/rbi/gems/erubis@2.7.0.rbi +8 -0
  79. data/sorbet/rbi/gems/faker@2.18.0.rbi +2469 -0
  80. data/sorbet/rbi/gems/ffi@1.15.3.rbi +8 -0
  81. data/sorbet/rbi/gems/flay@2.12.1.rbi +178 -0
  82. data/sorbet/rbi/gems/flog@4.6.4.rbi +70 -0
  83. data/sorbet/rbi/gems/formatador@0.3.0.rbi +8 -0
  84. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +49 -0
  85. data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +233 -0
  86. data/sorbet/rbi/gems/guard-rubocop@1.4.0.rbi +66 -0
  87. data/sorbet/rbi/gems/guard-shell@0.7.2.rbi +69 -0
  88. data/sorbet/rbi/gems/guard@2.18.0.rbi +617 -0
  89. data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
  90. data/sorbet/rbi/gems/i18n@1.8.10.rbi +616 -0
  91. data/sorbet/rbi/gems/io-console@0.5.9.rbi +8 -0
  92. data/sorbet/rbi/gems/irb@1.3.6.rbi +452 -0
  93. data/sorbet/rbi/gems/lefthook@0.7.6.rbi +8 -0
  94. data/sorbet/rbi/gems/listen@3.6.0.rbi +476 -0
  95. data/sorbet/rbi/gems/loofah@2.10.0.rbi +223 -0
  96. data/sorbet/rbi/gems/lumberjack@1.2.8.rbi +431 -0
  97. data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
  98. data/sorbet/rbi/gems/minitest@5.14.4.rbi +344 -0
  99. data/sorbet/rbi/gems/mutant-license@0.1.1.1.4043027289354708743625974235631451632228.0.rbi +8 -0
  100. data/sorbet/rbi/gems/mutant-rspec@0.10.32.rbi +8 -0
  101. data/sorbet/rbi/gems/mutant@0.10.32.rbi +4154 -0
  102. data/sorbet/rbi/gems/nenv@0.3.0.rbi +88 -0
  103. data/sorbet/rbi/gems/nokogiri@1.11.7.rbi +1422 -0
  104. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +331 -0
  105. data/sorbet/rbi/gems/parallel@1.20.1.rbi +113 -0
  106. data/sorbet/rbi/gems/parlour@6.0.1.rbi +1726 -0
  107. data/sorbet/rbi/gems/parser@3.0.2.0.rbi +1683 -0
  108. data/sorbet/rbi/gems/path_expander@1.1.0.rbi +24 -0
  109. data/sorbet/rbi/gems/polyfill@1.9.0.rbi +393 -0
  110. data/sorbet/rbi/gems/pry@0.14.1.rbi +8 -0
  111. data/sorbet/rbi/gems/racc@1.5.2.rbi +47 -0
  112. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +272 -0
  113. data/sorbet/rbi/gems/rack@2.2.3.rbi +1618 -0
  114. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +92 -0
  115. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +183 -0
  116. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +153 -0
  117. data/sorbet/rbi/gems/rake@13.0.6.rbi +808 -0
  118. data/sorbet/rbi/gems/rb-fsevent@0.11.0.rbi +8 -0
  119. data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +8 -0
  120. data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +1120 -0
  121. data/sorbet/rbi/gems/reline@0.2.6.rbi +662 -0
  122. data/sorbet/rbi/gems/rexml@3.2.5.rbi +672 -0
  123. data/sorbet/rbi/gems/rspec-core@3.10.1.rbi +2509 -0
  124. data/sorbet/rbi/gems/rspec-expectations@3.10.1.rbi +1574 -0
  125. data/sorbet/rbi/gems/rspec-mocks@3.10.2.rbi +1462 -0
  126. data/sorbet/rbi/gems/rspec-support@3.10.2.rbi +509 -0
  127. data/sorbet/rbi/gems/rspec@3.10.0.rbi +38 -0
  128. data/sorbet/rbi/gems/rubocop-ast@1.8.0.rbi +2194 -0
  129. data/sorbet/rbi/gems/rubocop-performance@1.11.4.rbi +899 -0
  130. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +118 -0
  131. data/sorbet/rbi/gems/rubocop-rspec@2.4.0.rbi +1805 -0
  132. data/sorbet/rbi/gems/rubocop-sorbet@0.6.2.rbi +288 -0
  133. data/sorbet/rbi/gems/rubocop@1.18.4.rbi +13197 -0
  134. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +405 -0
  135. data/sorbet/rbi/gems/ruby_parser@3.16.0.rbi +4528 -0
  136. data/sorbet/rbi/gems/safe_type@1.1.1.rbi +157 -0
  137. data/sorbet/rbi/gems/sexp_processor@4.15.3.rbi +359 -0
  138. data/sorbet/rbi/gems/shellany@0.0.1.rbi +28 -0
  139. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +89 -0
  140. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +577 -0
  141. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +8 -0
  142. data/sorbet/rbi/gems/sorbet-coerce@0.5.0.rbi +42 -0
  143. data/sorbet/rbi/gems/sorbet-rails@0.7.4.rbi +8 -0
  144. data/sorbet/rbi/gems/sorbet-struct-comparable@1.1.0.rbi +17 -0
  145. data/sorbet/rbi/gems/spoom@1.1.1.rbi +1193 -0
  146. data/sorbet/rbi/gems/tapioca@0.4.23.rbi +1826 -0
  147. data/sorbet/rbi/gems/thor@1.1.0.rbi +838 -0
  148. data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +856 -0
  149. data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +26 -0
  150. data/sorbet/rbi/gems/unparser@0.6.0.rbi +2037 -0
  151. data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +173 -0
  152. data/sorbet/rbi/todo.rbi +8 -0
  153. data/sorbet/rbi/typed_params.rbi +7 -0
  154. data/sorbet/tapioca/require.rb +16 -0
  155. metadata +269 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e332fc84025e98889254f51b55415027318beded22c686e3b7d77df43de9fc07
4
+ data.tar.gz: 2341f1c5eceef5625b93a56f4e152e1eeb641e946611d484e3a9f3bab7103f5d
5
+ SHA512:
6
+ metadata.gz: 1093293b6f0d073e1e8caa54929215fcb04c20906e18db3db6467596d245db9dbff1b4d7bc9f3e5ecb763e0344d41873d6588e7b597459c56c5e2b896bf3560a
7
+ data.tar.gz: 2c2ca8dcf28eaf9531e84dbdb8a45c13489ddd04488491127436d4650ff4e32e154e160f9b91f9a82d383892b0719a5b965b403a03672ee95d43071148ce9505
@@ -0,0 +1,16 @@
1
+ name: Ruby
2
+
3
+ on: [push,pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - name: Set up Ruby
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.6.6
14
+ bundler-cache: true
15
+ - name: Run the default task
16
+ run: bundle exec rake
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ /coverage/
2
+ /pkg/
3
+
4
+ .rspec_status
5
+ .byebug_history
data/.mutant.yml ADDED
@@ -0,0 +1,38 @@
1
+ ---
2
+ integration: rspec
3
+
4
+ includes:
5
+ - lib
6
+
7
+ requires:
8
+ - muina
9
+
10
+ matcher:
11
+ subjects:
12
+ - Muina::Action*
13
+ - Muina::Action::ParamsFactory*
14
+ - Muina::Action::Step*
15
+ - Muina::Action::Step::Command*
16
+ - Muina::Action::Step::Failure*
17
+ - Muina::Action::Step::Query*
18
+ - Muina::Action::Step::Result*
19
+ - Muina::Any*
20
+ - Muina::Classes*
21
+ - Muina::Error*
22
+ - Muina::TestError*
23
+ - Muina::Parameters*
24
+ - Muina::Params*
25
+ - Muina::PrivateCreation*
26
+ - Muina::Result*
27
+ - Muina::Result::Factory*
28
+ - Muina::Result::Failure*
29
+ - Muina::Result::Null*
30
+ - Muina::Result::Success*
31
+ - Muina::Service*
32
+ - Muina::SymbolHash*
33
+ - Muina::Unit*
34
+ - Muina::UNIT*
35
+ - Muina::UntypedArray*
36
+ - Muina::UntypedHash*
37
+ - Muina::Value*
38
+ - Muina::VERSION*
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --force-color
2
+ --format documentation
3
+ --order random
4
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,172 @@
1
+ ---
2
+ inherit_mode:
3
+ merge:
4
+ - Exclude
5
+ - IgnoredMethods
6
+
7
+ require:
8
+ - rubocop-performance
9
+ - rubocop-rake
10
+ - rubocop-rspec
11
+ - rubocop-sorbet
12
+
13
+ AllCops:
14
+ NewCops: enable
15
+ Exclude:
16
+ - bin/*
17
+ - vendor/**/*
18
+
19
+ Bundler/GemComment:
20
+ Enabled: false
21
+
22
+ Bundler/GemVersion:
23
+ Enabled: true
24
+ EnforcedStyle: forbidden
25
+
26
+ Layout/ClassStructure:
27
+ Enabled: true
28
+ Categories:
29
+ module_inclusion:
30
+ - include
31
+ - prepend
32
+ - extend
33
+ ExpectedOrder:
34
+ - module_inclusion
35
+ - constants
36
+ - public_class_methods
37
+ - initializer
38
+ - public_methods
39
+ - protected_methods
40
+ - private_methods
41
+
42
+ Lint/ConstantResolution:
43
+ Enabled: false
44
+ Only: []
45
+ Ignore: []
46
+
47
+ Metrics/MethodLength:
48
+ Max: 5
49
+
50
+ Metrics/ParameterLists:
51
+ Max: 4
52
+
53
+ Performance/SelectMap:
54
+ Enabled: true
55
+
56
+ RSpec/AlignLeftLetBrace:
57
+ Enabled: true
58
+
59
+ RSpec/AlignRightLetBrace:
60
+ Enabled: true
61
+
62
+ RSpec/DescribedClassModuleWrapping:
63
+ Enabled: true
64
+
65
+ RSpec/MessageExpectation:
66
+ Description: Checks for consistent message expectation style.
67
+ Enabled: false
68
+ EnforcedStyle: allow
69
+ SupportedStyles:
70
+ - allow
71
+ - expect
72
+
73
+ RSpec/Pending:
74
+ Enabled: true
75
+
76
+ Sorbet/EnforceSignatures:
77
+ Enabled: false
78
+
79
+ Sorbet/ForbidIncludeConstLiteral:
80
+ Enabled: true
81
+
82
+ Sorbet/ForbidSuperclassConstLiteral:
83
+ Enabled: true
84
+
85
+ Sorbet/ForbidTUnsafe:
86
+ Enabled: true
87
+
88
+ Sorbet/StrictSigil:
89
+ Enabled: true
90
+ Exclude: [ 'spec/**/*' ]
91
+
92
+ Style/Alias:
93
+ EnforcedStyle: prefer_alias_method
94
+
95
+ Style/ArrayCoercion:
96
+ Safe: false
97
+ Enabled: true
98
+
99
+ Style/AutoResourceCleanup:
100
+ Enabled: true
101
+
102
+ Style/ClassMethodsDefinitions:
103
+ Enabled: true
104
+ EnforcedStyle: def_self
105
+
106
+ Style/CollectionMethods:
107
+ Enabled: true
108
+
109
+ Style/ConstantVisibility:
110
+ Enabled: true
111
+
112
+ Style/DisableCopsWithinSourceCodeDirective:
113
+ Description: Forbids disabling/enabling cops within source code.
114
+ Enabled: false
115
+ AllowedCops: []
116
+
117
+ Style/DocumentationMethod:
118
+ Enabled: false
119
+ RequireForNonPublicMethods: true
120
+
121
+ Style/EmptyCaseCondition:
122
+ Enabled: false
123
+
124
+ Style/ImplicitRuntimeError:
125
+ Enabled: true
126
+
127
+ Style/InlineComment:
128
+ Enabled: false
129
+
130
+ Style/LambdaCall:
131
+ Enabled: false
132
+
133
+ Style/MethodCallWithArgsParentheses:
134
+ Enabled: false
135
+
136
+ Style/MethodCalledOnDoEndBlock:
137
+ Enabled: true
138
+
139
+ Style/MissingElse:
140
+ Enabled: true
141
+ EnforcedStyle: both
142
+
143
+ Style/MultilineMethodSignature:
144
+ Enabled: true
145
+
146
+ Style/OptionHash:
147
+ Enabled: true
148
+
149
+ # Supports --auto-correct
150
+ Style/ReturnNil:
151
+ Enabled: true
152
+
153
+ Style/Send:
154
+ Enabled: true
155
+
156
+ Style/SingleLineBlockParams:
157
+ Enabled: true
158
+
159
+ Style/StaticClass:
160
+ Enabled: true
161
+
162
+ Style/StringHashKeys:
163
+ Enabled: true
164
+
165
+ Style/TopLevelMethodDefinition:
166
+ Enabled: true
167
+
168
+ Style/TrailingCommaInBlockArgs:
169
+ Enabled: false
170
+
171
+ Style/UnlessLogicalOperators:
172
+ Enabled: false
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.6.6
data/.simplecov ADDED
@@ -0,0 +1,14 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ SimpleCov.start do
5
+ enable_coverage :branch
6
+ primary_coverage :branch
7
+
8
+ minimum_coverage line: 100, branch: 100
9
+ minimum_coverage_by_file line: 100, branch: 100
10
+
11
+ refuse_coverage_drop :line, :branch
12
+
13
+ add_filter '/spec/'
14
+ end
data/CHANGELOG.md ADDED
@@ -0,0 +1,38 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.2.0] - 2021-06-28
11
+
12
+ ### Added
13
+
14
+ * Muina::Action: step based result returning services
15
+ * Muina::Result#{value!,error!,and_then,or_else}: safe and unsafe ways of unwrapping values and errors
16
+
17
+ ### Removed
18
+
19
+ * Muina::Result#{value,error}
20
+
21
+
22
+ ## [0.1.1] - 2021-06-22
23
+
24
+ ### Fixed
25
+
26
+ * Add missing `zeitwerk` dependency to gemspec
27
+
28
+
29
+ ## [0.1.0] - 2021-06-21
30
+
31
+ ### Added
32
+
33
+ * Muina::Params: self extracting typed params
34
+ * Muina::PrivateCreation: mixin to make `.new` and `.allocate` private
35
+ * Muina::Result: type safe result monad
36
+ * Muina::Service: service object with typesafe constants and attributes
37
+ * Muina::Value: typesafe immutable struct-like objects
38
+ * `muina` CLI: to copy bundled rbi file
data/Gemfile ADDED
@@ -0,0 +1,34 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ source 'https://rubygems.org'
5
+
6
+ gemspec
7
+
8
+ gem 'awesome_print'
9
+ gem 'byebug'
10
+ gem 'faker'
11
+ gem 'flay'
12
+ gem 'flog'
13
+ gem 'guard'
14
+ gem 'guard-rspec'
15
+ gem 'guard-rubocop'
16
+ gem 'guard-shell'
17
+ gem 'irb'
18
+ gem 'lefthook'
19
+ gem 'mutant'
20
+ gem 'mutant-rspec'
21
+ gem 'parlour'
22
+ gem 'rake'
23
+ gem 'rspec'
24
+ gem 'rubocop'
25
+ gem 'rubocop-performance'
26
+ gem 'rubocop-rake'
27
+ gem 'rubocop-rspec'
28
+ gem 'rubocop-sorbet'
29
+ gem 'simplecov'
30
+ gem 'tapioca'
31
+
32
+ source 'https://com:KpggqCgIwNtt64FWb4dEMTx9xupW3w8D@gem.mutant.dev' do
33
+ gem 'mutant-license', require: false
34
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,265 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ muina (0.2.7)
5
+ actionpack
6
+ sorbet-rails
7
+ sorbet-runtime
8
+ sorbet-struct-comparable
9
+ zeitwerk
10
+
11
+ GEM
12
+ remote: https://com:KpggqCgIwNtt64FWb4dEMTx9xupW3w8D@gem.mutant.dev/
13
+ specs:
14
+ mutant-license (0.1.1.1.4043027289354708743625974235631451632228.0)
15
+
16
+ GEM
17
+ remote: https://rubygems.org/
18
+ specs:
19
+ actionpack (6.1.4)
20
+ actionview (= 6.1.4)
21
+ activesupport (= 6.1.4)
22
+ rack (~> 2.0, >= 2.0.9)
23
+ rack-test (>= 0.6.3)
24
+ rails-dom-testing (~> 2.0)
25
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
26
+ actionview (6.1.4)
27
+ activesupport (= 6.1.4)
28
+ builder (~> 3.1)
29
+ erubi (~> 1.4)
30
+ rails-dom-testing (~> 2.0)
31
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
32
+ activesupport (6.1.4)
33
+ concurrent-ruby (~> 1.0, >= 1.0.2)
34
+ i18n (>= 1.6, < 2)
35
+ minitest (>= 5.1)
36
+ tzinfo (~> 2.0)
37
+ zeitwerk (~> 2.3)
38
+ ast (2.4.2)
39
+ awesome_print (1.9.2)
40
+ builder (3.2.4)
41
+ byebug (11.1.3)
42
+ coderay (1.1.3)
43
+ colorize (0.8.1)
44
+ commander (4.6.0)
45
+ highline (~> 2.0.0)
46
+ concurrent-ruby (1.1.9)
47
+ crass (1.0.6)
48
+ diff-lcs (1.4.4)
49
+ docile (1.4.0)
50
+ erubi (1.10.0)
51
+ erubis (2.7.0)
52
+ faker (2.18.0)
53
+ i18n (>= 1.6, < 2)
54
+ ffi (1.15.3)
55
+ flay (2.12.1)
56
+ erubis (~> 2.7.0)
57
+ path_expander (~> 1.0)
58
+ ruby_parser (~> 3.0)
59
+ sexp_processor (~> 4.0)
60
+ flog (4.6.4)
61
+ path_expander (~> 1.0)
62
+ ruby_parser (~> 3.1, > 3.1.0)
63
+ sexp_processor (~> 4.8)
64
+ formatador (0.3.0)
65
+ guard (2.18.0)
66
+ formatador (>= 0.2.4)
67
+ listen (>= 2.7, < 4.0)
68
+ lumberjack (>= 1.0.12, < 2.0)
69
+ nenv (~> 0.1)
70
+ notiffany (~> 0.0)
71
+ pry (>= 0.13.0)
72
+ shellany (~> 0.0)
73
+ thor (>= 0.18.1)
74
+ guard-compat (1.2.1)
75
+ guard-rspec (4.7.3)
76
+ guard (~> 2.1)
77
+ guard-compat (~> 1.1)
78
+ rspec (>= 2.99.0, < 4.0)
79
+ guard-rubocop (1.4.0)
80
+ guard (~> 2.0)
81
+ rubocop (< 2.0)
82
+ guard-shell (0.7.2)
83
+ guard (>= 2.0.0)
84
+ guard-compat (~> 1.0)
85
+ highline (2.0.3)
86
+ i18n (1.8.10)
87
+ concurrent-ruby (~> 1.0)
88
+ io-console (0.5.9)
89
+ irb (1.3.6)
90
+ reline (>= 0.2.5)
91
+ lefthook (0.7.6)
92
+ listen (3.6.0)
93
+ rb-fsevent (~> 0.10, >= 0.10.3)
94
+ rb-inotify (~> 0.9, >= 0.9.10)
95
+ loofah (2.12.0)
96
+ crass (~> 1.0.2)
97
+ nokogiri (>= 1.5.9)
98
+ lumberjack (1.2.8)
99
+ method_source (1.0.0)
100
+ minitest (5.14.4)
101
+ mutant (0.10.32)
102
+ diff-lcs (~> 1.3)
103
+ parser (~> 3.0.0)
104
+ regexp_parser (~> 2.0, >= 2.0.3)
105
+ unparser (~> 0.6.0)
106
+ mutant-rspec (0.10.32)
107
+ mutant (= 0.10.32)
108
+ rspec-core (>= 3.8.0, < 4.0.0)
109
+ nenv (0.3.0)
110
+ nokogiri (1.12.3-x86_64-darwin)
111
+ racc (~> 1.4)
112
+ nokogiri (1.12.3-x86_64-linux)
113
+ racc (~> 1.4)
114
+ notiffany (0.1.3)
115
+ nenv (~> 0.1)
116
+ shellany (~> 0.0)
117
+ parallel (1.20.1)
118
+ parlour (6.0.1)
119
+ commander (~> 4.5)
120
+ parser
121
+ rainbow (~> 3.0)
122
+ sorbet-runtime (>= 0.5)
123
+ parser (3.0.2.0)
124
+ ast (~> 2.4.1)
125
+ path_expander (1.1.0)
126
+ polyfill (1.9.0)
127
+ pry (0.14.1)
128
+ coderay (~> 1.1)
129
+ method_source (~> 1.0)
130
+ racc (1.5.2)
131
+ rack (2.2.3)
132
+ rack-test (1.1.0)
133
+ rack (>= 1.0, < 3)
134
+ rails-dom-testing (2.0.3)
135
+ activesupport (>= 4.2.0)
136
+ nokogiri (>= 1.6)
137
+ rails-html-sanitizer (1.3.0)
138
+ loofah (~> 2.3)
139
+ rainbow (3.0.0)
140
+ rake (13.0.6)
141
+ rb-fsevent (0.11.0)
142
+ rb-inotify (0.10.1)
143
+ ffi (~> 1.0)
144
+ regexp_parser (2.1.1)
145
+ reline (0.2.6)
146
+ io-console (~> 0.5)
147
+ rexml (3.2.5)
148
+ rspec (3.10.0)
149
+ rspec-core (~> 3.10.0)
150
+ rspec-expectations (~> 3.10.0)
151
+ rspec-mocks (~> 3.10.0)
152
+ rspec-core (3.10.1)
153
+ rspec-support (~> 3.10.0)
154
+ rspec-expectations (3.10.1)
155
+ diff-lcs (>= 1.2.0, < 2.0)
156
+ rspec-support (~> 3.10.0)
157
+ rspec-mocks (3.10.2)
158
+ diff-lcs (>= 1.2.0, < 2.0)
159
+ rspec-support (~> 3.10.0)
160
+ rspec-support (3.10.2)
161
+ rubocop (1.18.4)
162
+ parallel (~> 1.10)
163
+ parser (>= 3.0.0.0)
164
+ rainbow (>= 2.2.2, < 4.0)
165
+ regexp_parser (>= 1.8, < 3.0)
166
+ rexml
167
+ rubocop-ast (>= 1.8.0, < 2.0)
168
+ ruby-progressbar (~> 1.7)
169
+ unicode-display_width (>= 1.4.0, < 3.0)
170
+ rubocop-ast (1.9.1)
171
+ parser (>= 3.0.1.1)
172
+ rubocop-performance (1.11.4)
173
+ rubocop (>= 1.7.0, < 2.0)
174
+ rubocop-ast (>= 0.4.0)
175
+ rubocop-rake (0.6.0)
176
+ rubocop (~> 1.0)
177
+ rubocop-rspec (2.4.0)
178
+ rubocop (~> 1.0)
179
+ rubocop-ast (>= 1.1.0)
180
+ rubocop-sorbet (0.6.2)
181
+ rubocop
182
+ ruby-progressbar (1.11.0)
183
+ ruby_parser (3.17.0)
184
+ sexp_processor (~> 4.15, >= 4.15.1)
185
+ safe_type (1.1.1)
186
+ sexp_processor (4.15.3)
187
+ shellany (0.0.1)
188
+ simplecov (0.21.2)
189
+ docile (~> 1.1)
190
+ simplecov-html (~> 0.11)
191
+ simplecov_json_formatter (~> 0.1)
192
+ simplecov-html (0.12.3)
193
+ simplecov_json_formatter (0.1.3)
194
+ sorbet (0.5.9030)
195
+ sorbet-static (= 0.5.9030)
196
+ sorbet-coerce (0.5.0)
197
+ polyfill (~> 1.8)
198
+ safe_type (~> 1.1, >= 1.1.1)
199
+ sorbet-runtime (>= 0.4.4704)
200
+ sorbet-rails (0.7.4)
201
+ method_source (>= 0.9.2)
202
+ parlour (>= 4.0.1)
203
+ parser (>= 2.7)
204
+ sorbet-coerce (>= 0.2.6)
205
+ sorbet-runtime (>= 0.5)
206
+ sorbet-runtime (0.5.9030)
207
+ sorbet-static (0.5.9030-universal-darwin-20)
208
+ sorbet-static (0.5.9030-x86_64-linux)
209
+ sorbet-struct-comparable (1.1.0)
210
+ sorbet-runtime (>= 0.5)
211
+ spoom (1.1.2)
212
+ colorize
213
+ sorbet (>= 0.5.6347)
214
+ sorbet-runtime
215
+ thor (>= 0.19.2)
216
+ tapioca (0.4.24)
217
+ bundler (>= 1.17.3)
218
+ parlour (>= 2.1.0)
219
+ pry (>= 0.12.2)
220
+ sorbet-runtime
221
+ sorbet-static (>= 0.4.4471)
222
+ spoom
223
+ thor (>= 0.19.2)
224
+ thor (1.1.0)
225
+ tzinfo (2.0.4)
226
+ concurrent-ruby (~> 1.0)
227
+ unicode-display_width (2.0.0)
228
+ unparser (0.6.0)
229
+ diff-lcs (~> 1.3)
230
+ parser (>= 3.0.0)
231
+ zeitwerk (2.4.2)
232
+
233
+ PLATFORMS
234
+ x86_64-darwin-20
235
+ x86_64-linux
236
+
237
+ DEPENDENCIES
238
+ awesome_print
239
+ byebug
240
+ faker
241
+ flay
242
+ flog
243
+ guard
244
+ guard-rspec
245
+ guard-rubocop
246
+ guard-shell
247
+ irb
248
+ lefthook
249
+ muina!
250
+ mutant
251
+ mutant-license!
252
+ mutant-rspec
253
+ parlour
254
+ rake
255
+ rspec
256
+ rubocop
257
+ rubocop-performance
258
+ rubocop-rake
259
+ rubocop-rspec
260
+ rubocop-sorbet
261
+ simplecov
262
+ tapioca
263
+
264
+ BUNDLED WITH
265
+ 2.2.20
data/Guardfile ADDED
@@ -0,0 +1,24 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ guard :rspec, cmd: 'bin/rspec' do
5
+ require 'guard/rspec/dsl'
6
+ dsl = Guard::RSpec::Dsl.new(self)
7
+
8
+ # RSpec files
9
+ rspec = dsl.rspec
10
+ watch(rspec.spec_helper) { rspec.spec_dir }
11
+ watch(rspec.spec_support) { rspec.spec_dir }
12
+ watch(rspec.spec_files)
13
+
14
+ # Ruby files
15
+ ruby = dsl.ruby
16
+ dsl.watch_spec_files_for(ruby.lib_files)
17
+ end
18
+
19
+ guard :rubocop do
20
+ watch(/.+\.rb$/)
21
+ watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
22
+ end
23
+
24
+ guard(:shell) { watch(/(.*)_spec.rb/) { `mutant run --fail-fast` } }
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # Muina
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/muina.svg)](https://badge.fury.io/rb/muina)
4
+
5
+ Typesafe base objects to make your code safer and cleaner.
6
+
7
+ ## Installation
8
+
9
+ ```ruby
10
+ gem 'muina'
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ * Muina::Action: self extracting, step based, result returning features
16
+ * Muina::Params: self extracting typed params
17
+ * Muina::PrivateCreation: mixin to make `.new` and `.allocate` private
18
+ * Muina::Result: type safe result monad
19
+ * Muina::Service: service object with typesafe constants and attributes
20
+ * Muina::Value: typesafe immutable struct-like objects
21
+ * `muina` CLI: to copy bundled rbi file
22
+
23
+ ## Development
24
+
25
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
26
+ You can also run `bin/console` for an interactive prompt that will allow you to experiment.
27
+
28
+ To install this gem onto your local machine, run `bundle exec rake install`.
29
+ To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`,
30
+ which will create a git tag for the version, push git commits and the created tag,
31
+ and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/vaporyhumo/muina.
36
+ This project is intended to be a safe, welcoming space for collaboration.
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/gem_tasks'
5
+ require 'rspec/core/rake_task'
6
+
7
+ RSpec::Core::RakeTask.new(:spec)
8
+
9
+ require 'rubocop/rake_task'
10
+
11
+ RuboCop::RakeTask.new
12
+
13
+ task default: %i[spec rubocop]
data/SECURITY.md ADDED
@@ -0,0 +1,14 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Currently supported version are:
6
+
7
+ | Version | Supported |
8
+ | ------- | ------------------ |
9
+ | 0.2.0 | :white_check_mark: |
10
+ | 0.1.x | :x: |
11
+
12
+ ## Reporting a Vulnerability
13
+
14
+ If you find any vulnerability please open an issue.