edge 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +3 -4
- data/CHANGELOG.md +5 -0
- data/edge.gemspec +1 -1
- data/lib/edge/forest.rb +2 -2
- data/lib/edge/version.rb +1 -1
- metadata +6 -13
- data/gemfiles/4.1.gemfile +0 -5
- data/gemfiles/4.2.gemfile +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 729c11baf5b9739910af25ee6d00b58661e2c675733a18d8d10909c9174241f7
|
4
|
+
data.tar.gz: b6ad48c8651a2fbdc12e2adc10e829278c74038fde5ee8eeef0a4067da4c278f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3dbff0036285efea182ae5b755039ab4a5b0a765944276ac25e32abb118579d988c3f4b0454340249f1e5ebfa7e4d3baf69e0b17502bb9e6659a8139eea7562
|
7
|
+
data.tar.gz: 2cecda8332cbde5c580834ea3b43c15e75994e9a4d86385208f2f2deec40c01b9deb4c92e7660b01aa73371d59330cce7aad52734d6900c4b07d5d6db6dad06e
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/edge.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = Edge::VERSION
|
17
17
|
|
18
|
-
gem.add_dependency 'activerecord', ">=
|
18
|
+
gem.add_dependency 'activerecord', ">= 5.0.0"
|
19
19
|
|
20
20
|
gem.add_development_dependency 'pg'
|
21
21
|
gem.add_development_dependency 'pry'
|
data/lib/edge/forest.rb
CHANGED
@@ -24,7 +24,7 @@ module Edge
|
|
24
24
|
|
25
25
|
dependent_options = options[:dependent] ? { dependent: options[:dependent] } : {}
|
26
26
|
|
27
|
-
optional_options =
|
27
|
+
optional_options = options[:optional] ? { optional: options[:optional] } : {}
|
28
28
|
|
29
29
|
belongs_to :parent, common_options.merge(inverse_of: :children).merge(optional_options)
|
30
30
|
|
@@ -122,7 +122,7 @@ module Edge
|
|
122
122
|
quoted_table_name = '"locations"'
|
123
123
|
original_scope = (current_scope || all).select(primary_key, forest_foreign_key)
|
124
124
|
iterated_scope = unscoped.select(primary_key, forest_foreign_key)
|
125
|
-
.joins("INNER JOIN all_nodes ON #{connection.
|
125
|
+
.joins("INNER JOIN all_nodes ON #{connection.quote_table_name table_name}.#{connection.quote_column_name forest_foreign_key}=all_nodes.#{connection.quote_column_name primary_key}")
|
126
126
|
<<-SQL
|
127
127
|
WITH RECURSIVE all_nodes AS (
|
128
128
|
#{original_scope.to_sql}
|
data/lib/edge/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Christensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 5.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 5.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pg
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,8 +101,6 @@ files:
|
|
101
101
|
- bench/database_structure.sql
|
102
102
|
- bench/forest_find.rb
|
103
103
|
- edge.gemspec
|
104
|
-
- gemfiles/4.1.gemfile
|
105
|
-
- gemfiles/4.2.gemfile
|
106
104
|
- gemfiles/5.0.gemfile
|
107
105
|
- lib/edge.rb
|
108
106
|
- lib/edge/forest.rb
|
@@ -131,14 +129,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
129
|
version: '0'
|
132
130
|
requirements: []
|
133
131
|
rubyforge_project:
|
134
|
-
rubygems_version: 2.6
|
132
|
+
rubygems_version: 2.7.6
|
135
133
|
signing_key:
|
136
134
|
specification_version: 4
|
137
135
|
summary: Graph functionality for ActiveRecord. Provides tree/forest modeling structure
|
138
136
|
that can load entire trees in a single query.
|
139
|
-
test_files:
|
140
|
-
- spec/database.yml
|
141
|
-
- spec/database.yml.travis
|
142
|
-
- spec/database_structure.sql
|
143
|
-
- spec/forest_spec.rb
|
144
|
-
- spec/spec_helper.rb
|
137
|
+
test_files: []
|
data/gemfiles/4.1.gemfile
DELETED