deep_unrest 0.1.48 → 0.1.49
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deep_unrest.rb +16 -1
- data/lib/deep_unrest/read.rb +1 -1
- data/lib/deep_unrest/version.rb +1 -1
- 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: 58d7fd7e14fd2a97dc1d868befab4fef1727f66eae798dec56548140235a758e
|
4
|
+
data.tar.gz: 8ed1efaabc8d392f48c10ef4605fdb362bfbe542952b310b8390438dbb631c45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7203d7f3b44f9de78cbe3baf5f9cad123d40bd46e9fe611d813819036a1a97a2a741998c618871e58a979ffefb28ad8d1513ef83bad91d35adc8f820f57fb485
|
7
|
+
data.tar.gz: 5bd0b09ead529ace24f9a0e082c85da51511e7381e6e7d67f798695627cc112c7e08eaf16df68233a7be1f21b256c3760e7b013e96e5e9fd774c08423b4d2110
|
data/lib/deep_unrest.rb
CHANGED
@@ -650,7 +650,7 @@ module DeepUnrest
|
|
650
650
|
|
651
651
|
### SHARED ###
|
652
652
|
def self.deep_underscore_keys(query)
|
653
|
-
query
|
653
|
+
query&.deep_transform_keys! do |key|
|
654
654
|
k = begin
|
655
655
|
key.to_s.underscore
|
656
656
|
rescue StandardError
|
@@ -664,6 +664,21 @@ module DeepUnrest
|
|
664
664
|
end
|
665
665
|
end
|
666
666
|
|
667
|
+
def self.deep_camelize_keys(query)
|
668
|
+
query&.deep_transform_keys! do |key|
|
669
|
+
k = begin
|
670
|
+
key.to_s.camelize(:lower)
|
671
|
+
rescue StandardError
|
672
|
+
key
|
673
|
+
end
|
674
|
+
begin
|
675
|
+
k.to_sym
|
676
|
+
rescue StandardError
|
677
|
+
key
|
678
|
+
end
|
679
|
+
end
|
680
|
+
end
|
681
|
+
|
667
682
|
def self.collect_authorized_scopes(mappings, user)
|
668
683
|
mappings.each do |mapping|
|
669
684
|
mapping[:scope] = DeepUnrest.authorization_strategy.get_authorized_scope(user, mapping[:klass])
|
data/lib/deep_unrest/read.rb
CHANGED
data/lib/deep_unrest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deep_unrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.49
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lynn Hurley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|