acfs 1.6.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (258) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +144 -115
  3. data/README.md +33 -41
  4. data/acfs.gemspec +9 -10
  5. data/lib/acfs/adapter/typhoeus.rb +6 -4
  6. data/lib/acfs/collections/paginatable.rb +11 -11
  7. data/lib/acfs/configuration.rb +13 -3
  8. data/lib/acfs/errors.rb +7 -7
  9. data/lib/acfs/global.rb +4 -4
  10. data/lib/acfs/location.rb +2 -2
  11. data/lib/acfs/operation.rb +1 -1
  12. data/lib/acfs/request/callbacks.rb +1 -1
  13. data/lib/acfs/request.rb +1 -1
  14. data/lib/acfs/resource/attributes/uuid.rb +2 -2
  15. data/lib/acfs/resource/attributes.rb +1 -1
  16. data/lib/acfs/resource/dirty.rb +1 -1
  17. data/lib/acfs/resource/locatable.rb +2 -2
  18. data/lib/acfs/resource/operational.rb +4 -4
  19. data/lib/acfs/resource/query_methods.rb +5 -5
  20. data/lib/acfs/response/status.rb +1 -1
  21. data/lib/acfs/runner.rb +15 -15
  22. data/lib/acfs/service/middleware.rb +2 -2
  23. data/lib/acfs/singleton_resource.rb +2 -2
  24. data/lib/acfs/stub.rb +35 -30
  25. data/lib/acfs/version.rb +3 -3
  26. data/lib/acfs/yard.rb +1 -0
  27. data/spec/acfs/adapter/typhoeus_spec.rb +4 -4
  28. data/spec/acfs/collection_spec.rb +66 -41
  29. data/spec/acfs/configuration_spec.rb +22 -12
  30. data/spec/acfs/global_spec.rb +14 -12
  31. data/spec/acfs/location_spec.rb +1 -1
  32. data/spec/acfs/middleware/json_spec.rb +9 -9
  33. data/spec/acfs/middleware/{msgpack_spec.rb → message_pack_spec.rb} +7 -7
  34. data/spec/acfs/operation_spec.rb +4 -3
  35. data/spec/acfs/request/callbacks_spec.rb +19 -10
  36. data/spec/acfs/request_spec.rb +15 -19
  37. data/spec/acfs/resource/attributes/boolean_spec.rb +32 -32
  38. data/spec/acfs/resource/attributes/date_time_spec.rb +17 -9
  39. data/spec/acfs/resource/attributes/dict_spec.rb +16 -10
  40. data/spec/acfs/resource/attributes/float_spec.rb +21 -11
  41. data/spec/acfs/resource/attributes/integer_spec.rb +11 -6
  42. data/spec/acfs/resource/attributes/list_spec.rb +13 -8
  43. data/spec/acfs/resource/attributes/uuid_spec.rb +14 -8
  44. data/spec/acfs/resource/attributes_spec.rb +33 -32
  45. data/spec/acfs/resource/dirty_spec.rb +7 -4
  46. data/spec/acfs/resource/initialization_spec.rb +4 -5
  47. data/spec/acfs/resource/loadable_spec.rb +3 -1
  48. data/spec/acfs/resource/locatable_spec.rb +24 -18
  49. data/spec/acfs/resource/{persistance_spec.rb → persistence_spec.rb} +119 -87
  50. data/spec/acfs/resource/query_methods_spec.rb +144 -111
  51. data/spec/acfs/resource/validation_spec.rb +34 -27
  52. data/spec/acfs/response/formats_spec.rb +8 -8
  53. data/spec/acfs/response/status_spec.rb +16 -9
  54. data/spec/acfs/runner_spec.rb +22 -20
  55. data/spec/acfs/service/middleware_spec.rb +3 -3
  56. data/spec/acfs/service_spec.rb +5 -4
  57. data/spec/acfs/singleton_resource_spec.rb +2 -1
  58. data/spec/acfs/stub_spec.rb +64 -65
  59. data/spec/acfs_spec.rb +112 -94
  60. data/spec/spec_helper.rb +10 -6
  61. data/spec/support/hash.rb +1 -1
  62. data/spec/support/response.rb +2 -2
  63. data/spec/support/service.rb +1 -1
  64. data/spec/support/shared/find_callbacks.rb +14 -10
  65. data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-67802c9d1826/LICENSE +21 -0
  66. data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-67802c9d1826/README.md +23 -0
  67. data/vendor/bundle/ruby/3.4.0/bundler/gems/rubocop-config-67802c9d1826/rubocop-config.gemspec +31 -0
  68. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.1/CHANGELOG.md +205 -0
  69. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.1/MIT-LICENSE +21 -0
  70. data/vendor/bundle/ruby/3.4.0/gems/actionpack-8.0.1/README.rdoc +57 -0
  71. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/CHANGELOG.md +67 -0
  72. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/MIT-LICENSE +21 -0
  73. data/vendor/bundle/ruby/3.4.0/gems/actionview-8.0.1/README.rdoc +40 -0
  74. data/vendor/bundle/ruby/3.4.0/gems/activemodel-8.0.1/CHANGELOG.md +110 -0
  75. data/vendor/bundle/ruby/3.4.0/gems/activemodel-8.0.1/MIT-LICENSE +21 -0
  76. data/vendor/bundle/ruby/3.4.0/gems/activemodel-8.0.1/README.rdoc +266 -0
  77. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/CHANGELOG.md +157 -0
  78. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/MIT-LICENSE +20 -0
  79. data/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.1/README.rdoc +40 -0
  80. data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/CHANGELOG.md +301 -0
  81. data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/LICENSE.txt +202 -0
  82. data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/README.md +121 -0
  83. data/vendor/bundle/ruby/3.4.0/gems/addressable-2.8.7/addressable.gemspec +28 -0
  84. data/vendor/bundle/ruby/3.4.0/gems/appraisal-2.5.0/MIT-LICENSE +21 -0
  85. data/vendor/bundle/ruby/3.4.0/gems/appraisal-2.5.0/README.md +243 -0
  86. data/vendor/bundle/ruby/3.4.0/gems/appraisal-2.5.0/appraisal.gemspec +29 -0
  87. data/vendor/bundle/ruby/3.4.0/gems/base64-0.2.0/LICENSE.txt +22 -0
  88. data/vendor/bundle/ruby/3.4.0/gems/base64-0.2.0/README.md +48 -0
  89. data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.0/README.md +138 -0
  90. data/vendor/bundle/ruby/3.4.0/gems/benchmark-0.4.0/benchmark.gemspec +32 -0
  91. data/vendor/bundle/ruby/3.4.0/gems/bigdecimal-3.1.9/LICENSE +56 -0
  92. data/vendor/bundle/ruby/3.4.0/gems/bigdecimal-3.1.9/bigdecimal.gemspec +57 -0
  93. data/vendor/bundle/ruby/3.4.0/gems/builder-3.3.0/MIT-LICENSE +20 -0
  94. data/vendor/bundle/ruby/3.4.0/gems/builder-3.3.0/README.md +258 -0
  95. data/vendor/bundle/ruby/3.4.0/gems/builder-3.3.0/builder.gemspec +49 -0
  96. data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/CHANGELOG.md +603 -0
  97. data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/LICENSE.txt +21 -0
  98. data/vendor/bundle/ruby/3.4.0/gems/concurrent-ruby-1.3.5/README.md +407 -0
  99. data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.0/LICENSE +20 -0
  100. data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.0/README.md +167 -0
  101. data/vendor/bundle/ruby/3.4.0/gems/connection_pool-2.5.0/connection_pool.gemspec +24 -0
  102. data/vendor/bundle/ruby/3.4.0/gems/crack-1.0.0/LICENSE +20 -0
  103. data/vendor/bundle/ruby/3.4.0/gems/crack-1.0.0/README.md +43 -0
  104. data/vendor/bundle/ruby/3.4.0/gems/crass-1.0.6/LICENSE +18 -0
  105. data/vendor/bundle/ruby/3.4.0/gems/crass-1.0.6/README.md +192 -0
  106. data/vendor/bundle/ruby/3.4.0/gems/crass-1.0.6/crass.gemspec +31 -0
  107. data/vendor/bundle/ruby/3.4.0/gems/diff-lcs-1.5.1/License.md +41 -0
  108. data/vendor/bundle/ruby/3.4.0/gems/diff-lcs-1.5.1/README.rdoc +84 -0
  109. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.1/LICENSE.txt +22 -0
  110. data/vendor/bundle/ruby/3.4.0/gems/drb-2.2.1/drb.gemspec +41 -0
  111. data/vendor/bundle/ruby/3.4.0/gems/erubi-1.13.1/CHANGELOG +111 -0
  112. data/vendor/bundle/ruby/3.4.0/gems/erubi-1.13.1/MIT-LICENSE +21 -0
  113. data/vendor/bundle/ruby/3.4.0/gems/erubi-1.13.1/README.rdoc +151 -0
  114. data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/CHANGELOG.md +375 -0
  115. data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/LICENSE +20 -0
  116. data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/README.md +118 -0
  117. data/vendor/bundle/ruby/3.4.0/gems/ethon-0.16.0/ethon.gemspec +26 -0
  118. data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/CHANGELOG.md +465 -0
  119. data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/LICENSE +24 -0
  120. data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/LICENSE.SPECS +22 -0
  121. data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/README.md +137 -0
  122. data/vendor/bundle/ruby/3.4.0/gems/ffi-1.17.1-x86_64-linux-gnu/ffi.gemspec +42 -0
  123. data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/LICENSE +19 -0
  124. data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/README.md +298 -0
  125. data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/changelog.md +119 -0
  126. data/vendor/bundle/ruby/3.4.0/gems/hashdiff-1.1.2/hashdiff.gemspec +39 -0
  127. data/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.6/MIT-LICENSE +20 -0
  128. data/vendor/bundle/ruby/3.4.0/gems/i18n-1.14.6/README.md +127 -0
  129. data/vendor/bundle/ruby/3.4.0/gems/json-2.9.1/README.md +195 -0
  130. data/vendor/bundle/ruby/3.4.0/gems/json-2.9.1/json.gemspec +64 -0
  131. data/vendor/bundle/ruby/3.4.0/gems/logger-1.6.5/README.md +104 -0
  132. data/vendor/bundle/ruby/3.4.0/gems/logger-1.6.5/logger.gemspec +28 -0
  133. data/vendor/bundle/ruby/3.4.0/gems/loofah-2.24.0/CHANGELOG.md +591 -0
  134. data/vendor/bundle/ruby/3.4.0/gems/loofah-2.24.0/MIT-LICENSE.txt +23 -0
  135. data/vendor/bundle/ruby/3.4.0/gems/loofah-2.24.0/README.md +410 -0
  136. data/vendor/bundle/ruby/3.4.0/gems/minitest-5.25.4/README.rdoc +835 -0
  137. data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/CHANGELOG.md +275 -0
  138. data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/LICENSE.md +20 -0
  139. data/vendor/bundle/ruby/3.4.0/gems/multi_json-1.15.0/README.md +121 -0
  140. data/vendor/bundle/ruby/3.4.0/gems/nokogiri-1.18.1-x86_64-linux-gnu/LICENSE-DEPENDENCIES.md +2224 -0
  141. data/vendor/bundle/ruby/3.4.0/gems/nokogiri-1.18.1-x86_64-linux-gnu/LICENSE.md +9 -0
  142. data/vendor/bundle/ruby/3.4.0/gems/nokogiri-1.18.1-x86_64-linux-gnu/README.md +293 -0
  143. data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.1/CHANGELOG.md +491 -0
  144. data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.1/LICENSE.txt +22 -0
  145. data/vendor/bundle/ruby/3.4.0/gems/public_suffix-6.0.1/README.md +222 -0
  146. data/vendor/bundle/ruby/3.4.0/gems/racc-1.8.1/ChangeLog +846 -0
  147. data/vendor/bundle/ruby/3.4.0/gems/racc-1.8.1/README.ja.rdoc +58 -0
  148. data/vendor/bundle/ruby/3.4.0/gems/racc-1.8.1/README.rdoc +60 -0
  149. data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.8/CHANGELOG.md +998 -0
  150. data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.8/MIT-LICENSE +20 -0
  151. data/vendor/bundle/ruby/3.4.0/gems/rack-3.1.8/README.md +328 -0
  152. data/vendor/bundle/ruby/3.4.0/gems/rack-session-2.1.0/license.md +72 -0
  153. data/vendor/bundle/ruby/3.4.0/gems/rack-session-2.1.0/readme.md +47 -0
  154. data/vendor/bundle/ruby/3.4.0/gems/rack-test-2.2.0/MIT-LICENSE.txt +20 -0
  155. data/vendor/bundle/ruby/3.4.0/gems/rack-test-2.2.0/README.md +139 -0
  156. data/vendor/bundle/ruby/3.4.0/gems/rails-dom-testing-2.2.0/MIT-LICENSE +23 -0
  157. data/vendor/bundle/ruby/3.4.0/gems/rails-dom-testing-2.2.0/README.md +91 -0
  158. data/vendor/bundle/ruby/3.4.0/gems/rails-html-sanitizer-1.6.2/CHANGELOG.md +255 -0
  159. data/vendor/bundle/ruby/3.4.0/gems/rails-html-sanitizer-1.6.2/MIT-LICENSE +23 -0
  160. data/vendor/bundle/ruby/3.4.0/gems/rails-html-sanitizer-1.6.2/README.md +267 -0
  161. data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/MIT-LICENSE +21 -0
  162. data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/README.rdoc +155 -0
  163. data/vendor/bundle/ruby/3.4.0/gems/rake-13.2.1/rake.gemspec +101 -0
  164. data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/LICENSE +21 -0
  165. data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/README.md +107 -0
  166. data/vendor/bundle/ruby/3.4.0/gems/rake-release-1.3.0/rake-release.gemspec +23 -0
  167. data/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.0/LICENSE.txt +22 -0
  168. data/vendor/bundle/ruby/3.4.0/gems/rexml-3.4.0/README.md +57 -0
  169. data/vendor/bundle/ruby/3.4.0/gems/rspec-3.13.0/LICENSE.md +27 -0
  170. data/vendor/bundle/ruby/3.4.0/gems/rspec-3.13.0/README.md +47 -0
  171. data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/Changelog.md +68 -0
  172. data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/LICENSE.txt +27 -0
  173. data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/README.md +76 -0
  174. data/vendor/bundle/ruby/3.4.0/gems/rspec-collection_matchers-1.2.1/rspec-collection_matchers.gemspec +33 -0
  175. data/vendor/bundle/ruby/3.4.0/gems/rspec-core-3.13.2/Changelog.md +2415 -0
  176. data/vendor/bundle/ruby/3.4.0/gems/rspec-core-3.13.2/LICENSE.md +26 -0
  177. data/vendor/bundle/ruby/3.4.0/gems/rspec-core-3.13.2/README.md +389 -0
  178. data/vendor/bundle/ruby/3.4.0/gems/rspec-expectations-3.13.3/Changelog.md +1352 -0
  179. data/vendor/bundle/ruby/3.4.0/gems/rspec-expectations-3.13.3/LICENSE.md +25 -0
  180. data/vendor/bundle/ruby/3.4.0/gems/rspec-expectations-3.13.3/README.md +326 -0
  181. data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/Changelog.md +73 -0
  182. data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/LICENSE.txt +27 -0
  183. data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/README.md +104 -0
  184. data/vendor/bundle/ruby/3.4.0/gems/rspec-its-2.0.0/rspec-its.gemspec +31 -0
  185. data/vendor/bundle/ruby/3.4.0/gems/rspec-mocks-3.13.2/Changelog.md +1299 -0
  186. data/vendor/bundle/ruby/3.4.0/gems/rspec-mocks-3.13.2/LICENSE.md +25 -0
  187. data/vendor/bundle/ruby/3.4.0/gems/rspec-mocks-3.13.2/README.md +465 -0
  188. data/vendor/bundle/ruby/3.4.0/gems/rspec-support-3.13.2/Changelog.md +408 -0
  189. data/vendor/bundle/ruby/3.4.0/gems/rspec-support-3.13.2/LICENSE.md +23 -0
  190. data/vendor/bundle/ruby/3.4.0/gems/rspec-support-3.13.2/README.md +40 -0
  191. data/vendor/bundle/ruby/3.4.0/gems/securerandom-0.4.1/README.md +72 -0
  192. data/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/LICENSE.md +20 -0
  193. data/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/README.md +45 -0
  194. data/vendor/bundle/ruby/3.4.0/gems/thor-1.3.2/thor.gemspec +33 -0
  195. data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/CHANGELOG.md +410 -0
  196. data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/LICENSE +22 -0
  197. data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/README.md +588 -0
  198. data/vendor/bundle/ruby/3.4.0/gems/typhoeus-1.4.1/typhoeus.gemspec +25 -0
  199. data/vendor/bundle/ruby/3.4.0/gems/tzinfo-2.0.6/LICENSE +19 -0
  200. data/vendor/bundle/ruby/3.4.0/gems/tzinfo-2.0.6/README.md +406 -0
  201. data/vendor/bundle/ruby/3.4.0/gems/uri-1.0.2/README.md +55 -0
  202. data/vendor/bundle/ruby/3.4.0/gems/useragent-0.16.11/LICENSE +20 -0
  203. data/vendor/bundle/ruby/3.4.0/gems/useragent-0.16.11/README.md +42 -0
  204. data/vendor/bundle/ruby/3.4.0/gems/webmock-3.24.0/CHANGELOG.md +2104 -0
  205. data/vendor/bundle/ruby/3.4.0/gems/webmock-3.24.0/LICENSE +20 -0
  206. data/vendor/bundle/ruby/3.4.0/gems/webmock-3.24.0/README.md +1222 -0
  207. data/vendor/bundle/ruby/3.4.0/specifications/actionpack-8.0.1.gemspec +36 -0
  208. data/vendor/bundle/ruby/3.4.0/specifications/actionview-8.0.1.gemspec +33 -0
  209. data/vendor/bundle/ruby/3.4.0/specifications/activemodel-8.0.1.gemspec +26 -0
  210. data/vendor/bundle/ruby/3.4.0/specifications/activesupport-8.0.1.gemspec +38 -0
  211. data/vendor/bundle/ruby/3.4.0/specifications/addressable-2.8.7.gemspec +30 -0
  212. data/vendor/bundle/ruby/3.4.0/specifications/appraisal-2.5.0.gemspec +31 -0
  213. data/vendor/bundle/ruby/3.4.0/specifications/base64-0.2.0.gemspec +23 -0
  214. data/vendor/bundle/ruby/3.4.0/specifications/benchmark-0.4.0.gemspec +23 -0
  215. data/vendor/bundle/ruby/3.4.0/specifications/bigdecimal-3.1.9.gemspec +25 -0
  216. data/vendor/bundle/ruby/3.4.0/specifications/builder-3.3.0.gemspec +22 -0
  217. data/vendor/bundle/ruby/3.4.0/specifications/concurrent-ruby-1.3.5.gemspec +24 -0
  218. data/vendor/bundle/ruby/3.4.0/specifications/connection_pool-2.5.0.gemspec +28 -0
  219. data/vendor/bundle/ruby/3.4.0/specifications/crack-1.0.0.gemspec +27 -0
  220. data/vendor/bundle/ruby/3.4.0/specifications/crass-1.0.6.gemspec +27 -0
  221. data/vendor/bundle/ruby/3.4.0/specifications/diff-lcs-1.5.1.gemspec +37 -0
  222. data/vendor/bundle/ruby/3.4.0/specifications/drb-2.2.1.gemspec +22 -0
  223. data/vendor/bundle/ruby/3.4.0/specifications/erubi-1.13.1.gemspec +29 -0
  224. data/vendor/bundle/ruby/3.4.0/specifications/ethon-0.16.0.gemspec +24 -0
  225. data/vendor/bundle/ruby/3.4.0/specifications/ffi-1.17.1-x86_64-linux-gnu.gemspec +31 -0
  226. data/vendor/bundle/ruby/3.4.0/specifications/hashdiff-1.1.2.gemspec +30 -0
  227. data/vendor/bundle/ruby/3.4.0/specifications/i18n-1.14.6.gemspec +27 -0
  228. data/vendor/bundle/ruby/3.4.0/specifications/json-2.9.1.gemspec +0 -0
  229. data/vendor/bundle/ruby/3.4.0/specifications/logger-1.6.5.gemspec +22 -0
  230. data/vendor/bundle/ruby/3.4.0/specifications/loofah-2.24.0.gemspec +27 -0
  231. data/vendor/bundle/ruby/3.4.0/specifications/minitest-5.25.4.gemspec +31 -0
  232. data/vendor/bundle/ruby/3.4.0/specifications/multi_json-1.15.0.gemspec +26 -0
  233. data/vendor/bundle/ruby/3.4.0/specifications/nokogiri-1.18.1-x86_64-linux-gnu.gemspec +31 -0
  234. data/vendor/bundle/ruby/3.4.0/specifications/public_suffix-6.0.1.gemspec +24 -0
  235. data/vendor/bundle/ruby/3.4.0/specifications/racc-1.8.1.gemspec +28 -0
  236. data/vendor/bundle/ruby/3.4.0/specifications/rack-3.1.8.gemspec +31 -0
  237. data/vendor/bundle/ruby/3.4.0/specifications/rack-session-2.1.0.gemspec +30 -0
  238. data/vendor/bundle/ruby/3.4.0/specifications/rack-test-2.2.0.gemspec +29 -0
  239. data/vendor/bundle/ruby/3.4.0/specifications/rails-dom-testing-2.2.0.gemspec +28 -0
  240. data/vendor/bundle/ruby/3.4.0/specifications/rails-html-sanitizer-1.6.2.gemspec +27 -0
  241. data/vendor/bundle/ruby/3.4.0/specifications/rake-13.2.1.gemspec +26 -0
  242. data/vendor/bundle/ruby/3.4.0/specifications/rake-release-1.3.0.gemspec +26 -0
  243. data/vendor/bundle/ruby/3.4.0/specifications/rexml-3.4.0.gemspec +25 -0
  244. data/vendor/bundle/ruby/3.4.0/specifications/rspec-3.13.0.gemspec +31 -0
  245. data/vendor/bundle/ruby/3.4.0/specifications/rspec-collection_matchers-1.2.1.gemspec +27 -0
  246. data/vendor/bundle/ruby/3.4.0/specifications/rspec-core-3.13.2.gemspec +39 -0
  247. data/vendor/bundle/ruby/3.4.0/specifications/rspec-expectations-3.13.3.gemspec +33 -0
  248. data/vendor/bundle/ruby/3.4.0/specifications/rspec-its-2.0.0.gemspec +27 -0
  249. data/vendor/bundle/ruby/3.4.0/specifications/rspec-mocks-3.13.2.gemspec +33 -0
  250. data/vendor/bundle/ruby/3.4.0/specifications/rspec-support-3.13.2.gemspec +29 -0
  251. data/vendor/bundle/ruby/3.4.0/specifications/securerandom-0.4.1.gemspec +23 -0
  252. data/vendor/bundle/ruby/3.4.0/specifications/thor-1.3.2.gemspec +28 -0
  253. data/vendor/bundle/ruby/3.4.0/specifications/typhoeus-1.4.1.gemspec +24 -0
  254. data/vendor/bundle/ruby/3.4.0/specifications/tzinfo-2.0.6.gemspec +30 -0
  255. data/vendor/bundle/ruby/3.4.0/specifications/uri-1.0.2.gemspec +23 -0
  256. data/vendor/bundle/ruby/3.4.0/specifications/useragent-0.16.11.gemspec +25 -0
  257. data/vendor/bundle/ruby/3.4.0/specifications/webmock-3.24.0.gemspec +45 -0
  258. metadata +208 -70
