From 05079b9fa0a32e53caece1c0edd2e302072d69db Mon Sep 17 00:00:00 2001 From: Chris Grigg Date: Fri, 30 Jan 2015 10:59:51 -0500 Subject: [PATCH] bump version, test for primary key inheritance --- CHANGELOG | 6 ++++++ lib/neo4j/version.rb | 2 +- spec/e2e/id_property_spec.rb | 23 +++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 8cd06031e..3a608d4a9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +== 4.1.2 +* Fixes two bugs related to inheritance: one regarding ActiveRel classes and relationship types, the other regarding ActiveNode primary_key properties not being set when a model is loaded prior to Neo4j session. + +== 4.1.1 +* Switches use of Fixnum to Integer to improve 32-bit support + == 4.1.0 This release includes many performance fixes and new features. The most notable: * Huge stylist cleanup/refactoring by Brian on the entire gem by Brian armed with Rubocop. See http://neo4jrb.io/blog/2014/12/29/stay-out-of-trouble.html. diff --git a/lib/neo4j/version.rb b/lib/neo4j/version.rb index 0a4a2e257..6b0467d02 100644 --- a/lib/neo4j/version.rb +++ b/lib/neo4j/version.rb @@ -1,3 +1,3 @@ module Neo4j - VERSION = '4.1.1' + VERSION = '4.1.2' end diff --git a/spec/e2e/id_property_spec.rb b/spec/e2e/id_property_spec.rb index 42f71b9c9..446d5c5ff 100644 --- a/spec/e2e/id_property_spec.rb +++ b/spec/e2e/id_property_spec.rb @@ -327,5 +327,28 @@ class Apple < Fruit; end it 'works without conf specified' do expect(IdProp::Apple.create.my_id).not_to be_nil end + + context 'when a session is not started' do + it 'waits until the session is loaded, then sets id property' do + Neo4j::Session.current.close + + module IdProp + class Executive + include Neo4j::ActiveNode + id_property :my_id, on: :my_method + + def my_method + 'an id' + end + end + + class CEO < Executive; end + end + + expect(IdProp::CEO.primary_key).to be_nil + create_session + expect(IdProp::CEO.primary_key).not_to be_nil + end + end end end