effective_resources 1.4.13 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/attribute.rb +3 -3
- data/lib/effective_resources.rb +0 -1
- data/lib/effective_resources/engine.rb +7 -2
- data/lib/effective_resources/version.rb +1 -1
- data/{app/models → lib}/validators/email_cc_validator.rb +0 -0
- data/{app/models → lib}/validators/email_validator.rb +0 -0
- data/{app/models → lib}/validators/url_validator.rb +0 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96ca5cf766ce1834be39c1cc4698eed91291824f5cc242fcd4daa5f287bcbe95
|
4
|
+
data.tar.gz: 3297962f09ef0490a3c53ccd3eb7d82858ed0a553a935e8ce264a7947c70fcdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a88337e14e4d6df602ec530a07e57a48ac345fc25ade3c5ebaf34b9038c67decb76e17f58f7c431c0bd58e64cb589dfd0b4f4f3055b6082fb4f1b2e68f9f0ad2
|
7
|
+
data.tar.gz: cb339dd8e0a39d7e0c78e483a0d122c4b7de0d682f031ec91cf1d9a2184fe527e96278edbd92176d18564d5bb6c9f7edacd4f0336b4eb222682bed52153f991d
|
@@ -75,11 +75,11 @@ module Effective
|
|
75
75
|
when :date, :datetime
|
76
76
|
if (digits = value.to_s.scan(/(\d+)/).flatten).present?
|
77
77
|
date = if digits.first.length == 4 # 2017-01-10
|
78
|
-
Time.zone.local(*digits)
|
78
|
+
(Time.zone.local(*digits) rescue nil)
|
79
79
|
else # 01/10/2016
|
80
80
|
year = digits.find { |d| d.length == 4}
|
81
81
|
digits = [year] + (digits - [year])
|
82
|
-
Time.zone.local(*digits)
|
82
|
+
(Time.zone.local(*digits) rescue nil)
|
83
83
|
end
|
84
84
|
|
85
85
|
name.to_s.start_with?('end_') ? date.end_of_day : date
|
@@ -87,7 +87,7 @@ module Effective
|
|
87
87
|
when :time
|
88
88
|
if (digits = value.to_s.scan(/(\d+)/).flatten).present?
|
89
89
|
now = Time.zone.now
|
90
|
-
Time.zone.local(now.year, now.month, now.day, *digits)
|
90
|
+
(Time.zone.local(now.year, now.month, now.day, *digits) rescue nil)
|
91
91
|
end
|
92
92
|
when :decimal, :currency
|
93
93
|
(value.kind_of?(String) ? value.gsub(/[^0-9|\-|\.]/, '') : value).to_f
|
data/lib/effective_resources.rb
CHANGED
@@ -3,9 +3,14 @@ module EffectiveResources
|
|
3
3
|
engine_name 'effective_resources'
|
4
4
|
|
5
5
|
config.autoload_paths += Dir[
|
6
|
-
"#{config.root}/lib/",
|
7
6
|
"#{config.root}/jobs/",
|
8
|
-
"#{config.root}/
|
7
|
+
"#{config.root}/lib/validators/",
|
8
|
+
"#{config.root}/app/controllers/concerns/"
|
9
|
+
]
|
10
|
+
|
11
|
+
config.eager_load_paths += Dir[
|
12
|
+
"#{config.root}/jobs/",
|
13
|
+
"#{config.root}/lib/validators/",
|
9
14
|
"#{config.root}/app/controllers/concerns/"
|
10
15
|
]
|
11
16
|
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -71,9 +71,6 @@ files:
|
|
71
71
|
- app/models/effective/resources/paths.rb
|
72
72
|
- app/models/effective/resources/relation.rb
|
73
73
|
- app/models/effective/resources/sql.rb
|
74
|
-
- app/models/validators/email_cc_validator.rb
|
75
|
-
- app/models/validators/email_validator.rb
|
76
|
-
- app/models/validators/url_validator.rb
|
77
74
|
- app/views/application/_flash.html.haml
|
78
75
|
- app/views/application/create.js.erb
|
79
76
|
- app/views/application/destroy.js.erb
|
@@ -94,6 +91,9 @@ files:
|
|
94
91
|
- lib/effective_resources/engine.rb
|
95
92
|
- lib/effective_resources/version.rb
|
96
93
|
- lib/generators/effective_resources/install_generator.rb
|
94
|
+
- lib/validators/email_cc_validator.rb
|
95
|
+
- lib/validators/email_validator.rb
|
96
|
+
- lib/validators/url_validator.rb
|
97
97
|
homepage: https://github.com/code-and-effect/effective_resources
|
98
98
|
licenses:
|
99
99
|
- MIT
|