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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ce0dcb3f38b7a78dfabe5d75cf5376385cfaaeac
4
- data.tar.gz: 78652cb4a461fc982c07e524d06a30571ee7cee7
2
+ SHA256:
3
+ metadata.gz: 729c11baf5b9739910af25ee6d00b58661e2c675733a18d8d10909c9174241f7
4
+ data.tar.gz: b6ad48c8651a2fbdc12e2adc10e829278c74038fde5ee8eeef0a4067da4c278f
5
5
  SHA512:
6
- metadata.gz: 61e257b23bf0b7309f6cbf88ca2593bdf454f18ba270c27fd6951af2396bb663422006eaebedd78a807250e4bb60ddde072fdf76daa1ae60e9cb63ca5019bce6
7
- data.tar.gz: 8a47558d1ee198d94d450d237e454014e5bc727f83b8fb8a14eea325e2f2797d877e2f35dc70ffbaaf7fb4498f78ea8a42607f4b7edb40bf16ae22151a829207
6
+ metadata.gz: e3dbff0036285efea182ae5b755039ab4a5b0a765944276ac25e32abb118579d988c3f4b0454340249f1e5ebfa7e4d3baf69e0b17502bb9e6659a8139eea7562
7
+ data.tar.gz: 2cecda8332cbde5c580834ea3b43c15e75994e9a4d86385208f2f2deec40c01b9deb4c92e7660b01aa73371d59330cce7aad52734d6900c4b07d5d6db6dad06e
@@ -1,10 +1,9 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.1
4
- - 2.2.5
3
+ - 2.5.3
4
+ - 2.4.5
5
+ - 2.3.8
5
6
  gemfile:
6
- - gemfiles/4.1.gemfile
7
- - gemfiles/4.2.gemfile
8
7
  - gemfiles/5.0.gemfile
9
8
 
10
9
  addons:
@@ -1,3 +1,8 @@
1
+ # 0.6.0 (December 13, 2018)
2
+
3
+ * Fix usage when table name includes schema
4
+ * Drop Rails 4.x support
5
+
1
6
  # 0.5.1 (August 4, 2017)
2
7
 
3
8
  * Allow use of 'optional' option for belongs_to (Yuji Yaginuma)
@@ -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', ">= 4.1.0"
18
+ gem.add_dependency 'activerecord', ">= 5.0.0"
19
19
 
20
20
  gem.add_development_dependency 'pg'
21
21
  gem.add_development_dependency 'pry'
@@ -24,7 +24,7 @@ module Edge
24
24
 
25
25
  dependent_options = options[:dependent] ? { dependent: options[:dependent] } : {}
26
26
 
27
- optional_options = (ActiveRecord::VERSION::MAJOR >= 5 && options[:optional]) ? { optional: options[:optional] } : {}
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.quote_column_name table_name}.#{connection.quote_column_name forest_foreign_key}=all_nodes.#{connection.quote_column_name primary_key}")
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}
@@ -1,3 +1,3 @@
1
1
  module Edge
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
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.5.1
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: 2017-08-04 00:00:00.000000000 Z
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: 4.1.0
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: 4.1.0
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.11
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: []
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "activerecord", "~> 4.1.13"
4
-
5
- gemspec :path=>"../"
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "activerecord", "~> 4.2.4"
4
-
5
- gemspec :path=>"../"