muina 0.2.8 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +25 -0
  3. data/README.md +0 -35
  4. data/lib/muina/maybe/none.rb +61 -0
  5. data/lib/muina/maybe/some.rb +62 -0
  6. data/lib/muina/maybe.rb +13 -0
  7. data/lib/muina/result/failure.rb +7 -18
  8. data/lib/muina/result/success.rb +7 -18
  9. data/lib/muina/result.rb +6 -8
  10. data/lib/muina/version.rb +1 -2
  11. data/lib/muina.rb +0 -32
  12. metadata +24 -225
  13. data/.github/workflows/main.yml +0 -16
  14. data/.gitignore +0 -5
  15. data/.mutant.yml +0 -38
  16. data/.rspec +0 -4
  17. data/.rubocop.yml +0 -181
  18. data/.ruby-version +0 -1
  19. data/.simplecov +0 -14
  20. data/CHANGELOG.md +0 -38
  21. data/Gemfile +0 -34
  22. data/Gemfile.lock +0 -265
  23. data/Guardfile +0 -24
  24. data/Rakefile +0 -13
  25. data/SECURITY.md +0 -14
  26. data/bin/bundle +0 -114
  27. data/bin/console +0 -15
  28. data/bin/flay +0 -29
  29. data/bin/flog +0 -29
  30. data/bin/guard +0 -29
  31. data/bin/irb +0 -29
  32. data/bin/lefthook +0 -29
  33. data/bin/mutant +0 -29
  34. data/bin/parlour +0 -29
  35. data/bin/rake +0 -29
  36. data/bin/rspec +0 -29
  37. data/bin/rubocop +0 -29
  38. data/bin/setup +0 -8
  39. data/bin/srb +0 -29
  40. data/bin/srb-rbi +0 -29
  41. data/bin/tapioca +0 -29
  42. data/exe/muina +0 -11
  43. data/lefthook.yml +0 -39
  44. data/lib/muina/action/params_factory.rb +0 -17
  45. data/lib/muina/action/step/command.rb +0 -33
  46. data/lib/muina/action/step/failure.rb +0 -18
  47. data/lib/muina/action/step/query.rb +0 -35
  48. data/lib/muina/action/step/result.rb +0 -56
  49. data/lib/muina/action/step.rb +0 -13
  50. data/lib/muina/action.rb +0 -73
  51. data/lib/muina/any.rb +0 -7
  52. data/lib/muina/classes.rb +0 -7
  53. data/lib/muina/deprecator.rb +0 -93
  54. data/lib/muina/entity.rb +0 -20
  55. data/lib/muina/module.rb +0 -6
  56. data/lib/muina/parameters.rb +0 -7
  57. data/lib/muina/params.rb +0 -19
  58. data/lib/muina/private_creation.rb +0 -12
  59. data/lib/muina/result/factory.rb +0 -37
  60. data/lib/muina/result/null.rb +0 -25
  61. data/lib/muina/service.rb +0 -25
  62. data/lib/muina/symbol_hash.rb +0 -7
  63. data/lib/muina/unit.rb +0 -10
  64. data/lib/muina/untyped_array.rb +0 -7
  65. data/lib/muina/untyped_hash.rb +0 -7
  66. data/lib/muina/value.rb +0 -24
  67. data/muina.gemspec +0 -35
  68. data/rbi/muina.rbi +0 -311
  69. data/sorbet/config +0 -2
  70. data/sorbet/rbi/gems/actionpack@6.1.4.rbi +0 -5045
  71. data/sorbet/rbi/gems/actionview@6.1.4.rbi +0 -2416
  72. data/sorbet/rbi/gems/activesupport@6.1.4.rbi +0 -3778
  73. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -54
  74. data/sorbet/rbi/gems/awesome_print@1.9.2.rbi +0 -322
  75. data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -8
  76. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -18
  77. data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -8
  78. data/sorbet/rbi/gems/colorize@0.8.1.rbi +0 -39
  79. data/sorbet/rbi/gems/commander@4.6.0.rbi +0 -8
  80. data/sorbet/rbi/gems/concurrent-ruby@1.1.9.rbi +0 -2403
  81. data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -123
  82. data/sorbet/rbi/gems/diff-lcs@1.4.4.rbi +0 -185
  83. data/sorbet/rbi/gems/docile@1.4.0.rbi +0 -54
  84. data/sorbet/rbi/gems/erubi@1.10.0.rbi +0 -36
  85. data/sorbet/rbi/gems/erubis@2.7.0.rbi +0 -8
  86. data/sorbet/rbi/gems/faker@2.18.0.rbi +0 -2469
  87. data/sorbet/rbi/gems/ffi@1.15.3.rbi +0 -8
  88. data/sorbet/rbi/gems/flay@2.12.1.rbi +0 -178
  89. data/sorbet/rbi/gems/flog@4.6.4.rbi +0 -70
  90. data/sorbet/rbi/gems/formatador@0.3.0.rbi +0 -8
  91. data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +0 -49
  92. data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +0 -233
  93. data/sorbet/rbi/gems/guard-rubocop@1.4.0.rbi +0 -66
  94. data/sorbet/rbi/gems/guard-shell@0.7.2.rbi +0 -69
  95. data/sorbet/rbi/gems/guard@2.18.0.rbi +0 -617
  96. data/sorbet/rbi/gems/highline@2.0.3.rbi +0 -8
  97. data/sorbet/rbi/gems/i18n@1.8.10.rbi +0 -616
  98. data/sorbet/rbi/gems/io-console@0.5.9.rbi +0 -8
  99. data/sorbet/rbi/gems/irb@1.3.6.rbi +0 -452
  100. data/sorbet/rbi/gems/lefthook@0.7.6.rbi +0 -8
  101. data/sorbet/rbi/gems/listen@3.6.0.rbi +0 -476
  102. data/sorbet/rbi/gems/loofah@2.10.0.rbi +0 -223
  103. data/sorbet/rbi/gems/lumberjack@1.2.8.rbi +0 -431
  104. data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -8
  105. data/sorbet/rbi/gems/minitest@5.14.4.rbi +0 -344
  106. data/sorbet/rbi/gems/mutant-license@0.1.1.1.4043027289354708743625974235631451632228.0.rbi +0 -8
  107. data/sorbet/rbi/gems/mutant-rspec@0.10.32.rbi +0 -8
  108. data/sorbet/rbi/gems/mutant@0.10.32.rbi +0 -4154
  109. data/sorbet/rbi/gems/nenv@0.3.0.rbi +0 -88
  110. data/sorbet/rbi/gems/nokogiri@1.11.7.rbi +0 -1422
  111. data/sorbet/rbi/gems/notiffany@0.1.3.rbi +0 -331
  112. data/sorbet/rbi/gems/parallel@1.20.1.rbi +0 -113
  113. data/sorbet/rbi/gems/parlour@6.0.1.rbi +0 -1726
  114. data/sorbet/rbi/gems/parser@3.0.2.0.rbi +0 -1683
  115. data/sorbet/rbi/gems/path_expander@1.1.0.rbi +0 -24
  116. data/sorbet/rbi/gems/polyfill@1.9.0.rbi +0 -393
  117. data/sorbet/rbi/gems/pry@0.14.1.rbi +0 -8
  118. data/sorbet/rbi/gems/racc@1.5.2.rbi +0 -47
  119. data/sorbet/rbi/gems/rack-test@1.1.0.rbi +0 -272
  120. data/sorbet/rbi/gems/rack@2.2.3.rbi +0 -1618
  121. data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +0 -92
  122. data/sorbet/rbi/gems/rails-html-sanitizer@1.3.0.rbi +0 -183
  123. data/sorbet/rbi/gems/rainbow@3.0.0.rbi +0 -153
  124. data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -808
  125. data/sorbet/rbi/gems/rb-fsevent@0.11.0.rbi +0 -8
  126. data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +0 -8
  127. data/sorbet/rbi/gems/regexp_parser@2.1.1.rbi +0 -1120
  128. data/sorbet/rbi/gems/reline@0.2.6.rbi +0 -662
  129. data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -672
  130. data/sorbet/rbi/gems/rspec-core@3.10.1.rbi +0 -2509
  131. data/sorbet/rbi/gems/rspec-expectations@3.10.1.rbi +0 -1574
  132. data/sorbet/rbi/gems/rspec-mocks@3.10.2.rbi +0 -1462
  133. data/sorbet/rbi/gems/rspec-support@3.10.2.rbi +0 -509
  134. data/sorbet/rbi/gems/rspec@3.10.0.rbi +0 -38
  135. data/sorbet/rbi/gems/rubocop-ast@1.8.0.rbi +0 -2194
  136. data/sorbet/rbi/gems/rubocop-performance@1.11.4.rbi +0 -899
  137. data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +0 -118
  138. data/sorbet/rbi/gems/rubocop-rspec@2.4.0.rbi +0 -1805
  139. data/sorbet/rbi/gems/rubocop-sorbet@0.6.2.rbi +0 -288
  140. data/sorbet/rbi/gems/rubocop@1.18.4.rbi +0 -13197
  141. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -405
  142. data/sorbet/rbi/gems/ruby_parser@3.16.0.rbi +0 -4528
  143. data/sorbet/rbi/gems/safe_type@1.1.1.rbi +0 -157
  144. data/sorbet/rbi/gems/sexp_processor@4.15.3.rbi +0 -359
  145. data/sorbet/rbi/gems/shellany@0.0.1.rbi +0 -28
  146. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -89
  147. data/sorbet/rbi/gems/simplecov@0.21.2.rbi +0 -577
  148. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.3.rbi +0 -8
  149. data/sorbet/rbi/gems/sorbet-coerce@0.5.0.rbi +0 -42
  150. data/sorbet/rbi/gems/sorbet-rails@0.7.4.rbi +0 -8
  151. data/sorbet/rbi/gems/sorbet-struct-comparable@1.1.0.rbi +0 -17
  152. data/sorbet/rbi/gems/spoom@1.1.1.rbi +0 -1193
  153. data/sorbet/rbi/gems/tapioca@0.4.23.rbi +0 -1826
  154. data/sorbet/rbi/gems/thor@1.1.0.rbi +0 -838
  155. data/sorbet/rbi/gems/tzinfo@2.0.4.rbi +0 -856
  156. data/sorbet/rbi/gems/unicode-display_width@2.0.0.rbi +0 -26
  157. data/sorbet/rbi/gems/unparser@0.6.0.rbi +0 -2037
  158. data/sorbet/rbi/gems/zeitwerk@2.4.2.rbi +0 -173
  159. data/sorbet/rbi/todo.rbi +0 -8
  160. data/sorbet/rbi/typed_params.rbi +0 -7
  161. data/sorbet/tapioca/require.rb +0 -16
