adequate_serialization 1.0.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/Gemfile.lock +3 -1
- data/adequate_serialization.gemspec +2 -0
- data/lib/adequate_serialization.rb +14 -0
- data/lib/adequate_serialization/rails/cache_refresh.rb +1 -1
- data/lib/adequate_serialization/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85146c58398835d031d5a5f1acf857314053bd3a3eeef74a9a805c01b595dd8d
|
4
|
+
data.tar.gz: fe2b4c681f16af90ee97689fffb85d6dba5444de178bfd6b2a8eba97cbf9b62c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c885c5465c961352409433e327baf8b6a1983b7a0a0342c74faa69446cc1ea2acc3ad616e4621f4ed601e40182fba843cabec4f52e6a1869471824887061b5d
|
7
|
+
data.tar.gz: 312bea7bb4ea77435edad2131d085a28a7a709ec01ee737558c1ba37191d5f9bf97f02d174ab457b26390bbe7875b090cbf283389122f15b231ef58c60be79ac
|
data/CHANGELOG.md
CHANGED
@@ -6,22 +6,44 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [2.0.0] - 2019-12-31
|
10
|
+
|
11
|
+
### Added
|
12
|
+
|
13
|
+
- The `oj` dependency.
|
14
|
+
- We now automatically bust caches using a background job on a many->one relationship.
|
15
|
+
- Add the ability to configure the ActiveJob queue that's used like so:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
AdequateSerialization.configure do |config|
|
19
|
+
config.active_job_queue = :low
|
20
|
+
end
|
21
|
+
```
|
22
|
+
|
9
23
|
## [1.0.1] - 2019-12-31
|
24
|
+
|
10
25
|
### Changed
|
26
|
+
|
11
27
|
- Fix up Ruby 2.7 warnings.
|
12
28
|
|
13
29
|
## [1.0.0] - 2019-03-25
|
30
|
+
|
14
31
|
### Added
|
32
|
+
|
15
33
|
- The ability to define serializers inline in the object they're serializing.
|
16
34
|
|
17
35
|
### Changed
|
36
|
+
|
18
37
|
- Renamed the `AdequateSerialization::Steps::PassthroughStep` class to just `AdequateSerialization::Steps::Step`.
|
19
38
|
|
20
39
|
### Removed
|
40
|
+
|
21
41
|
- `AdequateSerialization.hook_into_rails!` is now no longer necessary as we assume you want to if `::Rails` is defined.
|
22
42
|
|
23
43
|
## [0.1.1] - 2018-08-30
|
44
|
+
|
24
45
|
### Changed
|
46
|
+
|
25
47
|
- No longer trigger another query when the `ActiveRecord` relation being serialized isn't loaded.
|
26
48
|
|
27
49
|
[unreleased]: https://github.com/CultureHQ/adequate_serialization/compare/v1.0.1...HEAD
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
adequate_serialization (
|
4
|
+
adequate_serialization (2.0.0)
|
5
|
+
oj (~> 3.10)
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: https://rubygems.org/
|
@@ -91,6 +92,7 @@ GEM
|
|
91
92
|
nio4r (2.5.2)
|
92
93
|
nokogiri (1.10.7)
|
93
94
|
mini_portile2 (~> 2.4.0)
|
95
|
+
oj (3.10.0)
|
94
96
|
parallel (1.19.1)
|
95
97
|
parser (2.6.5.0)
|
96
98
|
ast (~> 2.4.0)
|
@@ -21,6 +21,8 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
|
+
spec.add_dependency 'oj', '~> 3.10'
|
25
|
+
|
24
26
|
spec.add_development_dependency 'bundler', '~> 2'
|
25
27
|
spec.add_development_dependency 'bundler-audit', '~> 0.6'
|
26
28
|
spec.add_development_dependency 'minitest', '~> 5'
|
@@ -1,11 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'oj'
|
4
|
+
|
3
5
|
module AdequateSerialization
|
4
6
|
class Error < StandardError
|
5
7
|
def initialize(message)
|
6
8
|
super(message.gsub("\n", ' '))
|
7
9
|
end
|
8
10
|
end
|
11
|
+
|
12
|
+
class << self
|
13
|
+
attr_accessor :active_job_queue
|
14
|
+
|
15
|
+
def configure
|
16
|
+
yield self
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
self.active_job_queue = :default
|
9
21
|
end
|
10
22
|
|
11
23
|
require 'adequate_serialization/attribute'
|
@@ -30,4 +42,6 @@ if defined?(Rails)
|
|
30
42
|
Serializer.singleton_class.prepend(CacheBusting)
|
31
43
|
ActiveRecord::Base.include(Serializable)
|
32
44
|
end
|
45
|
+
|
46
|
+
Oj.optimize_rails
|
33
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adequate_serialization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Deisz
|
@@ -10,6 +10,20 @@ bindir: exe
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2019-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: oj
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.10'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.10'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|