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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 872977a69e5cb7a4fd2cbe93953be2dbba89868f3c41267b8a72ce22ffb5c600
4
- data.tar.gz: 2d189dcaa525e2d5a1b2ffd752a53cc28e0e381cb2411d8530e750175f9de92c
3
+ metadata.gz: fb8f1e8668da2d5d53c211b2f999a5109bf968815f1a700be6d5ee29537afc21
4
+ data.tar.gz: c60dd4731e33f6b495b82575989dc72376697ec21bbcbb01ce23021c61dbc26b
5
5
  SHA512:
6
- metadata.gz: 2e3b922df304f43f3404db5e0213dce76bd073d6d226a3c62620fc5ff0198c2a13a6c7ed3b48b92421cfb6396acb31c11e84edb099bdab915cc9b8917baa845b
7
- data.tar.gz: 80a5f5f23638c598c64012032a7ab4aea3fc5ce515f6b72f9bdf93f19c1c50ee3fd9fd373a6ccec34e4f84f6cf3217257d10d93b4a870aa06e91be67e610c8b0
6
+ metadata.gz: ecd5b910c32aff8592b16406fb8cf12e3d8d00585e671900966c594e475ea9a4d7b620d7d7ff52d35aad9190563fc29f5ce0e1014d886ee35ed46b72e1791ca8
7
+ data.tar.gz: e1273d26d0571ae89f0405933888ac17b10083cfe250da9cb7d7118a511efe381cc03176ec9f78e30e5157d2ec2588883c6d113a22a84a0d326e9ccf02b016dd
data/Gemfile CHANGED
@@ -3,8 +3,6 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in graphiti.gemspec
4
4
  gemspec
5
5
 
6
- gem "standard", "0.4.7"
7
-
8
6
  group :test do
9
7
  gem "pry"
10
8
  gem "pry-byebug", platform: [:mri]
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "rails", "~> 4.1"
5
+ gem "rails", "~> 4.2"
6
6
  gem "rspec-rails"
7
7
  gem "sqlite3", "~> 1.3.6"
8
8
  gem "database_cleaner"
@@ -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/inferrence"
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,5 +1,5 @@
1
1
  class Graphiti::Adapters::ActiveRecord::BelongsToSideload < Graphiti::Sideload::BelongsTo
2
- include Graphiti::Adapters::ActiveRecord::Inferrence
2
+ include Graphiti::Adapters::ActiveRecord::Inference
3
3
 
4
4
  def default_base_scope
5
5
  resource_class.model.all
@@ -1,5 +1,5 @@
1
1
  class Graphiti::Adapters::ActiveRecord::HasManySideload < Graphiti::Sideload::HasMany
2
- include Graphiti::Adapters::ActiveRecord::Inferrence
2
+ include Graphiti::Adapters::ActiveRecord::Inference
3
3
 
4
4
  def default_base_scope
5
5
  resource_class.model.all
@@ -1,5 +1,5 @@
1
1
  class Graphiti::Adapters::ActiveRecord::HasOneSideload < Graphiti::Sideload::HasOne
2
- include Graphiti::Adapters::ActiveRecord::Inferrence
2
+ include Graphiti::Adapters::ActiveRecord::Inference
3
3
 
4
4
  def default_base_scope
5
5
  resource_class.model.all
@@ -1,6 +1,6 @@
1
- module Graphiti::Adapters::ActiveRecord::Inferrence
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 inferrence
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
- .preload(through_relationship_name)
52
- .joins(through_relationship_name)
51
+ .includes(through_relationship_name)
53
52
  .where(belongs_to_many_clause(value, type))
54
53
  end
55
54
 
@@ -1,3 +1,3 @@
1
1
  module Graphiti
2
- VERSION = "1.2.26"
2
+ VERSION = "1.2.27"
3
3
  end
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.26
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/inferrence.rb
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