trailblazer-finder 0.2.7 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop-https---raw-githubusercontent-com-trailblazer-meta-master-rubocop-yml +1 -1
- data/CHANGES.md +3 -0
- data/Gemfile +2 -0
- data/Rakefile +2 -0
- data/lib/trailblazer/finder/find.rb +0 -1
- data/lib/trailblazer/finder/utils/string.rb +5 -4
- data/lib/trailblazer/finder/version.rb +1 -1
- data/lib/trailblazer/operation/finder.rb +7 -7
- data/trailblazer-finder.gemspec +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9d592b6bddb7a2a1a4013bce8a5243f2f2bb095a49dbe9107e1196d54d10571
|
4
|
+
data.tar.gz: 025da1c9e5eb3457ecac611a86cba86ae571476a2d5ee7e7e7c22a935531f838
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40e4ff1dfbd936fad7accb42f6d5496e49494b0772785518967fc75dc63d1328b8b10e5982f5574039361c2cb5fabab60f6b4814f7196fcf7328bc0d168efbfd
|
7
|
+
data.tar.gz: 94b01a12cb4b867900a1a8033761080a6c5494d72587db79fa11f6a2b3bf84778da6c2ae8ef094d067eb11bb84242eea73a8f31e5386544f6eb9c140725e2907
|
data/CHANGES.md
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -23,7 +23,6 @@ module Trailblazer
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def process_paging(ctx)
|
26
|
-
# ctx.instance_exec @paging[:current_page], @paging[:per_page], (process_filters ctx), &@paging[:handler]
|
27
26
|
ctx.instance_exec @paging[:current_page], @paging[:per_page], (@sorting.empty? ? (process_filters ctx) : (process_sorting ctx)), &@paging[:handler]
|
28
27
|
end
|
29
28
|
|
@@ -37,10 +37,11 @@ module Trailblazer
|
|
37
37
|
|
38
38
|
def self.date?(date)
|
39
39
|
return false unless
|
40
|
-
date.
|
41
|
-
date.
|
42
|
-
date.
|
43
|
-
return false if date.
|
40
|
+
date.is_a?(::DateTime) ||
|
41
|
+
date.is_a?(::Date) ||
|
42
|
+
date.is_a?(::String)
|
43
|
+
return false if date.is_a?(::String) && date.size == 36 # Ignore uuids that could get casted to dates
|
44
|
+
|
44
45
|
date_hash = ::Date._parse(date.to_s)
|
45
46
|
Date.valid_date?(date_hash[:year].to_i, date_hash[:mon].to_i, date_hash[:mday].to_i)
|
46
47
|
end
|
@@ -8,9 +8,9 @@ module Trailblazer
|
|
8
8
|
|
9
9
|
extension = Trailblazer::Activity::TaskWrap::Merge.new(
|
10
10
|
Wrap::Inject::Defaults(
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
:"finder.class" => finder_class,
|
12
|
+
:"finder.entity" => entity,
|
13
|
+
:"finder.action" => action
|
14
14
|
)
|
15
15
|
)
|
16
16
|
|
@@ -29,12 +29,12 @@ module Trailblazer
|
|
29
29
|
|
30
30
|
class Builder
|
31
31
|
def call(options, params)
|
32
|
-
finder_class = options["finder.class"]
|
33
|
-
entity = options["finder.entity"]
|
34
|
-
action = options["finder.action"]
|
32
|
+
finder_class = options[:"finder.class"]
|
33
|
+
entity = options[:"finder.entity"]
|
34
|
+
action = options[:"finder.action"]
|
35
35
|
action = :all unless %i[all single].include?(action)
|
36
36
|
|
37
|
-
send("#{action}!", finder_class, entity, params, options["finder.action"])
|
37
|
+
send("#{action}!", finder_class, entity, params, options[:"finder.action"])
|
38
38
|
end
|
39
39
|
|
40
40
|
private
|
data/trailblazer-finder.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-03-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dry-types
|