ocean-rails 2.10.1 → 2.10.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbd8005493023e3421fad5e17b6f141bd484f249
4
- data.tar.gz: 5103477f62b4d283d8d0db84948606a1e1b3d054
3
+ metadata.gz: b2fc5b84fd62aaf90ef0e42e8ce7e94f4e6ac041
4
+ data.tar.gz: 6b7c3bb277839882f3b1b7dc117cf314cd2187fb
5
5
  SHA512:
6
- metadata.gz: 28d40805d7d915875b4cb88834cbc9291c4488633a74f3581648ba4e395afbbd96c7254f7253b6d3883e8a0c3773bce2c93726123fd7b2e6a0ac91dc56af7d55
7
- data.tar.gz: 07ac89cd9536620bc15441c1ad10d12e5ae70d63f1e3d4239977bab241853e4cc944ae2c2aa6ec02de45ee68c707e3a01c6c9647efb7230186c91da729e07a82
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.inject([]) do |acc, rr|
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.inject { |a, b| a.or(b) }
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
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "2.10.1"
2
+ VERSION = "2.10.2"
3
3
  end
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.1
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-03-27 00:00:00.000000000 Z
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: '4.0'
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: '4.0'
138
+ version: 4.0.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: sqlite3
141
141
  requirement: !ruby/object:Gem::Requirement