js-routes 2.2.9 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -3
- data/Readme.md +16 -15
- data/lib/js_routes/configuration.rb +7 -5
- data/lib/js_routes/generators/base.rb +6 -1
- data/lib/js_routes/generators/middleware.rb +2 -3
- data/lib/js_routes/generators/webpacker.rb +2 -1
- data/lib/js_routes/instance.rb +21 -6
- data/lib/js_routes/middleware.rb +5 -4
- data/lib/js_routes/route.rb +7 -3
- data/lib/js_routes/types.rb +10 -0
- data/lib/js_routes/utils.rb +18 -0
- data/lib/js_routes/version.rb +1 -1
- data/lib/js_routes.rb +12 -4
- data/lib/routes.d.ts +7 -6
- data/lib/routes.js +19 -18
- data/lib/routes.ts +33 -27
- data/lib/tasks/js_routes.rake +4 -2
- metadata +12 -145
- data/.document +0 -5
- data/.eslintrc.js +0 -15
- data/.github/workflows/ci.yml +0 -36
- data/.gitignore +0 -65
- data/.nvmrc +0 -1
- data/.rspec +0 -1
- data/Appraisals +0 -17
- data/Gemfile +0 -9
- data/Rakefile +0 -37
- data/VERSION_2_UPGRADE.md +0 -66
- data/bin/tapioca +0 -27
- data/gemfiles/rails50_sprockets_3.gemfile +0 -8
- data/gemfiles/rails51_sprockets_3.gemfile +0 -8
- data/gemfiles/rails52_sprockets_3.gemfile +0 -8
- data/gemfiles/rails70_sprockets_4.gemfile +0 -8
- data/js-routes.gemspec +0 -42
- data/package.json +0 -38
- data/sorbet/config +0 -4
- data/sorbet/rbi/annotations/.gitattributes +0 -1
- data/sorbet/rbi/annotations/actionpack.rbi +0 -428
- data/sorbet/rbi/annotations/actionview.rbi +0 -75
- data/sorbet/rbi/annotations/activesupport.rbi +0 -421
- data/sorbet/rbi/annotations/railties.rbi +0 -61
- data/sorbet/rbi/gems/.gitattributes +0 -1
- data/sorbet/rbi/gems/actionpack@7.0.4.1.rbi +0 -303
- data/sorbet/rbi/gems/actionview@7.0.4.1.rbi +0 -8
- data/sorbet/rbi/gems/activesupport@7.0.4.1.rbi +0 -16424
- data/sorbet/rbi/gems/appraisal@2.4.1.rbi +0 -584
- data/sorbet/rbi/gems/builder@3.2.4.rbi +0 -8
- data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -168
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3606
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3426
- data/sorbet/rbi/gems/concurrent-ruby@1.2.0.rbi +0 -11570
- data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -8
- data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +0 -1083
- data/sorbet/rbi/gems/erubi@1.12.0.rbi +0 -145
- data/sorbet/rbi/gems/i18n@1.12.0.rbi +0 -2296
- data/sorbet/rbi/gems/libv8-node@16.10.0.0.rbi +0 -8
- data/sorbet/rbi/gems/loofah@2.19.1.rbi +0 -8
- data/sorbet/rbi/gems/method_source@1.0.0.rbi +0 -272
- data/sorbet/rbi/gems/mini_racer@0.6.3.rbi +0 -224
- data/sorbet/rbi/gems/minitest@5.17.0.rbi +0 -1457
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -158
- data/sorbet/rbi/gems/nokogiri@1.14.0.rbi +0 -8
- data/sorbet/rbi/gems/parallel@1.24.0.rbi +0 -280
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +0 -951
- data/sorbet/rbi/gems/prism@0.24.0.rbi +0 -29744
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1150
- data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10075
- data/sorbet/rbi/gems/racc@1.6.2.rbi +0 -150
- data/sorbet/rbi/gems/rack-test@2.0.2.rbi +0 -8
- data/sorbet/rbi/gems/rack@2.2.6.2.rbi +0 -5585
- data/sorbet/rbi/gems/rails-dom-testing@2.0.3.rbi +0 -8
- data/sorbet/rbi/gems/rails-html-sanitizer@1.5.0.rbi +0 -8
- data/sorbet/rbi/gems/railties@7.0.4.1.rbi +0 -1959
- data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -3072
- data/sorbet/rbi/gems/rbi@0.1.9.rbi +0 -3006
- data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +0 -10868
- data/sorbet/rbi/gems/rspec-expectations@3.12.2.rbi +0 -8100
- data/sorbet/rbi/gems/rspec-mocks@3.12.3.rbi +0 -5299
- data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +0 -1611
- data/sorbet/rbi/gems/rspec@3.12.0.rbi +0 -82
- data/sorbet/rbi/gems/spoom@1.2.4.rbi +0 -3777
- data/sorbet/rbi/gems/sprockets-rails@3.4.2.rbi +0 -14
- data/sorbet/rbi/gems/sprockets@4.2.0.rbi +0 -8
- data/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +0 -23136
- data/sorbet/rbi/gems/tapioca@0.12.0.rbi +0 -3510
- data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -3956
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +0 -5914
- data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +0 -428
- data/sorbet/rbi/gems/yard@0.9.34.rbi +0 -18332
- data/sorbet/rbi/gems/zeitwerk@2.6.8.rbi +0 -8
- data/sorbet/rbi/todo.rbi +0 -31
- data/sorbet/tapioca/config.yml +0 -13
- data/sorbet/tapioca/require.rb +0 -4
- data/spec/dummy/app/assets/config/manifest.js +0 -2
- data/spec/dummy/app/assets/javascripts/.gitkeep +0 -0
- data/spec/dummy/config/routes.rb +0 -55
- data/spec/js_routes/default_serializer_spec.rb +0 -31
- data/spec/js_routes/module_types/amd_spec.rb +0 -35
- data/spec/js_routes/module_types/cjs_spec.rb +0 -15
- data/spec/js_routes/module_types/dts/routes.spec.d.ts +0 -115
- data/spec/js_routes/module_types/dts/test.spec.ts +0 -56
- data/spec/js_routes/module_types/dts_spec.rb +0 -126
- data/spec/js_routes/module_types/esm_spec.rb +0 -45
- data/spec/js_routes/module_types/nil_spec.rb +0 -87
- data/spec/js_routes/module_types/umd_spec.rb +0 -85
- data/spec/js_routes/options_spec.rb +0 -508
- data/spec/js_routes/rails_routes_compatibility_spec.rb +0 -473
- data/spec/js_routes/route_specification_spec.rb +0 -37
- data/spec/js_routes/zzz_sprockets_spec.rb +0 -152
- data/spec/spec_helper.rb +0 -135
- data/spec/support/routes.rb +0 -81
- data/spec/tsconfig.json +0 -4
- data/tsconfig.json +0 -28
- data/yarn.lock +0 -2457
data/bin/tapioca
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
#
|
5
|
-
# This file was generated by Bundler.
|
6
|
-
#
|
7
|
-
# The application 'tapioca' is installed as part of a gem, and
|
8
|
-
# this file is here to facilitate running it.
|
9
|
-
#
|
10
|
-
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
12
|
-
|
13
|
-
bundle_binstub = File.expand_path("bundle", __dir__)
|
14
|
-
|
15
|
-
if File.file?(bundle_binstub)
|
16
|
-
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
|
17
|
-
load(bundle_binstub)
|
18
|
-
else
|
19
|
-
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
20
|
-
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
require "rubygems"
|
25
|
-
require "bundler/setup"
|
26
|
-
|
27
|
-
load Gem.bin_path("tapioca", "tapioca")
|
data/js-routes.gemspec
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'js_routes/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{js-routes}
|
8
|
-
s.version = JsRoutes::VERSION
|
9
|
-
|
10
|
-
if s.respond_to? :required_rubygems_version=
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0")
|
12
|
-
end
|
13
|
-
s.authors = ["Bogdan Gusiev"]
|
14
|
-
s.description = %q{Generates javascript file that defines all Rails named routes as javascript helpers}
|
15
|
-
s.email = %q{agresso@gmail.com}
|
16
|
-
s.extra_rdoc_files = [
|
17
|
-
"LICENSE.txt"
|
18
|
-
]
|
19
|
-
s.required_ruby_version = '>= 2.4.0'
|
20
|
-
s.files = `git ls-files`.split("\n")
|
21
|
-
s.homepage = %q{http://github.com/railsware/js-routes}
|
22
|
-
s.licenses = ["MIT"]
|
23
|
-
s.require_paths = ["lib"]
|
24
|
-
s.summary = %q{Brings Rails named routes to javascript}
|
25
|
-
s.metadata = { "github_repo" => "ssh://github.com/railsware/js-routes" }
|
26
|
-
|
27
|
-
s.add_runtime_dependency(%q<railties>, [">= 4"])
|
28
|
-
s.add_runtime_dependency(%q<sorbet-runtime>)
|
29
|
-
|
30
|
-
s.add_development_dependency(%q<sprockets-rails>)
|
31
|
-
s.add_development_dependency(%q<rspec>, [">= 3.10.0"])
|
32
|
-
s.add_development_dependency(%q<bundler>, [">= 2.2.25"])
|
33
|
-
s.add_development_dependency(%q<appraisal>, [">= 0.5.2"])
|
34
|
-
s.add_development_dependency(%q<bump>, [">= 0.10.0"])
|
35
|
-
if defined?(JRUBY_VERSION)
|
36
|
-
s.add_development_dependency(%q<therubyrhino>, [">= 2.0.4"])
|
37
|
-
else
|
38
|
-
s.add_development_dependency(%q<byebug>)
|
39
|
-
s.add_development_dependency(%q<pry-byebug>)
|
40
|
-
s.add_development_dependency(%q<mini_racer>, [">= 0.4.0"])
|
41
|
-
end
|
42
|
-
end
|
data/package.json
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "js-routes",
|
3
|
-
"version": "1.0.0",
|
4
|
-
"main": "index.js",
|
5
|
-
"repository": "git@github.com:railsware/js-routes.git",
|
6
|
-
"author": "Bogdan Gusiev <agresso@gmail.com>, Alexey Vasiliev <https://leopard.in.ua> ",
|
7
|
-
"license": "MIT",
|
8
|
-
"private": false,
|
9
|
-
"devDependencies": {
|
10
|
-
"typescript": "^4.1.2"
|
11
|
-
},
|
12
|
-
"dependencies": {
|
13
|
-
"@typescript-eslint/eslint-plugin": "^4.9.0",
|
14
|
-
"@typescript-eslint/parser": "^4.9.0",
|
15
|
-
"eslint": "^8.35.0",
|
16
|
-
"eslint-config-prettier": "^8.7.0",
|
17
|
-
"eslint-plugin-import": "^2.27.5",
|
18
|
-
"husky": "^4.3.0",
|
19
|
-
"lint-staged": "^10.5.2",
|
20
|
-
"pinst": "^2.1.1",
|
21
|
-
"prettier": "^2.8.4"
|
22
|
-
},
|
23
|
-
"scripts": {
|
24
|
-
"build": "tsc && yarn lint:fix",
|
25
|
-
"lint:fix": "yarn eslint --fix && yarn prettier --write lib/routes.ts",
|
26
|
-
"postinstall": "yarn husky-upgrade"
|
27
|
-
},
|
28
|
-
"husky": {
|
29
|
-
"hooks": {
|
30
|
-
"pre-commit": "yarn lint:fix"
|
31
|
-
}
|
32
|
-
},
|
33
|
-
"lint-staged": {
|
34
|
-
"./lib/routes.ts": [
|
35
|
-
"yarn lint:fix"
|
36
|
-
]
|
37
|
-
}
|
38
|
-
}
|
data/sorbet/config
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
**/*.rbi linguist-vendored=true
|
@@ -1,428 +0,0 @@
|
|
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
|
-
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, block: T.untyped).returns(ActionController::Parameters) }
|
79
|
-
def merge!(other_hash, &block); 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.untyped) }
|
111
|
-
def [](key); end
|
112
|
-
|
113
|
-
sig { params(key: T.any(String, Symbol, T::Array[T.any(String, Symbol)])).returns(T.untyped) }
|
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.untyped) }
|
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 { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
|
145
|
-
def slice!(*keys); end
|
146
|
-
|
147
|
-
sig { params(keys: T.any(String, Symbol)).returns(ActionController::Parameters) }
|
148
|
-
def slice(*keys); end
|
149
|
-
|
150
|
-
sig { params(block: T.nilable(Proc)).returns(ActiveSupport::HashWithIndifferentAccess) }
|
151
|
-
def to_h(&block); end
|
152
|
-
|
153
|
-
sig { returns(T::Hash[T.untyped, T.untyped]) }
|
154
|
-
def to_hash; end
|
155
|
-
|
156
|
-
# to_param is an alias of to_query
|
157
|
-
sig { params(args: String).returns(T.nilable(String)) }
|
158
|
-
def to_param(*args); end
|
159
|
-
|
160
|
-
sig { params(args: String).returns(T.nilable(String)) }
|
161
|
-
def to_query(*args); end
|
162
|
-
|
163
|
-
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
164
|
-
def to_unsafe_h; end
|
165
|
-
|
166
|
-
# to_unsafe_hash is an alias of to_unsafe_h
|
167
|
-
sig { returns(ActiveSupport::HashWithIndifferentAccess) }
|
168
|
-
def to_unsafe_hash; end
|
169
|
-
|
170
|
-
sig { params(block: T.untyped).returns(ActionController::Parameters) }
|
171
|
-
def transform_keys!(&block); end
|
172
|
-
|
173
|
-
sig { params(block: T.untyped).returns(ActionController::Parameters) }
|
174
|
-
def transform_keys(&block); end
|
175
|
-
|
176
|
-
sig { returns(ActionController::Parameters) }
|
177
|
-
def transform_values!; end
|
178
|
-
|
179
|
-
sig { returns(ActionController::Parameters) }
|
180
|
-
def transform_values; end
|
181
|
-
|
182
|
-
sig { params(keys: T.any(String, Symbol)).returns(T.untyped) }
|
183
|
-
def values_at(*keys); end
|
184
|
-
|
185
|
-
sig { returns(T.any(Symbol, T::Boolean)) }
|
186
|
-
def self.action_on_unpermitted_parameters; end
|
187
|
-
|
188
|
-
sig { params(obj: T.any(Symbol, T::Boolean)).void }
|
189
|
-
def self.action_on_unpermitted_parameters=(obj); end
|
190
|
-
|
191
|
-
sig { returns(T::Array[T.any(String, Symbol)]) }
|
192
|
-
def self.always_permitted_parameters; end
|
193
|
-
|
194
|
-
sig { params(obj: T::Array[T.any(String, Symbol)]).void }
|
195
|
-
def self.always_permitted_parameters=(obj); end
|
196
|
-
|
197
|
-
sig { returns(T::Boolean) }
|
198
|
-
def self.permit_all_parameters; end
|
199
|
-
|
200
|
-
sig { params(obj: T::Boolean).void }
|
201
|
-
def self.permit_all_parameters=(obj); 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(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(T.nilable(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
|
@@ -1,75 +0,0 @@
|
|
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 ActionView
|
8
|
-
TemplateError = T.type_alias { Template::Error }
|
9
|
-
|
10
|
-
class MissingTemplate < ActionView::ActionViewError
|
11
|
-
sig { returns(String) }
|
12
|
-
def path; end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
class ActionView::Helpers::FormBuilder
|
17
|
-
sig { returns(T.untyped) }
|
18
|
-
def object; end
|
19
|
-
end
|
20
|
-
|
21
|
-
module ActionView::Helpers::NumberHelper
|
22
|
-
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
23
|
-
def number_to_currency(number, options = T.unsafe(nil)); end
|
24
|
-
|
25
|
-
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
26
|
-
def number_to_human(number, options = T.unsafe(nil)); end
|
27
|
-
|
28
|
-
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
29
|
-
def number_to_human_size(number, options = T.unsafe(nil)); end
|
30
|
-
|
31
|
-
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
32
|
-
def number_to_percentage(number, options = T.unsafe(nil)); end
|
33
|
-
|
34
|
-
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
35
|
-
def number_to_phone(number, options = T.unsafe(nil)); end
|
36
|
-
|
37
|
-
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
38
|
-
def number_with_delimiter(number, options = T.unsafe(nil)); end
|
39
|
-
|
40
|
-
sig { params(number: T.untyped, options: T::Hash[T.untyped, T.untyped]).returns(T.nilable(String)) }
|
41
|
-
def number_with_precision(number, options = T.unsafe(nil)); end
|
42
|
-
end
|
43
|
-
|
44
|
-
module ActionView::Helpers::SanitizeHelper
|
45
|
-
mixes_in_class_methods ActionView::Helpers::SanitizeHelper::ClassMethods
|
46
|
-
end
|
47
|
-
|
48
|
-
module ActionView::Helpers::UrlHelper
|
49
|
-
extend ActiveSupport::Concern
|
50
|
-
include ActionView::Helpers::TagHelper
|
51
|
-
mixes_in_class_methods ActionView::Helpers::UrlHelper::ClassMethods
|
52
|
-
|
53
|
-
sig { params(name: T.nilable(String), options: T.untyped, html_options: T.untyped, block: T.untyped).returns(ActiveSupport::SafeBuffer) }
|
54
|
-
def link_to(name = nil, options = nil, html_options = nil, &block); end
|
55
|
-
|
56
|
-
sig { params(condition: T.untyped, name: String, options: T.untyped, html_options: T.untyped, block: T.untyped).returns(T.untyped) }
|
57
|
-
def link_to_if(condition, name, options = {}, html_options = {}, &block); end
|
58
|
-
end
|
59
|
-
|
60
|
-
module ActionView::Layouts
|
61
|
-
mixes_in_class_methods ActionView::Layouts::ClassMethods
|
62
|
-
end
|
63
|
-
|
64
|
-
module ActionView::Rendering
|
65
|
-
mixes_in_class_methods ActionView::Rendering::ClassMethods
|
66
|
-
end
|
67
|
-
|
68
|
-
module ActionView::ViewPaths
|
69
|
-
mixes_in_class_methods ActionView::ViewPaths::ClassMethods
|
70
|
-
end
|
71
|
-
|
72
|
-
module ActionView::ViewPaths::ClassMethods
|
73
|
-
sig { params(value: T.any(String, T::Array[String])).void }
|
74
|
-
def append_view_path(value); end
|
75
|
-
end
|