xsdk-scaffold-rails 0.1.4 → 0.1.4.1

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: bcab2986d69aa18f2a7bbe0ccab5374fe20450a0882b812ace91109385002479
4
- data.tar.gz: f74499c4d488df30ede8647b8e4346209f071b0bb88513c99a7aae8ff6d227cc
3
+ metadata.gz: 30b218c1e575049e061795da3be9e65dea45ef54bb94e55a4fa0fa0933e28e0c
4
+ data.tar.gz: 3c81b1cc180bc63706558fa3ba4caf8c8b61c555c52411f7dfb85f8d5cc175f0
5
5
  SHA512:
6
- metadata.gz: 404ddf91b737614b5ebdf802b01d6cf483b41b4e66ae1fb5413cc692f7f0e60fe53bf14b1828580f7c75d6296d756dba615004d9713821c09897c6eea3ff9e55
7
- data.tar.gz: ad304d70e9c35131d35e327aad8af2a98265e297d298da38b9d837a9f85dc456a807a098e19b6b00e709085663f75f170cba98bd8fe5a3271ffa902adb9f4060
6
+ metadata.gz: 05e3d765720bd2ef48b8de6325c37c6169d5d82fc05edf84e74e521657be33d1e43d20968f5c297977500e461fb1932368b30339babfd796a51b4c5a1077e08f
7
+ data.tar.gz: e275b477008f18fd0a5dfbbd80daf9bb5f7e41b4d41c8f818d166c8dc63185a4356be1dc2308f57f78d292113fee0f1971e31abf2dcf542b9dbd3daa6fe2269b
data/Gemfile CHANGED
@@ -3,7 +3,5 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in xsdk-scaffold-rails.gemspec
4
4
  gemspec
5
5
 
6
- gem 'rails', '~> 6.0.0.0'
7
-
8
6
  gem "rake", "~> 12.0"
9
7
  gem "rspec", "~> 3.0"
data/Gemfile.lock CHANGED
@@ -1,130 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xsdk-scaffold-rails (0.1.4)
4
+ xsdk-scaffold-rails (0.1.4.1)
5
5
  activerecord (>= 6.0.0)
