README.md in alba-1.0.0 vs README.md in alba-1.0.1

- old
+ new

@@ -1,30 +1,40 @@ [![Gem Version](https://badge.fury.io/rb/alba.svg)](https://badge.fury.io/rb/alba) -[![Build Status](https://travis-ci.com/okuramasafumi/alba.svg?branch=master)](https://travis-ci.com/okuramasafumi/alba) -[![Coverage Status](https://coveralls.io/repos/github/okuramasafumi/alba/badge.svg?branch=master)](https://coveralls.io/github/okuramasafumi/alba?branch=master) +[![CI](https://github.com/okuramasafumi/alba/actions/workflows/main.yml/badge.svg)](https://github.com/okuramasafumi/alba/actions/workflows/main.yml) +[![codecov](https://codecov.io/gh/okuramasafumi/alba/branch/master/graph/badge.svg?token=3D3HEZ5OXT)](https://codecov.io/gh/okuramasafumi/alba) [![Maintainability](https://api.codeclimate.com/v1/badges/fdab4cc0de0b9addcfe8/maintainability)](https://codeclimate.com/github/okuramasafumi/alba/maintainability) ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/okuramasafumi/alba) ![GitHub](https://img.shields.io/github/license/okuramasafumi/alba) # Alba -`Alba` is the fastest JSON serializer for Ruby. +`Alba` is the fastest JSON serializer for Ruby, JRuby an TruffleRuby. -## Why yet another JSON serializer? +## Discussions -We know that there are several other JSON serializers for Ruby around, but none of them made us satisfied. +Alba uses [GitHub Discussions](https://github.com/okuramasafumi/alba/discussions) to openly discuss the project. -Alba has some advantages over other JSON serializers which we've wanted to have. +If you've already used Alba, please consider posting your thoughts and feelings on [Feedback](https://github.com/okuramasafumi/alba/discussions/categories/feedback). The fact that you enjoy using Alba gives me energy to keep developing Alba! -### Easy to understand +If you have feature requests or interesting ideas, join us with [Ideas](https://github.com/okuramasafumi/alba/discussions/categories/ideas). Let's make Alba even better, together! -DSL is great. It makes the coding experience natural and intuitive. However, remembering lots of DSL requires us a lot of effort. Unfortunately, most of the existing libraries have implemented their features via DSL and it's not easy to understand how they behave entirely. Alba's core DSL are only four (`attributes`, `attribute`, `one` and `many`) so it's easy to understand how to use. +## Why Alba? -### Performance +Because it's fast, flexible and well-maintained! +### Fast + Alba is faster than most of the alternatives. We have a [benchmark](https://github.com/okuramasafumi/alba/tree/master/benchmark). +### Flexible + +Alba provides a small set of DSL to define your serialization logic. It also provides methods you can override to alter and filter serialized hash so that you have full control over the result. + +### Maintained + +Alba is well-maintained and adds features quickly. [Coverage Status](https://coveralls.io/github/okuramasafumi/alba?branch=master) and [CodeClimate Maintainability](https://codeclimate.com/github/okuramasafumi/alba/maintainability) show the code base is quite healthy. + ## Installation Add this line to your application's Gemfile: ```ruby @@ -39,11 +49,11 @@ $ gem install alba ## Supported Ruby versions -Alba supports CRuby 2.5.7 and higher and latest TruffleRuby. +Alba supports CRuby 2.5 and higher and latest JRuby and TruffleRuby. ## Documentation You can find the documentation on [RubyDoc](https://rubydoc.info/github/okuramasafumi/alba). @@ -438,10 +448,14 @@ [key, error.message] end end ``` +### Caching + +Currently, Alba doesn't support caching, primarily due to the behavior of `ActiveRecord::Relation`'s cache. See [the issue](https://github.com/rails/rails/issues/41784). + ## Comparison Alba is faster than alternatives. For a performance benchmark, see https://gist.github.com/okuramasafumi/4e375525bd3a28e4ca812d2a3b3e5829. @@ -454,9 +468,16 @@ ``` ## Why named "Alba"? The name "Alba" comes from "albatross", a kind of birds. In Japanese, this bird is called "Aho-dori", which means "stupid bird". I find it funny because in fact albatrosses fly really fast. I hope Alba looks stupid but in fact it does its job quick. + +## Pioneers + +There are great pioneers in Ruby's ecosystem which does basically the same thing as Alba does. To name a few: + +* [ActiveModelSerializers](https://github.com/rails-api/active_model_serializers) a.k.a AMS, the most famous implementation of JSON serializer for Ruby +* [Blueprinter](https://github.com/procore/blueprinter) shares some concepts with Alba ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.