acfs 1.7.0 → 2.0.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 +144 -116
- data/README.md +19 -24
- data/acfs.gemspec +7 -10
- data/lib/acfs/collections/paginatable.rb +11 -11
- data/lib/acfs/configuration.rb +1 -1
- data/lib/acfs/errors.rb +6 -6
- data/lib/acfs/global.rb +2 -2
- data/lib/acfs/location.rb +1 -1
- data/lib/acfs/resource/attributes/uuid.rb +1 -1
- data/lib/acfs/resource/attributes.rb +1 -1
- data/lib/acfs/resource/dirty.rb +1 -1
- data/lib/acfs/resource/operational.rb +4 -4
- data/lib/acfs/resource/query_methods.rb +3 -3
- data/lib/acfs/response/status.rb +1 -1
- data/lib/acfs/service/middleware.rb +2 -2
- data/lib/acfs/singleton_resource.rb +2 -2
- data/lib/acfs/stub.rb +1 -1
- data/lib/acfs/version.rb +2 -2
- data/lib/acfs/yard.rb +1 -0
- data/spec/acfs/adapter/typhoeus_spec.rb +3 -3
- data/spec/acfs/configuration_spec.rb +1 -1
- data/spec/acfs/global_spec.rb +5 -5
- data/spec/acfs/location_spec.rb +1 -1
- data/spec/acfs/middleware/json_spec.rb +1 -1
- data/spec/acfs/middleware/message_pack_spec.rb +1 -1
- data/spec/acfs/operation_spec.rb +1 -1
- data/spec/acfs/resource/attributes/boolean_spec.rb +31 -31
- data/spec/acfs/resource/attributes/date_time_spec.rb +9 -9
- data/spec/acfs/resource/attributes/dict_spec.rb +10 -10
- data/spec/acfs/resource/attributes/float_spec.rb +11 -11
- data/spec/acfs/resource/attributes/integer_spec.rb +6 -6
- data/spec/acfs/resource/attributes/list_spec.rb +1 -1
- data/spec/acfs/resource/attributes/uuid_spec.rb +8 -8
- data/spec/acfs/resource/attributes_spec.rb +8 -8
- data/spec/acfs/resource/dirty_spec.rb +1 -1
- data/spec/acfs/resource/persistence_spec.rb +7 -7
- data/spec/acfs/resource/query_methods_spec.rb +1 -1
- data/spec/acfs/runner_spec.rb +12 -12
- data/spec/acfs/stub_spec.rb +13 -18
- data/spec/acfs_spec.rb +4 -4
- data/spec/spec_helper.rb +9 -5
- data/spec/support/hash.rb +1 -1
- data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-67802c9d1826/LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-67802c9d1826/README.md +23 -0
- data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-67802c9d1826/rubocop-config.gemspec +31 -0
- data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.1/CHANGELOG.md +205 -0
- data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.1/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.1/README.rdoc +57 -0
- data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/CHANGELOG.md +67 -0
- data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/README.rdoc +40 -0
- data/vendor/bundle/ruby/3.4.0/gems/activemodel-8.0.1/CHANGELOG.md +110 -0
- data/vendor/bundle/ruby/3.4.0/gems/activemodel-8.0.1/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/activemodel-8.0.1/README.rdoc +266 -0
- data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/CHANGELOG.md +157 -0
- data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/README.rdoc +40 -0
- data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/CHANGELOG.md +301 -0
- data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/LICENSE.txt +202 -0
- data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/README.md +121 -0
- data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/addressable.gemspec +28 -0
- data/vendor/bundle/ruby/3.4.0/gems/appraisal-2.5.0/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/appraisal-2.5.0/README.md +243 -0
- data/vendor/bundle/ruby/3.4.0/gems/appraisal-2.5.0/appraisal.gemspec +29 -0
- data/vendor/bundle/ruby/3.4.0/gems/base64-0.2.0/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/base64-0.2.0/README.md +48 -0
- data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.0/README.md +138 -0
- data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.0/benchmark.gemspec +32 -0
- data/vendor/bundle/ruby/3.4.0/gems/bigdecimal-3.1.9/LICENSE +56 -0
- data/vendor/bundle/ruby/3.4.0/gems/bigdecimal-3.1.9/bigdecimal.gemspec +57 -0
- data/vendor/bundle/ruby/3.4.0/gems/builder-3.3.0/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/builder-3.3.0/README.md +258 -0
- data/vendor/bundle/ruby/3.4.0/gems/builder-3.3.0/builder.gemspec +49 -0
- data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/CHANGELOG.md +603 -0
- data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/LICENSE.txt +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/README.md +407 -0
- data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.0/LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.0/README.md +167 -0
- data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.0/connection_pool.gemspec +24 -0
- data/vendor/bundle/ruby/3.4.0/gems/crack-1.0.0/LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/crack-1.0.0/README.md +43 -0
- data/vendor/bundle/ruby/3.4.0/gems/crass-1.0.6/LICENSE +18 -0
- data/vendor/bundle/ruby/3.4.0/gems/crass-1.0.6/README.md +192 -0
- data/vendor/bundle/ruby/3.4.0/gems/crass-1.0.6/crass.gemspec +31 -0
- data/vendor/bundle/ruby/3.4.0/gems/diff-lcs-1.5.1/License.md +41 -0
- data/vendor/bundle/ruby/3.4.0/gems/diff-lcs-1.5.1/README.rdoc +84 -0
- data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.1/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.1/drb.gemspec +41 -0
- data/vendor/bundle/ruby/3.4.0/gems/erubi-1.13.1/CHANGELOG +111 -0
- data/vendor/bundle/ruby/3.4.0/gems/erubi-1.13.1/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/erubi-1.13.1/README.rdoc +151 -0
- data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/CHANGELOG.md +375 -0
- data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/README.md +118 -0
- data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/ethon.gemspec +26 -0
- data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/CHANGELOG.md +465 -0
- data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/LICENSE +24 -0
- data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/LICENSE.SPECS +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/README.md +137 -0
- data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/ffi.gemspec +42 -0
- data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/LICENSE +19 -0
- data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/README.md +298 -0
- data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/changelog.md +119 -0
- data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/hashdiff.gemspec +39 -0
- data/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.6/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.6/README.md +127 -0
- data/vendor/bundle/ruby/3.4.0/gems/json-2.9.1/README.md +195 -0
- data/vendor/bundle/ruby/3.4.0/gems/json-2.9.1/json.gemspec +64 -0
- data/vendor/bundle/ruby/3.4.0/gems/logger-1.6.5/README.md +104 -0
- data/vendor/bundle/ruby/3.4.0/gems/logger-1.6.5/logger.gemspec +28 -0
- data/vendor/bundle/ruby/3.4.0/gems/loofah-2.24.0/CHANGELOG.md +591 -0
- data/vendor/bundle/ruby/3.4.0/gems/loofah-2.24.0/MIT-LICENSE.txt +23 -0
- data/vendor/bundle/ruby/3.4.0/gems/loofah-2.24.0/README.md +410 -0
- data/vendor/bundle/ruby/3.4.0/gems/minitest-5.25.4/README.rdoc +835 -0
- data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/CHANGELOG.md +275 -0
- data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/README.md +121 -0
- data/vendor/bundle/ruby/3.4.0/gems/nokogiri-1.18.1-x86_64-linux-gnu/LICENSE-DEPENDENCIES.md +2224 -0
- data/vendor/bundle/ruby/3.4.0/gems/nokogiri-1.18.1-x86_64-linux-gnu/LICENSE.md +9 -0
- data/vendor/bundle/ruby/3.4.0/gems/nokogiri-1.18.1-x86_64-linux-gnu/README.md +293 -0
- data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.1/CHANGELOG.md +491 -0
- data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.1/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.1/README.md +222 -0
- data/vendor/bundle/ruby/3.4.0/gems/racc-1.8.1/ChangeLog +846 -0
- data/vendor/bundle/ruby/3.4.0/gems/racc-1.8.1/README.ja.rdoc +58 -0
- data/vendor/bundle/ruby/3.4.0/gems/racc-1.8.1/README.rdoc +60 -0
- data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.8/CHANGELOG.md +998 -0
- data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.8/MIT-LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.8/README.md +328 -0
- data/vendor/bundle/ruby/3.4.0/gems/rack-session-2.1.0/license.md +72 -0
- data/vendor/bundle/ruby/3.4.0/gems/rack-session-2.1.0/readme.md +47 -0
- data/vendor/bundle/ruby/3.4.0/gems/rack-test-2.2.0/MIT-LICENSE.txt +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/rack-test-2.2.0/README.md +139 -0
- data/vendor/bundle/ruby/3.4.0/gems/rails-dom-testing-2.2.0/MIT-LICENSE +23 -0
- data/vendor/bundle/ruby/3.4.0/gems/rails-dom-testing-2.2.0/README.md +91 -0
- data/vendor/bundle/ruby/3.4.0/gems/rails-html-sanitizer-1.6.2/CHANGELOG.md +255 -0
- data/vendor/bundle/ruby/3.4.0/gems/rails-html-sanitizer-1.6.2/MIT-LICENSE +23 -0
- data/vendor/bundle/ruby/3.4.0/gems/rails-html-sanitizer-1.6.2/README.md +267 -0
- data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/README.rdoc +155 -0
- data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/rake.gemspec +101 -0
- data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/LICENSE +21 -0
- data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/README.md +107 -0
- data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/rake-release.gemspec +23 -0
- data/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.0/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.0/README.md +57 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-3.13.0/LICENSE.md +27 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-3.13.0/README.md +47 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/Changelog.md +68 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/LICENSE.txt +27 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/README.md +76 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/rspec-collection_matchers.gemspec +33 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-core-3.13.2/Changelog.md +2415 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-core-3.13.2/LICENSE.md +26 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-core-3.13.2/README.md +389 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-expectations-3.13.3/Changelog.md +1352 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-expectations-3.13.3/LICENSE.md +25 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-expectations-3.13.3/README.md +326 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/Changelog.md +73 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/LICENSE.txt +27 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/README.md +104 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/rspec-its.gemspec +31 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-mocks-3.13.2/Changelog.md +1299 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-mocks-3.13.2/LICENSE.md +25 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-mocks-3.13.2/README.md +465 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-support-3.13.2/Changelog.md +408 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-support-3.13.2/LICENSE.md +23 -0
- data/vendor/bundle/ruby/3.4.0/gems/rspec-support-3.13.2/README.md +40 -0
- data/vendor/bundle/ruby/3.4.0/gems/securerandom-0.4.1/README.md +72 -0
- data/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/LICENSE.md +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/README.md +45 -0
- data/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/thor.gemspec +33 -0
- data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/CHANGELOG.md +410 -0
- data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/LICENSE +22 -0
- data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/README.md +588 -0
- data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/typhoeus.gemspec +25 -0
- data/vendor/bundle/ruby/3.4.0/gems/tzinfo-2.0.6/LICENSE +19 -0
- data/vendor/bundle/ruby/3.4.0/gems/tzinfo-2.0.6/README.md +406 -0
- data/vendor/bundle/ruby/3.4.0/gems/uri-1.0.2/README.md +55 -0
- data/vendor/bundle/ruby/3.4.0/gems/useragent-0.16.11/LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/useragent-0.16.11/README.md +42 -0
- data/vendor/bundle/ruby/3.4.0/gems/webmock-3.24.0/CHANGELOG.md +2104 -0
- data/vendor/bundle/ruby/3.4.0/gems/webmock-3.24.0/LICENSE +20 -0
- data/vendor/bundle/ruby/3.4.0/gems/webmock-3.24.0/README.md +1222 -0
- data/vendor/bundle/ruby/3.4.0/specifications/actionpack-8.0.1.gemspec +36 -0
- data/vendor/bundle/ruby/3.4.0/specifications/actionview-8.0.1.gemspec +33 -0
- data/vendor/bundle/ruby/3.4.0/specifications/activemodel-8.0.1.gemspec +26 -0
- data/vendor/bundle/ruby/3.4.0/specifications/activesupport-8.0.1.gemspec +38 -0
- data/vendor/bundle/ruby/3.4.0/specifications/addressable-2.8.7.gemspec +30 -0
- data/vendor/bundle/ruby/3.4.0/specifications/appraisal-2.5.0.gemspec +31 -0
- data/vendor/bundle/ruby/3.4.0/specifications/base64-0.2.0.gemspec +23 -0
- data/vendor/bundle/ruby/3.4.0/specifications/benchmark-0.4.0.gemspec +23 -0
- data/vendor/bundle/ruby/3.4.0/specifications/bigdecimal-3.1.9.gemspec +25 -0
- data/vendor/bundle/ruby/3.4.0/specifications/builder-3.3.0.gemspec +22 -0
- data/vendor/bundle/ruby/3.4.0/specifications/concurrent-ruby-1.3.5.gemspec +24 -0
- data/vendor/bundle/ruby/3.4.0/specifications/connection_pool-2.5.0.gemspec +28 -0
- data/vendor/bundle/ruby/3.4.0/specifications/crack-1.0.0.gemspec +27 -0
- data/vendor/bundle/ruby/3.4.0/specifications/crass-1.0.6.gemspec +27 -0
- data/vendor/bundle/ruby/3.4.0/specifications/diff-lcs-1.5.1.gemspec +37 -0
- data/vendor/bundle/ruby/3.4.0/specifications/drb-2.2.1.gemspec +22 -0
- data/vendor/bundle/ruby/3.4.0/specifications/erubi-1.13.1.gemspec +29 -0
- data/vendor/bundle/ruby/3.4.0/specifications/ethon-0.16.0.gemspec +24 -0
- data/vendor/bundle/ruby/3.4.0/specifications/ffi-1.17.1-x86_64-linux-gnu.gemspec +31 -0
- data/vendor/bundle/ruby/3.4.0/specifications/hashdiff-1.1.2.gemspec +30 -0
- data/vendor/bundle/ruby/3.4.0/specifications/i18n-1.14.6.gemspec +27 -0
- data/vendor/bundle/ruby/3.4.0/specifications/json-2.9.1.gemspec +0 -0
- data/vendor/bundle/ruby/3.4.0/specifications/logger-1.6.5.gemspec +22 -0
- data/vendor/bundle/ruby/3.4.0/specifications/loofah-2.24.0.gemspec +27 -0
- data/vendor/bundle/ruby/3.4.0/specifications/minitest-5.25.4.gemspec +31 -0
- data/vendor/bundle/ruby/3.4.0/specifications/multi_json-1.15.0.gemspec +26 -0
- data/vendor/bundle/ruby/3.4.0/specifications/nokogiri-1.18.1-x86_64-linux-gnu.gemspec +31 -0
- data/vendor/bundle/ruby/3.4.0/specifications/public_suffix-6.0.1.gemspec +24 -0
- data/vendor/bundle/ruby/3.4.0/specifications/racc-1.8.1.gemspec +28 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rack-3.1.8.gemspec +31 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rack-session-2.1.0.gemspec +30 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rack-test-2.2.0.gemspec +29 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rails-dom-testing-2.2.0.gemspec +28 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rails-html-sanitizer-1.6.2.gemspec +27 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rake-13.2.1.gemspec +26 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rake-release-1.3.0.gemspec +26 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rexml-3.4.0.gemspec +25 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rspec-3.13.0.gemspec +31 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rspec-collection_matchers-1.2.1.gemspec +27 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rspec-core-3.13.2.gemspec +39 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rspec-expectations-3.13.3.gemspec +33 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rspec-its-2.0.0.gemspec +27 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rspec-mocks-3.13.2.gemspec +33 -0
- data/vendor/bundle/ruby/3.4.0/specifications/rspec-support-3.13.2.gemspec +29 -0
- data/vendor/bundle/ruby/3.4.0/specifications/securerandom-0.4.1.gemspec +23 -0
- data/vendor/bundle/ruby/3.4.0/specifications/thor-1.3.2.gemspec +28 -0
- data/vendor/bundle/ruby/3.4.0/specifications/typhoeus-1.4.1.gemspec +24 -0
- data/vendor/bundle/ruby/3.4.0/specifications/tzinfo-2.0.6.gemspec +30 -0
- data/vendor/bundle/ruby/3.4.0/specifications/uri-1.0.2.gemspec +23 -0
- data/vendor/bundle/ruby/3.4.0/specifications/useragent-0.16.11.gemspec +25 -0
- data/vendor/bundle/ruby/3.4.0/specifications/webmock-3.24.0.gemspec +45 -0
- metadata +204 -67
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (C) 2007-2021 Leah Neukirchen <http://leahneukirchen.org/infopage.html>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to
|
7
|
+
deal in the Software without restriction, including without limitation the
|
8
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
9
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
18
|
+
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,328 @@
|
|
1
|
+
# ![Rack](contrib/logo.webp)
|
2
|
+
|
3
|
+
Rack provides a minimal, modular, and adaptable interface for developing web
|
4
|
+
applications in Ruby. By wrapping HTTP requests and responses in the simplest
|
5
|
+
way possible, it unifies and distills the bridge between web servers, web
|
6
|
+
frameworks, and web application into a single method call.
|
7
|
+
|
8
|
+
The exact details of this are described in the [Rack Specification], which all
|
9
|
+
Rack applications should conform to.
|
10
|
+
|
11
|
+
## Version support
|
12
|
+
|
13
|
+
| Version | Support |
|
14
|
+
|----------|------------------------------------|
|
15
|
+
| 3.0.x | Bug fixes and security patches. |
|
16
|
+
| 2.2.x | Security patches only. |
|
17
|
+
| <= 2.1.x | End of support. |
|
18
|
+
|
19
|
+
Please see the [Security Policy] for more information.
|
20
|
+
|
21
|
+
## Rack 3.0
|
22
|
+
|
23
|
+
This is the latest version of Rack. It contains API improvements but also some
|
24
|
+
breaking changes. Please check the [Upgrade Guide](UPGRADE-GUIDE.md) for more
|
25
|
+
details about migrating servers, middlewares and applications designed for Rack 2
|
26
|
+
to Rack 3. For detailed information on specific changes, check the [Change Log](CHANGELOG.md).
|
27
|
+
|
28
|
+
## Rack 2.2
|
29
|
+
|
30
|
+
This version of Rack is receiving security patches only, and effort should be
|
31
|
+
made to move to Rack 3.
|
32
|
+
|
33
|
+
Starting in Ruby 3.4 the `base64` dependency will no longer be a default gem,
|
34
|
+
and may cause a warning or error about `base64` being missing. To correct this,
|
35
|
+
add `base64` as a dependency to your project.
|
36
|
+
|
37
|
+
## Installation
|
38
|
+
|
39
|
+
Add the rack gem to your application bundle, or follow the instructions provided
|
40
|
+
by a [supported web framework](#supported-web-frameworks):
|
41
|
+
|
42
|
+
```bash
|
43
|
+
# Install it generally:
|
44
|
+
$ gem install rack
|
45
|
+
|
46
|
+
# or, add it to your current application gemfile:
|
47
|
+
$ bundle add rack
|
48
|
+
```
|
49
|
+
|
50
|
+
If you need features from `Rack::Session` or `bin/rackup` please add those gems separately.
|
51
|
+
|
52
|
+
```bash
|
53
|
+
$ gem install rack-session rackup
|
54
|
+
```
|
55
|
+
|
56
|
+
## Usage
|
57
|
+
|
58
|
+
Create a file called `config.ru` with the following contents:
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
run do |env|
|
62
|
+
[200, {}, ["Hello World"]]
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
Run this using the rackup gem or another [supported web
|
67
|
+
server](#supported-web-servers).
|
68
|
+
|
69
|
+
```bash
|
70
|
+
$ gem install rackup
|
71
|
+
$ rackup
|
72
|
+
$ curl http://localhost:9292
|
73
|
+
Hello World
|
74
|
+
```
|
75
|
+
|
76
|
+
## Supported web servers
|
77
|
+
|
78
|
+
Rack is supported by a wide range of servers, including:
|
79
|
+
|
80
|
+
* [Agoo](https://github.com/ohler55/agoo)
|
81
|
+
* [Falcon](https://github.com/socketry/falcon)
|
82
|
+
* [Iodine](https://github.com/boazsegev/iodine)
|
83
|
+
* [NGINX Unit](https://unit.nginx.org/)
|
84
|
+
* [Phusion Passenger](https://www.phusionpassenger.com/) (which is mod_rack for
|
85
|
+
Apache and for nginx)
|
86
|
+
* [Puma](https://puma.io/)
|
87
|
+
* [Thin](https://github.com/macournoyer/thin)
|
88
|
+
* [Unicorn](https://yhbt.net/unicorn/)
|
89
|
+
* [uWSGI](https://uwsgi-docs.readthedocs.io/en/latest/)
|
90
|
+
* [Lamby](https://lamby.custominktech.com) (for AWS Lambda)
|
91
|
+
|
92
|
+
You will need to consult the server documentation to find out what features and
|
93
|
+
limitations they may have. In general, any valid Rack app will run the same on
|
94
|
+
all these servers, without changing anything.
|
95
|
+
|
96
|
+
### Rackup
|
97
|
+
|
98
|
+
Rack provides a separate gem, [rackup](https://github.com/rack/rackup) which is
|
99
|
+
a generic interface for running a Rack application on supported servers, which
|
100
|
+
include `WEBRick`, `Puma`, `Falcon` and others.
|
101
|
+
|
102
|
+
## Supported web frameworks
|
103
|
+
|
104
|
+
These frameworks and many others support the [Rack Specification]:
|
105
|
+
|
106
|
+
* [Camping](https://github.com/camping/camping)
|
107
|
+
* [Hanami](https://hanamirb.org/)
|
108
|
+
* [Ramaze](https://github.com/ramaze/ramaze)
|
109
|
+
* [Padrino](https://padrinorb.com/)
|
110
|
+
* [Roda](https://github.com/jeremyevans/roda)
|
111
|
+
* [Ruby on Rails](https://rubyonrails.org/)
|
112
|
+
* [Rum](https://github.com/leahneukirchen/rum)
|
113
|
+
* [Sinatra](https://sinatrarb.com/)
|
114
|
+
* [Utopia](https://github.com/socketry/utopia)
|
115
|
+
* [WABuR](https://github.com/ohler55/wabur)
|
116
|
+
|
117
|
+
## Available middleware shipped with Rack
|
118
|
+
|
119
|
+
Between the server and the framework, Rack can be customized to your
|
120
|
+
applications needs using middleware. Rack itself ships with the following
|
121
|
+
middleware:
|
122
|
+
|
123
|
+
* `Rack::CommonLogger` for creating Apache-style logfiles.
|
124
|
+
* `Rack::ConditionalGet` for returning [Not
|
125
|
+
Modified](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304)
|
126
|
+
responses when the response has not changed.
|
127
|
+
* `Rack::Config` for modifying the environment before processing the request.
|
128
|
+
* `Rack::ContentLength` for setting a `content-length` header based on body
|
129
|
+
size.
|
130
|
+
* `Rack::ContentType` for setting a default `content-type` header for responses.
|
131
|
+
* `Rack::Deflater` for compressing responses with gzip.
|
132
|
+
* `Rack::ETag` for setting `etag` header on bodies that can be buffered.
|
133
|
+
* `Rack::Events` for providing easy hooks when a request is received and when
|
134
|
+
the response is sent.
|
135
|
+
* `Rack::Files` for serving static files.
|
136
|
+
* `Rack::Head` for returning an empty body for HEAD requests.
|
137
|
+
* `Rack::Lint` for checking conformance to the [Rack Specification].
|
138
|
+
* `Rack::Lock` for serializing requests using a mutex.
|
139
|
+
* `Rack::Logger` for setting a logger to handle logging errors.
|
140
|
+
* `Rack::MethodOverride` for modifying the request method based on a submitted
|
141
|
+
parameter.
|
142
|
+
* `Rack::Recursive` for including data from other paths in the application, and
|
143
|
+
for performing internal redirects.
|
144
|
+
* `Rack::Reloader` for reloading files if they have been modified.
|
145
|
+
* `Rack::Runtime` for including a response header with the time taken to process
|
146
|
+
the request.
|
147
|
+
* `Rack::Sendfile` for working with web servers that can use optimized file
|
148
|
+
serving for file system paths.
|
149
|
+
* `Rack::ShowException` for catching unhandled exceptions and presenting them in
|
150
|
+
a nice and helpful way with clickable backtrace.
|
151
|
+
* `Rack::ShowStatus` for using nice error pages for empty client error
|
152
|
+
responses.
|
153
|
+
* `Rack::Static` for more configurable serving of static files.
|
154
|
+
* `Rack::TempfileReaper` for removing temporary files creating during a request.
|
155
|
+
|
156
|
+
All these components use the same interface, which is described in detail in the
|
157
|
+
[Rack Specification]. These optional components can be used in any way you wish.
|
158
|
+
|
159
|
+
### Convenience interfaces
|
160
|
+
|
161
|
+
If you want to develop outside of existing frameworks, implement your own ones,
|
162
|
+
or develop middleware, Rack provides many helpers to create Rack applications
|
163
|
+
quickly and without doing the same web stuff all over:
|
164
|
+
|
165
|
+
* `Rack::Request` which also provides query string parsing and multipart
|
166
|
+
handling.
|
167
|
+
* `Rack::Response` for convenient generation of HTTP replies and cookie
|
168
|
+
handling.
|
169
|
+
* `Rack::MockRequest` and `Rack::MockResponse` for efficient and quick testing
|
170
|
+
of Rack application without real HTTP round-trips.
|
171
|
+
* `Rack::Cascade` for trying additional Rack applications if an application
|
172
|
+
returns a not found or method not supported response.
|
173
|
+
* `Rack::Directory` for serving files under a given directory, with directory
|
174
|
+
indexes.
|
175
|
+
* `Rack::MediaType` for parsing content-type headers.
|
176
|
+
* `Rack::Mime` for determining content-type based on file extension.
|
177
|
+
* `Rack::RewindableInput` for making any IO object rewindable, using a temporary
|
178
|
+
file buffer.
|
179
|
+
* `Rack::URLMap` to route to multiple applications inside the same process.
|
180
|
+
|
181
|
+
## Configuration
|
182
|
+
|
183
|
+
Rack exposes several configuration parameters to control various features of the
|
184
|
+
implementation.
|
185
|
+
|
186
|
+
### `param_depth_limit`
|
187
|
+
|
188
|
+
```ruby
|
189
|
+
Rack::Utils.param_depth_limit = 32 # default
|
190
|
+
```
|
191
|
+
|
192
|
+
The maximum amount of nesting allowed in parameters. For example, if set to 3,
|
193
|
+
this query string would be allowed:
|
194
|
+
|
195
|
+
```
|
196
|
+
?a[b][c]=d
|
197
|
+
```
|
198
|
+
|
199
|
+
but this query string would not be allowed:
|
200
|
+
|
201
|
+
```
|
202
|
+
?a[b][c][d]=e
|
203
|
+
```
|
204
|
+
|
205
|
+
Limiting the depth prevents a possible stack overflow when parsing parameters.
|
206
|
+
|
207
|
+
### `multipart_file_limit`
|
208
|
+
|
209
|
+
```ruby
|
210
|
+
Rack::Utils.multipart_file_limit = 128 # default
|
211
|
+
```
|
212
|
+
|
213
|
+
The maximum number of parts with a filename a request can contain. Accepting
|
214
|
+
too many parts can lead to the server running out of file handles.
|
215
|
+
|
216
|
+
The default is 128, which means that a single request can't upload more than 128
|
217
|
+
files at once. Set to 0 for no limit.
|
218
|
+
|
219
|
+
Can also be set via the `RACK_MULTIPART_FILE_LIMIT` environment variable.
|
220
|
+
|
221
|
+
(This is also aliased as `multipart_part_limit` and `RACK_MULTIPART_PART_LIMIT` for compatibility)
|
222
|
+
|
223
|
+
|
224
|
+
### `multipart_total_part_limit`
|
225
|
+
|
226
|
+
The maximum total number of parts a request can contain of any type, including
|
227
|
+
both file and non-file form fields.
|
228
|
+
|
229
|
+
The default is 4096, which means that a single request can't contain more than
|
230
|
+
4096 parts.
|
231
|
+
|
232
|
+
Set to 0 for no limit.
|
233
|
+
|
234
|
+
Can also be set via the `RACK_MULTIPART_TOTAL_PART_LIMIT` environment variable.
|
235
|
+
|
236
|
+
|
237
|
+
## Changelog
|
238
|
+
|
239
|
+
See [CHANGELOG.md](CHANGELOG.md).
|
240
|
+
|
241
|
+
## Contributing
|
242
|
+
|
243
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for specific details about how to make a
|
244
|
+
contribution to Rack.
|
245
|
+
|
246
|
+
Please post bugs, suggestions and patches to [GitHub
|
247
|
+
Issues](https://github.com/rack/rack/issues).
|
248
|
+
|
249
|
+
Please check our [Security Policy](https://github.com/rack/rack/security/policy)
|
250
|
+
for responsible disclosure and security bug reporting process. Due to wide usage
|
251
|
+
of the library, it is strongly preferred that we manage timing in order to
|
252
|
+
provide viable patches at the time of disclosure. Your assistance in this matter
|
253
|
+
is greatly appreciated.
|
254
|
+
|
255
|
+
## See Also
|
256
|
+
|
257
|
+
### `rack-contrib`
|
258
|
+
|
259
|
+
The plethora of useful middleware created the need for a project that collects
|
260
|
+
fresh Rack middleware. `rack-contrib` includes a variety of add-on components
|
261
|
+
for Rack and it is easy to contribute new modules.
|
262
|
+
|
263
|
+
* https://github.com/rack/rack-contrib
|
264
|
+
|
265
|
+
### `rack-session`
|
266
|
+
|
267
|
+
Provides convenient session management for Rack.
|
268
|
+
|
269
|
+
* https://github.com/rack/rack-session
|
270
|
+
|
271
|
+
## Thanks
|
272
|
+
|
273
|
+
The Rack Core Team, consisting of
|
274
|
+
|
275
|
+
* Aaron Patterson [tenderlove](https://github.com/tenderlove)
|
276
|
+
* Samuel Williams [ioquatix](https://github.com/ioquatix)
|
277
|
+
* Jeremy Evans [jeremyevans](https://github.com/jeremyevans)
|
278
|
+
* Eileen Uchitelle [eileencodes](https://github.com/eileencodes)
|
279
|
+
* Matthew Draper [matthewd](https://github.com/matthewd)
|
280
|
+
* Rafael França [rafaelfranca](https://github.com/rafaelfranca)
|
281
|
+
|
282
|
+
and the Rack Alumni
|
283
|
+
|
284
|
+
* Ryan Tomayko [rtomayko](https://github.com/rtomayko)
|
285
|
+
* Scytrin dai Kinthra [scytrin](https://github.com/scytrin)
|
286
|
+
* Leah Neukirchen [leahneukirchen](https://github.com/leahneukirchen)
|
287
|
+
* James Tucker [raggi](https://github.com/raggi)
|
288
|
+
* Josh Peek [josh](https://github.com/josh)
|
289
|
+
* José Valim [josevalim](https://github.com/josevalim)
|
290
|
+
* Michael Fellinger [manveru](https://github.com/manveru)
|
291
|
+
* Santiago Pastorino [spastorino](https://github.com/spastorino)
|
292
|
+
* Konstantin Haase [rkh](https://github.com/rkh)
|
293
|
+
|
294
|
+
would like to thank:
|
295
|
+
|
296
|
+
* Adrian Madrid, for the LiteSpeed handler.
|
297
|
+
* Christoffer Sawicki, for the first Rails adapter and `Rack::Deflater`.
|
298
|
+
* Tim Fletcher, for the HTTP authentication code.
|
299
|
+
* Luc Heinrich for the Cookie sessions, the static file handler and bugfixes.
|
300
|
+
* Armin Ronacher, for the logo and racktools.
|
301
|
+
* Alex Beregszaszi, Alexander Kahn, Anil Wadghule, Aredridel, Ben Alpert, Dan
|
302
|
+
Kubb, Daniel Roethlisberger, Matt Todd, Tom Robinson, Phil Hagelberg, S. Brent
|
303
|
+
Faulkner, Bosko Milekic, Daniel Rodríguez Troitiño, Genki Takiuchi, Geoffrey
|
304
|
+
Grosenbach, Julien Sanchez, Kamal Fariz Mahyuddin, Masayoshi Takahashi,
|
305
|
+
Patrick Aljordm, Mig, Kazuhiro Nishiyama, Jon Bardin, Konstantin Haase, Larry
|
306
|
+
Siden, Matias Korhonen, Sam Ruby, Simon Chiang, Tim Connor, Timur Batyrshin,
|
307
|
+
and Zach Brock for bug fixing and other improvements.
|
308
|
+
* Eric Wong, Hongli Lai, Jeremy Kemper for their continuous support and API
|
309
|
+
improvements.
|
310
|
+
* Yehuda Katz and Carl Lerche for refactoring rackup.
|
311
|
+
* Brian Candler, for `Rack::ContentType`.
|
312
|
+
* Graham Batty, for improved handler loading.
|
313
|
+
* Stephen Bannasch, for bug reports and documentation.
|
314
|
+
* Gary Wright, for proposing a better `Rack::Response` interface.
|
315
|
+
* Jonathan Buch, for improvements regarding `Rack::Response`.
|
316
|
+
* Armin Röhrl, for tracking down bugs in the Cookie generator.
|
317
|
+
* Alexander Kellett for testing the Gem and reviewing the announcement.
|
318
|
+
* Marcus Rückert, for help with configuring and debugging lighttpd.
|
319
|
+
* The WSGI team for the well-done and documented work they've done and Rack
|
320
|
+
builds up on.
|
321
|
+
* All bug reporters and patch contributors not mentioned above.
|
322
|
+
|
323
|
+
## License
|
324
|
+
|
325
|
+
Rack is released under the [MIT License](MIT-LICENSE).
|
326
|
+
|
327
|
+
[Rack Specification]: SPEC.rdoc
|
328
|
+
[Security Policy]: SECURITY.md
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# MIT License
|
2
|
+
|
3
|
+
Copyright, 2007-2008, by Leah Neukirchen.
|
4
|
+
Copyright, 2007-2009, by Scytrin dai Kinthra.
|
5
|
+
Copyright, 2008, by Daniel Roethlisberger.
|
6
|
+
Copyright, 2009, by Joshua Peek.
|
7
|
+
Copyright, 2009, by Mickaël Riga.
|
8
|
+
Copyright, 2010, by Simon Chiang.
|
9
|
+
Copyright, 2010-2011, by José Valim.
|
10
|
+
Copyright, 2010-2013, by James Tucker.
|
11
|
+
Copyright, 2010-2019, by Aaron Patterson.
|
12
|
+
Copyright, 2011, by Max Cantor.
|
13
|
+
Copyright, 2011-2012, by Konstantin Haase.
|
14
|
+
Copyright, 2011, by Will Leinweber.
|
15
|
+
Copyright, 2011, by John Manoogian III.
|
16
|
+
Copyright, 2012, by Yun Huang Yong.
|
17
|
+
Copyright, 2012, by Ravil Bayramgalin.
|
18
|
+
Copyright, 2012, by Timothy Elliott.
|
19
|
+
Copyright, 2012, by Jamie Macey.
|
20
|
+
Copyright, 2012-2015, by Santiago Pastorino.
|
21
|
+
Copyright, 2013, by Andrew Cole.
|
22
|
+
Copyright, 2013, by Postmodern.
|
23
|
+
Copyright, 2013, by Vipul A M.
|
24
|
+
Copyright, 2013, by Charles Hornberger.
|
25
|
+
Copyright, 2014, by Michal Bryxí.
|
26
|
+
Copyright, 2015, by deepj.
|
27
|
+
Copyright, 2015, by Doug McInnes.
|
28
|
+
Copyright, 2015, by David Runger.
|
29
|
+
Copyright, 2015, by Francesco Rodríguez.
|
30
|
+
Copyright, 2015, by Yuichiro Kaneko.
|
31
|
+
Copyright, 2015, by Michael Sauter.
|
32
|
+
Copyright, 2016, by Kir Shatrov.
|
33
|
+
Copyright, 2016, by Yann Vanhalewyn.
|
34
|
+
Copyright, 2016, by Jian Weihang.
|
35
|
+
Copyright, 2017, by Jordan Raine.
|
36
|
+
Copyright, 2018, by Dillon Welch.
|
37
|
+
Copyright, 2018, by Yoshiyuki Hirano.
|
38
|
+
Copyright, 2019, by Krzysztof Rybka.
|
39
|
+
Copyright, 2019, by Frederick Cheung.
|
40
|
+
Copyright, 2019, by Adrian Setyadi.
|
41
|
+
Copyright, 2019, by Rafael Mendonça França.
|
42
|
+
Copyright, 2019-2020, by Pavel Rosicky.
|
43
|
+
Copyright, 2019, by Dima Fatko.
|
44
|
+
Copyright, 2019, by Oleh Demianiuk.
|
45
|
+
Copyright, 2020-2023, by Samuel Williams.
|
46
|
+
Copyright, 2020-2022, by Jeremy Evans.
|
47
|
+
Copyright, 2020, by Alex Speller.
|
48
|
+
Copyright, 2020, by Ryuta Kamizono.
|
49
|
+
Copyright, 2020, by Yudai Suzuki.
|
50
|
+
Copyright, 2020, by Bart de Water.
|
51
|
+
Copyright, 2020, by Alec Clarke.
|
52
|
+
Copyright, 2021, by Michael Coyne.
|
53
|
+
Copyright, 2022, by Philip Arndt.
|
54
|
+
Copyright, 2022, by Jon Dufresne.
|
55
|
+
|
56
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
57
|
+
of this software and associated documentation files (the "Software"), to deal
|
58
|
+
in the Software without restriction, including without limitation the rights
|
59
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
60
|
+
copies of the Software, and to permit persons to whom the Software is
|
61
|
+
furnished to do so, subject to the following conditions:
|
62
|
+
|
63
|
+
The above copyright notice and this permission notice shall be included in all
|
64
|
+
copies or substantial portions of the Software.
|
65
|
+
|
66
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
67
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
68
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
69
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
70
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
71
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
72
|
+
SOFTWARE.
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Rack::Session
|
2
|
+
|
3
|
+
Session management implementation for Rack.
|
4
|
+
|
5
|
+
[![Development Status](https://github.com/rack/rack-session/workflows/Test/badge.svg)](https://github.com/rack/rack-session/actions?workflow=Test)
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
In your `config.ru`:
|
10
|
+
|
11
|
+
``` ruby
|
12
|
+
# config.ru
|
13
|
+
|
14
|
+
require 'rack/session'
|
15
|
+
use Rack::Session::Cookie,
|
16
|
+
:domain => 'mywebsite.com',
|
17
|
+
:path => '/',
|
18
|
+
:expire_after => 3600*24,
|
19
|
+
:secret => '**unique secret key**'
|
20
|
+
```
|
21
|
+
|
22
|
+
Usage follows the standard outlined by `rack.session`, i.e.:
|
23
|
+
|
24
|
+
``` ruby
|
25
|
+
class MyApp
|
26
|
+
def call(env)
|
27
|
+
session = env['rack.session']
|
28
|
+
|
29
|
+
# Set some state:
|
30
|
+
session[:key] = "value"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
### Compatibility
|
36
|
+
|
37
|
+
`rack-session` code used to be part of Rack, but it was extracted in Rack v3 to this gem. The v1 release of this gem is compatible with Rack v2, and the v2 release of this gem is compatible with Rack v3+. That means you can add `gem "rack-session"` to your application and it will be compatible with all versions of Rack.
|
38
|
+
|
39
|
+
## Contributing
|
40
|
+
|
41
|
+
We welcome contributions to this project.
|
42
|
+
|
43
|
+
1. Fork it.
|
44
|
+
2. Create your feature branch (`git checkout -b my-new-feature`).
|
45
|
+
3. Commit your changes (`git commit -am 'Add some feature'`).
|
46
|
+
4. Push to the branch (`git push origin my-new-feature`).
|
47
|
+
5. Create new Pull Request.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2008-2009 Bryan Helmkamp, Engine Yard Inc.
|
2
|
+
Copyright (c) 2022 Jeremy Evans
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
6
|
+
in the Software without restriction, including without limitation the rights
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
9
|
+
furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included in
|
12
|
+
all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
20
|
+
THE SOFTWARE.
|
@@ -0,0 +1,139 @@
|
|
1
|
+
# Rack::Test
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/rack-test.svg)](https://badge.fury.io/rb/rack-test)
|
3
|
+
|
4
|
+
Code: https://github.com/rack/rack-test
|
5
|
+
|
6
|
+
## Description
|
7
|
+
|
8
|
+
Rack::Test is a small, simple testing API for Rack apps. It can be used on its
|
9
|
+
own or as a reusable starting point for Web frameworks and testing libraries
|
10
|
+
to build on.
|
11
|
+
|
12
|
+
## Features
|
13
|
+
|
14
|
+
* Allows for submitting requests and testing responses
|
15
|
+
* Maintains a cookie jar across requests
|
16
|
+
* Supports request headers used for subsequent requests
|
17
|
+
* Follow redirects when requested
|
18
|
+
|
19
|
+
## Examples
|
20
|
+
|
21
|
+
These examples use `test/unit` but it's equally possible to use `rack-test` with
|
22
|
+
other testing frameworks such as `minitest` or `rspec`.
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require "test/unit"
|
26
|
+
require "rack/test"
|
27
|
+
require "json"
|
28
|
+
|
29
|
+
class HomepageTest < Test::Unit::TestCase
|
30
|
+
include Rack::Test::Methods
|
31
|
+
|
32
|
+
def app
|
33
|
+
lambda { |env| [200, {'content-type' => 'text/plain'}, ['All responses are OK']] }
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_response_is_ok
|
37
|
+
# Optionally set headers used for all requests in this spec:
|
38
|
+
#header 'accept-charset', 'utf-8'
|
39
|
+
|
40
|
+
# First argument is treated as the path
|
41
|
+
get '/'
|
42
|
+
|
43
|
+
assert last_response.ok?
|
44
|
+
assert_equal 'All responses are OK', last_response.body
|
45
|
+
end
|
46
|
+
|
47
|
+
def delete_with_url_params_and_body
|
48
|
+
# First argument can have a query string
|
49
|
+
#
|
50
|
+
# Second argument is used as the parameters for the request, which will be
|
51
|
+
# included in the request body for non-GET requests.
|
52
|
+
delete '/?foo=bar', JSON.generate('baz' => 'zot')
|
53
|
+
end
|
54
|
+
|
55
|
+
def post_with_json
|
56
|
+
# Third argument is the rack environment to use for the request. The following
|
57
|
+
# entries in the submitted rack environment are treated specially (in addition
|
58
|
+
# to options supported by `Rack::MockRequest#env_for`:
|
59
|
+
#
|
60
|
+
# :cookie : Set a cookie for the current session before submitting the request.
|
61
|
+
#
|
62
|
+
# :query_params : Set parameters for the query string (as opposed to the body).
|
63
|
+
# Value should be a hash of parameters.
|
64
|
+
#
|
65
|
+
# :xhr : Set HTTP_X_REQUESTED_WITH env key to XMLHttpRequest.
|
66
|
+
post(uri, JSON.generate('baz' => 'zot'), 'CONTENT_TYPE' => 'application/json')
|
67
|
+
end
|
68
|
+
end
|
69
|
+
```
|
70
|
+
|
71
|
+
`rack-test` will test the app returned by the `app` method. If you are loading middleware
|
72
|
+
in a `config.ru` file, and want to test that, you should load the Rack app created from
|
73
|
+
the `config.ru` file:
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
OUTER_APP = Rack::Builder.parse_file("config.ru").first
|
77
|
+
|
78
|
+
class TestApp < Test::Unit::TestCase
|
79
|
+
include Rack::Test::Methods
|
80
|
+
|
81
|
+
def app
|
82
|
+
OUTER_APP
|
83
|
+
end
|
84
|
+
|
85
|
+
def test_root
|
86
|
+
get "/"
|
87
|
+
assert last_response.ok?
|
88
|
+
end
|
89
|
+
end
|
90
|
+
```
|
91
|
+
|
92
|
+
## Install
|
93
|
+
|
94
|
+
To install the latest release as a gem:
|
95
|
+
|
96
|
+
```
|
97
|
+
gem install rack-test
|
98
|
+
```
|
99
|
+
|
100
|
+
Or add to your `Gemfile`:
|
101
|
+
|
102
|
+
```
|
103
|
+
gem 'rack-test'
|
104
|
+
```
|
105
|
+
|
106
|
+
## Contribution
|
107
|
+
|
108
|
+
Contributions are welcome. Please make sure to:
|
109
|
+
|
110
|
+
* Use a regular forking workflow
|
111
|
+
* Write tests for the new or changed behaviour
|
112
|
+
* Provide an explanation/motivation in your commit message / PR message
|
113
|
+
* Ensure `History.md` is updated
|
114
|
+
|
115
|
+
## Authors
|
116
|
+
|
117
|
+
- Contributions from Bryan Helmkamp, Jeremy Evans, Simon Rozet, and others
|
118
|
+
- Much of the original code was extracted from Merb 1.0's request helper
|
119
|
+
|
120
|
+
## License
|
121
|
+
|
122
|
+
`rack-test` is released under the [MIT License](MIT-LICENSE.txt).
|
123
|
+
|
124
|
+
## Supported platforms
|
125
|
+
|
126
|
+
* Ruby 2.0+
|
127
|
+
* JRuby 9.1+
|
128
|
+
|
129
|
+
## Releasing
|
130
|
+
|
131
|
+
* Bump VERSION in lib/rack/test/version.rb
|
132
|
+
* Ensure `History.md` is up-to-date, including correct version and date
|
133
|
+
* `git commit . -m 'Release $VERSION'`
|
134
|
+
* `git push`
|
135
|
+
* `git tag -a -m 'Tag the $VERSION release' $VERSION`
|
136
|
+
* `git push --tags`
|
137
|
+
* `gem build rack-test.gemspec`
|
138
|
+
* `gem push rack-test-$VERSION.gem`
|
139
|
+
* Add a discussion post for the release
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Copyright (c) 2013-2015 Kasper Timm Hansen
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
23
|
+
|