data/bin/bundle DELETED
@@ -1,114 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'bundle' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "rubygems"
12
-
13
- m = Module.new do
14
- module_function
15
-
16
- def invoked_as_script?
17
- File.expand_path($0) == File.expand_path(__FILE__)
18
- end
19
-
20
- def env_var_version
21
- ENV["BUNDLER_VERSION"]
22
- end
23
-
24
- def cli_arg_version
25
- return unless invoked_as_script? # don't want to hijack other binstubs
26
- return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
- bundler_version = nil
28
- update_index = nil
29
- ARGV.each_with_index do |a, i|
30
- if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31
- bundler_version = a
32
- end
33
- next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
- bundler_version = $1
35
- update_index = i
36
- end
37
- bundler_version
38
- end
39
-
40
- def gemfile
41
- gemfile = ENV["BUNDLE_GEMFILE"]
42
- return gemfile if gemfile && !gemfile.empty?
43
-
44
- File.expand_path("../../Gemfile", __FILE__)
45
- end
46
-
47
- def lockfile
48
- lockfile =
49
- case File.basename(gemfile)
50
- when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
51
- else "#{gemfile}.lock"
52
- end
53
- File.expand_path(lockfile)
54
- end
55
-
56
- def lockfile_version
57
- return unless File.file?(lockfile)
58
- lockfile_contents = File.read(lockfile)
59
- return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
- Regexp.last_match(1)
61
- end
62
-
63
- def bundler_version
64
- @bundler_version ||=
65
- env_var_version || cli_arg_version ||
66
- lockfile_version
67
- end
68
-
69
- def bundler_requirement
70
- return "#{Gem::Requirement.default}.a" unless bundler_version
71
-
72
- bundler_gem_version = Gem::Version.new(bundler_version)
73
-
74
- requirement = bundler_gem_version.approximate_recommendation
75
-
76
- return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
77
-
78
- requirement += ".a" if bundler_gem_version.prerelease?
79
-
80
- requirement
81
- end
82
-
83
- def load_bundler!
84
- ENV["BUNDLE_GEMFILE"] ||= gemfile
85
-
86
- activate_bundler
87
- end
88
-
89
- def activate_bundler
90
- gem_error = activation_error_handling do
91
- gem "bundler", bundler_requirement
92
- end
93
- return if gem_error.nil?
94
- require_error = activation_error_handling do
95
- require "bundler/version"
96
- end
97
- return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
98
- warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
99
- exit 42
100
- end
101
-
102
- def activation_error_handling
103
- yield
104
- nil
105
- rescue StandardError, LoadError => e
106
- e
107
- end
108
- end
109
-
110
- m.load_bundler!
111
-
112
- if m.invoked_as_script?
113
- load Gem.bin_path("bundler", "bundle")
114
- end
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require 'bundler/setup'
5
- require 'muina'
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require 'irb'
15
- IRB.start(__FILE__)
data/bin/flay DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'flay' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require 'pathname'
12
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path('bundle', __dir__)
16
-
17
- if File.file?(bundle_binstub)
18
- if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require 'rubygems'
27
- require 'bundler/setup'
28
-
29
- load Gem.bin_path('flay', 'flay')
data/bin/flog DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'flog' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("flog", "flog")
data/bin/guard DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'guard' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("guard", "guard")
data/bin/irb DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'irb' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("irb", "irb")
data/bin/lefthook DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'lefthook' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require 'pathname'
12
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path('bundle', __dir__)
16
-
17
- if File.file?(bundle_binstub)
18
- if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require 'rubygems'
27
- require 'bundler/setup'
28
-
29
- load Gem.bin_path('lefthook', 'lefthook')
data/bin/mutant DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'mutant' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require 'pathname'
12
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path('bundle', __dir__)
16
-
17
- if File.file?(bundle_binstub)
18
- if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require 'rubygems'
27
- require 'bundler/setup'
28
-
29
- load Gem.bin_path('mutant', 'mutant')
data/bin/parlour DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'parlour' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("parlour", "parlour")
data/bin/rake DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rake' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("rake", "rake")
data/bin/rspec DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rspec' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require 'pathname'
12
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path('bundle', __dir__)
16
-
17
- if File.file?(bundle_binstub)
18
- if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require 'rubygems'
27
- require 'bundler/setup'
28
-
29
- load Gem.bin_path('rspec-core', 'rspec')
data/bin/rubocop DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rubocop' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require 'pathname'
12
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path('bundle', __dir__)
16
-
17
- if File.file?(bundle_binstub)
18
- if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require 'rubygems'
27
- require 'bundler/setup'
28
-
29
- load Gem.bin_path('rubocop', 'rubocop')
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/bin/srb DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'srb' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require 'pathname'
12
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path('bundle', __dir__)
16
-
17
- if File.file?(bundle_binstub)
18
- if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require 'rubygems'
27
- require 'bundler/setup'
28
-
29
- load Gem.bin_path('sorbet', 'srb')
data/bin/srb-rbi DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'srb-rbi' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require 'pathname'
12
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path('bundle', __dir__)
16
-
17
- if File.file?(bundle_binstub)
18
- if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require 'rubygems'
27
- require 'bundler/setup'
28
-
29
- load Gem.bin_path('sorbet', 'srb-rbi')
data/bin/tapioca DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'tapioca' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require 'pathname'
12
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path('bundle', __dir__)
16
-
17
- if File.file?(bundle_binstub)
18
- if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require 'rubygems'
27
- require 'bundler/setup'
28
-
29
- load Gem.bin_path('tapioca', 'tapioca')
data/exe/muina DELETED
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # typed: strict
3
- # frozen_string_literal: true
4
-
5
- require 'fileutils'
6
- require_relative '../lib/muina/version'
7
-
8
- src = File.expand_path("#{File.dirname(__FILE__)}/../rbi/muina.rbi")
9
- dst = File.expand_path("#{Dir.pwd}/sorbet/rbi/gems/muina@#{Muina::VERSION}.rbi")
10
-
11
- FileUtils.cp src, dst
data/lefthook.yml DELETED
@@ -1,39 +0,0 @@
1
- ---
2
- pre-commit:
3
- parallel: true
4
- commands:
5
- flay:
6
- run: bin/flay -spec
7
- rspec:
8
- run: bin/rspec
9
- rubocop:
10
- run: bin/rubocop -fs
11
- sorbet:
12
- run: bin/srb tc
13
-
14
-
15
- audit:
16
- parallel: true
17
- commands:
18
- rspec:
19
- run: bin/rspec
20
- rubocop:
21
- run: bin/rubocop -fs
22
- sorbet:
23
- run: bin/srb tc
24
- flay:
25
- run: bin/flay -spec
26
-
27
- full_audit:
28
- parallel: true
29
- commands:
30
- flay:
31
- run: bin/flay -spec
32
- mutant:
33
- run: bin/mutant run
34
- rspec:
35
- run: bin/rspec
36
- rubocop:
37
- run: bin/rubocop -fs
38
- sorbet:
39
- run: bin/srb tc
@@ -1,17 +0,0 @@
1
- # typed: strict
2
- # frozen_string_literal: true
3
-
4
- module Muina
5
- class Action
6
- # Cast params to ActionController::Parameters
7
- module ParamsFactory
8
- def self.build(params)
9
- if params.instance_of?(Hash)
10
- ActionController::Parameters.new(params)
11
- else
12
- params
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,33 +0,0 @@
1
- # typed: strict
2
- # frozen_string_literal: true
3
-
4
- module Muina
5
- class Action
6
- class Step < Value
7
- # Commands are meant to run code with side effects and return no value.
8
- class Command < self
9
- def call(action = Object.new) # rubocop:disable Metrics/MethodLength
10
- return if action.instance_variable_get(:@__failure__)
11
-
12
- case result = Muina::Result() { action.instance_eval(&step) }
13
- when Muina::Result::Success then success
14
- when Muina::Result::Failure then failure(action, result)
15
- # :nocov:
16
- else T.absurd(result)
17
- # :nocov:
18
- end
19
- end
20
-
21
- private
22
-
23
- def success
24
- # noop
25
- end
26
-
27
- def failure(action, result)
28
- action.instance_variable_set(:@__failure__, result)
29
- end
30
- end
31
- end
32
- end
33
- end
@@ -1,18 +0,0 @@
1
- # typed: strict
2
- # frozen_string_literal: true
3
-
4
- module Muina
5
- class Action
6
- class Step < Value
7
- # Failures wrap the result into the Failure side of the Result Monad and won't run if result is already set
8
- class Failure < self
9
- def call(action = nil)
10
- return if action.instance_variable_get(:@__result__) || !action.instance_variable_get(:@__failure__)
11
-
12
- result = Muina::Failure(Muina::Result() { action.instance_eval(&step) }.value!)
13
- action.instance_variable_set(:@__failure__, result)
14
- end
15
- end
16
- end
17
- end
18
- end