6
6
  pg (>= 1.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (6.0.0)
12
- actionpack (= 6.0.0)
13
- nio4r (~> 2.0)
14
- websocket-driver (>= 0.6.1)
15
- actionmailbox (6.0.0)
16
- actionpack (= 6.0.0)
17
- activejob (= 6.0.0)
18
- activerecord (= 6.0.0)
19
- activestorage (= 6.0.0)
20
- activesupport (= 6.0.0)
21
- mail (>= 2.7.1)
22
- actionmailer (6.0.0)
23
- actionpack (= 6.0.0)
24
- actionview (= 6.0.0)
25
- activejob (= 6.0.0)
26
- mail (~> 2.5, >= 2.5.4)
27
- rails-dom-testing (~> 2.0)
28
- actionpack (6.0.0)
29
- actionview (= 6.0.0)
30
- activesupport (= 6.0.0)
31
- rack (~> 2.0)
32
- rack-test (>= 0.6.3)
33
- rails-dom-testing (~> 2.0)
34
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
- actiontext (6.0.0)
36
- actionpack (= 6.0.0)
37
- activerecord (= 6.0.0)
38
- activestorage (= 6.0.0)
39
- activesupport (= 6.0.0)
40
- nokogiri (>= 1.8.5)
41
- actionview (6.0.0)
42
- activesupport (= 6.0.0)
43
- builder (~> 3.1)
44
- erubi (~> 1.4)
45
- rails-dom-testing (~> 2.0)
46
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
- activejob (6.0.0)
48
- activesupport (= 6.0.0)
49
- globalid (>= 0.3.6)
50
- activemodel (6.0.0)
51
- activesupport (= 6.0.0)
52
- activerecord (6.0.0)
53
- activemodel (= 6.0.0)
54
- activesupport (= 6.0.0)
55
- activestorage (6.0.0)
56
- actionpack (= 6.0.0)
57
- activejob (= 6.0.0)
58
- activerecord (= 6.0.0)
59
- marcel (~> 0.3.1)
60
- activesupport (6.0.0)
11
+ activemodel (6.1.3.2)
12
+ activesupport (= 6.1.3.2)
13
+ activerecord (6.1.3.2)
14
+ activemodel (= 6.1.3.2)
15
+ activesupport (= 6.1.3.2)
16
+ activesupport (6.1.3.2)
61
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
62
- i18n (>= 0.7, < 2)
63
- minitest (~> 5.1)
64
- tzinfo (~> 1.1)
65
- zeitwerk (~> 2.1, >= 2.1.8)
18
+ i18n (>= 1.6, < 2)
19
+ minitest (>= 5.1)
20
+ tzinfo (~> 2.0)
21
+ zeitwerk (~> 2.3)
66
22
  ast (2.4.2)
67
- builder (3.2.4)
68
23
  concurrent-ruby (1.1.8)
69
- crass (1.0.6)
70
24
  diff-lcs (1.4.4)
71
- erubi (1.10.0)
72
- globalid (0.4.2)
73
- activesupport (>= 4.2.0)
74
25
  i18n (1.8.10)
75
26
  concurrent-ruby (~> 1.0)
76
- loofah (2.9.1)
77
- crass (~> 1.0.2)
78
- nokogiri (>= 1.5.9)
79
- mail (2.7.1)
80
- mini_mime (>= 0.1.1)
81
- marcel (0.3.3)
82
- mimemagic (~> 0.3.2)
83
- method_source (1.0.0)
84
- mimemagic (0.3.10)
85
- nokogiri (~> 1)
86
- rake
87
- mini_mime (1.1.0)
88
- mini_portile2 (2.5.1)
89
27
  minitest (5.14.4)
90
- nio4r (2.5.7)
91
- nokogiri (1.11.3)
92
- mini_portile2 (~> 2.5.0)
93
- racc (~> 1.4)
94
28
  parallel (1.20.1)
95
29
  parser (3.0.1.1)
96
30
  ast (~> 2.4.1)
97
31
  pg (1.2.3)
98
- racc (1.5.2)
99
- rack (2.2.3)
100
- rack-test (1.1.0)
101
- rack (>= 1.0, < 3)
102
- rails (6.0.0)
103
- actioncable (= 6.0.0)
104
- actionmailbox (= 6.0.0)
105
- actionmailer (= 6.0.0)
106
- actionpack (= 6.0.0)
107
- actiontext (= 6.0.0)
108
- actionview (= 6.0.0)
109
- activejob (= 6.0.0)
110
- activemodel (= 6.0.0)
111
- activerecord (= 6.0.0)
112
- activestorage (= 6.0.0)
113
- activesupport (= 6.0.0)
114
- bundler (>= 1.3.0)
115
- railties (= 6.0.0)
116
- sprockets-rails (>= 2.0.0)
117
- rails-dom-testing (2.0.3)
118
- activesupport (>= 4.2.0)
119
- nokogiri (>= 1.6)
120
- rails-html-sanitizer (1.3.0)
121
- loofah (~> 2.3)
122
- railties (6.0.0)
123
- actionpack (= 6.0.0)
124
- activesupport (= 6.0.0)
125
- method_source
126
- rake (>= 0.8.7)
127
- thor (>= 0.20.3, < 2.0)
128
32
  rainbow (3.0.0)
129
33
  rake (12.3.3)
130
34
  regexp_parser (2.1.1)
@@ -160,28 +64,15 @@ GEM
160
64
  rubocop (~> 1.0)
161
65
  rubocop-ast (>= 1.1.0)
162
66
  ruby-progressbar (1.11.0)
163
- sprockets (4.0.2)
67
+ tzinfo (2.0.4)
164
68
  concurrent-ruby (~> 1.0)
165
- rack (> 1, < 3)
166
- sprockets-rails (3.2.2)
167
- actionpack (>= 4.0)
168
- activesupport (>= 4.0)
169
- sprockets (>= 3.0.0)
170
- thor (1.1.0)
171
- thread_safe (0.3.6)
172
- tzinfo (1.2.9)
173
- thread_safe (~> 0.1)
174
69
  unicode-display_width (1.7.0)
175
- websocket-driver (0.7.3)
176
- websocket-extensions (>= 0.1.0)
177
- websocket-extensions (0.1.5)
178
70
  zeitwerk (2.4.2)
179
71
 
180
72
  PLATFORMS
181
- ruby
73
+ x86_64-darwin-20
182
74
 
183
75
  DEPENDENCIES
184
- rails (~> 6.0.0.0)
185
76
  rake (~> 12.0)
186
77
  rspec (~> 3.0)
187
78
  rubocop (~> 1.3.1)
@@ -190,4 +81,4 @@ DEPENDENCIES
190
81
  xsdk-scaffold-rails!
191
82
 
192
83
  BUNDLED WITH
193
- 2.1.4
84
+ 2.2.17
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+ module Xsdk
3
+
4
+ module Errors
5
+ extend ActiveSupport::Concern
6
+
7
+ def errors
8
+ local_errors = super()
9
+ keys = self.class.reflect_on_all_associations.select do |assoc|
10
+ self.class.nested_attributes_options.key? assoc.name
11
+ end
12
+ keys.each do |assoc|
13
+ name_assoc = assoc.name
14
+ local_errors.delete(name_assoc)
15
+ model_assoc = send(name_assoc)
16
+ next if model_assoc.nil?
17
+
18
+ row_errors = {}
19
+ if assoc.macro == :belongs_to
20
+ row_errors[model_assoc._uuid] = model_assoc.errors.messages if model_assoc.errors.messages.keys.any?
21
+ else
22
+ model_assoc.each do |row|
23
+ row_errors[row._uuid] = row.errors.messages if row.errors.messages.keys.any?
24
+ end
25
+ end
26
+ local_errors.add(name_assoc, row_errors) if row_errors.keys.any?
27
+ end
28
+ local_errors
29
+ end
30
+ end
31
+ end
32
+
@@ -1,7 +1,7 @@
1
1
  module Xsdk
2
2
  module Scaffold
3
3
  module Rails
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.4.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xsdk-scaffold-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davide Croci
@@ -100,6 +100,7 @@ files:
100
100
  - lib/xsdk/scaffold/rails.rb
101
101
  - lib/xsdk/scaffold/rails/base_datatable.rb
102
102
  - lib/xsdk/scaffold/rails/base_search.rb
103
+ - lib/xsdk/scaffold/rails/errors.rb
103
104
  - lib/xsdk/scaffold/rails/version.rb
104
105
  - xsdk-scaffold-rails.gemspec
105
106
  homepage: https://ermes-x.com