@@ -10,61 +10,70 @@ describe Acfs::Resource::Validation do
10
10
  context 'with valid attributes' do
11
11
  subject { model }
12
12
 
13
- it { should be_valid }
13
+ it { is_expected.to be_valid }
14
14
  end
15
15
 
16
16
  context 'with invalid attributes' do
17
- let(:params) { {name: 'invname'} }
18
17
  subject { model }
19
18
 
20
- it { should_not be_valid }
19
+ let(:params) { {name: 'invname'} }
20
+
21
+ it { is_expected.not_to be_valid }
21
22
  end
22
23
 
23
24
  context 'on resource with service side errors' do
25
+ subject(:resource) { MyUser.create(params) }
26
+
24
27
  before { Acfs::Stub.enable }
28
+
25
29
  after { Acfs::Stub.disable }
26
30
 
27
31
  before do
28
32
  Acfs::Stub.resource MyUser, :create, return: {errors: {name: ['can\'t be blank']}}, raise: 422
29
33
  end
30
34
 
31
- let(:params) { {} }
32
- let(:resource) { MyUser.create params }
33
- subject { resource }
35
+ let(:params) { {} }
34
36
 
35
- it { should_not be_valid }
37
+ it { is_expected.not_to be_valid }
36
38
 
37
- it 'should not override errors' do
38
- subject.valid?
39
- expect(subject.errors.to_hash).to eq(name: ['can\'t be blank'])
39
+ it 'does not override errors' do
40
+ resource.valid?
41
+ expect(resource.errors.to_hash).to eq(name: ['can\'t be blank'])
40
42
  end
