sal-engine 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/app/helpers/sal/application_helper.rb +2 -2
- data/lib/sal/version.rb +1 -1
- metadata +30 -31
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 568b9f369eef36d4fa28a32eb7841b1875a33623df118bb18c353c277961ad25
|
|
4
|
+
data.tar.gz: 89bc876c17241f10524f1871c26a75e1feee5aa2623dc047c73501586c8a56ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa7bf9ca3ccae49be4505cbb9dcc32509b155c544c251e87ed29bdb3e3260322bc1fc6e210dcf7c386abe50ebf418f403a3aeffbac45ef4cf5f1177d887677a4
|
|
7
|
+
data.tar.gz: 81bcd86e3ef229ef091f8f4aa0c1d3d6790756a636dc768a0aa68d0b058d1f814170f29e198ad3057c10d650f1cafed7b2f834f6b8d55981c0d99284c0f41f5b
|
|
@@ -3,10 +3,10 @@ module Sal
|
|
|
3
3
|
def errors_bar(*entities)
|
|
4
4
|
entities = Array(entities)
|
|
5
5
|
|
|
6
|
-
messages = entities.map { |entity| entity.errors
|
|
6
|
+
messages = entities.map { |entity| entity.errors.select { |error| error.attribute == :base }.map(&:to_s).map(&:capitalize) }.flatten
|
|
7
7
|
|
|
8
8
|
# is there any non-base error?
|
|
9
|
-
if entities.detect { |entity| entity.errors.
|
|
9
|
+
if entities.detect { |entity| entity.errors.detect { |error| error.attribute != :base } }
|
|
10
10
|
messages << t(:errors_bar_message)
|
|
11
11
|
end
|
|
12
12
|
|
data/lib/sal/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sal-engine
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Cruz Horts
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-02-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
19
|
+
version: '7'
|
|
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: '
|
|
26
|
+
version: '7'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: pry
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -95,7 +95,7 @@ dependencies:
|
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '2.4'
|
|
97
97
|
description: Sal (salt) is what you add to every meal. I add sal to my Rails projects
|
|
98
|
-
email:
|
|
98
|
+
email:
|
|
99
99
|
executables: []
|
|
100
100
|
extensions: []
|
|
101
101
|
extra_rdoc_files: []
|
|
@@ -166,7 +166,7 @@ homepage: https://github.com/dncrht/sal
|
|
|
166
166
|
licenses:
|
|
167
167
|
- MIT
|
|
168
168
|
metadata: {}
|
|
169
|
-
post_install_message:
|
|
169
|
+
post_install_message:
|
|
170
170
|
rdoc_options: []
|
|
171
171
|
require_paths:
|
|
172
172
|
- lib
|
|
@@ -181,48 +181,47 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
181
181
|
- !ruby/object:Gem::Version
|
|
182
182
|
version: '0'
|
|
183
183
|
requirements: []
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
signing_key:
|
|
184
|
+
rubygems_version: 3.1.6
|
|
185
|
+
signing_key:
|
|
187
186
|
specification_version: 4
|
|
188
187
|
summary: A Rails engine with my recurrent additions
|
|
189
188
|
test_files:
|
|
189
|
+
- spec/spec_helper.rb
|
|
190
|
+
- spec/dummy/app/models/tableless.rb
|
|
191
|
+
- spec/dummy/app/controllers/application_controller.rb
|
|
192
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
|
190
193
|
- spec/dummy/app/assets/javascripts/application.js
|
|
191
194
|
- spec/dummy/app/assets/stylesheets/application.css
|
|
192
|
-
- spec/dummy/app/controllers/application_controller.rb
|
|
193
195
|
- spec/dummy/app/helpers/application_helper.rb
|
|
194
|
-
- spec/dummy/
|
|
195
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
|
196
|
+
- spec/dummy/bin/rake
|
|
196
197
|
- spec/dummy/bin/bundle
|
|
197
198
|
- spec/dummy/bin/rails
|
|
198
|
-
- spec/dummy/
|
|
199
|
-
- spec/dummy/config/
|
|
200
|
-
- spec/dummy/config/
|
|
201
|
-
- spec/dummy/config/database.yml
|
|
202
|
-
- spec/dummy/config/environment.rb
|
|
203
|
-
- spec/dummy/config/environments/development.rb
|
|
199
|
+
- spec/dummy/config/secrets.yml
|
|
200
|
+
- spec/dummy/config/routes.rb
|
|
201
|
+
- spec/dummy/config/locales/en.yml
|
|
204
202
|
- spec/dummy/config/environments/production.rb
|
|
203
|
+
- spec/dummy/config/environments/development.rb
|
|
205
204
|
- spec/dummy/config/environments/test.rb
|
|
206
|
-
- spec/dummy/config/
|
|
205
|
+
- spec/dummy/config/environment.rb
|
|
206
|
+
- spec/dummy/config/application.rb
|
|
207
|
+
- spec/dummy/config/database.yml
|
|
208
|
+
- spec/dummy/config/boot.rb
|
|
207
209
|
- spec/dummy/config/initializers/backtrace_silencers.rb
|
|
208
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
|
209
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
|
210
|
-
- spec/dummy/config/initializers/inflections.rb
|
|
211
210
|
- spec/dummy/config/initializers/mime_types.rb
|
|
211
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
|
212
212
|
- spec/dummy/config/initializers/session_store.rb
|
|
213
213
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
|
214
|
-
- spec/dummy/config/
|
|
215
|
-
- spec/dummy/config/
|
|
216
|
-
- spec/dummy/config/
|
|
214
|
+
- spec/dummy/config/initializers/assets.rb
|
|
215
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
|
216
|
+
- spec/dummy/config/initializers/inflections.rb
|
|
217
217
|
- spec/dummy/config.ru
|
|
218
|
-
- spec/dummy/
|
|
218
|
+
- spec/dummy/Rakefile
|
|
219
|
+
- spec/dummy/public/favicon.ico
|
|
219
220
|
- spec/dummy/public/422.html
|
|
220
221
|
- spec/dummy/public/500.html
|
|
221
|
-
- spec/dummy/public/
|
|
222
|
-
- spec/dummy/Rakefile
|
|
222
|
+
- spec/dummy/public/404.html
|
|
223
223
|
- spec/dummy/README.rdoc
|
|
224
|
+
- spec/rails_helper.rb
|
|
224
225
|
- spec/helpers/application_helper_spec.rb
|
|
225
226
|
- spec/helpers/error_span_spec.rb
|
|
226
227
|
- spec/helpers/error_span_view.html.erb
|
|
227
|
-
- spec/rails_helper.rb
|
|
228
|
-
- spec/spec_helper.rb
|