active_cached_resource 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/LICENSE +21 -0
- data/lib/active_cached_resource/caching.rb +104 -1
- data/lib/active_cached_resource/configuration.rb +22 -1
- data/lib/active_cached_resource/logger.rb +14 -0
- data/lib/active_cached_resource/model.rb +18 -0
- data/lib/active_cached_resource/version.rb +1 -8
- metadata +2 -308
- data/.rspec +0 -3
- data/.rubocop.yml +0 -23
- data/.standard.yml +0 -2
- data/Rakefile +0 -29
- data/example/consumer/.dockerignore +0 -41
- data/example/consumer/.gitattributes +0 -9
- data/example/consumer/.gitignore +0 -36
- data/example/consumer/.kamal/hooks/docker-setup.sample +0 -3
- data/example/consumer/.kamal/hooks/post-deploy.sample +0 -14
- data/example/consumer/.kamal/hooks/post-proxy-reboot.sample +0 -3
- data/example/consumer/.kamal/hooks/pre-build.sample +0 -51
- data/example/consumer/.kamal/hooks/pre-connect.sample +0 -47
- data/example/consumer/.kamal/hooks/pre-deploy.sample +0 -109
- data/example/consumer/.kamal/hooks/pre-proxy-reboot.sample +0 -3
- data/example/consumer/.kamal/secrets +0 -17
- data/example/consumer/Dockerfile +0 -65
- data/example/consumer/Gemfile +0 -17
- data/example/consumer/Rakefile +0 -6
- data/example/consumer/app/controllers/application_controller.rb +0 -2
- data/example/consumer/app/controllers/concerns/.keep +0 -0
- data/example/consumer/app/jobs/application_job.rb +0 -7
- data/example/consumer/app/mailers/application_mailer.rb +0 -4
- data/example/consumer/app/models/application_record.rb +0 -3
- data/example/consumer/app/models/concerns/.keep +0 -0
- data/example/consumer/app/models/person.rb +0 -9
- data/example/consumer/app/views/layouts/mailer.html.erb +0 -13
- data/example/consumer/app/views/layouts/mailer.text.erb +0 -1
- data/example/consumer/bin/brakeman +0 -7
- data/example/consumer/bin/bundle +0 -109
- data/example/consumer/bin/dev +0 -2
- data/example/consumer/bin/docker-entrypoint +0 -14
- data/example/consumer/bin/jobs +0 -6
- data/example/consumer/bin/kamal +0 -27
- data/example/consumer/bin/rails +0 -4
- data/example/consumer/bin/rake +0 -4
- data/example/consumer/bin/rubocop +0 -8
- data/example/consumer/bin/setup +0 -34
- data/example/consumer/bin/thrust +0 -5
- data/example/consumer/config/application.rb +0 -20
- data/example/consumer/config/boot.rb +0 -3
- data/example/consumer/config/cache.yml +0 -16
- data/example/consumer/config/credentials.yml.enc +0 -1
- data/example/consumer/config/database.yml +0 -14
- data/example/consumer/config/deploy.yml +0 -116
- data/example/consumer/config/environment.rb +0 -5
- data/example/consumer/config/environments/development.rb +0 -64
- data/example/consumer/config/environments/production.rb +0 -85
- data/example/consumer/config/environments/test.rb +0 -50
- data/example/consumer/config/initializers/cors.rb +0 -16
- data/example/consumer/config/initializers/filter_parameter_logging.rb +0 -8
- data/example/consumer/config/initializers/inflections.rb +0 -16
- data/example/consumer/config/locales/en.yml +0 -31
- data/example/consumer/config/puma.rb +0 -41
- data/example/consumer/config/queue.yml +0 -18
- data/example/consumer/config/recurring.yml +0 -10
- data/example/consumer/config/routes.rb +0 -10
- data/example/consumer/config.ru +0 -6
- data/example/consumer/db/cache_schema.rb +0 -14
- data/example/consumer/db/queue_schema.rb +0 -129
- data/example/consumer/db/seeds.rb +0 -0
- data/example/consumer/lib/tasks/.keep +0 -0
- data/example/consumer/log/.keep +0 -0
- data/example/consumer/public/robots.txt +0 -1
- data/example/consumer/script/.keep +0 -0
- data/example/consumer/storage/.keep +0 -0
- data/example/consumer/tmp/.keep +0 -0
- data/example/consumer/tmp/cache/.keep +0 -0
- data/example/consumer/tmp/pids/.keep +0 -0
- data/example/consumer/tmp/storage/.keep +0 -0
- data/example/consumer/vendor/.keep +0 -0
- data/example/provider/.dockerignore +0 -41
- data/example/provider/.gitattributes +0 -9
- data/example/provider/.gitignore +0 -32
- data/example/provider/.kamal/hooks/docker-setup.sample +0 -3
- data/example/provider/.kamal/hooks/post-deploy.sample +0 -14
- data/example/provider/.kamal/hooks/post-proxy-reboot.sample +0 -3
- data/example/provider/.kamal/hooks/pre-build.sample +0 -51
- data/example/provider/.kamal/hooks/pre-connect.sample +0 -47
- data/example/provider/.kamal/hooks/pre-deploy.sample +0 -109
- data/example/provider/.kamal/hooks/pre-proxy-reboot.sample +0 -3
- data/example/provider/.kamal/secrets +0 -17
- data/example/provider/Dockerfile +0 -65
- data/example/provider/Gemfile +0 -14
- data/example/provider/Rakefile +0 -6
- data/example/provider/app/controllers/application_controller.rb +0 -2
- data/example/provider/app/controllers/concerns/.keep +0 -0
- data/example/provider/app/controllers/people_controller.rb +0 -68
- data/example/provider/app/jobs/application_job.rb +0 -7
- data/example/provider/app/mailers/application_mailer.rb +0 -4
- data/example/provider/app/models/address.rb +0 -3
- data/example/provider/app/models/application_record.rb +0 -3
- data/example/provider/app/models/company.rb +0 -3
- data/example/provider/app/models/concerns/.keep +0 -0
- data/example/provider/app/models/person.rb +0 -6
- data/example/provider/app/views/layouts/mailer.html.erb +0 -13
- data/example/provider/app/views/layouts/mailer.text.erb +0 -1
- data/example/provider/bin/brakeman +0 -7
- data/example/provider/bin/bundle +0 -109
- data/example/provider/bin/dev +0 -2
- data/example/provider/bin/docker-entrypoint +0 -14
- data/example/provider/bin/jobs +0 -6
- data/example/provider/bin/kamal +0 -27
- data/example/provider/bin/rails +0 -4
- data/example/provider/bin/rake +0 -4
- data/example/provider/bin/rubocop +0 -8
- data/example/provider/bin/setup +0 -34
- data/example/provider/bin/thrust +0 -5
- data/example/provider/config/application.rb +0 -44
- data/example/provider/config/boot.rb +0 -3
- data/example/provider/config/cache.yml +0 -16
- data/example/provider/config/credentials.yml.enc +0 -1
- data/example/provider/config/database.yml +0 -20
- data/example/provider/config/deploy.yml +0 -116
- data/example/provider/config/environment.rb +0 -5
- data/example/provider/config/environments/development.rb +0 -64
- data/example/provider/config/environments/production.rb +0 -85
- data/example/provider/config/environments/test.rb +0 -50
- data/example/provider/config/initializers/cors.rb +0 -16
- data/example/provider/config/initializers/filter_parameter_logging.rb +0 -8
- data/example/provider/config/initializers/inflections.rb +0 -16
- data/example/provider/config/locales/en.yml +0 -31
- data/example/provider/config/puma.rb +0 -41
- data/example/provider/config/queue.yml +0 -18
- data/example/provider/config/recurring.yml +0 -10
- data/example/provider/config/routes.rb +0 -4
- data/example/provider/config.ru +0 -6
- data/example/provider/db/cache_schema.rb +0 -14
- data/example/provider/db/migrate/20241202183937_create_people.rb +0 -11
- data/example/provider/db/migrate/20241202183955_create_addresses.rb +0 -13
- data/example/provider/db/migrate/20241202184017_create_companies.rb +0 -14
- data/example/provider/db/queue_schema.rb +0 -129
- data/example/provider/db/schema.rb +0 -47
- data/example/provider/db/seeds.rb +0 -18
- data/example/provider/lib/tasks/.keep +0 -0
- data/example/provider/log/.keep +0 -0
- data/example/provider/public/robots.txt +0 -1
- data/example/provider/script/.keep +0 -0
- data/example/provider/storage/.keep +0 -0
- data/example/provider/tmp/.keep +0 -0
- data/example/provider/tmp/pids/.keep +0 -0
- data/example/provider/tmp/storage/.keep +0 -0
- data/example/provider/vendor/.keep +0 -0
- data/lib/activeresource/.gitignore +0 -15
- data/lib/activeresource/examples/performance.rb +0 -72
- data/lib/activeresource/test/abstract_unit.rb +0 -154
- data/lib/activeresource/test/cases/active_job_serializer_test.rb +0 -53
- data/lib/activeresource/test/cases/association_test.rb +0 -104
- data/lib/activeresource/test/cases/associations/builder/belongs_to_test.rb +0 -42
- data/lib/activeresource/test/cases/associations/builder/has_many_test.rb +0 -28
- data/lib/activeresource/test/cases/associations/builder/has_one_test.rb +0 -28
- data/lib/activeresource/test/cases/authorization_test.rb +0 -276
- data/lib/activeresource/test/cases/base/custom_methods_test.rb +0 -155
- data/lib/activeresource/test/cases/base/equality_test.rb +0 -53
- data/lib/activeresource/test/cases/base/load_test.rb +0 -249
- data/lib/activeresource/test/cases/base/schema_test.rb +0 -428
- data/lib/activeresource/test/cases/base_errors_test.rb +0 -129
- data/lib/activeresource/test/cases/base_test.rb +0 -1622
- data/lib/activeresource/test/cases/callbacks_test.rb +0 -155
- data/lib/activeresource/test/cases/collection_test.rb +0 -196
- data/lib/activeresource/test/cases/connection_test.rb +0 -357
- data/lib/activeresource/test/cases/finder_test.rb +0 -217
- data/lib/activeresource/test/cases/format_test.rb +0 -137
- data/lib/activeresource/test/cases/http_mock_test.rb +0 -213
- data/lib/activeresource/test/cases/inheritence_test.rb +0 -19
- data/lib/activeresource/test/cases/inheriting_hash_test.rb +0 -25
- data/lib/activeresource/test/cases/log_subscriber_test.rb +0 -64
- data/lib/activeresource/test/cases/reflection_test.rb +0 -65
- data/lib/activeresource/test/cases/validations_test.rb +0 -78
- data/lib/activeresource/test/fixtures/address.rb +0 -20
- data/lib/activeresource/test/fixtures/beast.rb +0 -16
- data/lib/activeresource/test/fixtures/comment.rb +0 -5
- data/lib/activeresource/test/fixtures/customer.rb +0 -5
- data/lib/activeresource/test/fixtures/fixtures.rbi +0 -46
- data/lib/activeresource/test/fixtures/inventory.rb +0 -14
- data/lib/activeresource/test/fixtures/person.rb +0 -15
- data/lib/activeresource/test/fixtures/pet.rb +0 -6
- data/lib/activeresource/test/fixtures/post.rb +0 -5
- data/lib/activeresource/test/fixtures/product.rb +0 -11
- data/lib/activeresource/test/fixtures/project.rb +0 -19
- data/lib/activeresource/test/fixtures/proxy.rb +0 -6
- data/lib/activeresource/test/fixtures/sound.rb +0 -11
- data/lib/activeresource/test/fixtures/street_address.rb +0 -6
- data/lib/activeresource/test/fixtures/subscription_plan.rb +0 -7
- data/lib/activeresource/test/fixtures/weather.rb +0 -21
- data/lib/activeresource/test/setter_trap.rb +0 -28
- data/lib/activeresource/test/singleton_test.rb +0 -138
- data/lib/activeresource/test/threadsafe_attributes_test.rb +0 -91
- data/sorbet/config +0 -6
- data/sorbet/rbi/annotations/.gitattributes +0 -1
- data/sorbet/rbi/annotations/activemodel.rbi +0 -89
- data/sorbet/rbi/annotations/activesupport.rbi +0 -457
- data/sorbet/rbi/annotations/minitest.rbi +0 -119
- data/sorbet/rbi/annotations/rainbow.rbi +0 -269
- data/sorbet/rbi/dsl/.gitattributes +0 -1
- data/sorbet/rbi/dsl/active_support/callbacks.rbi +0 -21
- data/sorbet/rbi/gems/.gitattributes +0 -1
- data/sorbet/rbi/gems/actioncable@8.0.1.rbi +0 -252
- data/sorbet/rbi/gems/actionmailbox@8.0.1.rbi +0 -9
- data/sorbet/rbi/gems/actionmailer@8.0.1.rbi +0 -9
- data/sorbet/rbi/gems/actionpack@8.0.1.rbi +0 -21111
- data/sorbet/rbi/gems/actiontext@8.0.1.rbi +0 -9
- data/sorbet/rbi/gems/actionview@8.0.1.rbi +0 -16409
- data/sorbet/rbi/gems/activejob@8.0.1.rbi +0 -90
- data/sorbet/rbi/gems/activemodel-serializers-xml@1.0.3.rbi +0 -166
- data/sorbet/rbi/gems/activemodel@8.0.1.rbi +0 -6865
- data/sorbet/rbi/gems/activerecord@8.0.1.rbi +0 -43277
- data/sorbet/rbi/gems/activestorage@8.0.1.rbi +0 -9
- data/sorbet/rbi/gems/activesupport@8.0.1.rbi +0 -21426
- data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -585
- data/sorbet/rbi/gems/base64@0.2.0.rbi +0 -509
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +0 -618
- data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +0 -78
- data/sorbet/rbi/gems/builder@3.3.0.rbi +0 -9
- data/sorbet/rbi/gems/bump@0.10.0.rbi +0 -169
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3607
- data/sorbet/rbi/gems/coderay@1.1.3.rbi +0 -3427
- data/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi +0 -11645
- data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +0 -9
- data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -623
- data/sorbet/rbi/gems/date@3.4.1.rbi +0 -75
- data/sorbet/rbi/gems/diff-lcs@1.5.1.rbi +0 -1131
- data/sorbet/rbi/gems/docile@1.4.1.rbi +0 -377
- data/sorbet/rbi/gems/drb@2.2.1.rbi +0 -1347
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +0 -150
- data/sorbet/rbi/gems/globalid@1.2.1.rbi +0 -9
- data/sorbet/rbi/gems/i18n@1.14.6.rbi +0 -2359
- data/sorbet/rbi/gems/io-console@0.8.0.rbi +0 -9
- data/sorbet/rbi/gems/json@2.9.0.rbi +0 -1944
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14238
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +0 -240
- data/sorbet/rbi/gems/logger@1.6.3.rbi +0 -940
- data/sorbet/rbi/gems/loofah@2.23.1.rbi +0 -1081
- data/sorbet/rbi/gems/mail@2.8.1.rbi +0 -9
- data/sorbet/rbi/gems/marcel@1.0.4.rbi +0 -9
- data/sorbet/rbi/gems/method_source@1.1.0.rbi +0 -304
- data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +0 -9
- data/sorbet/rbi/gems/minitest@5.25.4.rbi +0 -1547
- data/sorbet/rbi/gems/mocha@2.7.1.rbi +0 -12
- data/sorbet/rbi/gems/msgpack@1.7.5.rbi +0 -320
- data/sorbet/rbi/gems/net-imap@0.5.2.rbi +0 -9
- data/sorbet/rbi/gems/net-pop@0.1.2.rbi +0 -9
- data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +0 -292
- data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +0 -9
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
- data/sorbet/rbi/gems/nio4r@2.7.4.rbi +0 -9
- data/sorbet/rbi/gems/nokogiri@1.17.2.rbi +0 -8201
- data/sorbet/rbi/gems/parallel@1.26.3.rbi +0 -291
- data/sorbet/rbi/gems/parser@3.3.6.0.rbi +0 -5519
- data/sorbet/rbi/gems/prism@1.2.0.rbi +0 -39085
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1151
- data/sorbet/rbi/gems/pry@0.14.2.rbi +0 -10076
- data/sorbet/rbi/gems/psych@5.2.1.rbi +0 -1785
- data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -162
- data/sorbet/rbi/gems/rack-session@2.0.0.rbi +0 -727
- data/sorbet/rbi/gems/rack-test@2.1.0.rbi +0 -747
- data/sorbet/rbi/gems/rack@3.1.8.rbi +0 -4905
- data/sorbet/rbi/gems/rackup@2.2.1.rbi +0 -230
- data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +0 -758
- data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +0 -785
- data/sorbet/rbi/gems/rails@8.0.1.rbi +0 -9
- data/sorbet/rbi/gems/railties@8.0.1.rbi +0 -6347
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
- data/sorbet/rbi/gems/rake@13.2.1.rbi +0 -3028
- data/sorbet/rbi/gems/rbi@0.2.1.rbi +0 -4535
- data/sorbet/rbi/gems/rdoc@6.9.1.rbi +0 -12593
- data/sorbet/rbi/gems/regexp_parser@2.9.3.rbi +0 -3772
- data/sorbet/rbi/gems/reline@0.6.0.rbi +0 -2454
- data/sorbet/rbi/gems/rexml@3.4.0.rbi +0 -4871
- data/sorbet/rbi/gems/rspec-core@3.13.2.rbi +0 -11284
- data/sorbet/rbi/gems/rspec-expectations@3.13.3.rbi +0 -8183
- data/sorbet/rbi/gems/rspec-mocks@3.13.2.rbi +0 -5341
- data/sorbet/rbi/gems/rspec-support@3.13.2.rbi +0 -1630
- data/sorbet/rbi/gems/rspec@3.13.0.rbi +0 -83
- data/sorbet/rbi/gems/rubocop-ast@1.37.0.rbi +0 -7713
- data/sorbet/rbi/gems/rubocop-md@1.2.4.rbi +0 -123
- data/sorbet/rbi/gems/rubocop-minitest@0.36.0.rbi +0 -2613
- data/sorbet/rbi/gems/rubocop-packaging@0.5.2.rbi +0 -388
- data/sorbet/rbi/gems/rubocop-performance@1.23.0.rbi +0 -9
- data/sorbet/rbi/gems/rubocop-rails@2.27.0.rbi +0 -9535
- data/sorbet/rbi/gems/rubocop@1.69.2.rbi +0 -59600
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1318
- data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -9
- data/sorbet/rbi/gems/securerandom@0.4.1.rbi +0 -78
- data/sorbet/rbi/gems/simplecov-html@0.13.1.rbi +0 -225
- data/sorbet/rbi/gems/simplecov@0.22.0.rbi +0 -2149
- data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +0 -9
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +0 -4932
- data/sorbet/rbi/gems/sqlite3@2.3.1.rbi +0 -1824
- data/sorbet/rbi/gems/standard-custom@1.0.2.rbi +0 -9
- data/sorbet/rbi/gems/standard-performance@1.6.0.rbi +0 -9
- data/sorbet/rbi/gems/standard@1.43.0.rbi +0 -926
- data/sorbet/rbi/gems/stringio@3.1.2.rbi +0 -9
- data/sorbet/rbi/gems/tapioca@0.16.4.rbi +0 -3597
- data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
- data/sorbet/rbi/gems/timeout@0.4.2.rbi +0 -151
- data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
- data/sorbet/rbi/gems/unicode-display_width@3.1.2.rbi +0 -130
- data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +0 -251
- data/sorbet/rbi/gems/uri@1.0.2.rbi +0 -2377
- data/sorbet/rbi/gems/useragent@0.16.11.rbi +0 -9
- data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +0 -9
- data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -9
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
- data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18504
- data/sorbet/rbi/gems/zeitwerk@2.7.1.rbi +0 -9
- data/sorbet/tapioca/config.yml +0 -13
- data/sorbet/tapioca/require.rb +0 -13
@@ -1,747 +0,0 @@
|
|
1
|
-
# typed: true
|
2
|
-
|
3
|
-
# DO NOT EDIT MANUALLY
|
4
|
-
# This is an autogenerated file for types exported from the `rack-test` gem.
|
5
|
-
# Please instead update this file by running `bin/tapioca gem rack-test`.
|
6
|
-
|
7
|
-
|
8
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#6
|
9
|
-
module Rack
|
10
|
-
class << self
|
11
|
-
# source://rack/3.1.8/lib/rack/version.rb#18
|
12
|
-
def release; end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
# For backwards compatibility with 1.1.0 and below
|
17
|
-
#
|
18
|
-
# source://rack-test//lib/rack/test.rb#381
|
19
|
-
Rack::MockSession = Rack::Test::Session
|
20
|
-
|
21
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#7
|
22
|
-
module Rack::Test
|
23
|
-
class << self
|
24
|
-
# Whether the version of rack in use handles encodings.
|
25
|
-
#
|
26
|
-
# @return [Boolean]
|
27
|
-
#
|
28
|
-
# source://rack-test//lib/rack/test.rb#375
|
29
|
-
def encoding_aware_strings?; end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
# Represents individual cookies in the cookie jar. This is considered private
|
34
|
-
# API and behavior of this class can change at any time.
|
35
|
-
#
|
36
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#10
|
37
|
-
class Rack::Test::Cookie
|
38
|
-
include ::Rack::Utils
|
39
|
-
|
40
|
-
# @return [Cookie] a new instance of Cookie
|
41
|
-
#
|
42
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#23
|
43
|
-
def initialize(raw, uri = T.unsafe(nil), default_host = T.unsafe(nil)); end
|
44
|
-
|
45
|
-
# Order cookies by name, path, and domain.
|
46
|
-
#
|
47
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#107
|
48
|
-
def <=>(other); end
|
49
|
-
|
50
|
-
# The explicit or implicit domain for the cookie.
|
51
|
-
#
|
52
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#59
|
53
|
-
def domain; end
|
54
|
-
|
55
|
-
# Whether the cookie has a value.
|
56
|
-
#
|
57
|
-
# @return [Boolean]
|
58
|
-
#
|
59
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#54
|
60
|
-
def empty?; end
|
61
|
-
|
62
|
-
# Whether the cookie is currently expired.
|
63
|
-
#
|
64
|
-
# @return [Boolean]
|
65
|
-
#
|
66
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#86
|
67
|
-
def expired?; end
|
68
|
-
|
69
|
-
# A Time value for when the cookie expires, if the expires option is set.
|
70
|
-
#
|
71
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#81
|
72
|
-
def expires; end
|
73
|
-
|
74
|
-
# Whether the cookie has the httponly flag, indicating it is not available via
|
75
|
-
# a javascript API.
|
76
|
-
#
|
77
|
-
# @return [Boolean]
|
78
|
-
#
|
79
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#71
|
80
|
-
def http_only?; end
|
81
|
-
|
82
|
-
# Cookies that do not match the URI will not be sent in requests to the URI.
|
83
|
-
#
|
84
|
-
# @return [Boolean]
|
85
|
-
#
|
86
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#102
|
87
|
-
def matches?(uri); end
|
88
|
-
|
89
|
-
# The name of the cookie, will be a string
|
90
|
-
#
|
91
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#14
|
92
|
-
def name; end
|
93
|
-
|
94
|
-
# The explicit or implicit path for the cookie.
|
95
|
-
#
|
96
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#76
|
97
|
-
def path; end
|
98
|
-
|
99
|
-
# The raw string for the cookie, without options. Will generally be in
|
100
|
-
# name=value format is name and value are provided.
|
101
|
-
#
|
102
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#21
|
103
|
-
def raw; end
|
104
|
-
|
105
|
-
# Wether the given cookie can replace the current cookie in the cookie jar.
|
106
|
-
#
|
107
|
-
# @return [Boolean]
|
108
|
-
#
|
109
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#49
|
110
|
-
def replaces?(other); end
|
111
|
-
|
112
|
-
# Whether the cookie has the secure flag, indicating it can only be sent over
|
113
|
-
# an encrypted connection.
|
114
|
-
#
|
115
|
-
# @return [Boolean]
|
116
|
-
#
|
117
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#65
|
118
|
-
def secure?; end
|
119
|
-
|
120
|
-
# A hash of cookie options, including the cookie value, but excluding the cookie name.
|
121
|
-
#
|
122
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#112
|
123
|
-
def to_h; end
|
124
|
-
|
125
|
-
# A hash of cookie options, including the cookie value, but excluding the cookie name.
|
126
|
-
#
|
127
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#112
|
128
|
-
def to_hash; end
|
129
|
-
|
130
|
-
# Whether the cookie is valid for the given URI.
|
131
|
-
#
|
132
|
-
# @return [Boolean]
|
133
|
-
#
|
134
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#91
|
135
|
-
def valid?(uri); end
|
136
|
-
|
137
|
-
# The value of the cookie, will be a string or nil if there is no value.
|
138
|
-
#
|
139
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#17
|
140
|
-
def value; end
|
141
|
-
|
142
|
-
private
|
143
|
-
|
144
|
-
# The default URI to use for the cookie, including just the host.
|
145
|
-
#
|
146
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#124
|
147
|
-
def default_uri; end
|
148
|
-
end
|
149
|
-
|
150
|
-
# Represents all cookies for a session, handling adding and
|
151
|
-
# removing cookies, and finding which cookies apply to a given
|
152
|
-
# request. This is considered private API and behavior of this
|
153
|
-
# class can change at any time.
|
154
|
-
#
|
155
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#133
|
156
|
-
class Rack::Test::CookieJar
|
157
|
-
# @return [CookieJar] a new instance of CookieJar
|
158
|
-
#
|
159
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#136
|
160
|
-
def initialize(cookies = T.unsafe(nil), default_host = T.unsafe(nil)); end
|
161
|
-
|
162
|
-
# Add a Cookie to the cookie jar.
|
163
|
-
#
|
164
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#198
|
165
|
-
def <<(new_cookie); end
|
166
|
-
|
167
|
-
# Return the value for first cookie with the given name, or nil
|
168
|
-
# if no such cookie exists.
|
169
|
-
#
|
170
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#149
|
171
|
-
def [](name); end
|
172
|
-
|
173
|
-
# Set a cookie with the given name and value in the
|
174
|
-
# cookie jar.
|
175
|
-
#
|
176
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#159
|
177
|
-
def []=(name, value); end
|
178
|
-
|
179
|
-
# Delete all cookies with the given name from the cookie jar.
|
180
|
-
#
|
181
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#173
|
182
|
-
def delete(name); end
|
183
|
-
|
184
|
-
# Return a raw cookie string for the cookie header to
|
185
|
-
# use for the given URI.
|
186
|
-
#
|
187
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#209
|
188
|
-
def for(uri); end
|
189
|
-
|
190
|
-
# Return the first cookie with the given name, or nil if
|
191
|
-
# no such cookie exists.
|
192
|
-
#
|
193
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#165
|
194
|
-
def get_cookie(name); end
|
195
|
-
|
196
|
-
# Add a string of raw cookie information to the cookie jar,
|
197
|
-
# if the cookie is valid for the given URI.
|
198
|
-
# Cookies should be separated with a newline.
|
199
|
-
#
|
200
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#183
|
201
|
-
def merge(raw_cookies, uri = T.unsafe(nil)); end
|
202
|
-
|
203
|
-
# Return a hash cookie names and cookie values for cookies in the jar.
|
204
|
-
#
|
205
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#226
|
206
|
-
def to_hash; end
|
207
|
-
|
208
|
-
private
|
209
|
-
|
210
|
-
# Yield each cookie that matches for the URI.
|
211
|
-
#
|
212
|
-
# The cookies are sorted by most specific first. So, we loop through
|
213
|
-
# all the cookies in order and add it to a hash by cookie name if
|
214
|
-
# the cookie can be sent to the current URI. It's added to the hash
|
215
|
-
# so that when we are done, the cookies will be unique by name and
|
216
|
-
# we'll have grabbed the most specific to the URI.
|
217
|
-
#
|
218
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#245
|
219
|
-
def each_cookie_for(uri); end
|
220
|
-
|
221
|
-
# Ensure the copy uses a distinct cookies array.
|
222
|
-
#
|
223
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#142
|
224
|
-
def initialize_copy(other); end
|
225
|
-
end
|
226
|
-
|
227
|
-
# source://rack-test//lib/rack/test/cookie_jar.rb#134
|
228
|
-
Rack::Test::CookieJar::DELIMITER = T.let(T.unsafe(nil), String)
|
229
|
-
|
230
|
-
# The default host to use for requests, when a full URI is not
|
231
|
-
# provided.
|
232
|
-
#
|
233
|
-
# source://rack-test//lib/rack/test.rb#33
|
234
|
-
Rack::Test::DEFAULT_HOST = T.let(T.unsafe(nil), String)
|
235
|
-
|
236
|
-
# The ending boundary in multipart requests
|
237
|
-
#
|
238
|
-
# source://rack-test//lib/rack/test.rb#42
|
239
|
-
Rack::Test::END_BOUNDARY = T.let(T.unsafe(nil), String)
|
240
|
-
|
241
|
-
# The common base class for exceptions raised by Rack::Test
|
242
|
-
#
|
243
|
-
# source://rack-test//lib/rack/test.rb#45
|
244
|
-
class Rack::Test::Error < ::StandardError; end
|
245
|
-
|
246
|
-
# The default multipart boundary to use for multipart request bodies
|
247
|
-
#
|
248
|
-
# source://rack-test//lib/rack/test.rb#36
|
249
|
-
Rack::Test::MULTIPART_BOUNDARY = T.let(T.unsafe(nil), String)
|
250
|
-
|
251
|
-
# This module serves as the primary integration point for using Rack::Test
|
252
|
-
# in a testing environment. It depends on an app method being defined in the
|
253
|
-
# same context, and provides the Rack::Test API methods (see Rack::Test::Session
|
254
|
-
# for their documentation). It defines the following methods that are delegated
|
255
|
-
# to the current session: :request, :get, :post, :put, :patch, :delete, :options,
|
256
|
-
# :head, :custom_request, :follow_redirect!, :header, :env, :set_cookie,
|
257
|
-
# :clear_cookies, :authorize, :basic_authorize, :last_response, and :last_request.
|
258
|
-
#
|
259
|
-
# Example:
|
260
|
-
#
|
261
|
-
# class HomepageTest < Test::Unit::TestCase
|
262
|
-
# include Rack::Test::Methods
|
263
|
-
#
|
264
|
-
# def app
|
265
|
-
# MyApp
|
266
|
-
# end
|
267
|
-
# end
|
268
|
-
#
|
269
|
-
# source://rack-test//lib/rack/test/methods.rb#24
|
270
|
-
module Rack::Test::Methods
|
271
|
-
extend ::Forwardable
|
272
|
-
|
273
|
-
# Private accessor to avoid uninitialized instance variable warning in Ruby 2.*
|
274
|
-
#
|
275
|
-
# source://rack-test//lib/rack/test/methods.rb#90
|
276
|
-
def _rack_test_current_session=(_arg0); end
|
277
|
-
|
278
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
279
|
-
def authorize(*args, **_arg1, &block); end
|
280
|
-
|
281
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
282
|
-
def basic_authorize(*args, **_arg1, &block); end
|
283
|
-
|
284
|
-
# Create a new Rack::Test::Session for #app.
|
285
|
-
#
|
286
|
-
# source://rack-test//lib/rack/test/methods.rb#40
|
287
|
-
def build_rack_test_session(_name); end
|
288
|
-
|
289
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
290
|
-
def clear_cookies(*args, **_arg1, &block); end
|
291
|
-
|
292
|
-
# Return the currently actively session. This is the session to
|
293
|
-
# which the delegated methods are sent.
|
294
|
-
#
|
295
|
-
# source://rack-test//lib/rack/test/methods.rb#55
|
296
|
-
def current_session; end
|
297
|
-
|
298
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
299
|
-
def custom_request(*args, **_arg1, &block); end
|
300
|
-
|
301
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
302
|
-
def delete(*args, **_arg1, &block); end
|
303
|
-
|
304
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
305
|
-
def env(*args, **_arg1, &block); end
|
306
|
-
|
307
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
308
|
-
def follow_redirect!(*args, **_arg1, &block); end
|
309
|
-
|
310
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
311
|
-
def get(*args, **_arg1, &block); end
|
312
|
-
|
313
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
314
|
-
def head(*args, **_arg1, &block); end
|
315
|
-
|
316
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
317
|
-
def header(*args, **_arg1, &block); end
|
318
|
-
|
319
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
320
|
-
def last_request(*args, **_arg1, &block); end
|
321
|
-
|
322
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
323
|
-
def last_response(*args, **_arg1, &block); end
|
324
|
-
|
325
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
326
|
-
def options(*args, **_arg1, &block); end
|
327
|
-
|
328
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
329
|
-
def patch(*args, **_arg1, &block); end
|
330
|
-
|
331
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
332
|
-
def post(*args, **_arg1, &block); end
|
333
|
-
|
334
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
335
|
-
def put(*args, **_arg1, &block); end
|
336
|
-
|
337
|
-
# Return the existing session with the given name, or a new
|
338
|
-
# rack session. Always use a new session if name is nil.
|
339
|
-
# For backwards compatibility with older rack-test versions.
|
340
|
-
#
|
341
|
-
# source://rack-test//lib/rack/test/methods.rb#29
|
342
|
-
def rack_mock_session(name = T.unsafe(nil)); end
|
343
|
-
|
344
|
-
# Return the existing session with the given name, or a new
|
345
|
-
# rack session. Always use a new session if name is nil.
|
346
|
-
#
|
347
|
-
# source://rack-test//lib/rack/test/methods.rb#29
|
348
|
-
def rack_test_session(name = T.unsafe(nil)); end
|
349
|
-
|
350
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
351
|
-
def request(*args, **_arg1, &block); end
|
352
|
-
|
353
|
-
# source://forwardable/1.3.3/forwardable.rb#231
|
354
|
-
def set_cookie(*args, **_arg1, &block); end
|
355
|
-
|
356
|
-
# Create a new session (or reuse an existing session with the given name),
|
357
|
-
# and make it the current session for the given block.
|
358
|
-
#
|
359
|
-
# source://rack-test//lib/rack/test/methods.rb#61
|
360
|
-
def with_session(name); end
|
361
|
-
|
362
|
-
private
|
363
|
-
|
364
|
-
# Private accessor to avoid uninitialized instance variable warning in Ruby 2.*
|
365
|
-
#
|
366
|
-
# source://rack-test//lib/rack/test/methods.rb#90
|
367
|
-
def _rack_test_current_session; end
|
368
|
-
end
|
369
|
-
|
370
|
-
# The starting boundary in multipart requests
|
371
|
-
#
|
372
|
-
# source://rack-test//lib/rack/test.rb#39
|
373
|
-
Rack::Test::START_BOUNDARY = T.let(T.unsafe(nil), String)
|
374
|
-
|
375
|
-
# Rack::Test::Session handles a series of requests issued to a Rack app.
|
376
|
-
# It keeps track of the cookies for the session, and allows for setting headers
|
377
|
-
# and a default rack environment that is used for future requests.
|
378
|
-
#
|
379
|
-
# Rack::Test::Session's methods are most often called through Rack::Test::Methods,
|
380
|
-
# which will automatically build a session when it's first used.
|
381
|
-
#
|
382
|
-
# source://rack-test//lib/rack/test.rb#53
|
383
|
-
class Rack::Test::Session
|
384
|
-
include ::Rack::Utils
|
385
|
-
include ::Rack::Test::Utils
|
386
|
-
extend ::Forwardable
|
387
|
-
|
388
|
-
# Creates a Rack::Test::Session for a given Rack app or Rack::Test::BasicSession.
|
389
|
-
#
|
390
|
-
# Note: Generally, you won't need to initialize a Rack::Test::Session directly.
|
391
|
-
# Instead, you should include Rack::Test::Methods into your testing context.
|
392
|
-
# (See README.rdoc for an example)
|
393
|
-
#
|
394
|
-
# The following methods are defined via metaprogramming: get, post, put, patch,
|
395
|
-
# delete, options, and head. Each method submits a request with the given request
|
396
|
-
# method, with the given URI and optional parameters and rack environment.
|
397
|
-
# Examples:
|
398
|
-
#
|
399
|
-
# # URI only:
|
400
|
-
# get("/") # GET /
|
401
|
-
# get("/?foo=bar") # GET /?foo=bar
|
402
|
-
#
|
403
|
-
# # URI and parameters
|
404
|
-
# get("/foo", 'bar'=>'baz') # GET /foo?bar=baz
|
405
|
-
# post("/foo", 'bar'=>'baz') # POST /foo (bar=baz in request body)
|
406
|
-
#
|
407
|
-
# # URI, parameters, and rack environment
|
408
|
-
# get("/bar", {}, 'CONTENT_TYPE'=>'foo')
|
409
|
-
# get("/bar", {'foo'=>'baz'}, 'HTTP_ACCEPT'=>'*')
|
410
|
-
#
|
411
|
-
# The above methods as well as #request and #custom_request store the Rack::Request
|
412
|
-
# submitted in #last_request. The methods store a Rack::MockResponse based on the
|
413
|
-
# response in #last_response. #last_response is also returned by the methods.
|
414
|
-
# If a block is given, #last_response is also yielded to the block.
|
415
|
-
#
|
416
|
-
# @return [Session] a new instance of Session
|
417
|
-
#
|
418
|
-
# source://rack-test//lib/rack/test.rb#99
|
419
|
-
def initialize(app, default_host = T.unsafe(nil)); end
|
420
|
-
|
421
|
-
# Run a block after the each request completes.
|
422
|
-
#
|
423
|
-
# source://rack-test//lib/rack/test.rb#118
|
424
|
-
def after_request(&block); end
|
425
|
-
|
426
|
-
# Set the username and password for HTTP Basic authorization, to be
|
427
|
-
# included in subsequent requests in the HTTP_AUTHORIZATION header.
|
428
|
-
#
|
429
|
-
# Example:
|
430
|
-
# basic_authorize "bryan", "secret"
|
431
|
-
#
|
432
|
-
# source://rack-test//lib/rack/test.rb#198
|
433
|
-
def authorize(username, password); end
|
434
|
-
|
435
|
-
# Set the username and password for HTTP Basic authorization, to be
|
436
|
-
# included in subsequent requests in the HTTP_AUTHORIZATION header.
|
437
|
-
#
|
438
|
-
# Example:
|
439
|
-
# basic_authorize "bryan", "secret"
|
440
|
-
#
|
441
|
-
# source://rack-test//lib/rack/test.rb#198
|
442
|
-
def basic_authorize(username, password); end
|
443
|
-
|
444
|
-
# Replace the current cookie jar with an empty cookie jar.
|
445
|
-
#
|
446
|
-
# source://rack-test//lib/rack/test.rb#123
|
447
|
-
def clear_cookies; end
|
448
|
-
|
449
|
-
# The Rack::Test::CookieJar for the cookies for the current session.
|
450
|
-
#
|
451
|
-
# source://rack-test//lib/rack/test.rb#67
|
452
|
-
def cookie_jar; end
|
453
|
-
|
454
|
-
# The Rack::Test::CookieJar for the cookies for the current session.
|
455
|
-
#
|
456
|
-
# source://rack-test//lib/rack/test.rb#67
|
457
|
-
def cookie_jar=(_arg0); end
|
458
|
-
|
459
|
-
# Issue a request using the given HTTP verb for the given URI, with optional
|
460
|
-
# params and rack environment. Example:
|
461
|
-
#
|
462
|
-
# custom_request "LINK", "/"
|
463
|
-
#
|
464
|
-
# source://rack-test//lib/rack/test.rb#160
|
465
|
-
def custom_request(verb, uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
|
466
|
-
|
467
|
-
# The default host used for the session for when using paths for URIs.
|
468
|
-
#
|
469
|
-
# source://rack-test//lib/rack/test.rb#70
|
470
|
-
def default_host; end
|
471
|
-
|
472
|
-
# source://rack-test//lib/rack/test.rb#111
|
473
|
-
def delete(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
|
474
|
-
|
475
|
-
# Set an entry in the rack environment to be included on all subsequent
|
476
|
-
# requests through the session. Use a value of nil to remove a previously
|
477
|
-
# value. Example:
|
478
|
-
#
|
479
|
-
# env "rack.session", {:csrf => 'token'}
|
480
|
-
#
|
481
|
-
# source://rack-test//lib/rack/test.rb#185
|
482
|
-
def env(name, value); end
|
483
|
-
|
484
|
-
# Rack::Test will not follow any redirects automatically. This method
|
485
|
-
# will follow the redirect returned (including setting the Referer header
|
486
|
-
# on the new request) in the last response. If the last response was not
|
487
|
-
# a redirect, an error will be raised.
|
488
|
-
#
|
489
|
-
# source://rack-test//lib/rack/test.rb#209
|
490
|
-
def follow_redirect!; end
|
491
|
-
|
492
|
-
# source://rack-test//lib/rack/test.rb#111
|
493
|
-
def get(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
|
494
|
-
|
495
|
-
# source://rack-test//lib/rack/test.rb#111
|
496
|
-
def head(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
|
497
|
-
|
498
|
-
# Set a header to be included on all subsequent requests through the
|
499
|
-
# session. Use a value of nil to remove a previously configured header.
|
500
|
-
#
|
501
|
-
# In accordance with the Rack spec, headers will be included in the Rack
|
502
|
-
# environment hash in HTTP_USER_AGENT form. Example:
|
503
|
-
#
|
504
|
-
# header "user-agent", "Firefox"
|
505
|
-
#
|
506
|
-
# source://rack-test//lib/rack/test.rb#173
|
507
|
-
def header(name, value); end
|
508
|
-
|
509
|
-
# Return the last request issued in the session. Raises an error if no
|
510
|
-
# requests have been sent yet.
|
511
|
-
#
|
512
|
-
# @raise [Error]
|
513
|
-
#
|
514
|
-
# source://rack-test//lib/rack/test.rb#134
|
515
|
-
def last_request; end
|
516
|
-
|
517
|
-
# Return the last response received in the session. Raises an error if
|
518
|
-
# no requests have been sent yet.
|
519
|
-
#
|
520
|
-
# @raise [Error]
|
521
|
-
#
|
522
|
-
# source://rack-test//lib/rack/test.rb#141
|
523
|
-
def last_response; end
|
524
|
-
|
525
|
-
# source://rack-test//lib/rack/test.rb#111
|
526
|
-
def options(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
|
527
|
-
|
528
|
-
# source://rack-test//lib/rack/test.rb#111
|
529
|
-
def patch(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
|
530
|
-
|
531
|
-
# source://rack-test//lib/rack/test.rb#111
|
532
|
-
def post(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
|
533
|
-
|
534
|
-
# source://rack-test//lib/rack/test.rb#111
|
535
|
-
def put(uri, params = T.unsafe(nil), env = T.unsafe(nil), &block); end
|
536
|
-
|
537
|
-
# Issue a request to the Rack app for the given URI and optional Rack
|
538
|
-
# environment. Example:
|
539
|
-
#
|
540
|
-
# request "/"
|
541
|
-
#
|
542
|
-
# source://rack-test//lib/rack/test.rb#150
|
543
|
-
def request(uri, env = T.unsafe(nil), &block); end
|
544
|
-
|
545
|
-
# Yield to the block, and restore the last request, last response, and
|
546
|
-
# cookie jar to the state they were prior to block execution upon
|
547
|
-
# exiting the block.
|
548
|
-
#
|
549
|
-
# source://rack-test//lib/rack/test.rb#240
|
550
|
-
def restore_state; end
|
551
|
-
|
552
|
-
# Set a cookie in the current cookie jar.
|
553
|
-
#
|
554
|
-
# source://rack-test//lib/rack/test.rb#128
|
555
|
-
def set_cookie(cookie, uri = T.unsafe(nil)); end
|
556
|
-
|
557
|
-
private
|
558
|
-
|
559
|
-
# Append a string version of the query params to the array of query params.
|
560
|
-
#
|
561
|
-
# source://rack-test//lib/rack/test.rb#340
|
562
|
-
def append_query_params(query_array, query_params); end
|
563
|
-
|
564
|
-
# close() gets called automatically in newer Rack versions.
|
565
|
-
#
|
566
|
-
# source://rack-test//lib/rack/test.rb#266
|
567
|
-
def close_body(body); end
|
568
|
-
|
569
|
-
# Update environment to use based on given URI.
|
570
|
-
#
|
571
|
-
# source://rack-test//lib/rack/test.rb#293
|
572
|
-
def env_for(uri, env); end
|
573
|
-
|
574
|
-
# Return the multipart content type to use based on the environment.
|
575
|
-
#
|
576
|
-
# source://rack-test//lib/rack/test.rb#346
|
577
|
-
def multipart_content_type(env); end
|
578
|
-
|
579
|
-
# Normalize URI based on given URI/path and environment.
|
580
|
-
#
|
581
|
-
# source://rack-test//lib/rack/test.rb#271
|
582
|
-
def parse_uri(path, env); end
|
583
|
-
|
584
|
-
# Submit the request with the given URI and rack environment to
|
585
|
-
# the mock session. Returns and potentially yields the last response.
|
586
|
-
#
|
587
|
-
# @yield [@last_response]
|
588
|
-
#
|
589
|
-
# source://rack-test//lib/rack/test.rb#357
|
590
|
-
def process_request(uri, env); end
|
591
|
-
|
592
|
-
class << self
|
593
|
-
# source://rack-test//lib/rack/test.rb#57
|
594
|
-
def new(app, default_host = T.unsafe(nil)); end
|
595
|
-
end
|
596
|
-
end
|
597
|
-
|
598
|
-
# source://rack-test//lib/rack/test.rb#279
|
599
|
-
Rack::Test::Session::DEFAULT_ENV = T.let(T.unsafe(nil), Hash)
|
600
|
-
|
601
|
-
# Wraps a Tempfile with a content type. Including one or more UploadedFile's
|
602
|
-
# in the params causes Rack::Test to build and issue a multipart request.
|
603
|
-
#
|
604
|
-
# Example:
|
605
|
-
# post "/photos", "file" => Rack::Test::UploadedFile.new("me.jpg", "image/jpeg")
|
606
|
-
#
|
607
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#14
|
608
|
-
class Rack::Test::UploadedFile
|
609
|
-
# Creates a new UploadedFile instance.
|
610
|
-
#
|
611
|
-
# Arguments:
|
612
|
-
# content :: is a path to a file, or an {IO} or {StringIO} object representing the content.
|
613
|
-
# content_type :: MIME type of the file
|
614
|
-
# binary :: Whether the file should be set to binmode (content treated as binary).
|
615
|
-
# original_filename :: The filename to use for the file. Required if content is StringIO, optional override if not
|
616
|
-
#
|
617
|
-
# @return [UploadedFile] a new instance of UploadedFile
|
618
|
-
#
|
619
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#31
|
620
|
-
def initialize(content, content_type = T.unsafe(nil), binary = T.unsafe(nil), original_filename: T.unsafe(nil)); end
|
621
|
-
|
622
|
-
# Append to given buffer in 64K chunks to avoid multiple large
|
623
|
-
# copies of file data in memory. Rewind tempfile before and
|
624
|
-
# after to make sure all data in tempfile is appended to the
|
625
|
-
# buffer.
|
626
|
-
#
|
627
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#60
|
628
|
-
def append_to(buffer); end
|
629
|
-
|
630
|
-
# The content type of the "uploaded" file
|
631
|
-
#
|
632
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#22
|
633
|
-
def content_type; end
|
634
|
-
|
635
|
-
# The content type of the "uploaded" file
|
636
|
-
#
|
637
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#22
|
638
|
-
def content_type=(_arg0); end
|
639
|
-
|
640
|
-
# The path to the tempfile. Will not work if the receiver's content is from a StringIO.
|
641
|
-
#
|
642
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#46
|
643
|
-
def local_path; end
|
644
|
-
|
645
|
-
# Delegate all methods not handled to the tempfile.
|
646
|
-
#
|
647
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#52
|
648
|
-
def method_missing(method_name, *args, &block); end
|
649
|
-
|
650
|
-
# The filename, *not* including the path, of the "uploaded" file
|
651
|
-
#
|
652
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#16
|
653
|
-
def original_filename; end
|
654
|
-
|
655
|
-
# The path to the tempfile. Will not work if the receiver's content is from a StringIO.
|
656
|
-
#
|
657
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#46
|
658
|
-
def path; end
|
659
|
-
|
660
|
-
# The tempfile
|
661
|
-
#
|
662
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#19
|
663
|
-
def tempfile; end
|
664
|
-
|
665
|
-
private
|
666
|
-
|
667
|
-
# Create a tempfile and copy the content from the given path into the tempfile, optionally renaming if
|
668
|
-
# original_filename has been set.
|
669
|
-
#
|
670
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#98
|
671
|
-
def initialize_from_file_path(path); end
|
672
|
-
|
673
|
-
# Use the StringIO as the tempfile.
|
674
|
-
#
|
675
|
-
# @raise [ArgumentError]
|
676
|
-
#
|
677
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#90
|
678
|
-
def initialize_from_stringio(stringio); end
|
679
|
-
|
680
|
-
# @return [Boolean]
|
681
|
-
#
|
682
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#71
|
683
|
-
def respond_to_missing?(method_name, include_private = T.unsafe(nil)); end
|
684
|
-
|
685
|
-
class << self
|
686
|
-
# Close and unlink the given file, used as a finalizer for the tempfile,
|
687
|
-
# if the tempfile is backed by a file in the filesystem.
|
688
|
-
#
|
689
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#82
|
690
|
-
def actually_finalize(file); end
|
691
|
-
|
692
|
-
# A proc that can be used as a finalizer to close and unlink the tempfile.
|
693
|
-
#
|
694
|
-
# source://rack-test//lib/rack/test/uploaded_file.rb#76
|
695
|
-
def finalize(file); end
|
696
|
-
end
|
697
|
-
end
|
698
|
-
|
699
|
-
# source://rack-test//lib/rack/test/utils.rb#5
|
700
|
-
module Rack::Test::Utils
|
701
|
-
include ::Rack::Utils
|
702
|
-
extend ::Rack::Utils
|
703
|
-
extend ::Rack::Test::Utils
|
704
|
-
|
705
|
-
# Build a multipart body for the given params.
|
706
|
-
#
|
707
|
-
# @raise [ArgumentError]
|
708
|
-
#
|
709
|
-
# source://rack-test//lib/rack/test/utils.rb#34
|
710
|
-
def build_multipart(params, _first = T.unsafe(nil), multipart = T.unsafe(nil)); end
|
711
|
-
|
712
|
-
# Build a query string for the given value and prefix. The value
|
713
|
-
# can be an array or hash of parameters.
|
714
|
-
#
|
715
|
-
# source://rack-test//lib/rack/test/utils.rb#11
|
716
|
-
def build_nested_query(value, prefix = T.unsafe(nil)); end
|
717
|
-
|
718
|
-
private
|
719
|
-
|
720
|
-
# Append each multipart parameter value to the buffer.
|
721
|
-
#
|
722
|
-
# source://rack-test//lib/rack/test/utils.rb#100
|
723
|
-
def _build_parts(buffer, parameters); end
|
724
|
-
|
725
|
-
# Append the multipart fragment for a parameter that is a file upload to the buffer.
|
726
|
-
#
|
727
|
-
# source://rack-test//lib/rack/test/utils.rb#133
|
728
|
-
def build_file_part(buffer, parameter_name, uploaded_file); end
|
729
|
-
|
730
|
-
# Build the multipart content for uploading.
|
731
|
-
#
|
732
|
-
# source://rack-test//lib/rack/test/utils.rb#94
|
733
|
-
def build_parts(buffer, parameters); end
|
734
|
-
|
735
|
-
# Append the multipart fragment for a parameter that isn't a file upload to the buffer.
|
736
|
-
#
|
737
|
-
# source://rack-test//lib/rack/test/utils.rb#121
|
738
|
-
def build_primitive_part(buffer, parameter_name, value); end
|
739
|
-
|
740
|
-
# Return a flattened hash of parameter values based on the given params.
|
741
|
-
#
|
742
|
-
# source://rack-test//lib/rack/test/utils.rb#62
|
743
|
-
def normalize_multipart_params(params, first = T.unsafe(nil)); end
|
744
|
-
end
|
745
|
-
|
746
|
-
# source://rack-test//lib/rack/test/version.rb#3
|
747
|
-
Rack::Test::VERSION = T.let(T.unsafe(nil), String)
|