41
43
  end
42
44
  end
43
45
 
44
46
  describe '#errors' do
45
47
  context 'with valid attributes' do
48
+ subject { model.errors }
49
+
46
50
  let(:params) { {name: 'john smith', age: 24} }
51
+
47
52
  before { model.valid? }
48
- subject { model.errors }
49
53
 
50
- it { should be_empty }
54
+ it { is_expected.to be_empty }
51
55
  end
52
56
 
53
57
  context 'with invalid attributes' do
58
+ subject(:errors) { model.errors }
59
+
54
60
  let(:params) { {name: 'john'} }
61
+
55
62
  before { model.valid? }
56
- subject { model.errors }
57
63
 
58
- it { should_not be_empty }
59
- it { should have(2).items }
64
+ it { is_expected.not_to be_empty }
65
+ it { is_expected.to have(2).items }
60
66
 
61
- it 'should contain a list of error messages' do
62
- expect(subject.to_hash).to eq age: ["can't be blank"], name: ['is invalid']
67
+ it 'contains a list of error messages' do
68
+ expect(errors.to_hash).to eq age: ["can't be blank"], name: ['is invalid']
63
69
  end
64
70
  end
65
71
 
66
72
  context 'server side errors' do
73
+ subject { resource.errors.to_hash }
74
+
67
75
  before { Acfs::Stub.enable }
