ocean-rails 5.7.4 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +13 -0
- data/lib/ocean/api_resource.rb +6 -3
- data/lib/ocean/version.rb +1 -1
- metadata +3 -3
- data/MIT-LICENSE +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d044bc337f03486f319acad37b8bb5bae323d47e
|
4
|
+
data.tar.gz: 3e52e7a21755ce16625b703b523250afaf4b8b6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3683f1df8ccb04a8d4f52203d49b08c4b769cae8ad3ce223eb32cae24ce5d33823cdc70b7844e83533679ec8b84a759fd825c80c0fbc03d13e013f59263de3f
|
7
|
+
data.tar.gz: afd88531c431f62c13a3009dada64c26dc3a119c2fe5250acc26ffd8939d809b1524615bdf82c58ca373df7e37340e679fa9b05e5e0ff544e4acf89e8d3bc827
|
data/LICENSE
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Copyright 2016 Peter Bengtson
|
2
|
+
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
you may not use this file except in compliance with the License.
|
5
|
+
You may obtain a copy of the License at
|
6
|
+
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
See the License for the specific language governing permissions and
|
13
|
+
limitations under the License.
|
data/lib/ocean/api_resource.rb
CHANGED
@@ -162,12 +162,15 @@ module ApiResource
|
|
162
162
|
#
|
163
163
|
def invalidate(avoid_self=false)
|
164
164
|
self.class.invalidate
|
165
|
-
resource_name = self.class.name.pluralize.underscore
|
165
|
+
#resource_name = self.class.name.pluralize.underscore
|
166
166
|
varnish_invalidate_member.each do |thing|
|
167
167
|
if thing.is_a?(String)
|
168
|
-
Api.ban "/v[0-9]+/#{resource_name}/#{self.id}#{thing}" if !avoid_self
|
168
|
+
#Api.ban "/v[0-9]+/#{resource_name}/#{self.id}#{thing}" if !avoid_self
|
169
|
+
# Invalidate every GET request where the URI mentions this UUID
|
170
|
+
Api.ban "#{self.id}" if !avoid_self
|
169
171
|
else
|
170
|
-
|
172
|
+
# Call the thing and let the resulting string be banned
|
173
|
+
Api.ban "#{thing.call(self)}"
|
171
174
|
end
|
172
175
|
end
|
173
176
|
end
|
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:
|
4
|
+
version: 6.0.0
|
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-
|
11
|
+
date: 2016-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -215,7 +215,7 @@ executables: []
|
|
215
215
|
extensions: []
|
216
216
|
extra_rdoc_files: []
|
217
217
|
files:
|
218
|
-
-
|
218
|
+
- LICENSE
|
219
219
|
- README.rdoc
|
220
220
|
- Rakefile
|
221
221
|
- app/controllers/alive_controller.rb
|
data/MIT-LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
Copyright 2015 Peter Bengtson
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|