simply_serializable 1.4.2 → 1.5.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: 904754ff4c6b90c64926fe63ccbb0480c0fca44f8c0ac0116164f8e09337dd4a
4
- data.tar.gz: 0bb25385d89d6385e2df827f2bbad3d8eecafeb6bbd7c7e241a7bf2fb53e3f4d
3
+ metadata.gz: 62f01e9abd2418de7e70f630c9fe9357f185918353a630eea112a4f6135dc3d5
4
+ data.tar.gz: a5f53ff65fa05b01a720e3ab64e1a06d4a4cbeca873671b8933bfda62ea0aaf5
5
5
  SHA512:
6
- metadata.gz: 9f7249203b26e89bceb603e51a85e3462b7cdafc0ab44c8e3fd996b3e73abe207c23314a3fc6ea9b43cd6c21bc1c9c19542b60197b0d437d5970d6839f9fe005
7
- data.tar.gz: 1d19045c1a57b28195ff953ee2187b8e4f9427f74265ea7a485e581d890fd81281d8c91659eeaa5cfe6d1066c2be5e16622c64962d8964ac55ce09d9ee6bc365
6
+ metadata.gz: '009c25323d80cfe57569f4c0d730a9d9df350b3368facb4ac07dbb75a36d438efe04b2e72d45205e0f772d5fcca5ae103a9e17fbdd1a67665760be4d6db01ec0'
7
+ data.tar.gz: 95d210802b7bd4c85b1287aeeb8d3609c2f0823cb5e2b9a6af85677d3a8679c06459a8049ee6508c5273ab78da6a2eb4990dbe8c8d7793c9ae6099b536aed524
data/.gitignore CHANGED
@@ -10,6 +10,8 @@
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
12
 
13
+ .ruby-version
14
+
13
15
  .byebug_history
14
16
 
15
17
  .DS_Store
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simply_serializable (1.4.2)
4
+ simply_serializable (1.5.0)
5
5
  fingerprintable (>= 1.2.1)
6
6
 
7
7
  GEM
@@ -22,7 +22,9 @@ GEM
22
22
  fingerprintable (1.2.1)
23
23
  colorize
24
24
  json (2.2.0)
25
- rake (10.5.0)
25
+ pd_ruby (0.2.3)
26
+ colorize
27
+ rake (13.0.1)
26
28
  rspec (3.8.0)
27
29
  rspec-core (~> 3.8.0)
28
30
  rspec-expectations (~> 3.8.0)
@@ -55,9 +57,10 @@ DEPENDENCIES
55
57
  bundler (~> 2.0)
56
58
  byebug
57
59
  coveralls
58
- rake (~> 10.0)
60
+ pd_ruby
61
+ rake (~> 13.0)
59
62
  rspec (~> 3.0)
60
63
  simply_serializable!
61
64
 
62
65
  BUNDLED WITH
63
- 2.0.2
66
+ 2.1.4
@@ -4,28 +4,28 @@ module SimplySerializable
4
4
  module Mixin
5
5
  module ClassMethods
6
6
  def inherited(subclass)
7
- subclass.serialize(**serializable_config)
7
+ subclass.simply_serialize(**simply_serializable_config)
8
8
  super(subclass)
9
9
  end
10
10
 
11
- def serialize(attributes: [], except: nil, only: nil, **keywords)
12
- serializable_config[:attributes] = serializable_config[:attributes] |= attributes
11
+ def simply_serialize(attributes: [], except: nil, only: nil, **keywords)
12
+ simply_serializable_config[:attributes] = simply_serializable_config[:attributes] |= attributes
13
13
 
14
14
  unless except.nil?
15
- serializable_config[:except] ||= []
16
- serializable_config[:except] = serializable_config[:except] |= except
15
+ simply_serializable_config[:except] ||= []
16
+ simply_serializable_config[:except] = simply_serializable_config[:except] |= except
17
17
  end
18
18
 
19
19
  unless only.nil?
20
- serializable_config[:only] ||= []
21
- serializable_config[:only] = serializable_config[:only] |= only
20
+ simply_serializable_config[:only] ||= []
21
+ simply_serializable_config[:only] = simply_serializable_config[:only] |= only
22
22
  end
23
23
 
24
- serializable_config.merge!(keywords)
24
+ simply_serializable_config.merge!(keywords)
25
25
  end
26
26
 
27
- def serializable_config
28
- @serializable_config ||= {
27
+ def simply_serializable_config
28
+ @simply_serializable_config ||= {
29
29
  attributes: [],
30
30
  except: nil,
31
31
  only: nil
@@ -38,13 +38,13 @@ module SimplySerializable
38
38
  base.extend(ClassMethods)
39
39
  end
40
40
 
41
- def serialize(cache: {}, **options)
42
- serializer(cache: cache, **options).serialize
41
+ def simply_serialize(cache: {}, **options)
42
+ simply_serializer(cache: cache, **options).serialize
43
43
  end
44
44
 
45
- def serializer(cache: {}, **options)
45
+ def simply_serializer(cache: {}, **options)
46
46
  Serializer.new(
47
- **self.class.serializable_config.merge(
47
+ **self.class.simply_serializable_config.merge(
48
48
  options
49
49
  ).merge(
50
50
  cache: cache,
@@ -53,8 +53,8 @@ module SimplySerializable
53
53
  )
54
54
  end
55
55
 
56
- def serializable_id
57
- serializer.id
56
+ def simply_serializable_id
57
+ simply_serializer.id
58
58
  end
59
59
  end
60
60
  end
@@ -1,3 +1,3 @@
1
1
  module SimplySerializable
2
- VERSION = "1.4.2"
2
+ VERSION = "1.5.0"
3
3
  end
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'bundler', '~> 2.0'
31
31
  spec.add_development_dependency 'byebug', '>= 0'
32
32
  spec.add_development_dependency 'coveralls', '>= 0'
33
- spec.add_development_dependency 'rake', '~> 10.0'
33
+ spec.add_development_dependency 'pd_ruby'
34
+ spec.add_development_dependency 'rake', '~> 13.0'
34
35
  spec.add_development_dependency 'rspec', '~> 3.0'
35
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simply_serializable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Jackson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-27 00:00:00.000000000 Z
11
+ date: 2020-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fingerprintable
@@ -94,20 +94,34 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pd_ruby
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rake
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - "~>"
102
116
  - !ruby/object:Gem::Version
103
- version: '10.0'
117
+ version: '13.0'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
- version: '10.0'
124
+ version: '13.0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rspec
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -169,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
183
  - !ruby/object:Gem::Version
170
184
  version: '0'
171
185
  requirements: []
172
- rubygems_version: 3.0.4
186
+ rubygems_version: 3.0.3
173
187
  signing_key:
174
188
  specification_version: 4
175
189
  summary: Simply Serializable makes it easy to serialize any object.