shreddies 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebd69b48f96960924658b650a604e9ca7795a2589d5662578ee1834feda91a1c
4
- data.tar.gz: 2f46df7d1d6103ac1ffab0439f23216ebb665c9ba13bc5e44693587797cecdcf
3
+ metadata.gz: f06b41abce0a2a20c7d9166746068b2522439de93081649a5e174e3cc6886d00
4
+ data.tar.gz: f5625641c4f0a4a713f40df3ccb73424bcccaac864dc0f5ab678f662c82bd0e2
5
5
  SHA512:
6
- metadata.gz: 2552f5b23549788e298ff8638750da0dbcb19646ef3926d1bad0017bf97ee07cdd10fbc26b76acc55161ca7336985f158be44fb76dbe15a61e6b0074a2f1528b
7
- data.tar.gz: 24868b411bd1ff05d95d1d2014961cedeebccb7ac69e0d9901d0572d277f37721716c712cbedf8a9cc123bc26a6aaf74d4cf72200006ef41d56a9d8337386a8a
6
+ metadata.gz: b48f382e57de7a13633c182d03a0c323322ff24f2509487ea015cdde536751230800d9c18c9ef29ca473a6d81c6ad78ba7b333783327058804338fbb8bc06005
7
+ data.tar.gz: dc7cf7b969beb3811c47ae10fb40e1baa2edb9dd1e8b6fce5ec3f3b0df1d9a6c4bdf7884c42db1ce2aa143910bd97ca829624af606dfbcd11ccae1b287f5453e
data/Gemfile.lock CHANGED
@@ -8,30 +8,29 @@ PATH
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (6.1.4.1)
12
- actionview (= 6.1.4.1)
13
- activesupport (= 6.1.4.1)
14
- rack (~> 2.0, >= 2.0.9)
11
+ actionpack (7.0.1)
12
+ actionview (= 7.0.1)
13
+ activesupport (= 7.0.1)
14
+ rack (~> 2.0, >= 2.2.0)
15
15
  rack-test (>= 0.6.3)
16
16
  rails-dom-testing (~> 2.0)
17
17
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
- actionview (6.1.4.1)
19
- activesupport (= 6.1.4.1)
18
+ actionview (7.0.1)
19
+ activesupport (= 7.0.1)
20
20
  builder (~> 3.1)
21
21
  erubi (~> 1.4)
22
22
  rails-dom-testing (~> 2.0)
23
23
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
- activemodel (6.1.4.1)
25
- activesupport (= 6.1.4.1)
26
- activerecord (6.1.4.1)
27
- activemodel (= 6.1.4.1)
28
- activesupport (= 6.1.4.1)
29
- activesupport (6.1.4.1)
24
+ activemodel (7.0.1)
25
+ activesupport (= 7.0.1)
26
+ activerecord (7.0.1)
27
+ activemodel (= 7.0.1)
28
+ activesupport (= 7.0.1)
29
+ activesupport (7.0.1)
30
30
  concurrent-ruby (~> 1.0, >= 1.0.2)
31
31
  i18n (>= 1.6, < 2)
32
32
  minitest (>= 5.1)
33
33
  tzinfo (~> 2.0)
34
- zeitwerk (~> 2.3)
35
34
  autotest-suffix (1.1.0)
36
35
  builder (3.2.4)
37
36
  combustion (1.3.5)
@@ -41,14 +40,14 @@ GEM
41
40
  concurrent-ruby (1.1.9)
42
41
  crass (1.0.6)
43
42
  erubi (1.10.0)
44
- i18n (1.8.11)
43
+ i18n (1.9.1)
45
44
  concurrent-ruby (~> 1.0)
46
- loofah (2.12.0)
45
+ loofah (2.13.0)
47
46
  crass (~> 1.0.2)
48
47
  nokogiri (>= 1.5.9)
49
48
  method_source (1.0.0)
50
- mini_portile2 (2.6.1)
51
- minitest (5.14.4)
49
+ mini_portile2 (2.7.1)
50
+ minitest (5.15.0)
52
51
  minitest-autotest (1.1.1)
53
52
  minitest-server (~> 1.0)
54
53
  path_expander (~> 1.0)
@@ -56,8 +55,8 @@ GEM
56
55
  minitest (>= 4, < 6)
57
56
  minitest-server (1.0.6)
58
57
  minitest (~> 5.0)
59
- nokogiri (1.12.5)
60
- mini_portile2 (~> 2.6.1)
58
+ nokogiri (1.13.1)
59
+ mini_portile2 (~> 2.7.0)
61
60
  racc (~> 1.4)
62
61
  path_expander (1.1.0)
63
62
  racc (1.6.0)
@@ -69,18 +68,19 @@ GEM
69
68
  nokogiri (>= 1.6)
70
69
  rails-html-sanitizer (1.4.2)
71
70
  loofah (~> 2.3)
72
- railties (6.1.4.1)
73
- actionpack (= 6.1.4.1)
74
- activesupport (= 6.1.4.1)
71
+ railties (7.0.1)
72
+ actionpack (= 7.0.1)
73
+ activesupport (= 7.0.1)
75
74
  method_source
76
- rake (>= 0.13)
75
+ rake (>= 12.2)
77
76
  thor (~> 1.0)
77
+ zeitwerk (~> 2.5)
78
78
  rake (13.0.6)
79
79
  sqlite3 (1.4.2)
80
- thor (1.1.0)
80
+ thor (1.2.1)
81
81
  tzinfo (2.0.4)
82
82
  concurrent-ruby (~> 1.0)
83
- zeitwerk (2.5.1)
83
+ zeitwerk (2.5.4)
84
84
 
85
85
  PLATFORMS
86
86
  ruby
@@ -10,6 +10,9 @@ module Shreddies
10
10
  serializer = serializer.to_s.safe_constantize
11
11
  elsif serializer.is_a?(Proc)
12
12
  return serializer.call
13
+ elsif serializer.is_a?(Hash)
14
+ options = serializer
15
+ serializer = "#{model_name}Serializer".safe_constantize
13
16
  end
14
17
 
15
18
  serializer ? serializer.render_as_json(self, options) : super
@@ -24,6 +27,9 @@ module Shreddies
24
27
  serializer = serializer.to_s.safe_constantize
25
28
  elsif serializer.is_a?(Proc)
26
29
  return serializer.call
30
+ elsif serializer.is_a?(Hash)
31
+ options = serializer
32
+ serializer = "#{model_name}Serializer".safe_constantize
27
33
  end
28
34
 
29
35
  serializer ? serializer.render_as_json(self, options) : super
@@ -1,3 +1,3 @@
1
1
  module Shreddies
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shreddies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel Moss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-29 00:00:00.000000000 Z
11
+ date: 2022-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  - !ruby/object:Gem::Version
85
85
  version: '0'
86
86
  requirements: []
87
- rubygems_version: 3.2.22
87
+ rubygems_version: 3.3.3
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: Stupid simple Rails model and object serializer