76
+
68
77
  after { Acfs::Stub.disable }
69
78
 
70
79
  before do
@@ -74,7 +83,6 @@ describe Acfs::Resource::Validation do
74
83
 
75
84
  let(:params) { {} }
76
85
  let(:resource) { MyUser.create params }
77
- subject { resource.errors.to_hash }
78
86
 
79
87
  context 'with `field => [messages]` payload' do
80
88
  let(:errors) { {name: ['cannot be blank']} }
@@ -97,33 +105,32 @@ describe Acfs::Resource::Validation do
97
105
  end
98
106
 
99
107
  describe '#save!' do
100
- subject { -> { model.save! } }
108
+ subject(:save) { -> { model.save! } }
109
+
101
110
  before { allow(model).to receive(:operation) }
102
111
 
103
112
  context 'with invalid attributes' do
104
113
  let(:params) { {name: 'john'} }
105
114
 
106
- it { expect { subject.call }.to raise_error Acfs::InvalidResource }
115
+ it { expect { save.call }.to raise_error Acfs::InvalidResource }
107
116
  end
108
117
 
109
118
  context 'on new resource' do
110
- it 'should validate with `create` context' do
119
+ it 'validates with `create` context' do
111
120
  expect(model).to receive(:valid?).with(:create).and_call_original
