README.md in acfs-1.4.0 vs README.md in acfs-1.5.0

- old
+ new

@@ -8,10 +8,11 @@ Acfs is a library to develop API client libraries for single services within a larger service oriented application. Acfs covers model and service abstraction, convenient query and filter methods, full middleware stack for pre-processing requests and responses on a per service level and automatic request queuing and parallel processing. See Usage for more. + ## Installation Add this line to your application's Gemfile: gem 'acfs', '~> 1.3' @@ -22,10 +23,11 @@ Or install it yourself as: > gem install acfs + ## Usage First you need to define your service(s): ```ruby @@ -143,10 +145,11 @@ @user.changed? # => false @user.persisted? # => true ``` + ## Singleton resources Singletons can be used in Acfs by creating a new resource which inherits from `SingletonResource`: ```ruby @@ -181,10 +184,11 @@ ```ruby my_single = Single.find name: 'Max' Acfs.run # sends GET request with param to /single?name=Max ``` + ## Resource Inheritance 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: @@ -217,10 +221,11 @@ @computer[0].class # => Computer @computer[1].class # => Mac @computer[2].class # => Pc ``` + ## Stubbing You can stub resources in applications using an Acfs service client: ```ruby @@ -277,10 +282,11 @@ Acfs.run # Would have raised Acfs::RealRequestNotAllowedError # Will run real request to user service instead. end ``` + ## Instrumentation Acfs supports [instrumentation via active support][1]. Acfs expose to following events @@ -294,42 +300,22 @@ Read [official guide][2] to see to to subscribe. [1]: http://guides.rubyonrails.org/active_support_instrumentation.html [2]: http://guides.rubyonrails.org/active_support_instrumentation.html#subscribing-to-an-event -## Roadmap -* Update - * Better new? detection eg. storing ETag from request resources. - * Use PATCH for with only changed attributes and `If-Unmodifed-Since` - and `If-Match` header fields if resource was surly loaded from service - and not created with an id (e.g `User.new id: 5, name: "john"`). - * Conflict detection (ETag / If-Unmodified-Since) -* High level features - * Support for custom mime types on client and server side. (`application/vnd.myservice.user.v2+msgpack`) - * Server side components - * Reusing model definitions for generating responses? - * Rails responders providing REST operations with integrated ETag, - Modified Headers, conflict detection, ... -* Documentation - ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 4. Add specs for your feature 5. Implement your feature 6. Commit your changes (`git commit -am 'Add some feature'`) 7. Push to the branch (`git push origin my-new-feature`) 8. Create new Pull Request -## Contributors -* [Nicolas Fricke](https://github.com/nicolas-fricke) -* [Tino Junge](https://github.com/tino-junge) -* [Malte Swart](https://github.com/mswart) - ## License MIT License -Copyright (c) 2013 Jan Graichen. MIT license, see LICENSE for more details. +Copyright (c) 2013-2020 Jan Graichen. MIT license, see LICENSE for more details.