acfs 1.6.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 -115
- data/README.md +33 -41
- data/acfs.gemspec +9 -10
- data/lib/acfs/adapter/typhoeus.rb +6 -4
- data/lib/acfs/collections/paginatable.rb +11 -11
- data/lib/acfs/configuration.rb +13 -3
- data/lib/acfs/errors.rb +7 -7
- data/lib/acfs/global.rb +4 -4
- data/lib/acfs/location.rb +2 -2
- data/lib/acfs/operation.rb +1 -1
- data/lib/acfs/request/callbacks.rb +1 -1
- data/lib/acfs/request.rb +1 -1
- data/lib/acfs/resource/attributes/uuid.rb +2 -2
- data/lib/acfs/resource/attributes.rb +1 -1
- data/lib/acfs/resource/dirty.rb +1 -1
- data/lib/acfs/resource/locatable.rb +2 -2
- data/lib/acfs/resource/operational.rb +4 -4
- data/lib/acfs/resource/query_methods.rb +5 -5
- data/lib/acfs/response/status.rb +1 -1
- data/lib/acfs/runner.rb +15 -15
- data/lib/acfs/service/middleware.rb +2 -2
- data/lib/acfs/singleton_resource.rb +2 -2
- data/lib/acfs/stub.rb +35 -30
- data/lib/acfs/version.rb +3 -3
- data/lib/acfs/yard.rb +1 -0
- data/spec/acfs/adapter/typhoeus_spec.rb +4 -4
- data/spec/acfs/collection_spec.rb +66 -41
- data/spec/acfs/configuration_spec.rb +22 -12
- data/spec/acfs/global_spec.rb +14 -12
- data/spec/acfs/location_spec.rb +1 -1
- data/spec/acfs/middleware/json_spec.rb +9 -9
- data/spec/acfs/middleware/{msgpack_spec.rb → message_pack_spec.rb} +7 -7
- data/spec/acfs/operation_spec.rb +4 -3
- data/spec/acfs/request/callbacks_spec.rb +19 -10
- data/spec/acfs/request_spec.rb +15 -19
- data/spec/acfs/resource/attributes/boolean_spec.rb +32 -32
- data/spec/acfs/resource/attributes/date_time_spec.rb +17 -9
- data/spec/acfs/resource/attributes/dict_spec.rb +16 -10
- data/spec/acfs/resource/attributes/float_spec.rb +21 -11
- data/spec/acfs/resource/attributes/integer_spec.rb +11 -6
- data/spec/acfs/resource/attributes/list_spec.rb +13 -8
- data/spec/acfs/resource/attributes/uuid_spec.rb +14 -8
- data/spec/acfs/resource/attributes_spec.rb +33 -32
- data/spec/acfs/resource/dirty_spec.rb +7 -4
- data/spec/acfs/resource/initialization_spec.rb +4 -5
- data/spec/acfs/resource/loadable_spec.rb +3 -1
- data/spec/acfs/resource/locatable_spec.rb +24 -18
- data/spec/acfs/resource/{persistance_spec.rb → persistence_spec.rb} +119 -87
- data/spec/acfs/resource/query_methods_spec.rb +144 -111
- data/spec/acfs/resource/validation_spec.rb +34 -27
- data/spec/acfs/response/formats_spec.rb +8 -8
- data/spec/acfs/response/status_spec.rb +16 -9
- data/spec/acfs/runner_spec.rb +22 -20
- data/spec/acfs/service/middleware_spec.rb +3 -3
- data/spec/acfs/service_spec.rb +5 -4
- data/spec/acfs/singleton_resource_spec.rb +2 -1
- data/spec/acfs/stub_spec.rb +64 -65
- data/spec/acfs_spec.rb +112 -94
- data/spec/spec_helper.rb +10 -6
- data/spec/support/hash.rb +1 -1
- data/spec/support/response.rb +2 -2
- data/spec/support/service.rb +1 -1
- data/spec/support/shared/find_callbacks.rb +14 -10
- 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 +208 -70
@@ -9,12 +9,12 @@ describe Acfs::Resource::Attributes do
|
|
9
9
|
describe '#initialize' do
|
10
10
|
before { model.attribute :name, :string, default: 'John' }
|
11
11
|
|
12
|
-
it '
|
12
|
+
it 'has attribute list' do
|
13
13
|
expect(model.new.attributes).to include(:name)
|
14
14
|
end
|
15
15
|
|
16
|
-
it '
|
17
|
-
expect(model.new.name).to
|
16
|
+
it 'sets default attributes' do
|
17
|
+
expect(model.new.name).to eq 'John'
|
18
18
|
end
|
19
19
|
|
20
20
|
context 'with dynamic default value' do
|
@@ -23,8 +23,8 @@ describe Acfs::Resource::Attributes do
|
|
23
23
|
model.attribute :mail, :string, default: -> { "#{name}@srv.tld" }
|
24
24
|
end
|
25
25
|
|
26
|
-
it '
|
27
|
-
expect(model.new.mail).to
|
26
|
+
it 'sets dynamic default attributes' do
|
27
|
+
expect(model.new.mail).to eq 'John@srv.tld'
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
@@ -35,12 +35,14 @@ describe Acfs::Resource::Attributes do
|
|
35
35
|
model.attribute :age, :integer, default: 25
|
36
36
|
end
|
37
37
|
|
38
|
-
it '
|
38
|
+
it 'returns hash of all attributes' do
|
39
39
|
expect(model.new.attributes).to eq(name: 'John', age: 25)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
43
|
describe '#write_attributes' do
|
44
|
+
subject(:action) { m.write_attributes(params, **opts) }
|
45
|
+
|
44
46
|
before do
|
45
47
|
model.attribute :name, :string, default: 'John'
|
46
48
|
model.attribute :age, :integer, default: 25
|
@@ -48,14 +50,13 @@ describe Acfs::Resource::Attributes do
|
|
48
50
|
write_attribute :name, "The Great #{name}"
|
49
51
|
end
|
50
52
|
end
|
53
|
+
|
51
54
|
let(:params) { {name: 'James'} }
|
52
55
|
let(:opts) { {} }
|
53
56
|
let(:m) { model.new }
|
54
|
-
let(:action) { -> { m.write_attributes(params, **opts) } }
|
55
|
-
subject { action }
|
56
57
|
|
57
|
-
it '
|
58
|
-
|
58
|
+
it 'updates attributes' do
|
59
|
+
expect { action }.to change(m, :attributes)
|
59
60
|
.from(name: 'The Great John', age: 25)
|
60
61
|
.to(name: 'The Great James', age: 25)
|
61
62
|
end
|
@@ -63,17 +64,17 @@ describe Acfs::Resource::Attributes do
|
|
63
64
|
context 'without non-hash params' do
|
64
65
|
let(:params) { 'James' }
|
65
66
|
|
66
|
-
it {
|
67
|
-
|
67
|
+
it { expect { action }.not_to change(m, :attributes) }
|
68
|
+
it { expect(action).to be false }
|
68
69
|
end
|
69
70
|
|
70
71
|
context 'with unknown attributes' do
|
71
72
|
let(:params) { {name: 'James', born_at: 'today'} }
|
72
73
|
|
73
|
-
it {
|
74
|
+
it { expect { action }.not_to raise_error }
|
74
75
|
|
75
|
-
it '
|
76
|
-
|
76
|
+
it 'updates known attributes and store unknown' do
|
77
|
+
expect { action }.to change(m, :attributes)
|
77
78
|
.from(name: 'The Great John', age: 25)
|
78
79
|
.to(name: 'The Great James', age: 25, born_at: 'today')
|
79
80
|
end
|
@@ -81,14 +82,14 @@ describe Acfs::Resource::Attributes do
|
|
81
82
|
context 'with unknown: :raise option' do
|
82
83
|
let(:opts) { {unknown: :raise} }
|
83
84
|
|
84
|
-
it {
|
85
|
+
it { expect { action }.to raise_error(ArgumentError, /unknown attribute/i) }
|
85
86
|
|
86
87
|
it do
|
87
88
|
expect do
|
88
|
-
|
89
|
+
action
|
89
90
|
rescue StandardError
|
90
91
|
true
|
91
|
-
end.
|
92
|
+
end.not_to change(m, :attributes)
|
92
93
|
end
|
93
94
|
end
|
94
95
|
end
|
@@ -97,15 +98,15 @@ describe Acfs::Resource::Attributes do
|
|
97
98
|
describe '#_getter_' do
|
98
99
|
before { model.attribute :name, :string, default: 'John' }
|
99
100
|
|
100
|
-
it '
|
101
|
+
it 'returns value' do
|
101
102
|
mo = model.new
|
102
103
|
mo.name = 'Paul'
|
103
104
|
|
104
|
-
expect(mo.name).to
|
105
|
+
expect(mo.name).to eq 'Paul'
|
105
106
|
end
|
106
107
|
|
107
|
-
it '
|
108
|
-
expect(model.new.name).to
|
108
|
+
it 'returns default value' do
|
109
|
+
expect(model.new.name).to eq 'John'
|
109
110
|
end
|
110
111
|
end
|
111
112
|
|
@@ -115,49 +116,49 @@ describe Acfs::Resource::Attributes do
|
|
115
116
|
model.attribute :age, :integer, default: '25'
|
116
117
|
end
|
117
118
|
|
118
|
-
it '
|
119
|
+
it 'sets value' do
|
119
120
|
o = model.new
|
120
121
|
o.name = 'Paul'
|
121
122
|
|
122
|
-
expect(o.name).to
|
123
|
+
expect(o.name).to eq 'Paul'
|
123
124
|
end
|
124
125
|
|
125
|
-
it '
|
126
|
+
it 'updates attributes hash' do
|
126
127
|
o = model.new
|
127
128
|
o.name = 'Johannes'
|
128
129
|
|
129
|
-
expect(o.attributes['name']).to
|
130
|
+
expect(o.attributes['name']).to eq 'Johannes'
|
130
131
|
end
|
131
132
|
|
132
|
-
it '
|
133
|
+
it 'casts values' do
|
133
134
|
o = model.new
|
134
135
|
o.age = '28'
|
135
136
|
|
136
|
-
expect(o.age).to
|
137
|
+
expect(o.age).to eq 28
|
137
138
|
end
|
138
139
|
end
|
139
140
|
|
140
141
|
describe 'class' do
|
141
142
|
describe '#attributes' do
|
142
|
-
it '
|
143
|
+
it 'adds an attribute to model attribute list' do
|
143
144
|
model.send :attribute, :name, :string
|
144
145
|
|
145
146
|
expect(model.attributes.symbolize_keys).to eq name: nil
|
146
147
|
end
|
147
148
|
|
148
|
-
it '
|
149
|
+
it 'accepts a default value' do
|
149
150
|
model.send :attribute, :name, :string, default: 'John'
|
150
151
|
|
151
152
|
expect(model.attributes.symbolize_keys).to eq name: 'John'
|
152
153
|
end
|
153
154
|
|
154
|
-
it '
|
155
|
+
it 'accepts a symbolic type' do
|
155
156
|
model.send :attribute, :age, :integer, default: '12'
|
156
157
|
|
157
158
|
expect(model.attributes.symbolize_keys).to eq age: 12
|
158
159
|
end
|
159
160
|
|
160
|
-
it '
|
161
|
+
it 'accepts a class type' do
|
161
162
|
model.send :attribute, :age, Acfs::Resource::Attributes::Integer,
|
162
163
|
default: '12'
|
163
164
|
|
@@ -4,6 +4,7 @@ require 'spec_helper'
|
|
4
4
|
|
5
5
|
describe Acfs::Resource::Dirty do
|
6
6
|
let(:model) { MyUser.new }
|
7
|
+
|
7
8
|
before do
|
8
9
|
stub_request(:get, 'http://users.example.org/users/1')
|
9
10
|
.to_return response id: 1, name: 'Anon', age: 12
|
@@ -12,7 +13,7 @@ describe Acfs::Resource::Dirty do
|
|
12
13
|
end
|
13
14
|
|
14
15
|
it 'includes ActiveModel::Dirty' do
|
15
|
-
model.
|
16
|
+
expect(model).to be_a ActiveModel::Dirty
|
16
17
|
end
|
17
18
|
|
18
19
|
describe '#changed?' do
|
@@ -23,21 +24,23 @@ describe Acfs::Resource::Dirty do
|
|
23
24
|
|
24
25
|
context 'and saving' do
|
25
26
|
before { user.save }
|
26
|
-
|
27
|
+
|
28
|
+
it { expect(user).not_to be_changed }
|
27
29
|
end
|
28
30
|
end
|
29
31
|
|
30
32
|
context 'after model load' do
|
31
33
|
let(:user) { MyUser.find 1 }
|
34
|
+
|
32
35
|
before { user && Acfs.run }
|
33
36
|
|
34
|
-
it { expect(user).
|
37
|
+
it { expect(user).not_to be_changed }
|
35
38
|
end
|
36
39
|
|
37
40
|
context 'after model new without attrs' do
|
38
41
|
let(:user) { MyUser.new }
|
39
42
|
|
40
|
-
it { expect(user).
|
43
|
+
it { expect(user).not_to be_changed }
|
41
44
|
end
|
42
45
|
|
43
46
|
context 'after model new with attrs' do
|
@@ -17,20 +17,19 @@ describe 'Acfs::Resource::Initialization' do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
describe '#initialize' do
|
20
|
-
it '
|
20
|
+
it 'allows to set attributes with initializer' do
|
21
21
|
m = model.new name: 'John'
|
22
22
|
expect(m.name).to eq 'John'
|
23
23
|
end
|
24
24
|
|
25
|
-
it '
|
25
|
+
it 'raises error when attributes with private setters are given' do
|
26
26
|
expect { model.new age: 25 }.to raise_error(NoMethodError)
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
30
|
describe '#persisted?' do
|
31
|
-
|
32
|
-
|
33
|
-
should be false
|
31
|
+
it 'is false' do
|
32
|
+
expect(model.new.persisted?).to be false
|
34
33
|
end
|
35
34
|
end
|
36
35
|
end
|
@@ -4,6 +4,7 @@ require 'spec_helper'
|
|
4
4
|
|
5
5
|
describe Acfs::Resource::Loadable do
|
6
6
|
let(:model) { MyUser.find 1 }
|
7
|
+
|
7
8
|
before do
|
8
9
|
stub_request(:get, 'http://users.example.org/users/1')
|
9
10
|
.to_return response id: 1, name: 'Anon', age: 12
|
@@ -11,11 +12,12 @@ describe Acfs::Resource::Loadable do
|
|
11
12
|
|
12
13
|
describe '#loaded?' do
|
13
14
|
context 'before Acfs#run' do
|
14
|
-
it { expect(model).
|
15
|
+
it { expect(model).not_to be_loaded }
|
15
16
|
end
|
16
17
|
|
17
18
|
context 'afer Acfs#run' do
|
18
19
|
before { model && Acfs.run }
|
20
|
+
|
19
21
|
it { expect(model).to be_loaded }
|
20
22
|
end
|
21
23
|
end
|
@@ -4,6 +4,7 @@ require 'spec_helper'
|
|
4
4
|
|
5
5
|
describe Acfs::Resource::Locatable do
|
6
6
|
let(:model) { MyUser }
|
7
|
+
|
7
8
|
before do
|
8
9
|
stub_request(:get, 'http://users.example.org/users/1')
|
9
10
|
.to_return response id: 1, name: 'Anon', age: 12
|
@@ -12,63 +13,67 @@ describe Acfs::Resource::Locatable do
|
|
12
13
|
end
|
13
14
|
|
14
15
|
describe '.url' do
|
15
|
-
it '
|
16
|
-
expect(model.url).to
|
16
|
+
it 'returns URL' do
|
17
|
+
expect(model.url).to eq 'http://users.example.org/users'
|
17
18
|
end
|
18
19
|
|
19
|
-
it '
|
20
|
-
expect(model.url(5)).to
|
20
|
+
it 'returns URL with id path part if specified' do
|
21
|
+
expect(model.url(5)).to eq 'http://users.example.org/users/5'
|
21
22
|
end
|
22
23
|
|
23
24
|
context 'with attribute in path' do
|
24
25
|
let(:model) { Profile }
|
25
26
|
|
26
|
-
it '
|
27
|
+
it 'replaces placeholder' do
|
27
28
|
expect(model.url(user_id: 1))
|
28
29
|
.to eq 'http://users.example.org/users/1/profile'
|
29
30
|
end
|
30
31
|
|
31
32
|
context 'without attributes' do
|
32
|
-
it '
|
33
|
+
it 'raises an error if attribute is missing' do
|
33
34
|
expect { model.url }.to raise_error ArgumentError
|
34
35
|
end
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|
38
39
|
describe 'custom paths' do
|
40
|
+
subject(:location) { Session.location(action: action) }
|
41
|
+
|
39
42
|
let(:model) { Session }
|
40
|
-
let(:location) { Session.location action: action }
|
41
|
-
subject { location }
|
42
43
|
|
43
44
|
context ':list location' do
|
44
45
|
let(:action) { :list }
|
45
46
|
|
46
47
|
its(:raw_uri) do
|
47
|
-
|
48
|
+
is_expected.to eq 'http://users.example.org/users/:user_id/sessions'
|
48
49
|
end
|
49
50
|
end
|
50
51
|
|
51
52
|
context ':create location' do
|
52
53
|
let(:action) { :create }
|
53
|
-
|
54
|
+
|
55
|
+
its(:raw_uri) { is_expected.to eq 'http://users.example.org/sessions' }
|
54
56
|
end
|
55
57
|
|
56
58
|
context ':read location' do
|
57
59
|
let(:action) { :read }
|
58
|
-
|
60
|
+
|
61
|
+
its(:raw_uri) { is_expected.to eq 'http://users.example.org/sessions/:id' }
|
59
62
|
end
|
60
63
|
|
61
64
|
context ':update location' do
|
62
65
|
let(:action) { :update }
|
66
|
+
|
63
67
|
its(:raw_uri) do
|
64
|
-
expect {
|
68
|
+
expect { location }.to raise_error ArgumentError, /update.*disabled/
|
65
69
|
end
|
66
70
|
end
|
67
71
|
|
68
72
|
context ':delete location' do
|
69
73
|
let(:action) { :delete }
|
74
|
+
|
70
75
|
its(:raw_uri) do
|
71
|
-
|
76
|
+
is_expected.to eq 'http://users.example.org/users/:user_id/sessions/del/:id'
|
72
77
|
end
|
73
78
|
end
|
74
79
|
end
|
@@ -78,20 +83,20 @@ describe Acfs::Resource::Locatable do
|
|
78
83
|
context 'new resource' do
|
79
84
|
let(:m) { model.new }
|
80
85
|
|
81
|
-
it '
|
86
|
+
it 'returns nil' do
|
82
87
|
expect(m.url).to be_nil
|
83
88
|
end
|
84
89
|
|
85
90
|
context 'new resource with id' do
|
86
91
|
let(:m) { model.new id: 475 }
|
87
92
|
|
88
|
-
it '
|
93
|
+
it 'returns resource URL' do
|
89
94
|
expect(m.url).to eq 'http://users.example.org/users/475'
|
90
95
|
end
|
91
96
|
end
|
92
97
|
|
93
98
|
context 'with attribute in path' do
|
94
|
-
it '
|
99
|
+
it 'returns nil' do
|
95
100
|
expect(m.url).to be_nil
|
96
101
|
end
|
97
102
|
end
|
@@ -99,9 +104,10 @@ describe Acfs::Resource::Locatable do
|
|
99
104
|
|
100
105
|
context 'loaded resource' do
|
101
106
|
let(:m) { model.find 1 }
|
107
|
+
|
102
108
|
before { m && Acfs.run }
|
103
109
|
|
104
|
-
it "
|
110
|
+
it "returns resource's URL" do
|
105
111
|
expect(m.url).to eq 'http://users.example.org/users/1'
|
106
112
|
end
|
107
113
|
|
@@ -109,7 +115,7 @@ describe Acfs::Resource::Locatable do
|
|
109
115
|
let(:model) { Profile }
|
110
116
|
let(:m) { model.find user_id: 1 }
|
111
117
|
|
112
|
-
it "
|
118
|
+
it "returns resource's URL" do
|
113
119
|
expect(m.url).to eq 'http://users.example.org/users/2/profile'
|
114
120
|
end
|
115
121
|
end
|