112
- subject.call
121
+ save.call
113
122
  end
114
123
  end
115
124
 
116
125
  context 'on changed resource' do
117
126
  before { model.loaded! }
127
+
118
128
  let(:model) { super().tap {|m| m.id = 1 } }
119
129
 
120
- it 'should validate with `save` context' do
130
+ it 'validates with `save` context' do
121
131
  expect(model).to receive(:valid?).with(:save).and_call_original
122
- subject.call
132
+ save.call
123
133
  end
124
134
  end
125
135
  end
126
-
127
- describe 'validates with context' do
128
- end
129
136
  end
@@ -13,8 +13,8 @@ describe Acfs::Response::Formats do
13
13
  context 'without Content-Type header' do
14
14
  let(:headers) { {} }
15
15
 
16
- it "should fallback on 'text/plain'" do
17
- expect(response.content_type).to be == Mime[:text]
16
+ it "fallbacks on 'text/plain'" do
17
+ expect(response.content_type).to eq Mime[:text]
18
18
  end
19
19
  end
20
20
 
@@ -22,13 +22,13 @@ describe Acfs::Response::Formats do
22
22
  let(:mime_type) { 'application/json' }
23
23
 
24
24
  describe '#content_type' do
25
- it 'should return Mime::JSON' do
26
- expect(response.content_type).to be == Mime[:json]
25
+ it 'returns Mime::JSON' do
26
+ expect(response.content_type).to eq Mime[:json]
27
27
  end
