acfs 1.6.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.
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
@@ -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 'should have attribute list' do
12
+ it 'has attribute list' do
13
13
  expect(model.new.attributes).to include(:name)
14
14
  end
15
15
 
16
- it 'should set default attributes' do
17
- expect(model.new.name).to be == 'John'
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 'should set dynamic default attributes' do
27
- expect(model.new.mail).to be == 'John@srv.tld'
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 'should return hash of all attributes' do
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 'should update attributes' do
58
- should change(m, :attributes)
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 { should_not change(m, :attributes) }
67
- its(:call) { should eq false }
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 { should_not raise_error }
74
+ it { expect { action }.not_to raise_error }
74
75
 
75
- it 'should update known attributes and store unknown' do
76
- should change(m, :attributes)
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 { should raise_error(ArgumentError, /unknown attribute/i) }
85
+ it { expect { action }.to raise_error(ArgumentError, /unknown attribute/i) }
85
86
 
86
87
  it do
87
88
  expect do
88
- subject.call
89
+ action
89
90
  rescue StandardError
90
91
  true
91
- end.to_not change(m, :attributes)
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 'should return value' do
101
+ it 'returns value' do
101
102
  mo = model.new
102
103
  mo.name = 'Paul'
103
104
 
104
- expect(mo.name).to be == 'Paul'
105
+ expect(mo.name).to eq 'Paul'
105
106
  end
106
107
 
107
- it 'should return default value' do
108
- expect(model.new.name).to be == 'John'
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 'should set value' do
119
+ it 'sets value' do
119
120
  o = model.new
120
121
  o.name = 'Paul'
121
122
 
122
- expect(o.name).to be == 'Paul'
123
+ expect(o.name).to eq 'Paul'
123
124
  end
124
125
 
125
- it 'should update attributes hash' do
126
+ it 'updates attributes hash' do
126
127
  o = model.new
127
128
  o.name = 'Johannes'
128
129
 
129
- expect(o.attributes['name']).to be == 'Johannes'
130
+ expect(o.attributes['name']).to eq 'Johannes'
130
131
  end
131
132
 
132
- it 'should cast values' do
133
+ it 'casts values' do
133
134
  o = model.new
134
135
  o.age = '28'
135
136
 
136
- expect(o.age).to be == 28
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 'should add an attribute to model attribute list' do
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 'should accept a default value' do
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 'should accept a symbolic type' do
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 'should accept a class type' do
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.is_a? ActiveModel::Dirty
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
- it { expect(user).to_not be_changed }
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).to_not be_changed }
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).to_not be_changed }
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 'should allow to set attributes with initializer' do
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 'should raise error when attributes with private setters are given' do
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
- subject { model.new.persisted? }
32
- it 'should be false' do
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).to_not be_loaded }
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 'should return URL' do
16
- expect(model.url).to be == 'http://users.example.org/users'
16
+ it 'returns URL' do
17
+ expect(model.url).to eq 'http://users.example.org/users'
17
18
  end
18
19
 
19
- it 'should return URL with id path part if specified' do
20
- expect(model.url(5)).to be == 'http://users.example.org/users/5'
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 'should replace placeholder' do
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 'should raise an error if attribute is missing' do
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
- should eq 'http://users.example.org/users/:user_id/sessions'
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
- its(:raw_uri) { should eq 'http://users.example.org/sessions' }
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
- its(:raw_uri) { should eq 'http://users.example.org/sessions/:id' }
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 { subject }.to raise_error ArgumentError, /update.*disabled/
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
- should eq 'http://users.example.org/users/:user_id/sessions/del/:id'
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 'should return nil' do
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 'should return resource URL' do
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 'should return nil' do
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 "should return resource's URL" do
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 "should return resource's URL" do
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