roast-ai 0.4.7 → 0.4.9
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/.gitignore +1 -0
- data/.rubocop.yml +1 -0
- data/Gemfile.lock +3 -3
- data/README.md +9 -5
- data/Rakefile +2 -0
- data/dsl/less_simple.rb +112 -0
- data/dsl/prototype.rb +17 -0
- data/dsl/simple.rb +5 -7
- data/dsl/step_communication.rb +18 -0
- data/examples/README.md +9 -0
- data/examples/available_tools_demo/workflow.yml +1 -1
- data/examples/basic_prompt_workflow/workflow.md +1 -0
- data/examples/basic_prompt_workflow/workflow.yml +14 -0
- data/examples/grading/README.md +1 -26
- data/examples/grading/analyze_coverage/prompt.md +1 -1
- data/examples/grading/calculate_final_grade.rb +10 -13
- data/examples/grading/format_result.rb +5 -8
- data/examples/grading/generate_grades/prompt.md +1 -1
- data/examples/grading/generate_recommendations/prompt.md +1 -1
- data/examples/grading/read_dependencies/prompt.md +0 -1
- data/examples/grading/verify_test_helpers/prompt.md +1 -1
- data/examples/grading/workflow.md +1 -4
- data/examples/grading/workflow.yml +3 -16
- data/lib/roast/dsl/cog/config.rb +31 -0
- data/lib/roast/dsl/cog/stack.rb +21 -0
- data/lib/roast/dsl/cog/store.rb +26 -0
- data/lib/roast/dsl/cog.rb +70 -0
- data/lib/roast/dsl/cog_execution_context.rb +29 -0
- data/lib/roast/dsl/cogs/cmd.rb +55 -0
- data/lib/roast/dsl/cogs/graph.rb +53 -0
- data/lib/roast/dsl/cogs.rb +65 -0
- data/lib/roast/dsl/config_context.rb +54 -0
- data/lib/roast/dsl/executor.rb +62 -7
- data/lib/roast/dsl/workflow_execution_context.rb +47 -0
- data/lib/roast/error.rb +7 -0
- data/lib/roast/errors.rb +3 -3
- data/lib/roast/graph/edge.rb +25 -0
- data/lib/roast/graph/node.rb +40 -0
- data/lib/roast/graph/quantum_edge.rb +27 -0
- data/lib/roast/graph/threaded_exec.rb +93 -0
- data/lib/roast/graph.rb +233 -0
- data/lib/roast/resources/api_resource.rb +2 -2
- data/lib/roast/resources/url_resource.rb +2 -2
- data/lib/roast/tools/apply_diff.rb +1 -1
- data/lib/roast/tools/ask_user.rb +1 -1
- data/lib/roast/tools/bash.rb +1 -1
- data/lib/roast/tools/cmd.rb +2 -2
- data/lib/roast/tools/coding_agent.rb +2 -2
- data/lib/roast/tools/grep.rb +1 -1
- data/lib/roast/tools/read_file.rb +1 -1
- data/lib/roast/tools/search_file.rb +1 -1
- data/lib/roast/tools/swarm.rb +1 -1
- data/lib/roast/tools/update_files.rb +2 -2
- data/lib/roast/tools/write_file.rb +1 -1
- data/lib/roast/tools.rb +1 -1
- data/lib/roast/value_objects/api_token.rb +1 -1
- data/lib/roast/value_objects/uri_base.rb +1 -1
- data/lib/roast/value_objects/workflow_path.rb +1 -1
- data/lib/roast/version.rb +1 -1
- data/lib/roast/workflow/base_step.rb +2 -3
- data/lib/roast/workflow/base_workflow.rb +38 -2
- data/lib/roast/workflow/command_executor.rb +1 -1
- data/lib/roast/workflow/configuration_loader.rb +1 -1
- data/lib/roast/workflow/error_handler.rb +1 -1
- data/lib/roast/workflow/step_executor_registry.rb +1 -1
- data/lib/roast/workflow/step_loader.rb +3 -8
- data/lib/roast/workflow/workflow_executor.rb +1 -1
- data/lib/roast.rb +7 -2
- data/sorbet/config +2 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/activesupport.rbi +495 -0
- data/sorbet/rbi/annotations/faraday.rbi +17 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/annotations/mocha.rbi +34 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/annotations/webmock.rbi +9 -0
- data/sorbet/rbi/gems/rbs-inline@0.12.0.rbi +2170 -0
- data/sorbet/rbi/gems/{rexml@3.4.1.rbi → rexml@3.4.2.rbi} +284 -239
- data/sorbet/rbi/shims/lib/roast/dsl/config_context.rbi +11 -0
- data/sorbet/rbi/shims/lib/roast/dsl/workflow_execution_context.rbi +11 -0
- data/sorbet/rbi/todo.rbi +7 -0
- metadata +37 -231
- data/CHANGELOG.md +0 -369
- data/examples/agent_continue/add_documentation/prompt.md +0 -5
- data/examples/agent_continue/add_error_handling/prompt.md +0 -5
- data/examples/agent_continue/analyze_codebase/prompt.md +0 -7
- data/examples/agent_continue/combined_workflow.yml +0 -24
- data/examples/agent_continue/continue_adding_features/prompt.md +0 -4
- data/examples/agent_continue/create_integration_tests/prompt.md +0 -3
- data/examples/agent_continue/document_with_context/prompt.md +0 -5
- data/examples/agent_continue/explore_api/prompt.md +0 -6
- data/examples/agent_continue/implement_client/prompt.md +0 -6
- data/examples/agent_continue/inline_workflow.yml +0 -20
- data/examples/agent_continue/refactor_code/prompt.md +0 -2
- data/examples/agent_continue/verify_changes/prompt.md +0 -6
- data/examples/agent_continue/workflow.yml +0 -27
- data/examples/agent_workflow/README.md +0 -75
- data/examples/agent_workflow/apply_refactorings/prompt.md +0 -22
- data/examples/agent_workflow/identify_code_smells/prompt.md +0 -15
- data/examples/agent_workflow/summarize_improvements/prompt.md +0 -18
- data/examples/agent_workflow/workflow.png +0 -0
- data/examples/agent_workflow/workflow.yml +0 -16
- data/examples/api_workflow/README.md +0 -85
- data/examples/api_workflow/fetch_api_data/prompt.md +0 -10
- data/examples/api_workflow/generate_report/prompt.md +0 -10
- data/examples/api_workflow/prompt.md +0 -10
- data/examples/api_workflow/transform_data/prompt.md +0 -10
- data/examples/api_workflow/workflow.png +0 -0
- data/examples/api_workflow/workflow.yml +0 -30
- data/examples/apply_diff_demo/README.md +0 -58
- data/examples/apply_diff_demo/apply_simple_change/prompt.md +0 -13
- data/examples/apply_diff_demo/create_sample_file/prompt.md +0 -11
- data/examples/apply_diff_demo/workflow.yml +0 -24
- data/examples/available_tools_demo/workflow.png +0 -0
- data/examples/bash_prototyping/README.md +0 -53
- data/examples/bash_prototyping/analyze_network/prompt.md +0 -13
- data/examples/bash_prototyping/analyze_system/prompt.md +0 -11
- data/examples/bash_prototyping/api_testing.png +0 -0
- data/examples/bash_prototyping/api_testing.yml +0 -14
- data/examples/bash_prototyping/check_processes/prompt.md +0 -11
- data/examples/bash_prototyping/generate_report/prompt.md +0 -16
- data/examples/bash_prototyping/process_json_response/prompt.md +0 -24
- data/examples/bash_prototyping/system_analysis.png +0 -0
- data/examples/bash_prototyping/system_analysis.yml +0 -14
- data/examples/bash_prototyping/test_public_api/prompt.md +0 -22
- data/examples/case_when/README.md +0 -58
- data/examples/case_when/detect_language/prompt.md +0 -16
- data/examples/case_when/workflow.png +0 -0
- data/examples/case_when/workflow.yml +0 -58
- data/examples/cmd/README.md +0 -99
- data/examples/cmd/analyze_project/prompt.md +0 -57
- data/examples/cmd/basic_demo/prompt.md +0 -48
- data/examples/cmd/basic_workflow.png +0 -0
- data/examples/cmd/basic_workflow.yml +0 -16
- data/examples/cmd/check_repository/prompt.md +0 -57
- data/examples/cmd/create_and_verify/prompt.md +0 -56
- data/examples/cmd/dev_workflow.png +0 -0
- data/examples/cmd/dev_workflow.yml +0 -26
- data/examples/cmd/explore_project/prompt.md +0 -67
- data/examples/cmd/explorer_workflow.png +0 -0
- data/examples/cmd/explorer_workflow.yml +0 -21
- data/examples/cmd/smart_tool_selection/prompt.md +0 -99
- data/examples/coding_agent_with_model.yml +0 -20
- data/examples/coding_agent_with_retries.yml +0 -30
- data/examples/conditional/README.md +0 -161
- data/examples/conditional/check_condition/prompt.md +0 -1
- data/examples/conditional/simple_workflow.png +0 -0
- data/examples/conditional/simple_workflow.yml +0 -15
- data/examples/conditional/workflow.png +0 -0
- data/examples/conditional/workflow.yml +0 -23
- data/examples/context_management_demo/README.md +0 -43
- data/examples/context_management_demo/workflow.yml +0 -42
- data/examples/direct_coerce_syntax/README.md +0 -32
- data/examples/direct_coerce_syntax/workflow.png +0 -0
- data/examples/direct_coerce_syntax/workflow.yml +0 -36
- data/examples/dot_notation/README.md +0 -37
- data/examples/dot_notation/workflow.png +0 -0
- data/examples/dot_notation/workflow.yml +0 -44
- data/examples/exit_on_error/README.md +0 -50
- data/examples/exit_on_error/analyze_lint_output/prompt.md +0 -9
- data/examples/exit_on_error/apply_fixes/prompt.md +0 -2
- data/examples/exit_on_error/workflow.png +0 -0
- data/examples/exit_on_error/workflow.yml +0 -19
- data/examples/grading/js_test_runner +0 -31
- data/examples/grading/rb_test_runner +0 -19
- data/examples/grading/run_coverage.rb +0 -54
- data/examples/grading/workflow.png +0 -0
- data/examples/grading/workflow.rb.md +0 -6
- data/examples/grading/workflow.ts+tsx.md +0 -6
- data/examples/instrumentation.rb +0 -76
- data/examples/interpolation/README.md +0 -50
- data/examples/interpolation/analyze_file/prompt.md +0 -1
- data/examples/interpolation/analyze_patterns/prompt.md +0 -27
- data/examples/interpolation/generate_report_for_js/prompt.md +0 -3
- data/examples/interpolation/generate_report_for_rb/prompt.md +0 -3
- data/examples/interpolation/sample.js +0 -48
- data/examples/interpolation/sample.rb +0 -42
- data/examples/interpolation/workflow.md +0 -1
- data/examples/interpolation/workflow.png +0 -0
- data/examples/interpolation/workflow.yml +0 -21
- data/examples/iteration/IMPLEMENTATION.md +0 -88
- data/examples/iteration/README.md +0 -68
- data/examples/iteration/analyze_complexity/prompt.md +0 -22
- data/examples/iteration/generate_recommendations/prompt.md +0 -21
- data/examples/iteration/generate_report/prompt.md +0 -129
- data/examples/iteration/implement_fix/prompt.md +0 -25
- data/examples/iteration/prioritize_issues/prompt.md +0 -24
- data/examples/iteration/prompts/analyze_file.md +0 -28
- data/examples/iteration/prompts/generate_summary.md +0 -24
- data/examples/iteration/prompts/update_report.md +0 -29
- data/examples/iteration/prompts/write_report.md +0 -22
- data/examples/iteration/read_file/prompt.md +0 -9
- data/examples/iteration/select_next_issue/prompt.md +0 -25
- data/examples/iteration/simple_workflow.md +0 -39
- data/examples/iteration/simple_workflow.yml +0 -58
- data/examples/iteration/update_fix_count/prompt.md +0 -26
- data/examples/iteration/verify_fix/prompt.md +0 -29
- data/examples/iteration/workflow.png +0 -0
- data/examples/iteration/workflow.yml +0 -42
- data/examples/json_handling/README.md +0 -32
- data/examples/json_handling/workflow.png +0 -0
- data/examples/json_handling/workflow.yml +0 -52
- data/examples/mcp/README.md +0 -223
- data/examples/mcp/analyze_changes/prompt.md +0 -8
- data/examples/mcp/analyze_issues/prompt.md +0 -4
- data/examples/mcp/analyze_schema/prompt.md +0 -4
- data/examples/mcp/check_data_quality/prompt.md +0 -5
- data/examples/mcp/check_documentation/prompt.md +0 -4
- data/examples/mcp/create_recommendations/prompt.md +0 -5
- data/examples/mcp/database_workflow.png +0 -0
- data/examples/mcp/database_workflow.yml +0 -29
- data/examples/mcp/env_demo/workflow.png +0 -0
- data/examples/mcp/env_demo/workflow.yml +0 -34
- data/examples/mcp/fetch_pr_context/prompt.md +0 -4
- data/examples/mcp/filesystem_demo/create_test_file/prompt.md +0 -2
- data/examples/mcp/filesystem_demo/list_files/prompt.md +0 -6
- data/examples/mcp/filesystem_demo/read_with_mcp/prompt.md +0 -7
- data/examples/mcp/filesystem_demo/workflow.png +0 -0
- data/examples/mcp/filesystem_demo/workflow.yml +0 -38
- data/examples/mcp/generate_insights/prompt.md +0 -4
- data/examples/mcp/generate_report/prompt.md +0 -6
- data/examples/mcp/generate_review/prompt.md +0 -16
- data/examples/mcp/github_workflow.png +0 -0
- data/examples/mcp/github_workflow.yml +0 -32
- data/examples/mcp/multi_mcp_workflow.png +0 -0
- data/examples/mcp/multi_mcp_workflow.yml +0 -58
- data/examples/mcp/post_review/prompt.md +0 -3
- data/examples/mcp/save_report/prompt.md +0 -6
- data/examples/mcp/search_issues/prompt.md +0 -2
- data/examples/mcp/summarize/prompt.md +0 -1
- data/examples/mcp/test_filesystem/prompt.md +0 -6
- data/examples/mcp/test_github/prompt.md +0 -8
- data/examples/mcp/test_read/prompt.md +0 -1
- data/examples/mcp/workflow.png +0 -0
- data/examples/mcp/workflow.yml +0 -35
- data/examples/no_model_fallback/README.md +0 -17
- data/examples/no_model_fallback/analyze_file/prompt.md +0 -1
- data/examples/no_model_fallback/analyze_patterns/prompt.md +0 -27
- data/examples/no_model_fallback/generate_report_for_md/prompt.md +0 -10
- data/examples/no_model_fallback/generate_report_for_rb/prompt.md +0 -3
- data/examples/no_model_fallback/sample.rb +0 -42
- data/examples/no_model_fallback/workflow.yml +0 -19
- data/examples/openrouter_example/README.md +0 -48
- data/examples/openrouter_example/analyze_input/prompt.md +0 -16
- data/examples/openrouter_example/generate_response/prompt.md +0 -9
- data/examples/openrouter_example/workflow.png +0 -0
- data/examples/openrouter_example/workflow.yml +0 -12
- data/examples/pre_post_processing/README.md +0 -111
- data/examples/pre_post_processing/analyze_test_file/prompt.md +0 -23
- data/examples/pre_post_processing/improve_test_coverage/prompt.md +0 -17
- data/examples/pre_post_processing/optimize_test_performance/prompt.md +0 -25
- data/examples/pre_post_processing/post_processing/aggregate_metrics/prompt.md +0 -31
- data/examples/pre_post_processing/post_processing/cleanup_environment/prompt.md +0 -28
- data/examples/pre_post_processing/post_processing/generate_summary_report/prompt.md +0 -32
- data/examples/pre_post_processing/post_processing/output.txt +0 -24
- data/examples/pre_post_processing/pre_processing/gather_baseline_metrics/prompt.md +0 -26
- data/examples/pre_post_processing/pre_processing/setup_test_environment/prompt.md +0 -11
- data/examples/pre_post_processing/validate_changes/prompt.md +0 -24
- data/examples/pre_post_processing/workflow.png +0 -0
- data/examples/pre_post_processing/workflow.yml +0 -21
- data/examples/retry/workflow.yml +0 -23
- data/examples/rspec_to_minitest/README.md +0 -68
- data/examples/rspec_to_minitest/analyze_spec/prompt.md +0 -30
- data/examples/rspec_to_minitest/create_minitest/prompt.md +0 -33
- data/examples/rspec_to_minitest/run_and_improve/prompt.md +0 -35
- data/examples/rspec_to_minitest/workflow.md +0 -10
- data/examples/rspec_to_minitest/workflow.png +0 -0
- data/examples/rspec_to_minitest/workflow.yml +0 -40
- data/examples/shared_config/README.md +0 -52
- data/examples/shared_config/example_with_shared_config/workflow.png +0 -0
- data/examples/shared_config/example_with_shared_config/workflow.yml +0 -6
- data/examples/shared_config/shared.png +0 -0
- data/examples/shared_config/shared.yml +0 -7
- data/examples/single_target_prepost/README.md +0 -36
- data/examples/single_target_prepost/post_processing/output.txt +0 -27
- data/examples/single_target_prepost/pre_processing/gather_dependencies/prompt.md +0 -11
- data/examples/single_target_prepost/workflow.png +0 -0
- data/examples/single_target_prepost/workflow.yml +0 -20
- data/examples/smart_coercion_defaults/README.md +0 -65
- data/examples/smart_coercion_defaults/workflow.png +0 -0
- data/examples/smart_coercion_defaults/workflow.yml +0 -44
- data/examples/step_configuration/README.md +0 -84
- data/examples/step_configuration/workflow.png +0 -0
- data/examples/step_configuration/workflow.yml +0 -57
- data/examples/swarm_example.yml +0 -25
- data/examples/tool_config_example/README.md +0 -109
- data/examples/tool_config_example/example_step/prompt.md +0 -42
- data/examples/tool_config_example/workflow.png +0 -0
- data/examples/tool_config_example/workflow.yml +0 -17
- data/examples/user_input/README.md +0 -90
- data/examples/user_input/funny_name/create_backstory/prompt.md +0 -10
- data/examples/user_input/funny_name/workflow.png +0 -0
- data/examples/user_input/funny_name/workflow.yml +0 -25
- data/examples/user_input/generate_summary/prompt.md +0 -11
- data/examples/user_input/simple_input_demo/workflow.png +0 -0
- data/examples/user_input/simple_input_demo/workflow.yml +0 -35
- data/examples/user_input/survey_workflow.png +0 -0
- data/examples/user_input/survey_workflow.yml +0 -71
- data/examples/user_input/welcome_message/prompt.md +0 -3
- data/examples/user_input/workflow.png +0 -0
- data/examples/user_input/workflow.yml +0 -73
- data/examples/workflow_generator/README.md +0 -27
- data/examples/workflow_generator/analyze_user_request/prompt.md +0 -34
- data/examples/workflow_generator/create_workflow_files/prompt.md +0 -32
- data/examples/workflow_generator/get_user_input/prompt.md +0 -14
- data/examples/workflow_generator/info_from_roast.rb +0 -22
- data/examples/workflow_generator/workflow.png +0 -0
- data/examples/workflow_generator/workflow.yml +0 -34
- data/package-lock.json +0 -6
- /data/sorbet/rbi/gems/{rack@2.2.17.rbi → rack@2.2.18.rbi} +0 -0
@@ -0,0 +1,495 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This file was pulled from a central RBI files repository.
|
5
|
+
# Please run `bin/tapioca annotations` to update it.
|
6
|
+
|
7
|
+
module ActiveSupport::Testing::Declarative
|
8
|
+
sig { params(name: String, block: T.proc.bind(T.untyped).void).void }
|
9
|
+
def test(name, &block); end
|
10
|
+
end
|
11
|
+
|
12
|
+
class ActiveSupport::EnvironmentInquirer
|
13
|
+
sig { returns(T::Boolean) }
|
14
|
+
def development?; end
|
15
|
+
|
16
|
+
sig { returns(T::Boolean) }
|
17
|
+
def production?; end
|
18
|
+
|
19
|
+
sig { returns(T::Boolean) }
|
20
|
+
def test?; end
|
21
|
+
|
22
|
+
# @method_missing: delegated to String through ActiveSupport::StringInquirer
|
23
|
+
sig { returns(T::Boolean) }
|
24
|
+
def staging?; end
|
25
|
+
end
|
26
|
+
|
27
|
+
module ActiveSupport::Testing::SetupAndTeardown::ClassMethods
|
28
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void }
|
29
|
+
def setup(*args, &block); end
|
30
|
+
|
31
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.untyped).void)).void }
|
32
|
+
def teardown(*args, &block); end
|
33
|
+
end
|
34
|
+
|
35
|
+
class ActiveSupport::TestCase
|
36
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void }
|
37
|
+
def self.setup(*args, &block); end
|
38
|
+
|
39
|
+
sig { params(args: T.untyped, block: T.nilable(T.proc.bind(T.attached_class).void)).void }
|
40
|
+
def self.teardown(*args, &block); end
|
41
|
+
|
42
|
+
sig { params(name: String, block: T.proc.bind(T.attached_class).void).void }
|
43
|
+
def self.test(name, &block); end
|
44
|
+
end
|
45
|
+
|
46
|
+
class ActiveSupport::TimeWithZone
|
47
|
+
# @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing
|
48
|
+
include ::DateAndTime::Zones
|
49
|
+
|
50
|
+
# @shim: Methods on ActiveSupport::TimeWithZone are delegated to `Time` using `method_missing
|
51
|
+
include ::DateAndTime::Calculations
|
52
|
+
|
53
|
+
sig { returns(FalseClass) }
|
54
|
+
def blank?; end
|
55
|
+
|
56
|
+
# @shim: since `present?` is always true, `presence` always returns `self`
|
57
|
+
sig { returns(T.self_type) }
|
58
|
+
def presence; end
|
59
|
+
|
60
|
+
# @shim: since `blank?` is always false, `present?` always returns `true`
|
61
|
+
sig { returns(TrueClass) }
|
62
|
+
def present?; end
|
63
|
+
end
|
64
|
+
|
65
|
+
class Object
|
66
|
+
sig { returns(T::Boolean) }
|
67
|
+
def blank?; end
|
68
|
+
|
69
|
+
sig { returns(FalseClass) }
|
70
|
+
def html_safe?; end
|
71
|
+
|
72
|
+
sig { returns(T.nilable(T.self_type)) }
|
73
|
+
def presence; end
|
74
|
+
|
75
|
+
sig { params(another_object: T.untyped).returns(T.nilable(T.self_type)) }
|
76
|
+
def presence_in(another_object); end
|
77
|
+
|
78
|
+
sig { returns(T::Boolean) }
|
79
|
+
def present?; end
|
80
|
+
end
|
81
|
+
|
82
|
+
class Hash
|
83
|
+
sig { returns(T::Boolean) }
|
84
|
+
def blank?; end
|
85
|
+
|
86
|
+
sig { returns(T::Boolean) }
|
87
|
+
def present?; end
|
88
|
+
|
89
|
+
sig { returns(T::Boolean) }
|
90
|
+
def extractable_options?; end
|
91
|
+
|
92
|
+
# @version >= 6.1.0
|
93
|
+
sig { returns(T::Hash[K, V]) }
|
94
|
+
def compact_blank; end
|
95
|
+
end
|
96
|
+
|
97
|
+
class Array
|
98
|
+
sig { returns(T::Boolean) }
|
99
|
+
def blank?; end
|
100
|
+
|
101
|
+
sig { returns(T::Boolean) }
|
102
|
+
def present?; end
|
103
|
+
|
104
|
+
sig { params(position: Integer).returns(T.self_type) }
|
105
|
+
def from(position); end
|
106
|
+
|
107
|
+
sig { params(position: Integer).returns(T.self_type) }
|
108
|
+
def to(position); end
|
109
|
+
|
110
|
+
sig { params(elements: T.untyped).returns(T::Array[T.untyped]) }
|
111
|
+
def including(*elements); end
|
112
|
+
|
113
|
+
sig { params(elements: T.untyped).returns(T.self_type) }
|
114
|
+
def excluding(*elements); end
|
115
|
+
|
116
|
+
sig { params(elements: T.untyped).returns(T.self_type) }
|
117
|
+
def without(*elements); end
|
118
|
+
|
119
|
+
sig { returns(T.nilable(Elem)) }
|
120
|
+
def second; end
|
121
|
+
|
122
|
+
sig { returns(T.nilable(Elem)) }
|
123
|
+
def third; end
|
124
|
+
|
125
|
+
sig { returns(T.nilable(Elem)) }
|
126
|
+
def fourth; end
|
127
|
+
|
128
|
+
sig { returns(T.nilable(Elem)) }
|
129
|
+
def fifth; end
|
130
|
+
|
131
|
+
sig { returns(T.nilable(Elem)) }
|
132
|
+
def forty_two; end
|
133
|
+
|
134
|
+
sig { returns(T.nilable(Elem)) }
|
135
|
+
def third_to_last; end
|
136
|
+
|
137
|
+
sig { returns(T.nilable(Elem)) }
|
138
|
+
def second_to_last; end
|
139
|
+
|
140
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).returns(String) }
|
141
|
+
def to_sentence(options = {}); end
|
142
|
+
|
143
|
+
sig { params(format: Symbol).returns(String) }
|
144
|
+
def to_fs(format = :default); end
|
145
|
+
|
146
|
+
sig { params(format: Symbol).returns(String) }
|
147
|
+
def to_formatted_s(format = :default); end
|
148
|
+
|
149
|
+
sig { returns(String) }
|
150
|
+
def to_xml; end
|
151
|
+
|
152
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
153
|
+
def extract_options!; end
|
154
|
+
|
155
|
+
sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) }
|
156
|
+
def in_groups(number, fill_with = T.unsafe(nil), &block); end
|
157
|
+
|
158
|
+
sig { type_parameters(:FillType).params(number: Integer, fill_with: T.type_parameter(:FillType), block: T.nilable(T.proc.params(group: T::Array[T.any(Elem, T.type_parameter(:FillType))]).void)).returns(T::Array[T::Array[T.any(Elem, T.type_parameter(:FillType))]]) }
|
159
|
+
def in_groups_of(number, fill_with = T.unsafe(nil), &block); end
|
160
|
+
|
161
|
+
sig { params(value: T.untyped, block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T::Array[T::Array[Elem]]) }
|
162
|
+
def split(value = nil, &block); end
|
163
|
+
|
164
|
+
sig { params(block: T.nilable(T.proc.params(element: Elem).returns(T.untyped))).returns(T.any(T::Array[Elem], T::Enumerator[Elem])) }
|
165
|
+
def extract!(&block); end
|
166
|
+
|
167
|
+
sig { returns(ActiveSupport::ArrayInquirer) }
|
168
|
+
def inquiry; end
|
169
|
+
|
170
|
+
sig { params(object: T.untyped).returns(T::Array[T.untyped]) }
|
171
|
+
def self.wrap(object); end
|
172
|
+
end
|
173
|
+
|
174
|
+
class Date
|
175
|
+
sig { returns(FalseClass) }
|
176
|
+
def blank?; end
|
177
|
+
|
178
|
+
# @shim: since `present?` is always true, `presence` always returns `self`
|
179
|
+
sig { returns(T.self_type) }
|
180
|
+
def presence; end
|
181
|
+
|
182
|
+
# @shim: since `blank?` is always false, `present?` always returns `true`
|
183
|
+
sig { returns(TrueClass) }
|
184
|
+
def present?; end
|
185
|
+
end
|
186
|
+
|
187
|
+
class DateTime
|
188
|
+
sig { returns(FalseClass) }
|
189
|
+
def blank?; end
|
190
|
+
|
191
|
+
# @shim: since `present?` is always true, `presence` always returns `self`
|
192
|
+
sig { returns(T.self_type) }
|
193
|
+
def presence; end
|
194
|
+
|
195
|
+
# @shim: since `blank?` is always false, `present?` always returns `true`
|
196
|
+
sig { returns(TrueClass) }
|
197
|
+
def present?; end
|
198
|
+
end
|
199
|
+
|
200
|
+
module Enumerable
|
201
|
+
sig { type_parameters(:Block).params(block: T.proc.params(arg0: Elem).returns(T.type_parameter(:Block))).returns(T::Hash[T.type_parameter(:Block), Elem]) }
|
202
|
+
sig { returns(T::Enumerable[T.untyped]) }
|
203
|
+
def index_by(&block); end
|
204
|
+
|
205
|
+
sig { type_parameters(:Block).params(block: T.proc.params(arg0: Elem).returns(T.type_parameter(:Block))).returns(T::Hash[Elem, T.type_parameter(:Block)]) }
|
206
|
+
sig { returns(T::Enumerable[T.untyped]) }
|
207
|
+
sig { type_parameters(:Default).params(default: T.type_parameter(:Default)).returns(T::Hash[Elem, T.type_parameter(:Default)]) }
|
208
|
+
def index_with(default = nil, &block); end
|
209
|
+
|
210
|
+
sig { params(block: T.proc.params(arg0: Elem).returns(BasicObject)).returns(T::Boolean) }
|
211
|
+
sig { returns(T::Boolean) }
|
212
|
+
def many?(&block); end
|
213
|
+
|
214
|
+
sig { params(object: BasicObject).returns(T::Boolean) }
|
215
|
+
def exclude?(object); end
|
216
|
+
|
217
|
+
# @version >= 6.1.0
|
218
|
+
sig { returns(T::Array[Elem]) }
|
219
|
+
def compact_blank; end
|
220
|
+
|
221
|
+
# @version >= 7.0.0
|
222
|
+
sig { returns(Elem) }
|
223
|
+
def sole; end
|
224
|
+
end
|
225
|
+
|
226
|
+
class NilClass
|
227
|
+
sig { returns(TrueClass) }
|
228
|
+
def blank?; end
|
229
|
+
|
230
|
+
# @shim: since `present?` is always false, `presence` always returns `nil`
|
231
|
+
sig { returns(NilClass) }
|
232
|
+
def presence; end
|
233
|
+
|
234
|
+
# @shim: since `blank?` is always true, `present?` always returns `false`
|
235
|
+
sig { returns(FalseClass) }
|
236
|
+
def present?; end
|
237
|
+
end
|
238
|
+
|
239
|
+
class FalseClass
|
240
|
+
sig { returns(TrueClass) }
|
241
|
+
def blank?; end
|
242
|
+
|
243
|
+
# @shim: since `present?` is always false, `presence` always returns `nil`
|
244
|
+
sig { returns(NilClass) }
|
245
|
+
def presence; end
|
246
|
+
|
247
|
+
# @shim: since `blank?` is always true, `present?` always returns `false`
|
248
|
+
sig { returns(FalseClass) }
|
249
|
+
def present?; end
|
250
|
+
end
|
251
|
+
|
252
|
+
class TrueClass
|
253
|
+
sig { returns(FalseClass) }
|
254
|
+
def blank?; end
|
255
|
+
|
256
|
+
# @shim: since `present?` is always true, `presence` always returns `self`
|
257
|
+
sig { returns(T.self_type) }
|
258
|
+
def presence; end
|
259
|
+
|
260
|
+
# @shim: since `blank?` is always false, `present?` always returns `true`
|
261
|
+
sig { returns(TrueClass) }
|
262
|
+
def present?; end
|
263
|
+
end
|
264
|
+
|
265
|
+
class Numeric
|
266
|
+
sig { returns(FalseClass) }
|
267
|
+
def blank?; end
|
268
|
+
|
269
|
+
sig { returns(TrueClass) }
|
270
|
+
def html_safe?; end
|
271
|
+
|
272
|
+
# @shim: since `present?` is always true, `presence` always returns `self`
|
273
|
+
sig { returns(T.self_type) }
|
274
|
+
def presence; end
|
275
|
+
|
276
|
+
# @shim: since `blank?` is always false, `present?` always returns `true`
|
277
|
+
sig { returns(TrueClass) }
|
278
|
+
def present?; end
|
279
|
+
end
|
280
|
+
|
281
|
+
class Time
|
282
|
+
sig { returns(FalseClass) }
|
283
|
+
def blank?; end
|
284
|
+
|
285
|
+
# @shim: since `present?` is always true, `presence` always returns `self`
|
286
|
+
sig { returns(T.self_type) }
|
287
|
+
def presence; end
|
288
|
+
|
289
|
+
# @shim: since `blank?` is always false, `present?` always returns `true`
|
290
|
+
sig { returns(TrueClass) }
|
291
|
+
def present?; end
|
292
|
+
|
293
|
+
sig { returns(ActiveSupport::TimeZone) }
|
294
|
+
def self.zone; end
|
295
|
+
|
296
|
+
sig { returns(T.any(ActiveSupport::TimeWithZone, ::Time)) }
|
297
|
+
def self.current; end
|
298
|
+
end
|
299
|
+
|
300
|
+
class Symbol
|
301
|
+
sig { returns(T::Boolean) }
|
302
|
+
def blank?; end
|
303
|
+
|
304
|
+
sig { returns(T::Boolean) }
|
305
|
+
def present?; end
|
306
|
+
|
307
|
+
# alias for `#start_with?`
|
308
|
+
sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
|
309
|
+
def starts_with?(*string_or_regexp); end
|
310
|
+
|
311
|
+
# alias for `#end_with?`
|
312
|
+
sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
|
313
|
+
def ends_with?(*string_or_regexp); end
|
314
|
+
end
|
315
|
+
|
316
|
+
class String
|
317
|
+
sig { returns(TrueClass) }
|
318
|
+
def acts_like_string?; end
|
319
|
+
|
320
|
+
# This is the subset of `#[]` sigs that have just 1 parameter.
|
321
|
+
# https://github.com/sorbet/sorbet/blob/40ad87b4dc7be23fa00c1369ac9f927053c68907/rbi/core/string.rbi#L270-L303
|
322
|
+
sig { params(position: Integer).returns(T.nilable(String)) }
|
323
|
+
sig { params(position: T.any(T::Range[Integer], Regexp)).returns(T.nilable(String)) }
|
324
|
+
sig { params(position: String).returns(T.nilable(String)) }
|
325
|
+
def at(position); end
|
326
|
+
|
327
|
+
sig { returns(String) }
|
328
|
+
def as_json; end
|
329
|
+
|
330
|
+
sig { returns(T::Boolean) }
|
331
|
+
def blank?; end
|
332
|
+
|
333
|
+
sig { params(first_letter: Symbol).returns(String) }
|
334
|
+
def camelcase(first_letter = :upper); end
|
335
|
+
|
336
|
+
sig { params(first_letter: Symbol).returns(String) }
|
337
|
+
def camelize(first_letter = :upper); end
|
338
|
+
|
339
|
+
sig { returns(String) }
|
340
|
+
def classify; end
|
341
|
+
|
342
|
+
sig { returns(T.untyped) }
|
343
|
+
def constantize; end
|
344
|
+
|
345
|
+
sig { returns(String) }
|
346
|
+
def dasherize; end
|
347
|
+
|
348
|
+
sig { returns(String) }
|
349
|
+
def deconstantize; end
|
350
|
+
|
351
|
+
sig { returns(String) }
|
352
|
+
def demodulize; end
|
353
|
+
|
354
|
+
# alias for `#end_with?`
|
355
|
+
sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
|
356
|
+
def ends_with?(*string_or_regexp); end
|
357
|
+
|
358
|
+
sig { returns(String) }
|
359
|
+
def downcase_first; end
|
360
|
+
|
361
|
+
sig { params(string: String).returns(T::Boolean) }
|
362
|
+
def exclude?(string); end
|
363
|
+
|
364
|
+
sig { params(limit: Integer).returns(String) }
|
365
|
+
def first(limit = 1); end
|
366
|
+
|
367
|
+
sig { params(separate_class_name_and_id_with_underscore: T::Boolean).returns(String) }
|
368
|
+
def foreign_key(separate_class_name_and_id_with_underscore = true); end
|
369
|
+
|
370
|
+
sig { params(position: Integer).returns(String) }
|
371
|
+
def from(position); end
|
372
|
+
|
373
|
+
sig { returns(ActiveSupport::SafeBuffer) }
|
374
|
+
def html_safe; end
|
375
|
+
|
376
|
+
sig { params(capitalize: T::Boolean, keep_id_suffix: T::Boolean).returns(String) }
|
377
|
+
def humanize(capitalize: true, keep_id_suffix: false); end
|
378
|
+
|
379
|
+
sig { params(zone: T.nilable(T.any(ActiveSupport::TimeZone, String))).returns(T.any(ActiveSupport::TimeWithZone, Time)) }
|
380
|
+
def in_time_zone(zone = ::Time.zone); end
|
381
|
+
|
382
|
+
sig { params(amount: Integer, indent_string: T.nilable(String), indent_empty_lines: T::Boolean).returns(String) }
|
383
|
+
def indent(amount, indent_string = nil, indent_empty_lines = false); end
|
384
|
+
|
385
|
+
sig { params(amount: Integer, indent_string: T.nilable(String), indent_empty_lines: T::Boolean).returns(T.nilable(String)) }
|
386
|
+
def indent!(amount, indent_string = nil, indent_empty_lines = false); end
|
387
|
+
|
388
|
+
sig { returns(ActiveSupport::StringInquirer) }
|
389
|
+
def inquiry; end
|
390
|
+
|
391
|
+
sig { returns(T::Boolean) }
|
392
|
+
def is_utf8?; end
|
393
|
+
|
394
|
+
sig { params(limit: Integer).returns(String) }
|
395
|
+
def last(limit = 1); end
|
396
|
+
|
397
|
+
sig { returns(ActiveSupport::Multibyte::Chars) }
|
398
|
+
def mb_chars; end
|
399
|
+
|
400
|
+
sig { params(separator: String, preserve_case: T::Boolean, locale: T.nilable(Symbol)).returns(String) }
|
401
|
+
def parameterize(separator: "-", preserve_case: false, locale: nil); end
|
402
|
+
|
403
|
+
sig { params(count: T.nilable(T.any(Integer, Symbol)), locale: T.nilable(Symbol)).returns(String) }
|
404
|
+
def pluralize(count = nil, locale = :en); end
|
405
|
+
|
406
|
+
sig { returns(T::Boolean) }
|
407
|
+
def present?; end
|
408
|
+
|
409
|
+
sig { params(patterns: T.any(String, Regexp)).returns(String) }
|
410
|
+
def remove(*patterns); end
|
411
|
+
|
412
|
+
sig { params(patterns: T.any(String, Regexp)).returns(String) }
|
413
|
+
def remove!(*patterns); end
|
414
|
+
|
415
|
+
sig { returns(T.untyped) }
|
416
|
+
def safe_constantize; end
|
417
|
+
|
418
|
+
sig { params(locale: Symbol).returns(String) }
|
419
|
+
def singularize(locale = :en); end
|
420
|
+
|
421
|
+
sig { returns(String) }
|
422
|
+
def squish; end
|
423
|
+
|
424
|
+
sig { returns(String) }
|
425
|
+
def squish!; end
|
426
|
+
|
427
|
+
# alias for `#start_with?`
|
428
|
+
sig { params(string_or_regexp: T.any(String, Regexp)).returns(T::Boolean) }
|
429
|
+
def starts_with?(*string_or_regexp); end
|
430
|
+
|
431
|
+
sig { returns(String) }
|
432
|
+
def strip_heredoc; end
|
433
|
+
|
434
|
+
sig { returns(String) }
|
435
|
+
def tableize; end
|
436
|
+
|
437
|
+
sig { params(keep_id_suffix: T::Boolean).returns(String) }
|
438
|
+
def titlecase(keep_id_suffix: false); end
|
439
|
+
|
440
|
+
sig { params(keep_id_suffix: T::Boolean).returns(String) }
|
441
|
+
def titleize(keep_id_suffix: false); end
|
442
|
+
|
443
|
+
sig { params(position: Integer).returns(String) }
|
444
|
+
def to(position); end
|
445
|
+
|
446
|
+
sig { returns(::Date) }
|
447
|
+
def to_date; end
|
448
|
+
|
449
|
+
sig { returns(::DateTime) }
|
450
|
+
def to_datetime; end
|
451
|
+
|
452
|
+
sig { params(form: T.nilable(Symbol)).returns(T.nilable(Time)) }
|
453
|
+
def to_time(form = :local); end
|
454
|
+
|
455
|
+
sig { params(truncate_to: Integer, options: T::Hash[Symbol, T.anything]).returns(String) }
|
456
|
+
def truncate(truncate_to, options = {}); end
|
457
|
+
|
458
|
+
sig { params(truncate_to: Integer, omission: T.nilable(String)).returns(String) }
|
459
|
+
def truncate_bytes(truncate_to, omission: "…"); end
|
460
|
+
|
461
|
+
sig { params(words_count: Integer, options: T::Hash[Symbol, T.anything]).returns(String) }
|
462
|
+
def truncate_words(words_count, options = {}); end
|
463
|
+
|
464
|
+
sig { returns(String) }
|
465
|
+
def underscore; end
|
466
|
+
|
467
|
+
sig { returns(String) }
|
468
|
+
def upcase_first; end
|
469
|
+
end
|
470
|
+
|
471
|
+
class ActiveSupport::ErrorReporter
|
472
|
+
# @version >= 7.1.0.beta1
|
473
|
+
sig { type_parameters(:Block, :Fallback).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), fallback: T.nilable(T.proc.returns(T.type_parameter(:Fallback))), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.any(T.type_parameter(:Block), T.type_parameter(:Fallback))) }
|
474
|
+
def handle(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), fallback: T.unsafe(nil), source: T.unsafe(nil), &blk); end
|
475
|
+
|
476
|
+
# @version >= 7.1.0.beta1
|
477
|
+
sig { type_parameters(:Block).params(error_classes: T.class_of(Exception), severity: T.nilable(Symbol), context: T.nilable(T::Hash[Symbol, T.untyped]), source: T.nilable(String), blk: T.proc.returns(T.type_parameter(:Block))).returns(T.type_parameter(:Block)) }
|
478
|
+
def record(*error_classes, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil), &blk); end
|
479
|
+
|
480
|
+
# @version >= 7.1.0.beta1
|
481
|
+
sig { params(error: Exception, handled: T::Boolean, severity: T.nilable(Symbol), context: T::Hash[Symbol, T.untyped], source: T.nilable(String)).void }
|
482
|
+
def report(error, handled: true, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end
|
483
|
+
|
484
|
+
# @version >= 7.2.0.beta1
|
485
|
+
sig { params(error: T.any(Exception, String), severity: T.nilable(Symbol), context: T::Hash[Symbol, T.untyped], source: T.nilable(String)).void }
|
486
|
+
def unexpected(error, severity: T.unsafe(nil), context: T.unsafe(nil), source: T.unsafe(nil)); end
|
487
|
+
end
|
488
|
+
|
489
|
+
module ActiveSupport::Testing::Assertions
|
490
|
+
sig { type_parameters(:Block).params(block: T.proc.returns(T.type_parameter(:Block))).returns(T.type_parameter(:Block)) }
|
491
|
+
def assert_nothing_raised(&block); end
|
492
|
+
|
493
|
+
sig { type_parameters(:TResult).params(expression: T.any(Proc, Kernel), message: Kernel, from: T.anything, to: T.anything, block: T.proc.returns(T.type_parameter(:TResult))).returns(T.type_parameter(:TResult)) }
|
494
|
+
def assert_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), to: T.unsafe(nil), &block); end
|
495
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This file was pulled from a central RBI files repository.
|
5
|
+
# Please run `bin/tapioca annotations` to update it.
|
6
|
+
|
7
|
+
module Faraday
|
8
|
+
class << self
|
9
|
+
sig { params(url: T.untyped, options: T::Hash[Symbol, T.untyped], block: T.nilable(T.proc.params(connection: Faraday::Connection).void)).returns(Faraday::Connection) }
|
10
|
+
def new(url = nil, options = {}, &block); end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class Faraday::Response
|
15
|
+
sig { returns(T::Boolean) }
|
16
|
+
def success?; end
|
17
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This file was pulled from a central RBI files repository.
|
5
|
+
# Please run `bin/tapioca annotations` to update it.
|
6
|
+
|
7
|
+
module Minitest::Assertions
|
8
|
+
sig { params(test: T.anything, msg: T.anything).returns(TrueClass) }
|
9
|
+
def assert(test, msg = nil); end
|
10
|
+
|
11
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
12
|
+
def assert_empty(obj, msg = nil); end
|
13
|
+
|
14
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
15
|
+
def assert_equal(exp, act, msg = nil); end
|
16
|
+
|
17
|
+
sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) }
|
18
|
+
def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end
|
19
|
+
|
20
|
+
sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) }
|
21
|
+
def assert_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end
|
22
|
+
|
23
|
+
sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
24
|
+
def assert_includes(collection, obj, msg = nil); end
|
25
|
+
|
26
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
27
|
+
def assert_instance_of(cls, obj, msg = nil); end
|
28
|
+
|
29
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
30
|
+
def assert_kind_of(cls, obj, msg = nil); end
|
31
|
+
|
32
|
+
sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(MatchData) }
|
33
|
+
def assert_match(matcher, obj, msg = nil); end
|
34
|
+
|
35
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
36
|
+
def assert_nil(obj, msg = nil); end
|
37
|
+
|
38
|
+
sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) }
|
39
|
+
def assert_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end
|
40
|
+
|
41
|
+
sig { params(stdout: T.nilable(T.any(String, Regexp)), stderr: T.nilable(T.any(String, Regexp)), block: T.proc.void).returns(T::Boolean) }
|
42
|
+
def assert_output(stdout = nil, stderr = nil, &block); end
|
43
|
+
|
44
|
+
sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) }
|
45
|
+
def assert_path_exists(path, msg = nil); end
|
46
|
+
|
47
|
+
sig { params(block: T.proc.void).returns(TrueClass) }
|
48
|
+
def assert_pattern(&block); end
|
49
|
+
|
50
|
+
sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) }
|
51
|
+
def assert_predicate(o1, op, msg = nil); end
|
52
|
+
|
53
|
+
sig { params(exp: NilClass, block: T.proc.void).returns(StandardError) }
|
54
|
+
sig { type_parameters(:T).params(exp: T.any(T::Class[T.type_parameter(:T)], Regexp, String), block: T.proc.void).returns(T.type_parameter(:T)) }
|
55
|
+
def assert_raises(*exp, &block); end
|
56
|
+
|
57
|
+
sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) }
|
58
|
+
def assert_respond_to(obj, meth, msg = nil, include_all: false); end
|
59
|
+
|
60
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
61
|
+
def assert_same(exp, act, msg = nil); end
|
62
|
+
|
63
|
+
sig { params(send_ary: T::Array[T.anything], m: T.anything).returns(T::Boolean) }
|
64
|
+
def assert_send(send_ary, m = nil); end
|
65
|
+
|
66
|
+
sig { params(block: T.proc.void).returns(T::Boolean) }
|
67
|
+
def assert_silent(&block); end
|
68
|
+
|
69
|
+
sig { params(sym: Symbol, msg: T.anything, block: T.proc.void).returns(T.anything) }
|
70
|
+
def assert_throws(sym, msg = nil, &block); end
|
71
|
+
|
72
|
+
sig { params(test: T.anything, msg: T.anything).returns(TrueClass) }
|
73
|
+
def refute(test, msg = nil); end
|
74
|
+
|
75
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
76
|
+
def refute_empty(obj, msg = nil); end
|
77
|
+
|
78
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
79
|
+
def refute_equal(exp, act, msg = nil); end
|
80
|
+
|
81
|
+
sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) }
|
82
|
+
def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end
|
83
|
+
|
84
|
+
sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) }
|
85
|
+
def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end
|
86
|
+
|
87
|
+
sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
88
|
+
def refute_includes(collection, obj, msg = nil); end
|
89
|
+
|
90
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
91
|
+
def refute_instance_of(cls, obj, msg = nil); end
|
92
|
+
|
93
|
+
sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) }
|
94
|
+
def refute_kind_of(cls, obj, msg = nil); end
|
95
|
+
|
96
|
+
sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(TrueClass) }
|
97
|
+
def refute_match(matcher, obj, msg = nil); end
|
98
|
+
|
99
|
+
sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) }
|
100
|
+
def refute_nil(obj, msg = nil); end
|
101
|
+
|
102
|
+
sig { params(block: T.proc.void).returns(TrueClass) }
|
103
|
+
def refute_pattern(&block); end
|
104
|
+
|
105
|
+
sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) }
|
106
|
+
def refute_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end
|
107
|
+
|
108
|
+
sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) }
|
109
|
+
def refute_path_exists(path, msg = nil); end
|
110
|
+
|
111
|
+
sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) }
|
112
|
+
def refute_predicate(o1, op, msg = nil); end
|
113
|
+
|
114
|
+
sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) }
|
115
|
+
def refute_respond_to(obj, meth, msg = nil, include_all: false); end
|
116
|
+
|
117
|
+
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
|
118
|
+
def refute_same(exp, act, msg = nil); end
|
119
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This file was pulled from a central RBI files repository.
|
5
|
+
# Please run `bin/tapioca annotations` to update it.
|
6
|
+
|
7
|
+
module Mocha::API
|
8
|
+
sig { params(arguments: T.untyped).returns(Mocha::Mock) }
|
9
|
+
def mock(*arguments); end
|
10
|
+
|
11
|
+
sig { params(arguments: T.untyped).returns(T.untyped) }
|
12
|
+
def stub(*arguments); end
|
13
|
+
end
|
14
|
+
|
15
|
+
module Mocha::ClassMethods
|
16
|
+
sig { returns(Mocha::Mock) }
|
17
|
+
def any_instance; end
|
18
|
+
end
|
19
|
+
|
20
|
+
class Mocha::Expectation
|
21
|
+
sig { params(expected_parameters_or_matchers: T.untyped, kwargs: T.untyped, matching_block: T.nilable(T.proc.params(actual_parameters: T.untyped).void)).returns(Mocha::Expectation) }
|
22
|
+
def with(*expected_parameters_or_matchers, **kwargs, &matching_block); end
|
23
|
+
|
24
|
+
sig { params(values: T.untyped).returns(Mocha::Expectation) }
|
25
|
+
def returns(*values); end
|
26
|
+
end
|
27
|
+
|
28
|
+
module Mocha::ObjectMethods
|
29
|
+
sig { params(expected_methods_vs_return_values: T.untyped).returns(Mocha::Expectation) }
|
30
|
+
def expects(expected_methods_vs_return_values); end
|
31
|
+
|
32
|
+
sig { params(stubbed_methods_vs_return_values: T.untyped).returns(Mocha::Expectation) }
|
33
|
+
def stubs(stubbed_methods_vs_return_values); end
|
34
|
+
end
|