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,26 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
=====================
|
3
|
+
|
4
|
+
* Copyright © 2012 Chad Humphries, David Chelimsky, Myron Marston
|
5
|
+
* Copyright © 2009 Chad Humphries, David Chelimsky
|
6
|
+
* Copyright © 2006 David Chelimsky, The RSpec Development Team
|
7
|
+
* Copyright © 2005 Steven Baker
|
8
|
+
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
10
|
+
a copy of this software and associated documentation files (the
|
11
|
+
"Software"), to deal in the Software without restriction, including
|
12
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
13
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
14
|
+
permit persons to whom the Software is furnished to do so, subject to
|
15
|
+
the following conditions:
|
16
|
+
|
17
|
+
The above copyright notice and this permission notice shall be
|
18
|
+
included in all copies or substantial portions of the Software.
|
19
|
+
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
21
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
23
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
24
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
25
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
26
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,389 @@
|
|
1
|
+
# rspec-core [![Build Status](https://github.com/rspec/rspec-core/workflows/RSpec%20CI/badge.svg)](https://github.com/rspec/rspec-core/actions) [![Code Climate](https://codeclimate.com/github/rspec/rspec-core.svg)](https://codeclimate.com/github/rspec/rspec-core)
|
2
|
+
|
3
|
+
rspec-core provides the structure for writing executable examples of how your
|
4
|
+
code should behave, and an `rspec` command with tools to constrain which
|
5
|
+
examples get run and tailor the output.
|
6
|
+
|
7
|
+
## Install
|
8
|
+
|
9
|
+
gem install rspec # for rspec-core, rspec-expectations, rspec-mocks
|
10
|
+
gem install rspec-core # for rspec-core only
|
11
|
+
rspec --help
|
12
|
+
|
13
|
+
Want to run against the `main` branch? You'll need to include the dependent
|
14
|
+
RSpec repos as well. Add the following to your `Gemfile`:
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
%w[rspec rspec-core rspec-expectations rspec-mocks rspec-support].each do |lib|
|
18
|
+
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => 'main'
|
19
|
+
end
|
20
|
+
```
|
21
|
+
|
22
|
+
## Basic Structure
|
23
|
+
|
24
|
+
RSpec uses the words "describe" and "it" so we can express concepts like a conversation:
|
25
|
+
|
26
|
+
"Describe an order."
|
27
|
+
"It sums the prices of its line items."
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
RSpec.describe Order do
|
31
|
+
it "sums the prices of its line items" do
|
32
|
+
order = Order.new
|
33
|
+
|
34
|
+
order.add_entry(LineItem.new(:item => Item.new(
|
35
|
+
:price => Money.new(1.11, :USD)
|
36
|
+
)))
|
37
|
+
order.add_entry(LineItem.new(:item => Item.new(
|
38
|
+
:price => Money.new(2.22, :USD),
|
39
|
+
:quantity => 2
|
40
|
+
)))
|
41
|
+
|
42
|
+
expect(order.total).to eq(Money.new(5.55, :USD))
|
43
|
+
end
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
The `describe` method creates an [ExampleGroup](http://rubydoc.info/gems/rspec-core/RSpec/Core/ExampleGroup). Within the
|
48
|
+
block passed to `describe` you can declare examples using the `it` method.
|
49
|
+
|
50
|
+
Under the hood, an example group is a class in which the block passed to
|
51
|
+
`describe` is evaluated. The blocks passed to `it` are evaluated in the
|
52
|
+
context of an _instance_ of that class.
|
53
|
+
|
54
|
+
## Nested Groups
|
55
|
+
|
56
|
+
You can also declare nested groups using the `describe` or `context`
|
57
|
+
methods:
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
RSpec.describe Order do
|
61
|
+
context "with no items" do
|
62
|
+
it "behaves one way" do
|
63
|
+
# ...
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context "with one item" do
|
68
|
+
it "behaves another way" do
|
69
|
+
# ...
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
```
|
74
|
+
|
75
|
+
Nested groups are subclasses of the outer example group class, providing
|
76
|
+
the inheritance semantics you'd want for free.
|
77
|
+
|
78
|
+
## Aliases
|
79
|
+
|
80
|
+
You can declare example groups using either `describe` or `context`.
|
81
|
+
For a top level example group, `describe` and `context` are available
|
82
|
+
off of `RSpec`. For backwards compatibility, they are also available
|
83
|
+
off of the `main` object and `Module` unless you disable monkey
|
84
|
+
patching.
|
85
|
+
|
86
|
+
You can declare examples within a group using any of `it`, `specify`, or
|
87
|
+
`example`.
|
88
|
+
|
89
|
+
## Shared Examples and Contexts
|
90
|
+
|
91
|
+
Declare a shared example group using `shared_examples`, and then include it
|
92
|
+
in any group using `include_examples`.
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
RSpec.shared_examples "collections" do |collection_class|
|
96
|
+
it "is empty when first created" do
|
97
|
+
expect(collection_class.new).to be_empty
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
RSpec.describe Array do
|
102
|
+
include_examples "collections", Array
|
103
|
+
end
|
104
|
+
|
105
|
+
RSpec.describe Hash do
|
106
|
+
include_examples "collections", Hash
|
107
|
+
end
|
108
|
+
```
|
109
|
+
|
110
|
+
Nearly anything that can be declared within an example group can be declared
|
111
|
+
within a shared example group. This includes `before`, `after`, and `around`
|
112
|
+
hooks, `let` declarations, and nested groups/contexts.
|
113
|
+
|
114
|
+
You can also use the names `shared_context` and `include_context`. These are
|
115
|
+
pretty much the same as `shared_examples` and `include_examples`, providing
|
116
|
+
more accurate naming when you share hooks, `let` declarations, helper methods,
|
117
|
+
etc, but no examples.
|
118
|
+
|
119
|
+
If you want to reuse shared examples or contexts across your RSpec suite you can
|
120
|
+
define them in a stand alone _*.rb_ files (_spec/support/shared_examples/definition.rb_
|
121
|
+
for example). But you will have to manually `require` them (there is no autoloading of
|
122
|
+
_spec/support/_ directory unless you set it up yourself).
|
123
|
+
|
124
|
+
## Metadata
|
125
|
+
|
126
|
+
rspec-core stores a metadata hash with every example and group, which
|
127
|
+
contains their descriptions, the locations at which they were
|
128
|
+
declared, etc, etc. This hash powers many of rspec-core's features,
|
129
|
+
including output formatters (which access descriptions and locations),
|
130
|
+
and filtering before and after hooks.
|
131
|
+
|
132
|
+
Although you probably won't ever need this unless you are writing an
|
133
|
+
extension, you can access it from an example like this:
|
134
|
+
|
135
|
+
```ruby
|
136
|
+
it "does something" do |example|
|
137
|
+
expect(example.metadata[:description]).to eq("does something")
|
138
|
+
end
|
139
|
+
```
|
140
|
+
|
141
|
+
### `described_class`
|
142
|
+
|
143
|
+
When a class is passed to `describe`, you can access it from an example
|
144
|
+
using the `described_class` method, which is a wrapper for
|
145
|
+
`example.metadata[:described_class]`.
|
146
|
+
|
147
|
+
```ruby
|
148
|
+
RSpec.describe Widget do
|
149
|
+
example do
|
150
|
+
expect(described_class).to equal(Widget)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
```
|
154
|
+
|
155
|
+
This is useful in extensions or shared example groups in which the specific
|
156
|
+
class is unknown. Taking the collections shared example group from above, we can
|
157
|
+
clean it up a bit using `described_class`:
|
158
|
+
|
159
|
+
```ruby
|
160
|
+
RSpec.shared_examples "collections" do
|
161
|
+
it "is empty when first created" do
|
162
|
+
expect(described_class.new).to be_empty
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
RSpec.describe Array do
|
167
|
+
include_examples "collections"
|
168
|
+
end
|
169
|
+
|
170
|
+
RSpec.describe Hash do
|
171
|
+
include_examples "collections"
|
172
|
+
end
|
173
|
+
```
|
174
|
+
|
175
|
+
## A Word on Scope
|
176
|
+
|
177
|
+
RSpec has two scopes:
|
178
|
+
|
179
|
+
* **Example Group**: Example groups are defined by a `describe` or
|
180
|
+
`context` block, which is eagerly evaluated when the spec file is
|
181
|
+
loaded. The block is evaluated in the context of a subclass of
|
182
|
+
`RSpec::Core::ExampleGroup`, or a subclass of the parent example group
|
183
|
+
when you're nesting them.
|
184
|
+
* **Example**: Examples -- typically defined by an `it` block -- and any other
|
185
|
+
blocks with per-example semantics -- such as a `before(:example)` hook -- are
|
186
|
+
evaluated in the context of
|
187
|
+
an _instance_ of the example group class to which the example belongs.
|
188
|
+
Examples are _not_ executed when the spec file is loaded; instead,
|
189
|
+
RSpec waits to run any examples until all spec files have been loaded,
|
190
|
+
at which point it can apply filtering, randomization, etc.
|
191
|
+
|
192
|
+
To make this more concrete, consider this code snippet:
|
193
|
+
|
194
|
+
``` ruby
|
195
|
+
RSpec.describe "Using an array as a stack" do
|
196
|
+
def build_stack
|
197
|
+
[]
|
198
|
+
end
|
199
|
+
|
200
|
+
before(:example) do
|
201
|
+
@stack = build_stack
|
202
|
+
end
|
203
|
+
|
204
|
+
it 'is initially empty' do
|
205
|
+
expect(@stack).to be_empty
|
206
|
+
end
|
207
|
+
|
208
|
+
context "after an item has been pushed" do
|
209
|
+
before(:example) do
|
210
|
+
@stack.push :item
|
211
|
+
end
|
212
|
+
|
213
|
+
it 'allows the pushed item to be popped' do
|
214
|
+
expect(@stack.pop).to eq(:item)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
end
|
218
|
+
```
|
219
|
+
|
220
|
+
Under the covers, this is (roughly) equivalent to:
|
221
|
+
|
222
|
+
``` ruby
|
223
|
+
class UsingAnArrayAsAStack < RSpec::Core::ExampleGroup
|
224
|
+
def build_stack
|
225
|
+
[]
|
226
|
+
end
|
227
|
+
|
228
|
+
def before_example_1
|
229
|
+
@stack = build_stack
|
230
|
+
end
|
231
|
+
|
232
|
+
def it_is_initially_empty
|
233
|
+
expect(@stack).to be_empty
|
234
|
+
end
|
235
|
+
|
236
|
+
class AfterAnItemHasBeenPushed < self
|
237
|
+
def before_example_2
|
238
|
+
@stack.push :item
|
239
|
+
end
|
240
|
+
|
241
|
+
def it_allows_the_pushed_item_to_be_popped
|
242
|
+
expect(@stack.pop).to eq(:item)
|
243
|
+
end
|
244
|
+
end
|
245
|
+
end
|
246
|
+
```
|
247
|
+
|
248
|
+
To run these examples, RSpec would (roughly) do the following:
|
249
|
+
|
250
|
+
``` ruby
|
251
|
+
example_1 = UsingAnArrayAsAStack.new
|
252
|
+
example_1.before_example_1
|
253
|
+
example_1.it_is_initially_empty
|
254
|
+
|
255
|
+
example_2 = UsingAnArrayAsAStack::AfterAnItemHasBeenPushed.new
|
256
|
+
example_2.before_example_1
|
257
|
+
example_2.before_example_2
|
258
|
+
example_2.it_allows_the_pushed_item_to_be_popped
|
259
|
+
```
|
260
|
+
|
261
|
+
## The `rspec` Command
|
262
|
+
|
263
|
+
When you install the rspec-core gem, it installs the `rspec` executable,
|
264
|
+
which you'll use to run rspec. The `rspec` command comes with many useful
|
265
|
+
options.
|
266
|
+
Run `rspec --help` to see the complete list.
|
267
|
+
|
268
|
+
## Store Command Line Options `.rspec`
|
269
|
+
|
270
|
+
You can store command line options in a `.rspec` file in the project's root
|
271
|
+
directory, and the `rspec` command will read them as though you typed them on
|
272
|
+
the command line.
|
273
|
+
|
274
|
+
## Get Started
|
275
|
+
|
276
|
+
Start with a simple example of behavior you expect from your system. Do
|
277
|
+
this before you write any implementation code:
|
278
|
+
|
279
|
+
```ruby
|
280
|
+
# in spec/calculator_spec.rb
|
281
|
+
RSpec.describe Calculator do
|
282
|
+
describe '#add' do
|
283
|
+
it 'returns the sum of its arguments' do
|
284
|
+
expect(Calculator.new.add(1, 2)).to eq(3)
|
285
|
+
end
|
286
|
+
end
|
287
|
+
end
|
288
|
+
```
|
289
|
+
|
290
|
+
Run this with the rspec command, and watch it fail:
|
291
|
+
|
292
|
+
```
|
293
|
+
$ rspec spec/calculator_spec.rb
|
294
|
+
./spec/calculator_spec.rb:1: uninitialized constant Calculator
|
295
|
+
```
|
296
|
+
|
297
|
+
Address the failure by defining a skeleton of the `Calculator` class:
|
298
|
+
|
299
|
+
```ruby
|
300
|
+
# in lib/calculator.rb
|
301
|
+
class Calculator
|
302
|
+
def add(a, b)
|
303
|
+
end
|
304
|
+
end
|
305
|
+
```
|
306
|
+
|
307
|
+
Be sure to require the implementation file in the spec:
|
308
|
+
|
309
|
+
```ruby
|
310
|
+
# in spec/calculator_spec.rb
|
311
|
+
# - RSpec adds ./lib to the $LOAD_PATH
|
312
|
+
require "calculator"
|
313
|
+
```
|
314
|
+
|
315
|
+
Now run the spec again, and watch the expectation fail:
|
316
|
+
|
317
|
+
```
|
318
|
+
$ rspec spec/calculator_spec.rb
|
319
|
+
F
|
320
|
+
|
321
|
+
Failures:
|
322
|
+
|
323
|
+
1) Calculator#add returns the sum of its arguments
|
324
|
+
Failure/Error: expect(Calculator.new.add(1, 2)).to eq(3)
|
325
|
+
|
326
|
+
expected: 3
|
327
|
+
got: nil
|
328
|
+
|
329
|
+
(compared using ==)
|
330
|
+
# ./spec/calculator_spec.rb:6:in `block (3 levels) in <top (required)>'
|
331
|
+
|
332
|
+
Finished in 0.00131 seconds (files took 0.10968 seconds to load)
|
333
|
+
1 example, 1 failure
|
334
|
+
|
335
|
+
Failed examples:
|
336
|
+
|
337
|
+
rspec ./spec/calculator_spec.rb:5 # Calculator#add returns the sum of its arguments
|
338
|
+
```
|
339
|
+
|
340
|
+
Implement the simplest solution, by changing the definition of `Calculator#add` to:
|
341
|
+
|
342
|
+
```ruby
|
343
|
+
def add(a, b)
|
344
|
+
a + b
|
345
|
+
end
|
346
|
+
```
|
347
|
+
|
348
|
+
Now run the spec again, and watch it pass:
|
349
|
+
|
350
|
+
```
|
351
|
+
$ rspec spec/calculator_spec.rb
|
352
|
+
.
|
353
|
+
|
354
|
+
Finished in 0.000315 seconds
|
355
|
+
1 example, 0 failures
|
356
|
+
```
|
357
|
+
|
358
|
+
Use the `documentation` formatter to see the resulting spec:
|
359
|
+
|
360
|
+
```
|
361
|
+
$ rspec spec/calculator_spec.rb --format doc
|
362
|
+
Calculator
|
363
|
+
#add
|
364
|
+
returns the sum of its arguments
|
365
|
+
|
366
|
+
Finished in 0.000379 seconds
|
367
|
+
1 example, 0 failures
|
368
|
+
```
|
369
|
+
|
370
|
+
## Contributing
|
371
|
+
|
372
|
+
Once you've set up the environment, you'll need to cd into the working
|
373
|
+
directory of whichever repo you want to work in. From there you can run the
|
374
|
+
specs and cucumber features, and make patches.
|
375
|
+
|
376
|
+
NOTE: You do not need to use rspec-dev to work on a specific RSpec repo. You
|
377
|
+
can treat each RSpec repo as an independent project.
|
378
|
+
|
379
|
+
* [Build details](BUILD_DETAIL.md)
|
380
|
+
* [Code of Conduct](CODE_OF_CONDUCT.md)
|
381
|
+
* [Detailed contributing guide](CONTRIBUTING.md)
|
382
|
+
* [Development setup guide](DEVELOPMENT.md)
|
383
|
+
|
384
|
+
## Also see
|
385
|
+
|
386
|
+
* [https://github.com/rspec/rspec](https://github.com/rspec/rspec)
|
387
|
+
* [https://github.com/rspec/rspec-expectations](https://github.com/rspec/rspec-expectations)
|
388
|
+
* [https://github.com/rspec/rspec-mocks](https://github.com/rspec/rspec-mocks)
|
389
|
+
* [https://github.com/rspec/rspec-rails](https://github.com/rspec/rspec-rails)
|