28
28
  end
29
29
 
30
30
  describe '#json?' do
31
- it 'should return true' do
31
+ it 'returns true' do
32
32
  expect(response).to be_json
33
33
  end
34
34
  end
@@ -37,13 +37,13 @@ describe Acfs::Response::Formats do
37
37
  let(:mime_type) { 'application/json; charset=utf8' }
38
38
 
39
39
  describe '#content_type' do
40
- it 'should return Mime::JSON' do
41
- expect(response.content_type).to be == Mime[:json]
40
+ it 'returns Mime::JSON' do
41
+ expect(response.content_type).to eq Mime[:json]
42
42
  end
43
43
  end
44
44
 
45
45
  describe '#json?' do
46
- it 'should return true' do
46
+ it 'returns true' do
47
47
  expect(response).to be_json
48
48
  end
49
49
  end
@@ -14,18 +14,18 @@ describe Acfs::Response::Status do
14
14
  context 'when given' do
15
15
  let(:status) { 200 }
16
16
 
17
- it 'should return status code' do
18
- expect(response.code).to be == 200
19
- expect(response.status_code).to be == 200
17
+ it 'returns status code' do
18
+ expect(response.code).to eq 200
19
+ expect(response.status_code).to eq 200
20
20
  end
21
21
  end
22
22
 
