primitive 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.bundle/config +2 -0
- data/.editorconfig +8 -0
- data/.github/workflows/ci.yaml +29 -0
- data/.gitignore +7 -0
- data/.rubocop.yml +16 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +7 -0
- data/CODE_OF_CONDUCT.md +73 -0
- data/Gemfile +5 -0
- data/Guardfile +17 -0
- data/LICENSE +5 -0
- data/README.md +107 -0
- data/Rakefile +12 -0
- data/bin/_guard-core +27 -0
- data/bin/bundle +109 -0
- data/bin/bundle-audit +27 -0
- data/bin/bundler-audit +27 -0
- data/bin/coderay +27 -0
- data/bin/guard +27 -0
- data/bin/htmldiff +27 -0
- data/bin/ldiff +27 -0
- data/bin/listen +27 -0
- data/bin/pry +27 -0
- data/bin/racc +27 -0
- data/bin/rake +27 -0
- data/bin/rspec +27 -0
- data/bin/rubocop +27 -0
- data/bin/ruby-parse +27 -0
- data/bin/ruby-rewrite +27 -0
- data/bin/spoom +27 -0
- data/bin/srb +27 -0
- data/bin/srb-rbi +27 -0
- data/bin/tapioca +27 -0
- data/bin/thor +27 -0
- data/bin/yard +27 -0
- data/bin/yardoc +27 -0
- data/bin/yri +27 -0
- data/lib/primitive/entity.rb +50 -0
- data/lib/primitive/version.rb +6 -0
- data/lib/primitive.rb +6 -0
- data/primitive.gemspec +45 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/ansi@1.5.0.rbi +8 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +8 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +8 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +145 -0
- data/sorbet/rbi/gems/ffi@1.16.3.rbi +8 -0
- data/sorbet/rbi/gems/formatador@1.1.0.rbi +8 -0
- data/sorbet/rbi/gems/guard-compat@1.2.1.rbi +66 -0
- data/sorbet/rbi/gems/guard-rspec@4.7.3.rbi +562 -0
- data/sorbet/rbi/gems/guard@2.18.1.rbi +8 -0
- data/sorbet/rbi/gems/json@2.7.1.rbi +1561 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +8 -0
- data/sorbet/rbi/gems/listen@3.8.0.rbi +8 -0
- data/sorbet/rbi/gems/lumberjack@1.2.9.rbi +8 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +8 -0
- data/sorbet/rbi/gems/nenv@0.3.0.rbi +8 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/notiffany@0.1.3.rbi +8 -0
- data/sorbet/rbi/gems/parallel@1.24.0.rbi +280 -0
- data/sorbet/rbi/gems/parser@3.3.0.5.rbi +5472 -0
- data/sorbet/rbi/gems/prism@0.27.0.rbi +35611 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +8 -0
- data/sorbet/rbi/gems/racc@1.7.3.rbi +161 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
- data/sorbet/rbi/gems/rake@13.1.0.rbi +3027 -0
- data/sorbet/rbi/gems/rb-fsevent@0.11.2.rbi +8 -0
- data/sorbet/rbi/gems/rb-inotify@0.10.1.rbi +8 -0
- data/sorbet/rbi/gems/rbi@0.1.12.rbi +3071 -0
- data/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +8 -0
- data/sorbet/rbi/gems/rexml@3.2.6.rbi +8 -0
- data/sorbet/rbi/gems/rspec-core@3.12.2.rbi +8 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +8 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +8 -0
- data/sorbet/rbi/gems/rspec-support@3.12.1.rbi +8 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-rake@0.6.0.rbi +8 -0
- data/sorbet/rbi/gems/rubocop-rspec@2.24.1.rbi +8 -0
- data/sorbet/rbi/gems/rubocop@1.60.2.rbi +8 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
- data/sorbet/rbi/gems/shellany@0.0.1.rbi +8 -0
- data/sorbet/rbi/gems/simplecov-console@0.9.1.rbi +102 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2148 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
- data/sorbet/rbi/gems/spoom@1.3.2.rbi +4420 -0
- data/sorbet/rbi/gems/tapioca@0.13.3.rbi +3520 -0
- data/sorbet/rbi/gems/terminal-table@3.0.2.rbi +8 -0
- data/sorbet/rbi/gems/thor@1.3.1.rbi +4318 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +8 -0
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +428 -0
- data/sorbet/rbi/gems/yard@0.9.36.rbi +18085 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +363 -0
@@ -0,0 +1,145 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `erubi` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem erubi`.
|
6
|
+
|
7
|
+
# source://erubi//lib/erubi.rb#3
|
8
|
+
module Erubi
|
9
|
+
class << self
|
10
|
+
def h(_arg0); end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
# source://erubi//lib/erubi.rb#54
|
15
|
+
class Erubi::Engine
|
16
|
+
# Initialize a new Erubi::Engine. Options:
|
17
|
+
# +:bufval+ :: The value to use for the buffer variable, as a string (default <tt>'::String.new'</tt>).
|
18
|
+
# +:bufvar+ :: The variable name to use for the buffer variable, as a string.
|
19
|
+
# +:chain_appends+ :: Whether to chain <tt><<</t> calls to the buffer variable. Offers better
|
20
|
+
# performance, but can cause issues when the buffer variable is reassigned during
|
21
|
+
# template rendering (default +false+).
|
22
|
+
# +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar.
|
23
|
+
# +:escapefunc+ :: The function to use for escaping, as a string (default: <tt>'::Erubi.h'</tt>).
|
24
|
+
# +:escape+ :: Whether to make <tt><%=</tt> escape by default, and <tt><%==</tt> not escape by default.
|
25
|
+
# +:escape_html+ :: Same as +:escape+, with lower priority.
|
26
|
+
# +:filename+ :: The filename for the template.
|
27
|
+
# the resulting source code. Note this may cause problems if you are wrapping the resulting
|
28
|
+
# source code in other code, because the magic comment only has an effect at the beginning of
|
29
|
+
# the file, and having the magic comment later in the file can trigger warnings.
|
30
|
+
# +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with <tt>.freeze</tt>
|
31
|
+
# (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older).
|
32
|
+
# Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled
|
33
|
+
# in order to improve performance.
|
34
|
+
# +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default <tt>'<%'</tt>).
|
35
|
+
# +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default <tt>'%>'</tt>).
|
36
|
+
# +:outvar+ :: Same as +:bufvar+, with lower priority.
|
37
|
+
# +:postamble+ :: The postamble for the template, by default returns the resulting source code.
|
38
|
+
# +:preamble+ :: The preamble for the template, by default initializes the buffer variable.
|
39
|
+
# +:regexp+ :: The regexp to use for scanning.
|
40
|
+
# +:src+ :: The initial value to use for the source code, an empty string by default.
|
41
|
+
# +:trim+ :: Whether to trim leading and trailing whitespace, true by default.
|
42
|
+
#
|
43
|
+
# @return [Engine] a new instance of Engine
|
44
|
+
#
|
45
|
+
# source://erubi//lib/erubi.rb#94
|
46
|
+
def initialize(input, properties = T.unsafe(nil)); end
|
47
|
+
|
48
|
+
# The variable name used for the buffer variable.
|
49
|
+
#
|
50
|
+
# source://erubi//lib/erubi.rb#65
|
51
|
+
def bufvar; end
|
52
|
+
|
53
|
+
# The filename of the template, if one was given.
|
54
|
+
#
|
55
|
+
# source://erubi//lib/erubi.rb#62
|
56
|
+
def filename; end
|
57
|
+
|
58
|
+
# The frozen ruby source code generated from the template, which can be evaled.
|
59
|
+
#
|
60
|
+
# source://erubi//lib/erubi.rb#59
|
61
|
+
def src; end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
# Add ruby code to the template
|
66
|
+
#
|
67
|
+
# source://erubi//lib/erubi.rb#226
|
68
|
+
def add_code(code); end
|
69
|
+
|
70
|
+
# Add the given ruby expression result to the template,
|
71
|
+
# escaping it based on the indicator given and escape flag.
|
72
|
+
#
|
73
|
+
# source://erubi//lib/erubi.rb#235
|
74
|
+
def add_expression(indicator, code); end
|
75
|
+
|
76
|
+
# Add the result of Ruby expression to the template
|
77
|
+
#
|
78
|
+
# source://erubi//lib/erubi.rb#244
|
79
|
+
def add_expression_result(code); end
|
80
|
+
|
81
|
+
# Add the escaped result of Ruby expression to the template
|
82
|
+
#
|
83
|
+
# source://erubi//lib/erubi.rb#249
|
84
|
+
def add_expression_result_escaped(code); end
|
85
|
+
|
86
|
+
# Add the given postamble to the src. Can be overridden in subclasses
|
87
|
+
# to make additional changes to src that depend on the current state.
|
88
|
+
#
|
89
|
+
# source://erubi//lib/erubi.rb#255
|
90
|
+
def add_postamble(postamble); end
|
91
|
+
|
92
|
+
# Add raw text to the template. Modifies argument if argument is mutable as a memory optimization.
|
93
|
+
# Must be called with a string, cannot be called with nil (Rails's subclass depends on it).
|
94
|
+
#
|
95
|
+
# source://erubi//lib/erubi.rb#213
|
96
|
+
def add_text(text); end
|
97
|
+
|
98
|
+
# Raise an exception, as the base engine class does not support handling other indicators.
|
99
|
+
#
|
100
|
+
# @raise [ArgumentError]
|
101
|
+
#
|
102
|
+
# source://erubi//lib/erubi.rb#261
|
103
|
+
def handle(indicator, code, tailch, rspace, lspace); end
|
104
|
+
|
105
|
+
# Make sure that any current expression has been terminated.
|
106
|
+
# The default is to terminate all expressions, but when
|
107
|
+
# the chain_appends option is used, expressions may not be
|
108
|
+
# terminated.
|
109
|
+
#
|
110
|
+
# source://erubi//lib/erubi.rb#289
|
111
|
+
def terminate_expression; end
|
112
|
+
|
113
|
+
# Make sure the buffer variable is the target of the next append
|
114
|
+
# before yielding to the block. Mark that the buffer is the target
|
115
|
+
# of the next append after the block executes.
|
116
|
+
#
|
117
|
+
# This method should only be called if the block will result in
|
118
|
+
# code where << will append to the bufvar.
|
119
|
+
#
|
120
|
+
# source://erubi//lib/erubi.rb#271
|
121
|
+
def with_buffer; end
|
122
|
+
end
|
123
|
+
|
124
|
+
# The default regular expression used for scanning.
|
125
|
+
#
|
126
|
+
# source://erubi//lib/erubi.rb#56
|
127
|
+
Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp)
|
128
|
+
|
129
|
+
# source://erubi//lib/erubi.rb#17
|
130
|
+
Erubi::FREEZE_TEMPLATE_LITERALS = T.let(T.unsafe(nil), TrueClass)
|
131
|
+
|
132
|
+
# source://erubi//lib/erubi.rb#15
|
133
|
+
Erubi::MATCH_METHOD = T.let(T.unsafe(nil), Symbol)
|
134
|
+
|
135
|
+
# source://erubi//lib/erubi.rb#8
|
136
|
+
Erubi::RANGE_FIRST = T.let(T.unsafe(nil), Integer)
|
137
|
+
|
138
|
+
# source://erubi//lib/erubi.rb#9
|
139
|
+
Erubi::RANGE_LAST = T.let(T.unsafe(nil), Integer)
|
140
|
+
|
141
|
+
# source://erubi//lib/erubi.rb#16
|
142
|
+
Erubi::SKIP_DEFINED_FOR_INSTANCE_VARIABLE = T.let(T.unsafe(nil), TrueClass)
|
143
|
+
|
144
|
+
# source://erubi//lib/erubi.rb#4
|
145
|
+
Erubi::VERSION = T.let(T.unsafe(nil), String)
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `ffi` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem ffi`.
|
6
|
+
|
7
|
+
# THIS IS AN EMPTY RBI FILE.
|
8
|
+
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `formatador` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem formatador`.
|
6
|
+
|
7
|
+
# THIS IS AN EMPTY RBI FILE.
|
8
|
+
# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `guard-compat` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem guard-compat`.
|
6
|
+
|
7
|
+
# Provided empty definition so requiring the plugin without Guard won't crash
|
8
|
+
# (e.g. when added to a Gemfile without `require: false`)
|
9
|
+
#
|
10
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#5
|
11
|
+
module Guard; end
|
12
|
+
|
13
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#24
|
14
|
+
module Guard::Compat
|
15
|
+
class << self
|
16
|
+
# TODO: this is just a temporary workaround to allow plugins
|
17
|
+
# to use watcher patterns in run_all
|
18
|
+
#
|
19
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#27
|
20
|
+
def matching_files(plugin, files); end
|
21
|
+
|
22
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#39
|
23
|
+
def watched_directories; end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#54
|
28
|
+
module Guard::Compat::UI
|
29
|
+
class << self
|
30
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#55
|
31
|
+
def color(text, *colors); end
|
32
|
+
|
33
|
+
# @return [Boolean]
|
34
|
+
#
|
35
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#63
|
36
|
+
def color_enabled?; end
|
37
|
+
|
38
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#95
|
39
|
+
def debug(message, options = T.unsafe(nil)); end
|
40
|
+
|
41
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#103
|
42
|
+
def deprecation(message, options = T.unsafe(nil)); end
|
43
|
+
|
44
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#87
|
45
|
+
def error(message, options = T.unsafe(nil)); end
|
46
|
+
|
47
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#71
|
48
|
+
def info(message, options = T.unsafe(nil)); end
|
49
|
+
|
50
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#111
|
51
|
+
def notify(msg, options = T.unsafe(nil)); end
|
52
|
+
|
53
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#79
|
54
|
+
def warning(message, options = T.unsafe(nil)); end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Monkey patch Plugin to just keep the interface
|
59
|
+
#
|
60
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#13
|
61
|
+
class Guard::Plugin
|
62
|
+
# @return [Plugin] a new instance of Plugin
|
63
|
+
#
|
64
|
+
# source://guard-compat//lib/guard/compat/plugin.rb#14
|
65
|
+
def initialize(_options = T.unsafe(nil)); end
|
66
|
+
end
|