Skip to content

Releases: yosiat/panko_serializer

v0.6.0

26 Aug 11:11
Compare
Choose a tag to compare

Changes

  • Faster to object serialization - until this version we were serializing to JSON and then using Oj to deserialize from JSON to object, the new approach is much faster - details in this PR - #36

v0.5.10

20 Apr 18:20
Compare
Choose a tag to compare

Changes

  • Support ruby 2.3.7 [issue #39]
  • Internal code cleanup
  • CI: test against ruby 2.3.8, 2.5.5 and 2.6.3 with rails 4.2, 5.2 and 6.0.0beta3

v0.5.9

05 Jan 14:06
Compare
Choose a tag to compare

Changes

  • Updating gemspec to include links to various links - source code uri, issues, documentation, release notes, etc.

v0.5.8

05 Jan 14:04
Compare
Choose a tag to compare

Changes

  • Bug fix for Rails 4.2 and dirty attributes - Thanks @palkan - Pull Request
  • Code cleanups using Rubocop, Clang-Formatter and C compiler warnings.

v0.5.7

25 Nov 21:45
Compare
Choose a tag to compare

Changes

  • Support Oj 3.7.* instead of 3.6.*

v0.5.6

25 Oct 10:25
Compare
Choose a tag to compare

Changes

this version includes changes from 0.5.3 to 0.5.6 - the versions between had small code cleanup.

  • Update microbenchmarks to latest versions of Ruby, Rails, AMS and Panko
  • Fix hash support in Panko::Response report in #32
  • Exposing milliseconds in ISO8601 date strings

v0.5.3

08 Sep 16:21
Compare
Choose a tag to compare

Changes

this version includes changes from 0.5.0 to 0.5.3

  • Serialize json dates correctly - Until 0.5.3 we serialized dates as ISO8601 with milliseconds since this version we will serialize milliseconds as well. example: we serialized 2017-03-04T12:45:23Z instead of 2017-03-04T12:45:23.000Z
  • Handling concurrent use of the same serializer - Panko re-uses serializers for has-one/has-many associations between runs - which can cause a bug in concurrent serialization
  • Deeply nesting context and scope - passing MySerializer.new(user, scope: current_user) will pass the scope to all nested associations. (same as context)
  • Code cleanups

v0.4.4

23 Jun 11:25
Compare
Choose a tag to compare

Changes

  • Rubocop fixes to all code
  • Panko::Response enchantments - handling array and nice "DSL"

Panko::Response.create

Panko::Response is a nice utility, but building nested objects with JSON values can be really ugly and fast.

Let's take this example (from specs):

Panko::Response.new([
  data: Panko::Response.new(
    json_data: Panko::JsonValue.from({ a: 1 }.to_json),
    foos: Panko::ArraySerializer.new(Foo.all, each_serializer: FooSerializer),
    foo: Panko::JsonValue.from(FooSerializer.new.serialize_to_json(Foo.first)),
  )
])

Will be changed to:

Panko::Response.create do |t|
  [
    {
      data: t.value(
        json_data: t.json({ a: 1 }.to_json),
        foos: t.array_serializer(Foo.all, FooSerializer),
        foo: t.serializer(Foo.first, FooSerializer)
      )
    }
  ]
end

v0.4.3

23 Jun 11:20
Compare
Choose a tag to compare

Changes

  • Faster time type casting - #31

v0.4.2

02 Jun 10:12
Compare
Choose a tag to compare

Changes

  • Handle typecasting of booleans when they are numbers (0 / 1) which happen in MySQL - #29