23
23
  context 'when nil' do
24
24
  let(:status) { nil }
25
25
 
26
- it 'should return zero' do
27
- expect(response.code).to be == 0
28
- expect(response.status_code).to be == 0
26
+ it 'returns zero' do
27
+ expect(response.code).to eq 0
28
+ expect(response.status_code).to eq 0
29
29
  end
30
30
  end
31
31
  end
@@ -33,38 +33,45 @@ describe Acfs::Response::Status do
33
33
  describe '#success?' do
34
34
  context 'with success status code' do
35
35
  let(:status) { 200 }
36
+
36
37
  it { expect(response).to be_success }
37
38
  end
38
39
 
39
40
  context 'with error status code' do
40
41
  let(:status) { 500 }
41
- it { expect(response).to_not be_success }
42
+
43
+ it { expect(response).not_to be_success }
42
44
  end
43
45
 
44
46
  context 'with zero status code' do
45
47
  let(:status) { nil }
46
- it { expect(response).to_not be_success }
48
+
49
+ it { expect(response).not_to be_success }
47
50
  end
48
51
  end
49
52
 
50
53
  describe '#modified?' do
51
54
  context 'with success status code' do
52
55
  let(:status) { 200 }
56
+
53
57
  it { expect(response).to be_modified }
54
58
  end
55
59
 
56
60
  context 'with not modified status code' do
57
61
  let(:status) { 304 }
58
- it { expect(response).to_not be_modified }
62
+
63
+ it { expect(response).not_to be_modified }
59
64
  end
60
65
 
61
66
  context 'with error status code' do
62
67
  let(:status) { 500 }
68
+
63
69
  it { expect(response).to be_modified }
64
70
  end
65
71
 
66
72
  context 'with zero status code' do
67
73
  let(:status) { nil }
74
+
68
75
  it { expect(response).to be_modified }
69
76
  end
70
77
  end
@@ -30,42 +30,42 @@ class NotificationCollector
30
30
  end
31
31
  end
32
32
 
33
- describe ::Acfs::Runner do
34
- let(:adapter) { ::NullAdapter.new }
35
- let(:runner) { ::Acfs::Runner.new adapter }
33
+ describe Acfs::Runner do
34
+ let(:adapter) { NullAdapter.new }
35
+ let(:runner) { Acfs::Runner.new adapter }
36
36
  let(:collector) { NotificationCollector.new }
37
37
  let(:collector2) { NotificationCollector.new }
38
38
 
39
39
  after do
40
- ::ActiveSupport::Notifications.notifier = \
41
- ::ActiveSupport::Notifications::Fanout.new
40
+ ActiveSupport::Notifications.notifier =
41
+ ActiveSupport::Notifications::Fanout.new
42
42
  end
43
43
 
44
44
  describe '#instrumentation' do
45
45
  before do
46
- ::ActiveSupport::Notifications.subscribe(/^acfs\.runner/, collector)
47
- ::ActiveSupport::Notifications.subscribe(/^acfs\.operation/, collector2)
46
+ ActiveSupport::Notifications.subscribe(/^acfs\.runner/, collector)
47
+ ActiveSupport::Notifications.subscribe(/^acfs\.operation/, collector2)
48
48
  end
49
49
 
50
50
  describe '#process' do
51
- it 'should trigger event' do
52
- runner.process ::Acfs::Operation.new MyUser, :read, params: {id: 0}
51
+ it 'triggers event' do
52
+ runner.process Acfs::Operation.new MyUser, :read, params: {id: 0}
53
53
  expect(collector.events).to have(1).items
