ocean-rails 2.10.1 → 2.10.2
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-rails.rb +2 -2
- data/lib/ocean/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2fc5b84fd62aaf90ef0e42e8ce7e94f4e6ac041
|
4
|
+
data.tar.gz: 6b7c3bb277839882f3b1b7dc117cf314cd2187fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1cb93319125b07b4a9b3e24573be6517cdce6b921e23fb526f9dd3308f773f7b61b1083d1771103f08bc161b4526a432467210fc16e9889fcfe636ad74c8d5e
|
7
|
+
data.tar.gz: 1378d0d00060a35cc12e1bd381b15d85d2f27be12ec599684fabb67eb076b3dcf818e7b16ae693a99ad1d1a143c20bcde20edb66e562296f0ee807862883a21d
|
data/lib/ocean-rails.rb
CHANGED
@@ -71,7 +71,7 @@ def add_right_restrictions(rel, restrictions)
|
|
71
71
|
# First get the table to use as a basis for the OR clauses
|
72
72
|
t = rel.arel_table
|
73
73
|
# Accumulating Arel AND clauses
|
74
|
-
cond = restrictions.
|
74
|
+
cond = restrictions.reduce [] do |acc, rr|
|
75
75
|
app = rr['app']
|
76
76
|
context = rr['context']
|
77
77
|
if app != '*' && context != '*'
|
@@ -91,7 +91,7 @@ def add_right_restrictions(rel, restrictions)
|
|
91
91
|
return rel.where(cond.first)
|
92
92
|
else
|
93
93
|
# OR the multiple clauses together
|
94
|
-
cond = cond.
|
94
|
+
cond = cond.reduce :or
|
95
95
|
# Return a relation built from the Arel condition we've constructed
|
96
96
|
rel.where(cond)
|
97
97
|
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: 2.10.
|
4
|
+
version: 2.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 4.0.0
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 4.0.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: sqlite3
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|