surrealist 1.3.4 → 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/.rubocop.yml +29 -24
- data/.travis.yml +3 -5
- data/Gemfile +3 -3
- data/README.md +3 -3
- data/Rakefile +3 -1
- data/benchmarks/surrealist_vs_ams.rb +3 -3
- data/gemfiles/activerecord42.gemfile +1 -1
- data/lib/surrealist/carrier.rb +1 -1
- data/lib/surrealist/hash_utils.rb +7 -6
- data/lib/surrealist/instance_methods.rb +4 -4
- data/lib/surrealist/serializer.rb +3 -3
- data/lib/surrealist/string_utils.rb +2 -2
- data/lib/surrealist/version.rb +1 -1
- data/lib/surrealist/wrapper.rb +3 -3
- data/lib/surrealist.rb +6 -6
- data/surrealist.gemspec +7 -7
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a95bb3a7fc605daa57ca534526272f1b07c213955a27d3e0ece8aed665feb01
|
4
|
+
data.tar.gz: 2a7a0506b60272f0c4e48fd05ccf2ec3f7ca26ae48ad02fab3228fe654b8cfa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ead5a826a27d9947b642e4e0a1119798899df0d2fb9868b171e15219551fb7934fae2d0e628091ec22b17706ab447e9d0c90cd1e523fa859034b28f31a1b5520
|
7
|
+
data.tar.gz: 2db98f48230a322fc153f787cb33b4486c796473b9ceb653eb75a703624a35ca2e1b7ad72457bcd16533ef07f516c53c1ff984d81f0e7d22cbcb6c66909999ba
|
data/.rubocop.yml
CHANGED
@@ -1,27 +1,29 @@
|
|
1
1
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
2
|
+
TargetRubyVersion: 2.5
|
3
|
+
NewCops: enable
|
4
|
+
SuggestExtensions: false
|
3
5
|
Exclude:
|
4
6
|
- './gemfiles/*gemfile'
|
5
7
|
- './tmp/*'
|
6
8
|
|
7
|
-
Documentation:
|
9
|
+
Style/Documentation:
|
8
10
|
Exclude:
|
9
11
|
- benchmarks/*rb
|
10
12
|
- spec/**/*rb
|
11
13
|
|
12
14
|
# Layout
|
13
15
|
|
14
|
-
Layout/
|
16
|
+
Layout/ParameterAlignment:
|
15
17
|
Enabled: true
|
16
18
|
|
17
19
|
Layout/EmptyLineBetweenDefs:
|
18
20
|
Exclude:
|
19
21
|
- spec/**/*rb
|
20
22
|
|
21
|
-
Layout/
|
23
|
+
Layout/FirstArrayElementIndentation:
|
22
24
|
EnforcedStyle: consistent
|
23
25
|
|
24
|
-
Layout/
|
26
|
+
Layout/FirstHashElementIndentation:
|
25
27
|
EnforcedStyle: consistent
|
26
28
|
|
27
29
|
Layout/MultilineMethodCallIndentation:
|
@@ -36,6 +38,10 @@ Layout/SpaceInLambdaLiteral:
|
|
36
38
|
Layout/ClosingParenthesisIndentation:
|
37
39
|
Enabled: true
|
38
40
|
|
41
|
+
Layout/LineLength:
|
42
|
+
Exclude: [ benchmarks/*rb ]
|
43
|
+
Max: 110
|
44
|
+
|
39
45
|
# Lint
|
40
46
|
Lint/AmbiguousBlockAssociation:
|
41
47
|
Enabled: false
|
@@ -52,6 +58,19 @@ Lint/NonLocalExitFromIterator:
|
|
52
58
|
Lint/RescueType:
|
53
59
|
Enabled: true
|
54
60
|
|
61
|
+
Lint/MissingSuper:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
Lint/ConstantDefinitionInBlock:
|
65
|
+
Exclude:
|
66
|
+
- spec/**/*rb
|
67
|
+
|
68
|
+
Lint/EmptyClass:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
Lint/SymbolConversion:
|
72
|
+
Enabled: false
|
73
|
+
|
55
74
|
# Metrics
|
56
75
|
|
57
76
|
Metrics/BlockLength:
|
@@ -65,10 +84,6 @@ Metrics/CyclomaticComplexity:
|
|
65
84
|
Metrics/MethodLength:
|
66
85
|
Max: 15
|
67
86
|
|
68
|
-
Metrics/LineLength:
|
69
|
-
Exclude: [benchmarks/*rb]
|
70
|
-
Max: 110
|
71
|
-
|
72
87
|
Metrics/PerceivedComplexity:
|
73
88
|
Enabled: false
|
74
89
|
|
@@ -81,20 +96,9 @@ Naming/AccessorMethodName:
|
|
81
96
|
Enabled: false
|
82
97
|
|
83
98
|
Naming/PredicateName:
|
84
|
-
|
99
|
+
ForbiddenPrefixes:
|
85
100
|
- is_
|
86
101
|
|
87
|
-
# Performance
|
88
|
-
|
89
|
-
Performance/Caller:
|
90
|
-
Enabled: true
|
91
|
-
|
92
|
-
Performance/Casecmp:
|
93
|
-
Enabled: true
|
94
|
-
|
95
|
-
Performance/UnfreezeString:
|
96
|
-
Enabled: true
|
97
|
-
|
98
102
|
# Style
|
99
103
|
|
100
104
|
# ¯\_(ツ)_/¯
|
@@ -163,9 +167,10 @@ Style/TrailingCommaInHashLiteral:
|
|
163
167
|
Style/MissingRespondToMissing:
|
164
168
|
Enabled: false
|
165
169
|
|
166
|
-
Style/MethodMissingSuper:
|
167
|
-
Enabled: false
|
168
|
-
|
169
170
|
Style/EvalWithLocation:
|
170
171
|
Exclude:
|
171
172
|
- spec/**/*.rb
|
173
|
+
|
174
|
+
Style/ClassVars:
|
175
|
+
Enabled: false
|
176
|
+
|
data/.travis.yml
CHANGED
@@ -5,14 +5,12 @@ script: bundle exec rake
|
|
5
5
|
matrix:
|
6
6
|
fast_finish: true
|
7
7
|
include:
|
8
|
-
- rvm:
|
8
|
+
- rvm: 3.0
|
9
|
+
gemfile: Gemfile
|
10
|
+
- rvm: 2.7
|
9
11
|
gemfile: Gemfile
|
10
12
|
- rvm: 2.6
|
11
13
|
gemfile: Gemfile
|
12
14
|
- rvm: 2.5
|
13
|
-
gemfile: Gemfile
|
14
|
-
- rvm: 2.4
|
15
|
-
gemfile: Gemfile
|
16
|
-
- rvm: 2.3
|
17
15
|
gemfile: gemfiles/activerecord42.gemfile
|
18
16
|
|
data/Gemfile
CHANGED
@@ -4,17 +4,17 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
group :development, :test do
|
7
|
-
gem 'active_model_serializers', '~> 0.10
|
7
|
+
gem 'active_model_serializers', '~> 0.10'
|
8
8
|
gem 'activerecord'
|
9
9
|
gem 'benchmark-ips'
|
10
10
|
gem 'blueprinter'
|
11
11
|
gem 'coveralls', require: false
|
12
12
|
gem 'dry-struct'
|
13
13
|
gem 'dry-types'
|
14
|
-
gem 'rom', '~>
|
14
|
+
gem 'rom', '~> 5.0'
|
15
15
|
gem 'rom-repository'
|
16
16
|
gem 'rom-sql'
|
17
17
|
gem 'sequel'
|
18
|
-
gem 'sqlite3', '~> 1.4
|
18
|
+
gem 'sqlite3', '~> 1.4'
|
19
19
|
gem 'yard', require: false unless ENV['TRAVIS']
|
20
20
|
end
|
data/README.md
CHANGED
@@ -497,10 +497,10 @@ class Car
|
|
497
497
|
|
498
498
|
json_schema do
|
499
499
|
{
|
500
|
-
age: Types::Coercible::
|
500
|
+
age: Types::Coercible::Integer,
|
501
501
|
brand: Types::Coercible::String,
|
502
|
-
doors: Types::
|
503
|
-
horsepower: Types::Strict::
|
502
|
+
doors: Types::Integer.optional,
|
503
|
+
horsepower: Types::Strict::Integer.constrained(gteq: 20),
|
504
504
|
fuel_system: Types::Any,
|
505
505
|
previous_owner: Types::String,
|
506
506
|
}
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# rubocop:disable Metrics/
|
3
|
+
# rubocop:disable Metrics/MethodLength
|
4
4
|
require_relative '../lib/surrealist'
|
5
5
|
require 'benchmark/ips'
|
6
6
|
require 'active_record'
|
@@ -36,7 +36,7 @@ end
|
|
36
36
|
ActiveModelSerializers.config.adapter = :json
|
37
37
|
|
38
38
|
def random_name
|
39
|
-
('a'..'z').to_a.shuffle.join
|
39
|
+
('a'..'z').to_a.shuffle.join.first(10).capitalize
|
40
40
|
end
|
41
41
|
|
42
42
|
class User < ActiveRecord::Base
|
@@ -304,4 +304,4 @@ benchmark_associations_collection
|
|
304
304
|
# Surrealist (associations): collection through Surrealist.surrealize_collection(): 2.4 i/s
|
305
305
|
# Surrealist (associations): collection through Surrealist::Serializer: 2.4 i/s - 1.03x slower
|
306
306
|
# AMS (associations): collection: 1.5 i/s - 1.60x slower
|
307
|
-
# rubocop:enable Metrics/
|
307
|
+
# rubocop:enable Metrics/MethodLength
|
data/lib/surrealist/carrier.rb
CHANGED
@@ -15,7 +15,7 @@ module Surrealist
|
|
15
15
|
return hash unless hash.is_a?(Hash)
|
16
16
|
|
17
17
|
hash.each_with_object({}) do |(k, v), obj|
|
18
|
-
obj[camelize_key(k, false)] = camelize_hash(v)
|
18
|
+
obj[camelize_key(k, first_upper: false)] = camelize_hash(v)
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -27,11 +27,12 @@ module Surrealist
|
|
27
27
|
# @param [Boolean] first_upper should the first letter be capitalized.
|
28
28
|
#
|
29
29
|
# @return [String | Symbol] camelized key of a hash.
|
30
|
-
def camelize_key(key, first_upper
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
def camelize_key(key, first_upper: true)
|
31
|
+
case key
|
32
|
+
when Symbol
|
33
|
+
Surrealist::StringUtils.camelize(key.to_s, first_upper: first_upper).to_sym
|
34
|
+
when String
|
35
|
+
Surrealist::StringUtils.camelize(key, first_upper: first_upper)
|
35
36
|
else
|
36
37
|
key
|
37
38
|
end
|
@@ -49,10 +49,10 @@ module Surrealist
|
|
49
49
|
# # => "{\"name\":\"Nikita\",\"age\":23}"
|
50
50
|
# # For more examples see README
|
51
51
|
def surrealize(**args)
|
52
|
-
return args[:serializer].new(self).surrealize(args) if args[:serializer]
|
52
|
+
return args[:serializer].new(self).surrealize(**args) if args[:serializer]
|
53
53
|
|
54
54
|
if (serializer = find_serializer(args[:for]))
|
55
|
-
return serializer.new(self).surrealize(args)
|
55
|
+
return serializer.new(self).surrealize(**args)
|
56
56
|
end
|
57
57
|
|
58
58
|
Oj.dump(Surrealist.build_schema(instance: self, **args), mode: :compat)
|
@@ -60,10 +60,10 @@ module Surrealist
|
|
60
60
|
|
61
61
|
# Invokes +Surrealist+'s class method +build_schema+
|
62
62
|
def build_schema(**args)
|
63
|
-
return args[:serializer].new(self).build_schema(args) if args[:serializer]
|
63
|
+
return args[:serializer].new(self).build_schema(**args) if args[:serializer]
|
64
64
|
|
65
65
|
if (serializer = find_serializer(args[:for]))
|
66
|
-
return serializer.new(self).build_schema(args)
|
66
|
+
return serializer.new(self).build_schema(**args)
|
67
67
|
end
|
68
68
|
|
69
69
|
Surrealist.build_schema(instance: self, **args)
|
@@ -81,7 +81,7 @@ module Surrealist
|
|
81
81
|
# Checks whether object is a collection or an instance and serializes it
|
82
82
|
def surrealize(**args)
|
83
83
|
if Helper.collection?(object)
|
84
|
-
Surrealist.surrealize_collection(object, args.merge(context: context))
|
84
|
+
Surrealist.surrealize_collection(object, **args.merge(context: context))
|
85
85
|
else
|
86
86
|
Surrealist.surrealize(instance: self, **args)
|
87
87
|
end
|
@@ -90,7 +90,7 @@ module Surrealist
|
|
90
90
|
# Passes build_schema to Surrealist
|
91
91
|
def build_schema(**args)
|
92
92
|
if Helper.collection?(object)
|
93
|
-
build_collection_schema(args)
|
93
|
+
build_collection_schema(**args)
|
94
94
|
else
|
95
95
|
Surrealist.build_schema(instance: self, **args)
|
96
96
|
end
|
@@ -102,7 +102,7 @@ module Surrealist
|
|
102
102
|
|
103
103
|
# Maps collection and builds schema for each instance.
|
104
104
|
def build_collection_schema(**args)
|
105
|
-
object.map { |object| self.class.new(object, context).build_schema(args) }
|
105
|
+
object.map { |object| self.class.new(object, **context).build_schema(**args) }
|
106
106
|
end
|
107
107
|
|
108
108
|
# Methods not found inside serializer will be invoked on the object
|
@@ -33,7 +33,7 @@ module Surrealist
|
|
33
33
|
# @param [Boolean] first_upper should the first letter be capitalized.
|
34
34
|
#
|
35
35
|
# @return [String] camelized string.
|
36
|
-
def camelize(snake_string, first_upper
|
36
|
+
def camelize(snake_string, first_upper: true)
|
37
37
|
if first_upper
|
38
38
|
snake_string.to_s.gsub(UNDERSCORE_REGEXP) { Regexp.last_match[1].capitalize }
|
39
39
|
else
|
@@ -73,7 +73,7 @@ module Surrealist
|
|
73
73
|
Surrealist::ExceptionRaiser.raise_invalid_nesting!(nesting_level) unless nesting_level.positive?
|
74
74
|
|
75
75
|
klass.split(NAMESPACES_SEPARATOR).last(nesting_level).reverse!.inject({}) do |a, n|
|
76
|
-
key = (camelize ? camelize(uncapitalize(n), false) : underscore(n)).to_sym
|
76
|
+
key = (camelize ? camelize(uncapitalize(n), first_upper: false) : underscore(n)).to_sym
|
77
77
|
|
78
78
|
{ key => a }
|
79
79
|
end
|
data/lib/surrealist/version.rb
CHANGED
data/lib/surrealist/wrapper.rb
CHANGED
@@ -11,8 +11,8 @@ module Surrealist
|
|
11
11
|
# @param [String] klass instance's class name.
|
12
12
|
#
|
13
13
|
# @return [Hash] a wrapped hash.
|
14
|
-
def wrap(hash, carrier, klass
|
15
|
-
namespaces_condition = carrier.include_namespaces || carrier.namespaces_nesting_level != DEFAULT_NESTING_LEVEL # rubocop:disable
|
14
|
+
def wrap(hash, carrier, klass: false)
|
15
|
+
namespaces_condition = carrier.include_namespaces || carrier.namespaces_nesting_level != DEFAULT_NESTING_LEVEL # rubocop:disable Layout/LineLength
|
16
16
|
|
17
17
|
if !klass && (carrier.include_root || namespaces_condition)
|
18
18
|
Surrealist::ExceptionRaiser.raise_unknown_root!
|
@@ -56,7 +56,7 @@ module Surrealist
|
|
56
56
|
# @return [Hash] a hash with schema wrapped inside a root key.
|
57
57
|
def wrap_schema_into_root(schema, carrier, root)
|
58
58
|
root_key = if carrier.camelize
|
59
|
-
Surrealist::StringUtils.camelize(root, false).to_sym
|
59
|
+
Surrealist::StringUtils.camelize(root, first_upper: false).to_sym
|
60
60
|
else
|
61
61
|
Surrealist::StringUtils.underscore(root).to_sym
|
62
62
|
end
|
data/lib/surrealist.rb
CHANGED
@@ -59,7 +59,7 @@ module Surrealist
|
|
59
59
|
Surrealist::ExceptionRaiser.raise_invalid_collection! unless Helper.collection?(collection)
|
60
60
|
|
61
61
|
result = collection.map do |object|
|
62
|
-
Helper.surrealist?(object.class) ? __build_schema(object, args) : object
|
62
|
+
Helper.surrealist?(object.class) ? __build_schema(object, **args) : object
|
63
63
|
end
|
64
64
|
|
65
65
|
args[:raw] ? result : Oj.dump(result, mode: :compat)
|
@@ -128,13 +128,13 @@ module Surrealist
|
|
128
128
|
schema = Surrealist::VarsHelper.find_schema(instance.class)
|
129
129
|
Surrealist::ExceptionRaiser.raise_unknown_schema!(instance) if schema.nil?
|
130
130
|
|
131
|
-
parameters = config ? config.merge(args) : args
|
131
|
+
parameters = config ? config.merge(**args) : args
|
132
132
|
|
133
133
|
# TODO: Refactor (something pipeline-like would do here, perhaps a builder of some sort)
|
134
|
-
carrier = Surrealist::Carrier.call(parameters)
|
134
|
+
carrier = Surrealist::Carrier.call(**parameters)
|
135
135
|
copied_schema = Surrealist::Copier.deep_copy(schema)
|
136
136
|
built_schema = Builder.new(carrier, copied_schema, instance).call
|
137
|
-
wrapped_schema = Surrealist::Wrapper.wrap(built_schema, carrier, instance.class.name)
|
137
|
+
wrapped_schema = Surrealist::Wrapper.wrap(built_schema, carrier, klass: instance.class.name)
|
138
138
|
carrier.camelize ? Surrealist::HashUtils.camelize_hash(wrapped_schema) : wrapped_schema
|
139
139
|
end
|
140
140
|
# rubocop:enable Metrics/AbcSize
|
@@ -178,10 +178,10 @@ module Surrealist
|
|
178
178
|
# provided in the object's class. Values will be taken from the return values
|
179
179
|
# of appropriate methods from the object.
|
180
180
|
def __build_schema(object, **args)
|
181
|
-
return args[:serializer].new(object, args[:context].to_h).build_schema(args) if args[:serializer]
|
181
|
+
return args[:serializer].new(object, **args[:context].to_h).build_schema(**args) if args[:serializer]
|
182
182
|
|
183
183
|
if (serializer = Surrealist::VarsHelper.find_serializer(object.class, tag: args[:for]))
|
184
|
-
serializer.new(object, args[:context].to_h).build_schema(args)
|
184
|
+
serializer.new(object, **args[:context].to_h).build_schema(**args)
|
185
185
|
else
|
186
186
|
build_schema(instance: object, **args)
|
187
187
|
end
|
data/surrealist.gemspec
CHANGED
@@ -22,13 +22,13 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.bindir = 'exe'
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
|
-
spec.required_ruby_version = '>= 2.
|
25
|
+
spec.required_ruby_version = '>= 2.5.0'
|
26
26
|
|
27
|
-
spec.add_runtime_dependency 'oj', '~> 3.
|
27
|
+
spec.add_runtime_dependency 'oj', '~> 3.11'
|
28
28
|
|
29
|
-
spec.add_development_dependency 'bundler'
|
30
|
-
spec.add_development_dependency 'pry', '~> 0.
|
31
|
-
spec.add_development_dependency 'rake', '~>
|
32
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
33
|
-
spec.add_development_dependency 'rubocop', '~>
|
29
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
30
|
+
spec.add_development_dependency 'pry', '~> 0.13'
|
31
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
32
|
+
spec.add_development_dependency 'rspec', '~> 3.10'
|
33
|
+
spec.add_development_dependency 'rubocop', '~> 1.9'
|
34
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: surrealist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Esaulov
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -16,84 +16,84 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '3.
|
19
|
+
version: '3.11'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '3.
|
26
|
+
version: '3.11'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
47
|
+
version: '0.13'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
54
|
+
version: '0.13'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '13.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '13.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '3.
|
75
|
+
version: '3.10'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '3.
|
82
|
+
version: '3.10'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rubocop
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '1.9'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '1.9'
|
97
97
|
description: A gem that provides DSL for serialization of plain old Ruby objects to
|
98
98
|
JSON in a declarative style by defining a `schema`. It also provides a trivial type
|
99
99
|
checking in the runtime before serialization.
|
@@ -143,7 +143,7 @@ homepage: https://github.com/nesaulov/surrealist
|
|
143
143
|
licenses:
|
144
144
|
- MIT
|
145
145
|
metadata: {}
|
146
|
-
post_install_message:
|
146
|
+
post_install_message:
|
147
147
|
rdoc_options: []
|
148
148
|
require_paths:
|
149
149
|
- lib
|
@@ -151,15 +151,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
151
151
|
requirements:
|
152
152
|
- - ">="
|
153
153
|
- !ruby/object:Gem::Version
|
154
|
-
version: 2.
|
154
|
+
version: 2.5.0
|
155
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
|
-
rubygems_version: 3.
|
162
|
-
signing_key:
|
161
|
+
rubygems_version: 3.2.3
|
162
|
+
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: A gem that provides DSL for serialization of plain old Ruby objects to JSON
|
165
165
|
in a declarative style.
|