acts-as-messageable 0.5.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +8 -0
- data/.github/workflows/test.yml +152 -0
- data/.rubocop.yml +14 -1
- data/.rubocop_todo.yml +49 -7
- data/.ruby-version +1 -0
- data/Appraisals +11 -0
- data/Dockerfile +2 -1
- data/Gemfile +19 -13
- data/Gemfile.lock +186 -97
- data/README.md +2 -3
- data/Rakefile +6 -1
- data/VERSION +1 -1
- data/acts-as-messageable.gemspec +193 -40
- data/bin/tapioca +29 -0
- data/docker-compose.yml +82 -71
- data/gemfiles/rails_3.2.gemfile +14 -9
- data/gemfiles/rails_4.2.gemfile +14 -9
- data/gemfiles/rails_5.2.gemfile +14 -9
- data/gemfiles/rails_6.0.gemfile +14 -9
- data/gemfiles/rails_7.0.gemfile +29 -0
- data/gemfiles/rails_master.gemfile +15 -9
- data/lib/acts-as-messageable.rb +1 -0
- data/lib/acts_as_messageable/message.rb +62 -5
- data/lib/acts_as_messageable/model.rb +71 -20
- data/lib/acts_as_messageable/rails3.rb +27 -2
- data/lib/acts_as_messageable/rails4.rb +31 -4
- data/lib/acts_as_messageable/rails6.rb +34 -2
- data/lib/acts_as_messageable/railtie.rb +1 -0
- data/lib/acts_as_messageable/relation.rb +18 -2
- data/lib/acts_as_messageable/scopes.rb +11 -0
- data/lib/acts_as_messageable.rb +18 -0
- data/lib/generators/acts_as_messageable/migration/migration_generator.rb +4 -0
- data/lib/generators/acts_as_messageable/migration/templates/migration.rb +1 -0
- data/lib/generators/acts_as_messageable/migration/templates/migration_indexes.rb +1 -0
- data/lib/generators/acts_as_messageable/migration/templates/migration_opened_as_datetime.rb +1 -0
- data/lib/generators/acts_as_messageable/migration/templates/migration_permanent.rb +1 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/actionpack.rbi +428 -0
- data/sorbet/rbi/annotations/actionview.rbi +77 -0
- data/sorbet/rbi/annotations/activerecord.rbi +18 -0
- data/sorbet/rbi/annotations/activesupport.rbi +52 -0
- data/sorbet/rbi/annotations/faraday.rbi +17 -0
- data/sorbet/rbi/annotations/railties.rbi +58 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/dsl/abstract_controller/caching/fragments.rbi +23 -0
- data/sorbet/rbi/dsl/abstract_controller/caching.rbi +30 -0
- data/sorbet/rbi/dsl/abstract_controller/callbacks.rbi +23 -0
- data/sorbet/rbi/dsl/abstract_controller/helpers.rbi +23 -0
- data/sorbet/rbi/dsl/abstract_controller/rendering.rbi +9 -0
- data/sorbet/rbi/dsl/abstract_controller/url_for.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/caching.rbi +29 -0
- data/sorbet/rbi/dsl/action_controller/conditional_get.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/content_security_policy.rbi +31 -0
- data/sorbet/rbi/dsl/action_controller/data_streaming.rbi +9 -0
- data/sorbet/rbi/dsl/action_controller/etag_with_flash.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/etag_with_template_digest.rbi +30 -0
- data/sorbet/rbi/dsl/action_controller/flash.rbi +19 -0
- data/sorbet/rbi/dsl/action_controller/form_builder.rbi +19 -0
- data/sorbet/rbi/dsl/action_controller/helpers.rbi +36 -0
- data/sorbet/rbi/dsl/action_controller/params_wrapper.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/redirecting.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/renderers/all.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/renderers.rbi +23 -0
- data/sorbet/rbi/dsl/action_controller/request_forgery_protection.rbi +31 -0
- data/sorbet/rbi/dsl/action_controller/rescue.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/test_case/behavior.rbi +24 -0
- data/sorbet/rbi/dsl/action_controller/url_for.rbi +24 -0
- data/sorbet/rbi/dsl/action_dispatch/routing/url_for.rbi +23 -0
- data/sorbet/rbi/dsl/action_view/helpers/form_helper.rbi +10 -0
- data/sorbet/rbi/dsl/action_view/helpers/form_tag_helper.rbi +10 -0
- data/sorbet/rbi/dsl/action_view/helpers/text_helper.rbi +9 -0
- data/sorbet/rbi/dsl/action_view/helpers.rbi +10 -0
- data/sorbet/rbi/dsl/action_view/layouts.rbi +24 -0
- data/sorbet/rbi/dsl/action_view/rendering.rbi +9 -0
- data/sorbet/rbi/dsl/active_model/attribute_methods.rbi +27 -0
- data/sorbet/rbi/dsl/active_model/attributes.rbi +34 -0
- data/sorbet/rbi/dsl/active_model/dirty.rbi +28 -0
- data/sorbet/rbi/dsl/active_model/serializers/json.rbi +22 -0
- data/sorbet/rbi/dsl/active_model/validations/callbacks.rbi +22 -0
- data/sorbet/rbi/dsl/active_model/validations.rbi +27 -0
- data/sorbet/rbi/dsl/active_record/attribute_methods/dirty.rbi +38 -0
- data/sorbet/rbi/dsl/active_record/attribute_methods/time_zone_conversion.rbi +32 -0
- data/sorbet/rbi/dsl/active_record/attribute_methods.rbi +53 -0
- data/sorbet/rbi/dsl/active_record/attributes.rbi +19 -0
- data/sorbet/rbi/dsl/active_record/callbacks.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/core.rbi +55 -0
- data/sorbet/rbi/dsl/active_record/encryption/encryptable_record.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/inheritance.rbi +27 -0
- data/sorbet/rbi/dsl/active_record/integration.rbi +32 -0
- data/sorbet/rbi/dsl/active_record/locking/optimistic.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/model_schema.rbi +52 -0
- data/sorbet/rbi/dsl/active_record/nested_attributes.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/readonly_attributes.rbi +19 -0
- data/sorbet/rbi/dsl/active_record/reflection.rbi +32 -0
- data/sorbet/rbi/dsl/active_record/scoping/default.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/scoping.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/serialization.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/signed_id.rbi +22 -0
- data/sorbet/rbi/dsl/active_record/test_fixtures.rbi +58 -0
- data/sorbet/rbi/dsl/active_record/timestamp.rbi +23 -0
- data/sorbet/rbi/dsl/active_record/validations.rbi +28 -0
- data/sorbet/rbi/dsl/active_support/actionable_error.rbi +23 -0
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +22 -0
- data/sorbet/rbi/dsl/active_support/rescuable.rbi +23 -0
- data/sorbet/rbi/dsl/active_support/testing/file_fixtures.rbi +22 -0
- data/sorbet/rbi/gems/actionpack@7.0.4.3.rbi +19265 -0
- data/sorbet/rbi/gems/actionview@7.0.4.3.rbi +15482 -0
- data/sorbet/rbi/gems/activemodel@7.0.4.3.rbi +6025 -0
- data/sorbet/rbi/gems/activerecord@7.0.4.3.rbi +37852 -0
- data/sorbet/rbi/gems/activesupport@7.0.4.3.rbi +18788 -0
- data/sorbet/rbi/gems/addressable@2.4.0.rbi +8 -0
- data/sorbet/rbi/gems/appraisal@2.4.1.rbi +584 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
- data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
- data/sorbet/rbi/gems/commander@4.6.0.rbi +8 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.2.2.rbi +11545 -0
- data/sorbet/rbi/gems/coveralls_reborn@0.27.0.rbi +8 -0
- data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
- data/sorbet/rbi/gems/descendants_tracker@0.0.4.rbi +8 -0
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1079 -0
- data/sorbet/rbi/gems/docile@1.4.0.rbi +8 -0
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +146 -0
- data/sorbet/rbi/gems/faraday@0.9.2.rbi +964 -0
- data/sorbet/rbi/gems/git@1.11.0.rbi +2700 -0
- data/sorbet/rbi/gems/github_api@0.16.0.rbi +8 -0
- data/sorbet/rbi/gems/hashie@5.0.0.rbi +8 -0
- data/sorbet/rbi/gems/highline@2.0.3.rbi +8 -0
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +2296 -0
- data/sorbet/rbi/gems/jeweler@2.3.9.rbi +1591 -0
- data/sorbet/rbi/gems/json@2.6.3.rbi +1541 -0
- data/sorbet/rbi/gems/jwt@2.5.0.rbi +8 -0
- data/sorbet/rbi/gems/loofah@2.19.1.rbi +904 -0
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
- data/sorbet/rbi/gems/mime-types@2.99.3.rbi +8 -0
- data/sorbet/rbi/gems/minitest@5.18.0.rbi +1491 -0
- data/sorbet/rbi/gems/multi_json@1.15.0.rbi +8 -0
- data/sorbet/rbi/gems/multi_xml@0.6.0.rbi +8 -0
- data/sorbet/rbi/gems/multipart-post@2.2.3.rbi +8 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
- data/sorbet/rbi/gems/nokogiri@1.14.2.rbi +7244 -0
- data/sorbet/rbi/gems/oauth2@1.4.8.rbi +8 -0
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
- data/sorbet/rbi/gems/pg@1.4.6.rbi +2574 -0
- data/sorbet/rbi/gems/polyfill@1.9.0.rbi +8 -0
- data/sorbet/rbi/gems/pry@0.14.2.rbi +10081 -0
- data/sorbet/rbi/gems/psych@4.0.6.rbi +1819 -0
- data/sorbet/rbi/gems/racc@1.6.2.rbi +155 -0
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +943 -0
- data/sorbet/rbi/gems/rack@2.2.6.4.rbi +5659 -0
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +455 -0
- data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +685 -0
- data/sorbet/rbi/gems/railties@7.0.4.3.rbi +4553 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +8 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +2959 -0
- data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
- data/sorbet/rbi/gems/rbs@2.8.0.rbi +8 -0
- data/sorbet/rbi/gems/rchardet@1.8.0.rbi +1078 -0
- data/sorbet/rbi/gems/rdoc@6.5.0.rbi +12441 -0
- data/sorbet/rbi/gems/regexp_parser@2.7.0.rbi +8 -0
- data/sorbet/rbi/gems/rexml@3.2.5.rbi +8 -0
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10798 -0
- data/sorbet/rbi/gems/rspec-expectations@3.12.0.rbi +8090 -0
- data/sorbet/rbi/gems/rspec-mocks@3.12.0.rbi +5296 -0
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +8 -0
- data/sorbet/rbi/gems/safe_type@1.1.1.rbi +8 -0
- data/sorbet/rbi/gems/semver2@3.4.2.rbi +8 -0
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +8 -0
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +8 -0
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +8 -0
- data/sorbet/rbi/gems/sorbet-coerce@0.7.0.rbi +8 -0
- data/sorbet/rbi/gems/stringio@3.0.2.rbi +8 -0
- data/sorbet/rbi/gems/sync@0.5.0.rbi +8 -0
- data/sorbet/rbi/gems/term-ansicolor@1.7.1.rbi +8 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
- data/sorbet/rbi/gems/thread_safe@0.3.6.rbi +8 -0
- data/sorbet/rbi/gems/timecop@0.9.6.rbi +361 -0
- data/sorbet/rbi/gems/tins@1.32.1.rbi +8 -0
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +5917 -0
- data/sorbet/rbi/gems/unicode-display_width@2.4.2.rbi +8 -0
- data/sorbet/rbi/gems/unparser@0.6.7.rbi +4515 -0
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +2553 -0
- data/sorbet/rbi/gems/yard@0.9.28.rbi +17954 -0
- data/sorbet/rbi/gems/zeitwerk@2.6.7.rbi +966 -0
- data/sorbet/rbi/models/acts-as-messageable/message.rbi +668 -0
- data/sorbet/rbi/models/acts-as-messageable/user.rbi +343 -0
- data/sorbet/rbi/rails-rbi/active_record_base.rbi +119 -0
- data/sorbet/rbi/rails-rbi/active_record_relation.rbi +180 -0
- data/sorbet/rbi/shims/activerecord.rbi +4 -0
- data/sorbet/rbi/shims/model.rbi +9 -0
- data/sorbet/tapioca/config.yml +10 -0
- data/sorbet/tapioca/pre_require.rb +5 -0
- data/sorbet/tapioca/require.rb +10 -0
- data/spec/acts_as_messageable_spec.rb +7 -4
- data/spec/custom_class_spec.rb +1 -0
- data/spec/custom_required_spec.rb +8 -4
- data/spec/group_messages_spec.rb +1 -0
- data/spec/migrations_spec.rb +2 -1
- data/spec/spec_helper.rb +19 -9
- data/spec/support/admin.rb +3 -0
- data/spec/support/custom_message.rb +3 -0
- data/spec/support/custom_message_uuid.rb +1 -0
- data/spec/support/custom_search_user.rb +3 -0
- data/spec/support/men.rb +1 -0
- data/spec/support/send_message.rb +8 -1
- data/spec/support/table_schema.rb +7 -6
- data/spec/support/user.rb +3 -0
- data/spec/support/uuid_user.rb +3 -0
- data/tasks/types.rake +46 -0
- metadata +261 -11
- data/.travis.yml +0 -55
data/sorbet/config
ADDED
@@ -0,0 +1,428 @@
|
|
1
|
+
# typed: strict
|
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
|
+
class ActionController::API
|
8
|
+
MODULES = T.let(T.unsafe(nil), T::Array[T.untyped])
|
9
|
+
end
|
10
|
+
|
11
|
+
module ActionController::Flash::ClassMethods
|
12
|
+
sig { params(types: Symbol).void }
|
13
|
+
def add_flash_types(*types); end
|
14
|
+
end
|
15
|
+
|
16
|
+
module ActionController::Helpers::ClassMethods
|
17
|
+
sig { returns(ActionView::Base) }
|
18
|
+
def helpers; end
|
19
|
+
end
|
20
|
+
|
21
|
+
class ActionController::Metal < AbstractController::Base
|
22
|
+
sig { returns(ActionController::Parameters) }
|
23
|
+
def params; end
|
24
|
+
|
25
|
+
sig { returns(ActionDispatch::Request) }
|
26
|
+
def request; end
|
27
|
+
|
28
|
+
sig { returns(ActionDispatch::Response) }
|
29
|
+
def response; end
|
30
|
+
end
|
31
|
+
|
32
|
+
module ActionController::MimeResponds
|
33
|
+
sig { params(mimes: T.nilable(Symbol), block: T.nilable(T.proc.params(arg0: ActionController::MimeResponds::Collector).void)).void }
|
34
|
+
def respond_to(*mimes, &block); end
|
35
|
+
end
|
36
|
+
|
37
|
+
class ActionController::Parameters
|
38
|
+
sig { params(other: T.any(String, ActionController::Parameters)).returns(T::Boolean) }
|
39
|
+
def ==(other); end
|
40
|
+
|
41
|
+
sig { params(key: T.any(String, Symbol), value: T.untyped).void }
|
42
|
+
def []=(key, value); end
|
43
|
+
|
44
|
+
sig { returns(T.nilable(T::Array[T.any(String, Symbol)])) }
|
45
|
+
def always_permitted_parameters; end
|
46
|
+
|
47
|
+
sig { params(obj: T.nilable(T::Array[T.any(String, Symbol)])).void }
|
48
|
+
def always_permitted_parameters=(obj); end
|
49
|
+
|
50
|
+
sig { returns(T.untyped) }
|
51
|
+
def deep_dup; end
|
52
|
+
|
53
|
+
sig { params(key: T.any(String, Symbol), block: T.untyped).returns(T.untyped) }
|
54
|
+
def delete(key, &block); end
|
55
|
+
|
56
|
+
sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
|
57
|
+
def dig(*keys); end
|
58
|
+
|
59
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
60
|
+
def each_pair(&block); end
|
61
|
+
|
62
|
+
# each is an alias of each_pair
|
63
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
64
|
+
def each(&block); end
|
65
|
+
|
66
|
+
sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
|
67
|
+
def except(*keys); end
|
68
|
+
|
69
|
+
sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
|
70
|
+
def extract!(*keys); end
|
71
|
+
|
72
|
+
sig { params(key: T.any(String, Symbol), args: T.untyped).returns(T.untyped) }
|
73
|
+
def fetch(key, *args); end
|
74
|
+
|
75
|
+
sig { returns(String) }
|
76
|
+
def inspect; end
|
77
|
+
|
78
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
79
|
+
def merge!(other_hash); end
|
80
|
+
|
81
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
82
|
+
def merge(other_hash); end
|
83
|
+
|
84
|
+
sig { returns(T.untyped) }
|
85
|
+
def parameters; end
|
86
|
+
|
87
|
+
sig { returns(T.self_type) }
|
88
|
+
def permit!; end
|
89
|
+
|
90
|
+
# You can pass _a lot_ of stuff to permit, so filters is left untyped for now.
|
91
|
+
sig { params(filters: T.untyped).returns(ActionController::Parameters) }
|
92
|
+
def permit(*filters); end
|
93
|
+
|
94
|
+
sig { params(new_permitted: T.untyped).void }
|
95
|
+
def permitted=(new_permitted); end
|
96
|
+
|
97
|
+
sig { returns(T::Boolean) }
|
98
|
+
def permitted?; end
|
99
|
+
|
100
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
101
|
+
def reject!(&block); end
|
102
|
+
|
103
|
+
# delete_if is an alias of reject!
|
104
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
105
|
+
def delete_if(&block); end
|
106
|
+
|
107
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
108
|
+
def reject(&block); end
|
109
|
+
|
110
|
+
sig { params(key: T.any(String, Symbol)).returns(T.nilable(T.any(String, Numeric, ActionController::Parameters))) }
|
111
|
+
def [](key); end
|
112
|
+
|
113
|
+
sig { params(key: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(T.any(String, Numeric, T::Array[T.untyped], ActionController::Parameters)) }
|
114
|
+
def require(key); end
|
115
|
+
|
116
|
+
# required is an alias of require
|
117
|
+
sig { params(key: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(T.any(String, Numeric, T::Array[T.untyped], ActionController::Parameters)) }
|
118
|
+
def required(key); end
|
119
|
+
|
120
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
121
|
+
def reverse_merge!(other_hash); end
|
122
|
+
|
123
|
+
# with_defaults! is an alias of reverse_merge!
|
124
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
125
|
+
def with_defaults!(other_hash); end
|
126
|
+
|
127
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
128
|
+
def reverse_merge(other_hash); end
|
129
|
+
|
130
|
+
# with_defaults is an alias of reverse_merge
|
131
|
+
sig { params(other_hash: T.untyped).returns(ActionController::Parameters) }
|
132
|
+
def with_defaults(other_hash); end
|
133
|
+
|
134
|
+
sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) }
|
135
|
+
def select!(&block); end
|
136
|
+
|
137
|
+
# keep_if is an alias of select!
|
138
|
+
sig { params(block: T.untyped).returns(T.nilable(ActionController::Parameters)) }
|
139
|
+
def keep_if(&block); end
|
140
|
+
|
141
|
+
sig { params(block: T.untyped).returns(ActionController::Parameters) }
|
142
|
+
def select(&block); end
|
143
|
+
|
144
|
+
sig { returns(T.any(Symbol, T::Boolean)) }
|
145
|
+
def self.action_on_unpermitted_parameters; end
|
146
|
+
|
147
|
+
sig { params(obj: T.any(Symbol, T::Boolean)).void }
|
148
|
+
def self.action_on_unpermitted_parameters=(obj); end
|
149
|
+
|
150
|
+
sig { returns(T::Array[T.any(String, Symbol)]) }
|
151
|
+
def self.always_permitted_parameters; end
|
152
|
+
|
153
|
+
sig { params(obj: T::Array[T.any(String, Symbol)]).void }
|
154
|
+
def self.always_permitted_parameters=(obj); end
|
155
|
+
|
156
|
+
sig { returns(T::Boolean) }
|
157
|
+
def self.permit_all_parameters; end
|
158
|
+
|
159
|
+
sig { params(obj: T::Boolean).void }
|
160
|
+
def self.permit_all_parameters=(obj); end
|
161
|
+
|
162
|
+
sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
|
163
|
+
def slice!(*keys); end
|
164
|
+
|
165
|
+
sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
|
166
|
+
def slice(*keys); end
|
167
|
+
|
168
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
169
|
+
def to_h; end
|
170
|
+
|
171
|
+
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
172
|
+
def to_hash; end
|
173
|
+
|
174
|
+
# to_param is an alias of to_query
|
175
|
+
sig { params(args: String).returns(T.nilable(String)) }
|
176
|
+
def to_param(*args); end
|
177
|
+
|
178
|
+
sig { params(args: String).returns(T.nilable(String)) }
|
179
|
+
def to_query(*args); end
|
180
|
+
|
181
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
182
|
+
def to_unsafe_h; end
|
183
|
+
|
184
|
+
# to_unsafe_hash is an alias of to_unsafe_h
|
185
|
+
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
186
|
+
def to_unsafe_hash; end
|
187
|
+
|
188
|
+
sig { params(block: T.untyped).returns(ActionController::Parameters) }
|
189
|
+
def transform_keys!(&block); end
|
190
|
+
|
191
|
+
sig { params(block: T.untyped).returns(ActionController::Parameters) }
|
192
|
+
def transform_keys(&block); end
|
193
|
+
|
194
|
+
sig { returns(ActionController::Parameters) }
|
195
|
+
def transform_values!; end
|
196
|
+
|
197
|
+
sig { returns(ActionController::Parameters) }
|
198
|
+
def transform_values; end
|
199
|
+
|
200
|
+
sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
|
201
|
+
def values_at(*keys); end
|
202
|
+
end
|
203
|
+
|
204
|
+
module ActionController::RequestForgeryProtection
|
205
|
+
sig { returns(T::Boolean) }
|
206
|
+
def protect_against_forgery?; end
|
207
|
+
|
208
|
+
sig { params(form_options: T::Hash[T.untyped, T.untyped]).returns(String) }
|
209
|
+
def form_authenticity_token(form_options: {}); end
|
210
|
+
end
|
211
|
+
|
212
|
+
module ActionController::RequestForgeryProtection::ClassMethods
|
213
|
+
sig { params(options: T::Hash[T.untyped, T.untyped]).void }
|
214
|
+
def skip_forgery_protection(options = T.unsafe(nil)); end
|
215
|
+
end
|
216
|
+
|
217
|
+
module ActionController::StrongParameters
|
218
|
+
sig { returns(ActionController::Parameters) }
|
219
|
+
def params; end
|
220
|
+
end
|
221
|
+
|
222
|
+
module ActionDispatch::Http::Parameters
|
223
|
+
sig { returns(ActionController::Parameters) }
|
224
|
+
def parameters; end
|
225
|
+
|
226
|
+
# params is an alias of parameters
|
227
|
+
sig { returns(ActionController::Parameters) }
|
228
|
+
def params; end
|
229
|
+
end
|
230
|
+
|
231
|
+
module ActionDispatch::Integration::Runner
|
232
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
233
|
+
sig { params(host: String).returns(String) }
|
234
|
+
def host!(host); end
|
235
|
+
|
236
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
237
|
+
sig { params(flag: T::Boolean).returns(T::Boolean) }
|
238
|
+
def https!(flag = true); end
|
239
|
+
end
|
240
|
+
|
241
|
+
class ActionDispatch::IntegrationTest
|
242
|
+
# The following methods are accessible on `IntegrationTest`
|
243
|
+
# through the following delegation chain:
|
244
|
+
# - `IntegrationTest` includes `IntegrationTest::Behavior`
|
245
|
+
# - `IntegrationTest::Behavior` includes `Integration::Runner`
|
246
|
+
# - `Integration::Runner#method_missing` delegates to `Integration::Session`
|
247
|
+
#
|
248
|
+
# Then `Integration::Session` either implements the methods
|
249
|
+
# directly or further delegates to `TestProcess` (included) or
|
250
|
+
# `TestResponse` / `Request` (via `delegate`).
|
251
|
+
#
|
252
|
+
# Cf. https://github.com/Shopify/rbi-central/pull/138 for more context.
|
253
|
+
# @method_missing: delegated to ActionDispatch::TestProcess
|
254
|
+
sig { returns(ActionDispatch::Flash::FlashHash) }
|
255
|
+
def flash; end
|
256
|
+
|
257
|
+
# @method_missing: delegated to ActionDispatch::TestProcess
|
258
|
+
sig { returns(ActionDispatch::Request::Session) }
|
259
|
+
def session; end
|
260
|
+
|
261
|
+
# @method_missing: delegated to ActionDispatch::TestResponse
|
262
|
+
sig { returns(T.nilable(Integer)) }
|
263
|
+
def status; end
|
264
|
+
|
265
|
+
# @method_missing: delegated to ActionDispatch::TestResponse
|
266
|
+
sig { returns(T.nilable(String)) }
|
267
|
+
def status_message; end
|
268
|
+
|
269
|
+
# @method_missing: delegated to ActionDispatch::TestResponse
|
270
|
+
sig { returns(T.nilable(ActionDispatch::Response::Header)) }
|
271
|
+
def headers; end
|
272
|
+
|
273
|
+
# @method_missing: delegated to ActionDispatch::TestResponse
|
274
|
+
sig { returns(T.nilable(String)) }
|
275
|
+
def body; end
|
276
|
+
|
277
|
+
# @method_missing: delegated to ActionDispatch::TestResponse
|
278
|
+
sig { returns(T.nilable(T::Boolean)) }
|
279
|
+
def redirect?; end
|
280
|
+
|
281
|
+
# @method_missing: delegated to ActionDispatch::Request
|
282
|
+
sig { returns(T.nilable(String)) }
|
283
|
+
def path; end
|
284
|
+
|
285
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
286
|
+
sig { returns(String) }
|
287
|
+
def host; end
|
288
|
+
|
289
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
290
|
+
sig { params(host: String).returns(String) }
|
291
|
+
attr_writer :host
|
292
|
+
|
293
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
294
|
+
sig { returns(T.nilable(String)) }
|
295
|
+
attr_accessor :remote_addr
|
296
|
+
|
297
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
298
|
+
sig { returns(T.nilable(String)) }
|
299
|
+
attr_accessor :accept
|
300
|
+
|
301
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
302
|
+
sig { returns(Rack::Test::CookieJar) }
|
303
|
+
def cookies; end
|
304
|
+
|
305
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
306
|
+
sig { returns(T.nilable(ActionController::Base)) }
|
307
|
+
attr_reader :controller
|
308
|
+
|
309
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
310
|
+
sig { returns(ActionDispatch::TestRequest) }
|
311
|
+
attr_reader :request
|
312
|
+
|
313
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
314
|
+
sig { returns(ActionDispatch::TestResponse) }
|
315
|
+
attr_reader :response
|
316
|
+
|
317
|
+
# @method_missing: delegated to ActionDispatch::Integration::Session
|
318
|
+
sig { returns(Integer) }
|
319
|
+
attr_accessor :request_count
|
320
|
+
end
|
321
|
+
|
322
|
+
class ActionDispatch::Request
|
323
|
+
# Provides access to the request's HTTP headers, for example:
|
324
|
+
#
|
325
|
+
# ```ruby
|
326
|
+
# request.headers["Content-Type"] # => "text/plain"
|
327
|
+
# ```
|
328
|
+
sig { returns(ActionDispatch::Http::Headers) }
|
329
|
+
def headers; end
|
330
|
+
|
331
|
+
# Returns a `String` with the last requested path including their params.
|
332
|
+
#
|
333
|
+
# ```ruby
|
334
|
+
# # get '/foo'
|
335
|
+
# request.original_fullpath # => '/foo'
|
336
|
+
#
|
337
|
+
# # get '/foo?bar'
|
338
|
+
# request.original_fullpath # => '/foo?bar'
|
339
|
+
# ```
|
340
|
+
sig { returns(String) }
|
341
|
+
def original_fullpath; end
|
342
|
+
|
343
|
+
# Returns the `String` full path including params of the last URL requested.
|
344
|
+
#
|
345
|
+
# ```ruby
|
346
|
+
# # get "/articles"
|
347
|
+
# request.fullpath # => "/articles"
|
348
|
+
#
|
349
|
+
# # get "/articles?page=2"
|
350
|
+
# request.fullpath # => "/articles?page=2"
|
351
|
+
# ```
|
352
|
+
sig { returns(String) }
|
353
|
+
def fullpath; end
|
354
|
+
|
355
|
+
# Returns the original request URL as a `String`.
|
356
|
+
#
|
357
|
+
# ```ruby
|
358
|
+
# # get "/articles?page=2"
|
359
|
+
# request.original_url # => "http://www.example.com/articles?page=2"
|
360
|
+
# ```
|
361
|
+
sig { returns(String) }
|
362
|
+
def original_url; end
|
363
|
+
|
364
|
+
# The `String` MIME type of the request.
|
365
|
+
#
|
366
|
+
# ```
|
367
|
+
# # get "/articles"
|
368
|
+
# request.media_type # => "application/x-www-form-urlencoded"
|
369
|
+
# ```
|
370
|
+
sig { returns(String) }
|
371
|
+
def media_type; end
|
372
|
+
|
373
|
+
# Returns the content length of the request as an integer.
|
374
|
+
sig { returns(Integer) }
|
375
|
+
def content_length; end
|
376
|
+
|
377
|
+
# Returns the IP address of client as a `String`.
|
378
|
+
sig { returns(String) }
|
379
|
+
def ip; end
|
380
|
+
|
381
|
+
# Returns the IP address of client as a `String`,
|
382
|
+
# usually set by the RemoteIp middleware.
|
383
|
+
sig { returns(String) }
|
384
|
+
def remote_ip; end
|
385
|
+
|
386
|
+
# Returns the unique request id, which is based on either the X-Request-Id header that can
|
387
|
+
# be generated by a firewall, load balancer, or web server or by the RequestId middleware
|
388
|
+
# (which sets the action_dispatch.request_id environment variable).
|
389
|
+
#
|
390
|
+
# This unique ID is useful for tracing a request from end-to-end as part of logging or debugging.
|
391
|
+
# This relies on the Rack variable set by the ActionDispatch::RequestId middleware.
|
392
|
+
sig { returns(String) }
|
393
|
+
def request_id; end
|
394
|
+
|
395
|
+
# Returns true if the request has a header matching the given key parameter.
|
396
|
+
#
|
397
|
+
# ```ruby
|
398
|
+
# request.key? :ip_spoofing_check # => true
|
399
|
+
# ```
|
400
|
+
sig { params(key: Symbol).returns(T::Boolean) }
|
401
|
+
def key?(key); end
|
402
|
+
|
403
|
+
# True if the request came from localhost, 127.0.0.1, or ::1.
|
404
|
+
sig { returns(T::Boolean) }
|
405
|
+
def local?; end
|
406
|
+
end
|
407
|
+
|
408
|
+
module ActionDispatch::Routing::Mapper::Resources
|
409
|
+
sig { params(name: T.untyped).returns(T.untyped) }
|
410
|
+
def action_path(name); end
|
411
|
+
|
412
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
413
|
+
def collection(&block); end
|
414
|
+
|
415
|
+
sig { params(block: T.untyped).returns(T.untyped) }
|
416
|
+
def member(&block); end
|
417
|
+
|
418
|
+
sig { returns(T.untyped) }
|
419
|
+
def shallow; end
|
420
|
+
|
421
|
+
sig { returns(T::Boolean) }
|
422
|
+
def shallow?; end
|
423
|
+
end
|
424
|
+
|
425
|
+
class ActionDispatch::Routing::RouteSet
|
426
|
+
sig { params(block: T.proc.bind(ActionDispatch::Routing::Mapper).void).void }
|
427
|
+
def draw(&block); end
|
428
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# typed: strong
|
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 ActionView
|
8
|
+
TemplateError = T.type_alias {
|
9
|
+
Template::Error
|
10
|
+
}
|
11
|
+
|
12
|
+
class MissingTemplate < ActionView::ActionViewError
|
13
|
+
sig { returns(String) }
|
14
|
+
def path; end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
class ActionView::Helpers::FormBuilder
|
19
|
+
sig { returns(T.untyped) }
|
20
|
+
def object; end
|
21
|
+
end
|
22
|
+
|
23
|
+
module ActionView::Helpers::NumberHelper
|
24
|
+
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
25
|
+
def number_to_currency(number, options = T.unsafe(nil)); end
|
26
|
+
|
27
|
+
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
28
|
+
def number_to_human(number, options = T.unsafe(nil)); end
|
29
|
+
|
30
|
+
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
31
|
+
def number_to_human_size(number, options = T.unsafe(nil)); end
|
32
|
+
|
33
|
+
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
34
|
+
def number_to_percentage(number, options = T.unsafe(nil)); end
|
35
|
+
|
36
|
+
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
37
|
+
def number_to_phone(number, options = T.unsafe(nil)); end
|
38
|
+
|
39
|
+
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
40
|
+
def number_with_delimiter(number, options = T.unsafe(nil)); end
|
41
|
+
|
42
|
+
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
43
|
+
def number_with_precision(number, options = T.unsafe(nil)); end
|
44
|
+
end
|
45
|
+
|
46
|
+
module ActionView::Helpers::SanitizeHelper
|
47
|
+
mixes_in_class_methods ActionView::Helpers::SanitizeHelper::ClassMethods
|
48
|
+
end
|
49
|
+
|
50
|
+
module ActionView::Helpers::UrlHelper
|
51
|
+
extend ActiveSupport::Concern
|
52
|
+
include ActionView::Helpers::TagHelper
|
53
|
+
mixes_in_class_methods ActionView::Helpers::UrlHelper::ClassMethods
|
54
|
+
|
55
|
+
sig { params(name: String, options: T.untyped, html_options: T.untyped, block: T.untyped).returns(ActiveSupport::SafeBuffer) }
|
56
|
+
def link_to(name = nil, options = nil, html_options = nil, &block); end
|
57
|
+
|
58
|
+
sig { params(condition: T.untyped, name: String, options: T.untyped, html_options: T.untyped, block: T.untyped).returns(T.untyped) }
|
59
|
+
def link_to_if(condition, name, options = {}, html_options = {}, &block); end
|
60
|
+
end
|
61
|
+
|
62
|
+
module ActionView::Layouts
|
63
|
+
mixes_in_class_methods ActionView::Layouts::ClassMethods
|
64
|
+
end
|
65
|
+
|
66
|
+
module ActionView::Rendering
|
67
|
+
mixes_in_class_methods ActionView::Rendering::ClassMethods
|
68
|
+
end
|
69
|
+
|
70
|
+
module ActionView::ViewPaths
|
71
|
+
mixes_in_class_methods ActionView::ViewPaths::ClassMethods
|
72
|
+
end
|
73
|
+
|
74
|
+
module ActionView::ViewPaths::ClassMethods
|
75
|
+
sig { params(value: T.any(String, T::Array[String])).void }
|
76
|
+
def append_view_path(value); end
|
77
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# typed: strict
|
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
|
+
class ActiveRecord::Schema
|
8
|
+
sig { params(info: T::Hash[T.untyped, T.untyped], blk: T.proc.bind(ActiveRecord::Schema).void).void }
|
9
|
+
def self.define(info = nil, &blk); end
|
10
|
+
end
|
11
|
+
|
12
|
+
class ActiveRecord::Migration
|
13
|
+
# @shim: Methods on migration are delegated to `SchemaStatements` using `method_missing`
|
14
|
+
include ActiveRecord::ConnectionAdapters::SchemaStatements
|
15
|
+
|
16
|
+
# @shim: Methods on migration are delegated to `DatabaseaStatements` using `method_missing`
|
17
|
+
include ActiveRecord::ConnectionAdapters::DatabaseStatements
|
18
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# typed: strict
|
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 Object
|
47
|
+
sig { returns(T::Boolean) }
|
48
|
+
def blank?; end
|
49
|
+
|
50
|
+
sig { returns(T::Boolean) }
|
51
|
+
def present?; end
|
52
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# typed: strict
|
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,58 @@
|
|
1
|
+
# typed: strong
|
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 Rails
|
8
|
+
class << self
|
9
|
+
sig { returns(Rails::Application) }
|
10
|
+
def application; end
|
11
|
+
|
12
|
+
sig { returns(ActiveSupport::BacktraceCleaner) }
|
13
|
+
def backtrace_cleaner; end
|
14
|
+
|
15
|
+
sig { returns(ActiveSupport::Cache::Store) }
|
16
|
+
def cache; end
|
17
|
+
|
18
|
+
sig { returns(ActiveSupport::EnvironmentInquirer) }
|
19
|
+
def env; end
|
20
|
+
|
21
|
+
sig { returns(ActiveSupport::Logger) }
|
22
|
+
def logger; end
|
23
|
+
|
24
|
+
sig { returns(Pathname) }
|
25
|
+
def root; end
|
26
|
+
|
27
|
+
sig { returns(String) }
|
28
|
+
def version; end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class Rails::Application < ::Rails::Engine
|
33
|
+
class << self
|
34
|
+
sig { params(block: T.proc.bind(Rails::Application).void).void }
|
35
|
+
def configure(&block); end
|
36
|
+
end
|
37
|
+
|
38
|
+
sig { params(block: T.proc.bind(Rails::Application).void).void }
|
39
|
+
def configure(&block); end
|
40
|
+
|
41
|
+
sig { returns(T.untyped) }
|
42
|
+
def config; end
|
43
|
+
end
|
44
|
+
|
45
|
+
class Rails::Engine < ::Rails::Railtie
|
46
|
+
sig { params(block: T.untyped).returns(ActionDispatch::Routing::RouteSet) }
|
47
|
+
def routes(&block); end
|
48
|
+
end
|
49
|
+
|
50
|
+
class Rails::Railtie
|
51
|
+
sig { params(block: T.proc.bind(Rails::Railtie).void).void }
|
52
|
+
def configure(&block); end
|
53
|
+
end
|
54
|
+
|
55
|
+
class Rails::Railtie::Configuration
|
56
|
+
sig { params(blk: T.proc.bind(ActiveSupport::Reloader).void).void }
|
57
|
+
def to_prepare(&blk); end
|
58
|
+
end
|