54
54
  expect(collector2.events).to have(1).items
55
55
  end
56
56
  end
57
57
 
58
58
  describe '#run' do
59
- it 'should trigger event' do
60
- runner.run ::Acfs::Operation.new MyUser, :read, params: {id: 0}
59
+ it 'triggers event' do
60
+ runner.run Acfs::Operation.new MyUser, :read, params: {id: 0}
61
61
  expect(collector.events).to have(1).items
62
62
  expect(collector2.events).to have(0).items
63
63
  end
64
64
  end
65
65
 
66
66
  describe '#enqueue' do
67
- it 'should trigger event' do
68
- runner.enqueue ::Acfs::Operation.new MyUser, :read, params: {id: 0}
67
+ it 'triggers event' do
68
+ runner.enqueue Acfs::Operation.new MyUser, :read, params: {id: 0}
69
69
  expect(collector.events).to have(1).items
70
70
  expect(collector2.events).to have(0).items
71
71
  end
@@ -76,19 +76,21 @@ describe ::Acfs::Runner do
76
76
  before do
77
77
  expect_any_instance_of(UserService).to receive(:prepare).and_return nil
78
78
  end
79
- it 'it should not do requests when a middleware aborted' do
80
- expect(adapter).to_not receive :run
81
- runner.run ::Acfs::Operation.new MyUser, :read, params: {id: 0}
79
+
80
+ it 'does not do requests when a middleware aborted' do
81
+ expect(adapter).not_to receive :run
82
+ runner.run Acfs::Operation.new MyUser, :read, params: {id: 0}
82
83
  end
83
84
  end
84
85
 
85
86
  describe '#enqueue' do
86
87
  before do
87
- expect_any_instance_of(UserService).to receive(:prepare).and_return nil
88
+ expect_any_instance_of(UserService).to receive(:prepare).and_return(nil)
88
89
  end
89
- it 'it should not do requests when a middleware aborted' do
90
- expect(adapter).to_not receive :queue
91
- runner.enqueue ::Acfs::Operation.new MyUser, :read, params: {id: 0}
90
+
91
+ it 'does not do requests when a middleware aborted' do
92
+ expect(adapter).not_to receive(:queue)
93
+ runner.enqueue Acfs::Operation.new MyUser, :read, params: {id: 0}
92
94
  runner.start
93
95
  end
94
96
  end
@@ -13,19 +13,19 @@ describe Acfs::Service::Middleware do
13
13
  describe '.use' do
14
14
  let(:options) { {abc: 'cde'} }
15
15
 
16
- it 'should add middleware to list' do
16
+ it 'adds middleware to list' do
17
17
  srv_class.use middleware
18
18
 
19
19
  expect(srv_class.middleware).to include(middleware)
20
20
  end
21
21
 
22
- it 'should add middleware to stack' do
22
+ it 'adds middleware to stack' do
23
23
  srv_class.use middleware
24
24
 
25
25
  expect(srv_class.middleware.build(1)).to be_a(middleware)
26
26
  end
27
27
 
28
- it 'should instantiate middleware object' do
28
+ it 'instantiates middleware object' do
29
29
  expect(middleware).to receive(:new).with(anything, options)
30
30
 
31
31
  srv_class.use middleware, options
@@ -14,23 +14,24 @@ describe Acfs::Service do
14
14
  describe '#initialize' do
15
15
  let(:options) { {path: 'abc', key: 'value'} }
16
16
 
17
- it 'should set options' do
17
+ it 'sets options' do
18
18
  expect(service.options).to eq(options)
19
19
  end
20
20
  end
21
21
 
22
22
  describe '#location' do
23
23
  let(:resource) { Class.new }
24
+
24
25
  before { allow(resource).to receive(:location_default_path, &proc {|_a, p| p }) }
25
26
 
26
- it 'should extract resource path name from given class' do
27
+ it 'extracts resource path name from given class' do
27
28
  expect(service.location(resource).to_s).to eq('/classes')
28
29
  end
29
30
 
30
31
  context 'with path options' do
31
32
  let(:options) { {path: 'abc'} }
32
33
 
33
- it 'should have custom resource path' do
34
+ it 'has custom resource path' do
34
35
  expect(service.location(resource).to_s).to eq('/abc')
35
36
  end
36
37
  end
@@ -41,7 +42,7 @@ describe Acfs::Service do
41
42
  Acfs::Configuration.current.locate :test, 'http://abc.de/api/v1'
42
43
  end
43
44
 
44
- it 'should return configured URI for service' do
45
+ it 'returns configured URI for service' do
45
46
  expect(srv_class.base_url).to eq('http://abc.de/api/v1')
46
47
  end
47
48
  end
@@ -12,6 +12,7 @@ describe Acfs::SingletonResource do
12
12
  end
13
13
 
14
14
  let(:action) { ->(cb) { model.find(&cb) } }
15
- it_should_behave_like 'a query method with multi-callback support'
15
+
16
+ it_behaves_like 'a query method with multi-callback support'
16
17
  end
17
18
  end