ocean-rails 6.1.3 → 6.1.4
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c6feba83b83495464eccf885fe393675f8d7dfa
|
4
|
+
data.tar.gz: 5c59b3e4663bd2983e0de265848e8200ed193eda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80a5b60c2260279847f9ca9d9733f1fe94f59e3624af58a9afe5ab88556f0d06c005de2127c76ac93f08c19c002a28c05f5c9c820750ee82d049edb6c03a0e27
|
7
|
+
data.tar.gz: 769821c1d5e12a7884be727d8acdf7edfa9cf854b2f78873f6eae49b49aedab143992dd23e647a8b4d850ae21ffbfc47a4a590260aac7a0807cf7fe30cded8b3
|
@@ -5,14 +5,14 @@ require_dependency "<%= namespaced_file_path %>/application_controller"
|
|
5
5
|
<% module_namespacing do -%>
|
6
6
|
class <%= controller_class_name %>Controller < ApplicationController
|
7
7
|
|
8
|
-
ocean_resource_controller
|
8
|
+
ocean_resource_controller
|
9
9
|
|
10
10
|
before_action :find_<%= singular_table_name %>, :only => [:show, :update, :destroy]
|
11
11
|
|
12
12
|
|
13
13
|
# GET <%= route_url %>
|
14
14
|
def index
|
15
|
-
expires_in 0, 's-maxage' =>
|
15
|
+
expires_in 0, 's-maxage' => DEFAULT_CACHE_TIME
|
16
16
|
# if stale?(collection_etag(<%= class_name %>)) # collection_etag is still ActiveRecord only!
|
17
17
|
# Instead, we get all the instances and compute the ETag manually.
|
18
18
|
# You may wish to remove this action entirely. You may also wish to remove the caching,
|
@@ -28,7 +28,7 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
28
28
|
|
29
29
|
# GET <%= route_url %>/a-b-c-d-e
|
30
30
|
def show
|
31
|
-
expires_in 0, 's-maxage' =>
|
31
|
+
expires_in 0, 's-maxage' => DEFAULT_CACHE_TIME
|
32
32
|
if stale?(etag: @<%= singular_table_name %>.lock_version, # NB: DynamoDB tables don't have cache_key - FIX!
|
33
33
|
last_modified: @<%= singular_table_name %>.updated_at)
|
34
34
|
api_render @<%= singular_table_name %>
|
@@ -76,7 +76,7 @@ module OceanApplicationController
|
|
76
76
|
@group_names = a['group_names'].to_set if a['group_names']
|
77
77
|
return true
|
78
78
|
end
|
79
|
-
error_messages = response.body['_api_error']
|
79
|
+
error_messages = response.body['_api_error'] rescue ["Not JSON: #{raw_body}"]
|
80
80
|
render_api_error response.status, *error_messages
|
81
81
|
expires_in 0, must_revalidate: true
|
82
82
|
false
|
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: 6.1.
|
4
|
+
version: 6.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|