ledger_sync-domains 1.1.4 → 1.2.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: 14d7f7a6ce94ba69c8e10a5aba3719bce8c2789fc9fdd9fdc599884a3391a32f
4
- data.tar.gz: c5b7a3caee8948c730e0afe84eef573f686c0b6b4ca6efc5330a7893e8fdac61
3
+ metadata.gz: 77a744d4de0e8b4cefe00a0dec3bee88a317655d9bec7ab3eebfe7aacba4251f
4
+ data.tar.gz: a979fa7e1c80a9d9bfac2c317b2fb5eb22fea25fc17a4bf4952c53ce4add55c0
5
5
  SHA512:
6
- metadata.gz: 8c99ee3e2b9d0260aecda2f27663fb61c469957530d73813185c06d6bf0e2fa44941e07924a41f2a8b55697ae58580a1867f0ed289ed630ae0e0f1d202abe534
7
- data.tar.gz: d933fa1ab6c3876a16890b93c7e33ff0eacbbfd08d219ac5bae93a368fc7d7317a9fc7bc9bfd47f2e0d3d79af3f2f92f3841ab1828557c239b3278c2dcc16603
6
+ metadata.gz: 71b00186f1c6fff136958145c83018550a48d69c27777462994194d70b3ad20db5b05256a71562ce9d366007e7bb61a85a947e7cd4c33cffb199cabb215e3282
7
+ data.tar.gz: f6e0b8ae9d2efe5247535dfe82ca6adaa3f5cdb8431185a028ec8c5b6ffc02d3739057d209e1e0d53d8521718282b30bd9d4594ea3f62c0dc44d3f34378e55d1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.2.0] - 2022-07-07
4
+
5
+ - Feature: Add proxy methos to make Serialized resources work nice with rails forms
6
+
3
7
  ## [1.1.4] - 2022-05-26
4
8
 
5
9
  - Feature: Operation accepts custom serializer
@@ -25,7 +29,7 @@
25
29
 
26
30
  ## [1.0.5] - 2022-02-17
27
31
 
28
- - Fix: Do not serialize unset reader relational method
32
+ - Fix: Do not serialize unset reader relational method
29
33
 
30
34
  ## [1.0.4] - 2022-02-15
31
35
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ledger_sync-domains (1.1.4)
4
+ ledger_sync-domains (1.2.0)
5
5
  ledger_sync (~> 2.3.1)
6
6
 
7
7
  GEM
@@ -33,7 +33,7 @@ GEM
33
33
  dry-logic (1.2.0)
34
34
  concurrent-ruby (~> 1.0)
35
35
  dry-core (~> 0.5, >= 0.5)
36
- dry-schema (1.9.1)
36
+ dry-schema (1.9.3)
37
37
  concurrent-ruby (~> 1.0)
38
38
  dry-configurable (~> 0.13, >= 0.13.0)
39
39
  dry-core (~> 0.5, >= 0.5)
@@ -46,12 +46,12 @@ GEM
46
46
  dry-core (~> 0.5, >= 0.5)
47
47
  dry-inflector (~> 0.1, >= 0.1.2)
48
48
  dry-logic (~> 1.0, >= 1.0.2)
49
- dry-validation (1.8.0)
49
+ dry-validation (1.8.1)
50
50
  concurrent-ruby (~> 1.0)
51
51
  dry-container (~> 0.7, >= 0.7.1)
52
52
  dry-core (~> 0.5, >= 0.5)
53
53
  dry-initializer (~> 3.0)
54
- dry-schema (~> 1.9, >= 1.9.1)
54
+ dry-schema (~> 1.8, >= 1.8.0)
55
55
  factory_bot (6.2.0)
56
56
  activesupport (>= 5.0.0)
57
57
  faraday (1.10.0)
@@ -72,8 +72,8 @@ GEM
72
72
  faraday-em_synchrony (1.0.0)
73
73
  faraday-excon (1.1.0)
74
74
  faraday-httpclient (1.0.1)
75
- faraday-multipart (1.0.3)
76
- multipart-post (>= 1.2, < 3)
75
+ faraday-multipart (1.0.4)
76
+ multipart-post (~> 2)
77
77
  faraday-net_http (1.0.1)
78
78
  faraday-net_http_persistent (1.2.0)
79
79
  faraday-patron (1.0.0)
@@ -102,7 +102,9 @@ GEM
102
102
  resonad
103
103
  simply_serializable (>= 1.5.1)
104
104
  minitest (5.15.0)
105
- multipart-post (2.1.1)
105
+ multipart-post (2.2.3)
106
+ nokogiri (1.13.6-arm64-darwin)
107
+ racc (~> 1.4)
106
108
  nokogiri (1.13.6-x86_64-linux)
107
109
  racc (~> 1.4)
108
110
  openssl (2.2.1)
@@ -113,7 +115,7 @@ GEM
113
115
  pd_ruby (0.2.3)
114
116
  colorize
115
117
  racc (1.6.0)
116
- rack (2.2.3)
118
+ rack (2.2.4)
117
119
  rainbow (3.0.0)
118
120
  rake (13.0.6)
119
121
  regexp_parser (2.2.0)
@@ -152,6 +154,7 @@ GEM
152
154
  unicode-display_width (2.1.0)
153
155
 
154
156
  PLATFORMS
157
+ arm64-darwin-21
155
158
  x86_64-linux
156
159
 
157
160
  DEPENDENCIES
@@ -21,7 +21,15 @@ module LedgerSync
21
21
  define_method('valid?') { resource.valid? }
22
22
  define_method('errors') { resource.errors }
23
23
  define_method('to_hash') { hash }
24
+ define_method('class_name') { resource.class.name }
25
+ define_method('model_name') { resource.model_name }
26
+ define_method('to_key') { resource.to_key }
24
27
  references.each do |args|
28
+ if args.type.instance_of?(LedgerSync::Serialization::Type::SerializerReferencesOneType) # rubocop:disable Layout/LineLength
29
+ define_method("#{args.hash_attribute}_id") do
30
+ resource.send("#{args.hash_attribute}_id")
31
+ end
32
+ end
25
33
  define_method(args.hash_attribute) do
26
34
  Query.const_get(
27
35
  args.type.class.to_s.split('::').last
@@ -44,6 +52,10 @@ module LedgerSync
44
52
  id.present?
45
53
  end
46
54
 
55
+ def to_model
56
+ self
57
+ end
58
+
47
59
  def to_json(*args)
48
60
  JSON.generate(to_hash, *args)
49
61
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module LedgerSync
4
4
  module Domains
5
- VERSION = '1.1.4'
5
+ VERSION = '1.2.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ledger_sync-domains
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jozef Vaclavik
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-26 00:00:00.000000000 Z
11
+ date: 2022-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ledger_sync
@@ -109,7 +109,7 @@ metadata:
109
109
  homepage_uri: https://engineering.dropbot.sh
110
110
  source_code_uri: https://github.com/sandbite/ledger_sync-domains
111
111
  changelog_uri: https://github.com/sandbite/ledger_sync-domains/blob/main/CHANGELOG.md
112
- post_install_message:
112
+ post_install_message:
113
113
  rdoc_options: []
114
114
  require_paths:
115
115
  - lib
@@ -124,8 +124,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  requirements: []
127
- rubygems_version: 3.2.9
128
- signing_key:
127
+ rubygems_version: 3.3.3
128
+ signing_key:
129
129
  specification_version: 4
130
130
  summary: LedgerSync for Domains/Engines
131
131
  test_files: []