acfs 1.7.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 45e81963e8044fcd6dbb2c5b3e8026de90c77d35e8ec5de2e73a8a3afaa839a5
|
|
4
|
+
data.tar.gz: 3507a04d6fcae2bfb6e637c3ef67eeaa9f9d02a154a635fe6b767e0d53669220
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b0fc88443461e879c6c5b10375b7cef376d9690961935165d72be6acc91038a9101ea9073f2ff63f8f3efe1d19656ce7c431b37562ecf4d93deec78a0cbcfc2
|
|
7
|
+
data.tar.gz: 6518c3f15372487c8d3d4af937c0e9cb97e53f6aea08d5f2bd0a18da3043f105e7300c59b85ca154f7f7d20962587fe4812e8dc36e37bda082172c7e06d03223
|
data/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
3
|
## Unreleased
|
|
4
|
+
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
### New
|
|
9
|
-
* Support for Ruby 3.1 and Rails 7.0
|
|
10
8
|
|
|
11
9
|
### Changes
|
|
12
10
|
|
|
@@ -14,360 +12,390 @@
|
|
|
14
12
|
|
|
15
13
|
### Breaks
|
|
16
14
|
|
|
15
|
+
## 2.0.0 - (2025-01-17)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### New
|
|
20
|
+
|
|
21
|
+
- Add support for Rails 7.2 and 8.0
|
|
22
|
+
- Add support for Ruby 3.3 and 3.4
|
|
23
|
+
|
|
24
|
+
### Changes
|
|
25
|
+
|
|
26
|
+
- Use newer Ruby syntax for performance and code improvements
|
|
27
|
+
|
|
28
|
+
### Breaks
|
|
29
|
+
|
|
30
|
+
- Require Ruby 3.1+ and Rails 7.0+
|
|
31
|
+
|
|
32
|
+
## 1.7.0 - (2022-01-24)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
### New
|
|
37
|
+
|
|
38
|
+
- Support for Ruby 3.1 and Rails 7.0
|
|
17
39
|
|
|
18
40
|
## 1.6.0 - (2021-01-07)
|
|
41
|
+
|
|
19
42
|
---
|
|
20
43
|
|
|
21
44
|
### New
|
|
22
|
-
* Support Ruby 3.0
|
|
23
|
-
* Use keyword arguments in parameters and when calling methods
|
|
24
45
|
|
|
46
|
+
- Support Ruby 3.0
|
|
47
|
+
- Use keyword arguments in parameters and when calling methods
|
|
25
48
|
|
|
26
49
|
## 1.5.1 - (2020-12-30)
|
|
50
|
+
|
|
27
51
|
---
|
|
28
52
|
|
|
29
53
|
### Changes
|
|
30
|
-
* Revert back to using `::MultiJson`
|
|
31
54
|
|
|
55
|
+
- Revert to using `::MultiJson`
|
|
32
56
|
|
|
33
57
|
## 1.5.0 - (2020-06-19)
|
|
58
|
+
|
|
34
59
|
---
|
|
35
60
|
|
|
36
61
|
### New
|
|
37
|
-
|
|
62
|
+
|
|
63
|
+
- Error classes for more HTTP error responses: `400`, `401`, `403`, `500`, `502`, `503`, `504`.
|
|
38
64
|
|
|
39
65
|
### Changes
|
|
40
|
-
* Replace deprecated MultiJson with core JSON module
|
|
41
66
|
|
|
67
|
+
- Replace deprecated `MultiJson` with core JSON module
|
|
42
68
|
|
|
43
69
|
## 1.4.0 - (2020-06-12)
|
|
70
|
+
|
|
44
71
|
---
|
|
45
72
|
|
|
46
73
|
### New
|
|
47
|
-
* Use strict TCP keepalive probing by default (5s/5s)
|
|
48
|
-
* Adapter accepts curl request opts
|
|
49
74
|
|
|
75
|
+
- Use strict TCP keep alive probing by default (5s/5s)
|
|
76
|
+
- Adapter accepts curl request opts
|
|
50
77
|
|
|
51
78
|
## 1.3.4 - (2020-03-22)
|
|
79
|
+
|
|
52
80
|
---
|
|
53
81
|
|
|
54
82
|
### Fixes
|
|
55
|
-
* Empty package build for Gem release 1.3.3
|
|
56
83
|
|
|
84
|
+
- Empty package build for Gem release 1.3.3
|
|
57
85
|
|
|
58
86
|
## 1.3.3 - (2020-03-22)
|
|
87
|
+
|
|
59
88
|
---
|
|
60
89
|
|
|
61
90
|
### Changes
|
|
62
|
-
* Improved handling of low-level connection errors and timeouts
|
|
63
91
|
|
|
92
|
+
- Improved handling of low-level connection errors and timeouts
|
|
64
93
|
|
|
65
94
|
## 1.3.2 - (2019-09-24)
|
|
66
95
|
|
|
67
|
-
|
|
68
96
|
### Fixes
|
|
69
|
-
* Fix Acfs.on callbacks for empty find_by results (#42)
|
|
70
97
|
|
|
98
|
+
- Fix `Acfs.on` callbacks for empty `find_by` results (#42)
|
|
71
99
|
|
|
72
100
|
---
|
|
73
101
|
|
|
74
102
|
## 1.3.1 - (2019-07-02)
|
|
75
103
|
|
|
76
104
|
### Fixes
|
|
77
|
-
|
|
105
|
+
|
|
106
|
+
- Improve URL argument encoding when building resource requests
|
|
78
107
|
|
|
79
108
|
## 1.3.0
|
|
80
109
|
|
|
81
|
-
|
|
110
|
+
- Change default error messages to a more compact representation to ease integration with error reporting services.
|
|
82
111
|
|
|
83
112
|
## 1.2.1
|
|
84
113
|
|
|
85
|
-
|
|
114
|
+
- Fix issues with resources errors if response payload differs from the expected `field => [messages]`, such as `field => message` or `[messages]`.
|
|
86
115
|
|
|
87
116
|
## 1.2.0
|
|
88
117
|
|
|
89
|
-
|
|
118
|
+
- Add Rails 5.2 compatibility
|
|
90
119
|
|
|
91
120
|
## 1.1.1
|
|
92
121
|
|
|
93
|
-
|
|
122
|
+
- `each_item`: Pass collection to provided block (#40)
|
|
94
123
|
|
|
95
124
|
## 1.1.0
|
|
96
125
|
|
|
97
|
-
|
|
126
|
+
- Add support for Rails 5.1
|
|
98
127
|
|
|
99
128
|
## 1.0.1
|
|
100
129
|
|
|
101
|
-
|
|
130
|
+
- Fix deprecation warnings when using ::Mime
|
|
102
131
|
|
|
103
132
|
## 1.0.0
|
|
104
133
|
|
|
105
|
-
|
|
106
|
-
|
|
134
|
+
- Switch to first non-development major as its long time used in production.
|
|
135
|
+
- Fix NewRelic RPM inference with middleware stack inherited from `ActionDispatch::MiddlewareStack`.
|
|
107
136
|
|
|
108
137
|
## 0.48.0
|
|
109
138
|
|
|
110
|
-
|
|
111
|
-
|
|
139
|
+
- Remove #attribute_types broke since f7e4109 (Sep 2013, v0.23)
|
|
140
|
+
- Fix attribute inheritance on child classes broken since commit 7cf1d11 (Apr 2014, v0.43)
|
|
112
141
|
|
|
113
142
|
## 0.47.0
|
|
114
143
|
|
|
115
|
-
|
|
144
|
+
- Change blank value handling of dict and list type (0a12ef1)
|
|
116
145
|
|
|
117
146
|
## 0.46.0
|
|
118
147
|
|
|
119
|
-
|
|
148
|
+
- Rework types system (#39)
|
|
120
149
|
|
|
121
150
|
## 0.45.0
|
|
122
151
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
152
|
+
- Fetching multiple records (`find(ary)`) is stable now, but untested (#38)
|
|
153
|
+
- Middleware stack is build on `ActionDispatch::MiddlewareStack` now
|
|
154
|
+
- Deprecate legacy middleware names (`xyEncoder`, `xyDecoder`)
|
|
126
155
|
|
|
127
156
|
## 0.44.0
|
|
128
157
|
|
|
129
|
-
|
|
130
|
-
limiting concurrency.
|
|
158
|
+
- Add option to configure adapter creation and pass option to `typhoeus` adapter e.g. limiting concurrency.
|
|
131
159
|
|
|
132
160
|
## 0.43.2
|
|
133
161
|
|
|
134
|
-
|
|
162
|
+
- add `total_count` for paginated collections
|
|
135
163
|
|
|
136
164
|
## 0.43.1
|
|
137
165
|
|
|
138
|
-
|
|
166
|
+
- Fix `:with` condition matching on stubs
|
|
139
167
|
|
|
140
168
|
## 0.43.0
|
|
141
169
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
170
|
+
- Remove `Acfs::Model` (inherit from `Acfs::Resource`)
|
|
171
|
+
- Stub does only a partial match of `:with` attributes now
|
|
172
|
+
- Allow blocks as stub `:return`s
|
|
145
173
|
|
|
146
174
|
## 0.42.0
|
|
147
175
|
|
|
148
|
-
|
|
176
|
+
- Add simple dict attribute type
|
|
149
177
|
|
|
150
178
|
## 0.40.0
|
|
151
179
|
|
|
152
|
-
|
|
180
|
+
- Change `Resource#persisted?` to return true if it is not new
|
|
153
181
|
|
|
154
182
|
## 0.39.1
|
|
155
183
|
|
|
156
|
-
|
|
184
|
+
- Fix automatic path parameter handling for #destroy
|
|
157
185
|
|
|
158
186
|
## 0.39.0
|
|
159
187
|
|
|
160
|
-
|
|
188
|
+
- Add new event `acfs.operation.before_process`
|
|
161
189
|
|
|
162
190
|
## 0.38.0
|
|
163
191
|
|
|
164
|
-
|
|
165
|
-
|
|
192
|
+
- Allow middlewares to abort request processing
|
|
193
|
+
- Allow middlewares to receive the request operation object (via the request)
|
|
166
194
|
|
|
167
195
|
## 0.37.0
|
|
168
196
|
|
|
169
|
-
|
|
197
|
+
- Add `Acfs.on`
|
|
170
198
|
|
|
171
199
|
## 0.36.0
|
|
172
200
|
|
|
173
|
-
|
|
201
|
+
- Add #each_page and #each_item query methods
|
|
174
202
|
|
|
175
203
|
## 0.35.0
|
|
176
204
|
|
|
177
|
-
|
|
205
|
+
- Add instrumentation support
|
|
178
206
|
|
|
179
207
|
## 0.34.1
|
|
180
208
|
|
|
181
|
-
|
|
209
|
+
- Fix leaking failed requests in request queues
|
|
182
210
|
|
|
183
211
|
## 0.34.0
|
|
184
212
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
213
|
+
- Add support for will_paginate view helper used with `Acfs::Collection`s
|
|
214
|
+
- Add support for pagination header added by [paginate-responder](https://github.com/jgraichen/paginate-responder)
|
|
215
|
+
- Improve `Resource#new?` detection by using `loaded?` instead of presence of `:id` attribute
|
|
188
216
|
|
|
189
217
|
## 0.33.0
|
|
190
218
|
|
|
191
|
-
|
|
192
|
-
|
|
219
|
+
- Do not raise errors on unknown attributes by default, add :unknown option.
|
|
220
|
+
- Add support to store unknown attributes
|
|
193
221
|
|
|
194
222
|
## 0.32.1
|
|
195
223
|
|
|
196
|
-
|
|
224
|
+
- Fix multiple callbacks on `QueryMethods#all`
|
|
197
225
|
|
|
198
226
|
## 0.32.0
|
|
199
227
|
|
|
200
|
-
|
|
228
|
+
- Add new attribute type `UUID`
|
|
201
229
|
|
|
202
230
|
## 0.31.0
|
|
203
231
|
|
|
204
|
-
|
|
232
|
+
- Add experimental support for multiple and chained paths with placeholders
|
|
205
233
|
|
|
206
234
|
## 0.30.0
|
|
207
235
|
|
|
208
|
-
|
|
236
|
+
- Add experimental support for multiple operation callbacks (Acfs.add_callback)
|
|
209
237
|
|
|
210
238
|
## 0.29.1
|
|
211
239
|
|
|
212
|
-
|
|
240
|
+
- Fix: rescue `NameError` and `NoMethodError` on invalid type
|
|
213
241
|
|
|
214
242
|
## 0.29.0
|
|
215
243
|
|
|
216
|
-
|
|
244
|
+
- Add find_by!
|
|
217
245
|
|
|
218
246
|
## 0.28.0
|
|
219
247
|
|
|
220
|
-
|
|
248
|
+
- Add find_by
|
|
221
249
|
|
|
222
250
|
## 0.27.0
|
|
223
251
|
|
|
224
|
-
|
|
225
|
-
|
|
252
|
+
- Reset method to clear stubs, request queues, internal state
|
|
253
|
+
- Add RSpec helper to enable stubs and clear state after each spec
|
|
226
254
|
|
|
227
255
|
## 0.26.0
|
|
228
256
|
|
|
229
|
-
|
|
257
|
+
- Add support for singleton resources
|
|
230
258
|
|
|
231
259
|
## 0.25.0
|
|
232
260
|
|
|
233
|
-
|
|
234
|
-
|
|
261
|
+
- Add option to allow blank attribute values (Johannes Jasper)
|
|
262
|
+
- Internal changes
|
|
235
263
|
|
|
236
264
|
## 0.24.0
|
|
237
265
|
|
|
238
|
-
|
|
239
|
-
|
|
266
|
+
- Fix issues with stubs using type inheritance
|
|
267
|
+
- Allow '1' as true value for boolean attributes (Tino Junge)
|
|
240
268
|
|
|
241
269
|
## 0.23.2
|
|
242
270
|
|
|
243
|
-
|
|
271
|
+
- Fix regression in delegator usage by #find due to resource type inheritance.
|
|
244
272
|
|
|
245
273
|
## 0.23.1
|
|
246
274
|
|
|
247
|
-
|
|
275
|
+
- Fix error class name typo
|
|
248
276
|
|
|
249
277
|
## 0.23.0
|
|
250
278
|
|
|
251
|
-
|
|
279
|
+
- Add Resource Type Inheritance
|
|
252
280
|
|
|
253
281
|
## 0.22.2
|
|
254
282
|
|
|
255
|
-
|
|
256
|
-
|
|
283
|
+
- Preserve errors received from service on revalidation (2f1fc178)
|
|
284
|
+
- Fix parameter ordering bug on stubs (1dc78dc8)
|
|
257
285
|
|
|
258
286
|
## 0.22.1
|
|
259
287
|
|
|
260
|
-
|
|
288
|
+
- Fix hash modification on iteration bug on `ActiveModel::Errors` due to string keys in error hash
|
|
261
289
|
|
|
262
290
|
## 0.22.0
|
|
263
291
|
|
|
264
|
-
|
|
292
|
+
- Fill local resource errors hash also on 422 responses when saving resources
|
|
265
293
|
|
|
266
294
|
## 0.21.1
|
|
267
295
|
|
|
268
|
-
|
|
296
|
+
- Fix wrong validation context
|
|
269
297
|
|
|
270
298
|
## 0.21.0
|
|
271
299
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
300
|
+
- Add update_attributes
|
|
301
|
+
- Add validation check to `save` method
|
|
302
|
+
- Inherit attributes to subclasses
|
|
275
303
|
|
|
276
304
|
## 0.20.0
|
|
277
305
|
|
|
278
|
-
|
|
279
|
-
|
|
306
|
+
- Remove messaging
|
|
307
|
+
- Introduce `Acfs::Resource`
|
|
280
308
|
|
|
281
309
|
## 0.19.0
|
|
282
310
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
311
|
+
- Add support for `DateTime` and `Float` attribute types
|
|
312
|
+
- Add experimental list attribute type
|
|
313
|
+
- Allow block usage in stub `with` option
|
|
314
|
+
- Allow testing if operation stubs were called and how often
|
|
315
|
+
- Fix bug on operation stubs
|
|
288
316
|
|
|
289
317
|
## 0.18.0
|
|
290
318
|
|
|
291
|
-
|
|
319
|
+
- Basic DELETE operations
|
|
292
320
|
|
|
293
321
|
## 0.17.0
|
|
294
322
|
|
|
295
|
-
|
|
296
|
-
|
|
323
|
+
- Basic messaging
|
|
324
|
+
- Extensible YARD documentation
|
|
297
325
|
|
|
298
326
|
## 0.16.0
|
|
299
327
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
328
|
+
- Add YAML configuration
|
|
329
|
+
- Add external configuration for services
|
|
330
|
+
- Add Rubinius support
|
|
303
331
|
|
|
304
332
|
## 0.15.0
|
|
305
333
|
|
|
306
|
-
|
|
334
|
+
- Add stubbing capabilities for resources
|
|
307
335
|
|
|
308
336
|
## 0.14.0 & 0.13.0
|
|
309
337
|
|
|
310
|
-
|
|
338
|
+
- Fix response attributes
|
|
311
339
|
|
|
312
340
|
## 0.12.0
|
|
313
341
|
|
|
314
|
-
|
|
315
|
-
|
|
342
|
+
- Add JRuby support
|
|
343
|
+
- Improve handling of error responses (422)
|
|
316
344
|
|
|
317
345
|
## 0.11.0
|
|
318
346
|
|
|
319
|
-
|
|
320
|
-
|
|
347
|
+
- Add Logger Middleware
|
|
348
|
+
- Add handling of error responses
|
|
321
349
|
|
|
322
350
|
## 0.10.0
|
|
323
351
|
|
|
324
|
-
|
|
352
|
+
- Return hash with indifferent access for resource attributes
|
|
325
353
|
|
|
326
354
|
## 0.9.0
|
|
327
355
|
|
|
328
|
-
|
|
356
|
+
- Add create operation
|
|
329
357
|
|
|
330
358
|
## 0.8.0
|
|
331
359
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
360
|
+
- Add save operation (PUT and POST)
|
|
361
|
+
- Add JSON and MessagePack encoder middlewares for encoding request data
|
|
362
|
+
- `ActiveModel::Dirty`
|
|
363
|
+
- Add persistent state methods
|
|
336
364
|
|
|
337
365
|
## 0.7.0
|
|
338
366
|
|
|
339
|
-
|
|
367
|
+
- Per-service middleware stack
|
|
340
368
|
|
|
341
369
|
## 0.6.0
|
|
342
370
|
|
|
343
|
-
|
|
344
|
-
|
|
371
|
+
- Add support for multiple IDs for `.find`
|
|
372
|
+
- Add MessagePack support
|
|
345
373
|
|
|
346
374
|
## 0.5.1
|
|
347
375
|
|
|
348
|
-
|
|
376
|
+
- Fix mime type parsing for mime types with additional parameters (`ActionPack` < 4.0)
|
|
349
377
|
|
|
350
378
|
## 0.5.0
|
|
351
379
|
|
|
352
|
-
|
|
380
|
+
- Add mime type support for responses
|
|
353
381
|
|
|
354
382
|
## 0.4.0
|
|
355
383
|
|
|
356
|
-
|
|
357
|
-
|
|
384
|
+
- Improve JSON response detection
|
|
385
|
+
- Add boolean attribute type
|
|
358
386
|
|
|
359
387
|
## 0.3.0
|
|
360
388
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
389
|
+
- Add tracking for loading state (if resource is loaded or queued)
|
|
390
|
+
- Add JSON middleware to decode responses
|
|
391
|
+
- Add middleware support
|
|
392
|
+
- Add method to fetch single resources or list of resources
|
|
393
|
+
- Use typhoeus as HTTP library for parallel request processing
|
|
366
394
|
|
|
367
395
|
## 0.2.0
|
|
368
396
|
|
|
369
|
-
|
|
397
|
+
- Allow defining resources and attributes
|
|
370
398
|
|
|
371
399
|
## 0.1.0
|
|
372
400
|
|
|
373
|
-
|
|
401
|
+
- Project start
|
data/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# Acfs - *API client for services*
|
|
2
2
|
|
|
3
3
|
[](https://rubygems.org/gems/acfs)
|
|
4
|
-
[](https://github.com/jgraichen/acfs/actions?query=branch%3Amaster)
|
|
4
|
+
[](https://github.com/jgraichen/acfs/actions)
|
|
6
5
|
[](https://coveralls.io/r/jgraichen/acfs)
|
|
7
6
|
[](http://rubydoc.info/github/jgraichen/acfs/master/frames)
|
|
8
7
|
|
|
@@ -10,23 +9,25 @@ Acfs is a library to develop API client libraries for single services within a l
|
|
|
10
9
|
|
|
11
10
|
Acfs covers model and service abstraction, convenient query and filter methods, full middleware stack for pre-processing requests and responses, as well as automatic request queuing and parallel processing.
|
|
12
11
|
|
|
13
|
-
|
|
14
12
|
## Installation
|
|
15
13
|
|
|
16
14
|
Add this line to your application's Gemfile:
|
|
17
15
|
|
|
18
16
|
```ruby
|
|
19
|
-
gem 'acfs', '~>
|
|
17
|
+
gem 'acfs', '~> 2.0'
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
And then execute:
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
```console
|
|
23
|
+
bundle
|
|
24
|
+
```
|
|
25
25
|
|
|
26
26
|
Or install it yourself as:
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
```console
|
|
29
|
+
gem install acfs
|
|
30
|
+
```
|
|
30
31
|
|
|
31
32
|
## Usage
|
|
32
33
|
|
|
@@ -34,7 +35,7 @@ First you need to define your service(s):
|
|
|
34
35
|
|
|
35
36
|
```ruby
|
|
36
37
|
class UserService < Acfs::Service
|
|
37
|
-
self.base_url = '
|
|
38
|
+
self.base_url = 'https://users.myapp.org'
|
|
38
39
|
|
|
39
40
|
# You can configure middlewares you want to use for the service here.
|
|
40
41
|
# Each service has it own middleware stack.
|
|
@@ -120,10 +121,11 @@ Acfs.run # This call will fire all request as parallel as possible.
|
|
|
120
121
|
|
|
121
122
|
@user.name # => "John
|
|
122
123
|
@comments.size # => 25
|
|
123
|
-
@friends[0].name # => "
|
|
124
|
+
@friends[0].name # => "Miracolix"
|
|
124
125
|
```
|
|
125
126
|
|
|
126
127
|
Use `.find_by` to get first element only. `.find_by` will call the `index`-Action and return the first resource. Optionally passed parameters will be sent as `GET` parameters and can be used for filtering in the service's controller.
|
|
128
|
+
|
|
127
129
|
```ruby
|
|
128
130
|
@user = User.find_by age: 24
|
|
129
131
|
|
|
@@ -131,6 +133,7 @@ Acfs.run # Will request `http://users.myapp.org/users?age=24`
|
|
|
131
133
|
|
|
132
134
|
@user # Contains the first user object returned by the index action
|
|
133
135
|
```
|
|
136
|
+
|
|
134
137
|
If no object can be found, `.find_by` will return `nil`. The optional callback will then be called with `nil` as parameter. Use `.find_by!` to raise an `Acfs::ResourceNotFound` exception if no object can be found. `.find_by!` will only invoke the optional callback if an object was successfully loaded.
|
|
135
138
|
|
|
136
139
|
Acfs has basic update support using `PUT` requests:
|
|
@@ -149,7 +152,6 @@ Acfs has basic update support using `PUT` requests:
|
|
|
149
152
|
@user.persisted? # => true
|
|
150
153
|
```
|
|
151
154
|
|
|
152
|
-
|
|
153
155
|
## Singleton resources
|
|
154
156
|
|
|
155
157
|
Singletons can be used in Acfs by creating a new resource which inherits from `SingletonResource`:
|
|
@@ -188,7 +190,6 @@ my_single = Single.find name: 'Max'
|
|
|
188
190
|
Acfs.run # sends GET request with param to /single?name=Max
|
|
189
191
|
```
|
|
190
192
|
|
|
191
|
-
|
|
192
193
|
## Resource Inheritance
|
|
193
194
|
|
|
194
195
|
Acfs provides a resource inheritance similar to ActiveRecord Single Table Inheritance. If a `type` attribute exists and is a valid subclass of your resource they will be converted to you subclassed resources:
|
|
@@ -222,7 +223,6 @@ Acfs.run
|
|
|
222
223
|
@computer[2].class # => Pc
|
|
223
224
|
```
|
|
224
225
|
|
|
225
|
-
|
|
226
226
|
## Stubbing
|
|
227
227
|
|
|
228
228
|
You can stub resources in applications using an Acfs service client:
|
|
@@ -269,7 +269,7 @@ it 'should allow stub resource creation' do
|
|
|
269
269
|
end
|
|
270
270
|
```
|
|
271
271
|
|
|
272
|
-
By default Acfs raises an error when a non stubbed resource should be requested. You can switch of the behavior:
|
|
272
|
+
By default, Acfs raises an error when a non stubbed resource should be requested. You can switch of the behavior:
|
|
273
273
|
|
|
274
274
|
```ruby
|
|
275
275
|
before do
|
|
@@ -283,7 +283,6 @@ it 'should find user number one' do
|
|
|
283
283
|
end
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
-
|
|
287
286
|
## Instrumentation
|
|
288
287
|
|
|
289
288
|
Acfs supports [instrumentation via active support][1] and exposes the following events:
|
|
@@ -299,20 +298,16 @@ Read the [official guide][2] on how to subscribe to these events.
|
|
|
299
298
|
[1]: http://guides.rubyonrails.org/active_support_instrumentation.html
|
|
300
299
|
[2]: http://guides.rubyonrails.org/active_support_instrumentation.html#subscribing-to-an-event
|
|
301
300
|
|
|
302
|
-
|
|
303
301
|
## Contributing
|
|
304
302
|
|
|
305
303
|
1. Fork it
|
|
306
304
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
305
|
+
3. Add specs for your feature
|
|
306
|
+
4. Implement your feature
|
|
307
|
+
5. Commit your changes (`git commit -am 'Add some feature'`)
|
|
308
|
+
6. Push to the branch (`git push origin my-new-feature`)
|
|
309
|
+
7. Create new Pull Request
|
|
313
310
|
|
|
314
311
|
## License
|
|
315
312
|
|
|
316
|
-
MIT License
|
|
317
|
-
|
|
318
|
-
Copyright (c) 2013-2022 Jan Graichen. MIT license, see LICENSE for more details.
|
|
313
|
+
[MIT License](LICENSE)
|
data/acfs.gemspec
CHANGED
|
@@ -24,17 +24,14 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
}xi)
|
|
25
25
|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^bin/}) {|f| File.basename(f) }
|
|
27
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
28
27
|
spec.require_paths = %w[lib]
|
|
29
28
|
|
|
30
|
-
spec.required_ruby_version = '>=
|
|
29
|
+
spec.required_ruby_version = '>= 3.1.0'
|
|
31
30
|
|
|
32
|
-
spec.
|
|
33
|
-
spec.
|
|
34
|
-
spec.
|
|
35
|
-
spec.
|
|
36
|
-
spec.
|
|
37
|
-
spec.
|
|
38
|
-
|
|
39
|
-
spec.add_development_dependency 'bundler'
|
|
31
|
+
spec.add_dependency 'actionpack', '>= 7.0'
|
|
32
|
+
spec.add_dependency 'activemodel', '>= 7.0'
|
|
33
|
+
spec.add_dependency 'activesupport', '>= 7.0'
|
|
34
|
+
spec.add_dependency 'multi_json', '~> 1.0'
|
|
35
|
+
spec.add_dependency 'rack'
|
|
36
|
+
spec.add_dependency 'typhoeus', '~> 1.0'
|
|
40
37
|
end
|