activegraph 10.0.1 → 10.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e434fda5c1ab2cf1ad9d3d859cec6fc31d7b076fefcf3ead00dd5890849436a1
4
- data.tar.gz: 1d0827473f9f6c0e6000fd0da3175f6721c1e11d146734b58d9a3c216502b973
3
+ metadata.gz: da2d8a7259add3643cf674f25c93580424d614791b68394c6ebd51e936828140
4
+ data.tar.gz: 7c6987932e0bb59d96a1233d51a20748fee03d585cc2fa5dcd45111e17b8fb04
5
5
  SHA512:
6
- metadata.gz: d260e538a8121c313d08a51893a773ba2e7e6d7c6f0cf9e1a99f2f28da656c5192779e408f02cb7c8f399e9dbe427ed67ff6df5cf2f406a727ebb2259549c113
7
- data.tar.gz: 40b4a2bbdc71d888447f9b2c057cdb3d0c5b5f75f783e6a61fa04defc8916908e7dc3aee2f09c8261bd9e851c67c270b1eef920fff1039cdaa68d4a023291dff
6
+ metadata.gz: 97733e8f86febdfd278a75cbef2561074d14d7d545ce98474f61b8b395a9972e04643b624c0f87b9c132493a316cb8b0a7011e28dc27d918c7bc787681b57b84
7
+ data.tar.gz: b1529b3c7e256ecef44a7006691593fc0a7a8f1e7b7e6de60fb5d22bae6b92a91307d4753d4f9b12fec0a8853df3369f0e1479b7945c035b1f550f9dc7053b64
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
3
3
  This file should follow the standards specified on [http://keepachangelog.com/]
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [10.0.2] 2020-12-08
7
+
8
+ ## Fixed
9
+
10
+ - fixed bad require (https://github.com/neo4jrb/activegraph/issues/1634)
11
+ - removed unused exception class (Thanks @joshjordan)
12
+ - prevented after_commit callbacks from being called multiple times (Thanks @joshjordan)
13
+
6
14
  ## [10.0.1] 2020-07-26
7
15
 
8
16
  ## Fixed
@@ -22,6 +22,7 @@ module ActiveGraph
22
22
  class << self
23
23
  def for_clause(clause, arg, model, *args)
24
24
  method_to_call = "for_#{clause}_clause"
25
+ return unless respond_to?(method_to_call)
25
26
 
26
27
  send(method_to_call, arg, model, *args)
27
28
  end
@@ -112,8 +113,6 @@ module ActiveGraph
112
113
  default = [Link.new(clause, arg, *args)]
113
114
 
114
115
  Link.for_clause(clause, arg, model, *args) || default
115
- rescue NoMethodError
116
- default
117
116
  end
118
117
 
119
118
  def converted_keys(model, arg)
@@ -5,9 +5,8 @@ require 'active_graph/migration'
5
5
  if !defined?(Rails) && !Rake::Task.task_defined?('environment')
6
6
  desc 'Run a script against the database to perform system-wide changes'
7
7
  task :environment do
8
- require 'active_graph/session_manager'
9
8
  require 'ostruct'
10
- neo4j_url = ENV['NEO4J_URL'] || 'http://localhost:7474'
9
+ neo4j_url = ENV['NEO4J_URL'] || 'bolt://localhost:7687'
11
10
  $LOAD_PATH.unshift File.dirname('./')
12
11
  ActiveGraph::Base.on_establish_driver do
13
12
  Neo4j::Driver::GraphDatabase.driver(neo4j_url)
@@ -8,13 +8,16 @@ module ActiveGraph
8
8
  def close
9
9
  success
10
10
  super
11
- after_commit_registry.each(&:call) unless @failure
12
11
  end
13
12
 
14
13
  def after_commit(&block)
15
14
  after_commit_registry << block
16
15
  end
17
16
 
17
+ def apply_callbacks
18
+ after_commit_registry.each(&:call) unless @failure
19
+ end
20
+
18
21
  private
19
22
 
20
23
  def after_commit_registry
@@ -43,7 +43,7 @@ module ActiveGraph
43
43
  session.send(method, **config) do |tx|
44
44
  self.tx = tx
45
45
  checked_yield(tx, &block)
46
- end
46
+ end.tap { tx.apply_callbacks }
47
47
  end
48
48
 
49
49
  def checked_yield(tx)
@@ -1,3 +1,3 @@
1
1
  module ActiveGraph
2
- VERSION = '10.0.1'
2
+ VERSION = '10.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activegraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.1
4
+ version: 10.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Ronge, Brian Underwood, Chris Grigg, Heinrich Klobuczek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-27 00:00:00.000000000 Z
11
+ date: 2020-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -260,7 +260,6 @@ files:
260
260
  - lib/active_graph/class_arguments.rb
261
261
  - lib/active_graph/config.rb
262
262
  - lib/active_graph/core.rb
263
- - lib/active_graph/core/connection_failed_error.rb
264
263
  - lib/active_graph/core/cypher_error.rb
265
264
  - lib/active_graph/core/entity.rb
266
265
  - lib/active_graph/core/instrumentable.rb
@@ -1,6 +0,0 @@
1
- module ActiveGraph
2
- module Core
3
- class ConnectionFailedError < StandardError;
4
- end
5
- end
6
- end