ocean-rails 7.5.0 → 7.5.1
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 +4 -4
- data/lib/ocean/api.rb +1 -0
- data/lib/ocean/api_resource.rb +7 -7
- data/lib/ocean/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: ec8e50ad0c178c67ee4500bd94d19459468215a893b3b33d826c3942a9bce10c
|
4
|
+
data.tar.gz: e8d0e26940271573cb45bf1cbd877be5dfb6335397246ae78630024bf61c464c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f218b0bf3f06d52c8bf07d6426dbf5b036bb58b74027eaefe01f6f4821b4254b846c81e0e9d992d980282faf70285d4d54a290105a35defce90809289a8087bc
|
7
|
+
data.tar.gz: 6ddcb051c7b611da0662eb46aadf35f138d3e1969e3adc3bee1033501ceded0bb44c42eafff782fe14d83811454958e8a8e711e9afea63d77e5e067a37c5c35b
|
data/lib/ocean/api.rb
CHANGED
@@ -341,6 +341,7 @@ class Api
|
|
341
341
|
def self.ban(path)
|
342
342
|
hydra = Typhoeus::Hydra.hydra
|
343
343
|
escaped_path = escape(path)
|
344
|
+
escaped_path = '/' + escaped_path if escaped_path[0] != '/'
|
344
345
|
VARNISH_CACHES.each do |host|
|
345
346
|
url = "http://#{host}#{escaped_path}"
|
346
347
|
request = Typhoeus::Request.new(url, method: :ban, headers: {})
|
data/lib/ocean/api_resource.rb
CHANGED
@@ -22,8 +22,8 @@ module ApiResource
|
|
22
22
|
#
|
23
23
|
# @collection = @api_user.groups.collection(params).active.order("email ASC")
|
24
24
|
#
|
25
|
-
# The whole params hash can safely be passed as the input arg: keys are filtered so
|
26
|
-
# that matches only are done against the attributes declared in the controller using
|
25
|
+
# The whole params hash can safely be passed as the input arg: keys are filtered so
|
26
|
+
# that matches only are done against the attributes declared in the controller using
|
27
27
|
# +ocean_resource_model+. Ranges are allowed for those attributes declared to accept
|
28
28
|
# them using the +ranged+ parameter of +ocean_resource_model+.
|
29
29
|
#
|
@@ -31,7 +31,7 @@ module ApiResource
|
|
31
31
|
#
|
32
32
|
# The +search:+ keyword arg, if present, searches for the value in the database string or
|
33
33
|
# text column declared in the controller's +ocean_resource_model+ declaration.
|
34
|
-
# The search is done using an SQL +LIKE+ clause, with the substring framed by
|
34
|
+
# The search is done using an SQL +LIKE+ clause, with the substring framed by
|
35
35
|
# wildcard characters. It's self-evident that this is not an efficient search method
|
36
36
|
# for larger datasets; in such cases, other search methods should be employed.
|
37
37
|
#
|
@@ -49,12 +49,12 @@ module ApiResource
|
|
49
49
|
end
|
50
50
|
|
51
51
|
|
52
|
-
private
|
52
|
+
private
|
53
53
|
|
54
54
|
def collection_internal(conds={}, group, search, page, page_size, restrictions)
|
55
55
|
if index_only != []
|
56
56
|
new_conds = {}
|
57
|
-
index_only.each do |key|
|
57
|
+
index_only.each do |key|
|
58
58
|
val = conds[key]
|
59
59
|
next unless val
|
60
60
|
if ranged_matchers.include?(key) && val.include?(",")
|
@@ -82,7 +82,7 @@ module ApiResource
|
|
82
82
|
query = query.limit(page_size).offset(page_size * page)
|
83
83
|
end
|
84
84
|
# Finally, add any app/context restrictions, then return the accumulated Relation
|
85
|
-
add_right_restrictions(query, restrictions)
|
85
|
+
add_right_restrictions(query, restrictions)
|
86
86
|
end
|
87
87
|
|
88
88
|
|
@@ -107,7 +107,7 @@ module ApiResource
|
|
107
107
|
end
|
108
108
|
|
109
109
|
|
110
|
-
public
|
110
|
+
public
|
111
111
|
|
112
112
|
#
|
113
113
|
# Returns the latest version for the resource class. E.g.:
|
data/lib/ocean/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocean-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.5.
|
4
|
+
version: 7.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|