graphiti 1.2.26 → 1.2.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/gemfiles/rails_4.gemfile +1 -1
- data/graphiti.gemspec +1 -0
- data/lib/graphiti/adapters/active_record.rb +1 -1
- data/lib/graphiti/adapters/active_record/belongs_to_sideload.rb +1 -1
- data/lib/graphiti/adapters/active_record/has_many_sideload.rb +1 -1
- data/lib/graphiti/adapters/active_record/has_one_sideload.rb +1 -1
- data/lib/graphiti/adapters/active_record/{inferrence.rb → inference.rb} +2 -2
- data/lib/graphiti/adapters/active_record/many_to_many_sideload.rb +1 -2
- data/lib/graphiti/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb8f1e8668da2d5d53c211b2f999a5109bf968815f1a700be6d5ee29537afc21
|
4
|
+
data.tar.gz: c60dd4731e33f6b495b82575989dc72376697ec21bbcbb01ce23021c61dbc26b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecd5b910c32aff8592b16406fb8cf12e3d8d00585e671900966c594e475ea9a4d7b620d7d7ff52d35aad9190563fc29f5ce0e1014d886ee35ed46b72e1791ca8
|
7
|
+
data.tar.gz: e1273d26d0571ae89f0405933888ac17b10083cfe250da9cb7d7118a511efe381cc03176ec9f78e30e5157d2ec2588883c6d113a22a84a0d326e9ccf02b016dd
|
data/Gemfile
CHANGED
data/gemfiles/rails_4.gemfile
CHANGED
data/graphiti.gemspec
CHANGED
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "kaminari", "~> 0.17"
|
30
30
|
spec.add_development_dependency "bundler"
|
31
31
|
spec.add_development_dependency "rake", "~> 10.0"
|
32
|
+
spec.add_development_dependency "standard", "0.4.7"
|
32
33
|
spec.add_development_dependency "activemodel", ">= 4.1"
|
33
34
|
spec.add_development_dependency "graphiti_spec_helpers", "1.0.beta.4"
|
34
35
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Graphiti
|
2
2
|
module Adapters
|
3
3
|
class ActiveRecord < ::Graphiti::Adapters::Abstract
|
4
|
-
require "graphiti/adapters/active_record/
|
4
|
+
require "graphiti/adapters/active_record/inference"
|
5
5
|
require "graphiti/adapters/active_record/has_many_sideload"
|
6
6
|
require "graphiti/adapters/active_record/belongs_to_sideload"
|
7
7
|
require "graphiti/adapters/active_record/has_one_sideload"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
module Graphiti::Adapters::ActiveRecord::
|
1
|
+
module Graphiti::Adapters::ActiveRecord::Inference
|
2
2
|
# If going AR to AR, use AR introspection
|
3
|
-
# If going AR to PORO, fall back to normal
|
3
|
+
# If going AR to PORO, fall back to normal inference
|
4
4
|
def infer_foreign_key
|
5
5
|
parent_model = parent_resource_class.model
|
6
6
|
reflection = parent_model.reflections[association_name.to_s]
|
@@ -48,8 +48,7 @@ class Graphiti::Adapters::ActiveRecord::ManyToManySideload < Graphiti::Sideload:
|
|
48
48
|
|
49
49
|
def filter_for(scope, value, type = nil)
|
50
50
|
scope
|
51
|
-
.
|
52
|
-
.joins(through_relationship_name)
|
51
|
+
.includes(through_relationship_name)
|
53
52
|
.where(belongs_to_many_clause(value, type))
|
54
53
|
end
|
55
54
|
|
data/lib/graphiti/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphiti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Richmond
|
@@ -162,6 +162,20 @@ dependencies:
|
|
162
162
|
- - "~>"
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '10.0'
|
165
|
+
- !ruby/object:Gem::Dependency
|
166
|
+
name: standard
|
167
|
+
requirement: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - '='
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: 0.4.7
|
172
|
+
type: :development
|
173
|
+
prerelease: false
|
174
|
+
version_requirements: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - '='
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: 0.4.7
|
165
179
|
- !ruby/object:Gem::Dependency
|
166
180
|
name: activemodel
|
167
181
|
requirement: !ruby/object:Gem::Requirement
|
@@ -248,7 +262,7 @@ files:
|
|
248
262
|
- lib/graphiti/adapters/active_record/belongs_to_sideload.rb
|
249
263
|
- lib/graphiti/adapters/active_record/has_many_sideload.rb
|
250
264
|
- lib/graphiti/adapters/active_record/has_one_sideload.rb
|
251
|
-
- lib/graphiti/adapters/active_record/
|
265
|
+
- lib/graphiti/adapters/active_record/inference.rb
|
252
266
|
- lib/graphiti/adapters/active_record/many_to_many_sideload.rb
|
253
267
|
- lib/graphiti/adapters/graphiti_api.rb
|
254
268
|
- lib/graphiti/adapters/null.rb
|