neo4j 8.0.4 → 8.0.5

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
  SHA1:
3
- metadata.gz: 0128c84d65f0d8f2258c186af98b72fbfe619401
4
- data.tar.gz: c55af92c96646da112414fdab2e07087669c85de
3
+ metadata.gz: ed65404b4ce14b8954c173c41fa6075587ef5394
4
+ data.tar.gz: 711a76dd1c7fdf1483a6bca709e362fcd7b42e00
5
5
  SHA512:
6
- metadata.gz: 787b8f523c9bf24a6d0733e7ae7abbd8b5089daa5545b6e2cec828f3e194d09ccea60ef53191b84d07a8c1c9c6a17386fccd7b0a9c07e0ec5e0d2818c05e010f
7
- data.tar.gz: b20a28be010dc498c4aaa63d197d28c6e79b04da8c9852aa3c6275220a197e0964e688f64c7e1e5e9c03fe09006a9c6d39876b1dd8207ffdf5c3b015bd42ddbe
6
+ metadata.gz: 5420076c376efd118458720e7607235f38c0dec1014199836907b8d4b8ecd6f07014de681b1ce77bdab51de9a7005d41801c521b29e4d180c8053e8a27e4989a
7
+ data.tar.gz: 4e04692112bfffc79bc3422cfa0c6ed1cdcb3bda6d467053cb53504a5c18ef270404dfc08315cb95e2dccfb2e40f4c2c17378f21254975c886f3506961382668
data/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@ 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
+ ## [8.0.5] 2016-01-05
7
+
8
+ ### Fixed
9
+
10
+ - When invalid session type is given, an exception will be raised to aid debugging (see #1335 / thanks @Joshfindit)
11
+
6
12
  ## [8.0.4] 2016-01-03
7
13
 
8
14
  ### Fixed
data/lib/neo4j/railtie.rb CHANGED
@@ -122,12 +122,6 @@ module Neo4j
122
122
  end.detect(&:exist?)
123
123
  end
124
124
 
125
- TYPE_SUBSCRIBERS = {
126
- http: Neo4j::Core::CypherSession::Adaptors::HTTP.method(:subscribe_to_request),
127
- bolt: Neo4j::Core::CypherSession::Adaptors::Bolt.method(:subscribe_to_request),
128
- embedded: Neo4j::Core::CypherSession::Adaptors::Embedded.method(:subscribe_to_transaction)
129
- }
130
-
131
125
  def register_neo4j_cypher_logging(session_type)
132
126
  return if @neo4j_cypher_logging_registered
133
127
 
@@ -137,9 +131,23 @@ module Neo4j
137
131
  (Neo4j::Config[:logger] ||= Rails.logger).debug message
138
132
  end
139
133
  Neo4j::Core::CypherSession::Adaptors::Base.subscribe_to_query(&logger_proc)
140
- TYPE_SUBSCRIBERS[session_type.to_sym].call(&logger_proc)
134
+ subscribe_to_session_type_logging!(session_type, logger_proc)
141
135
 
142
136
  @neo4j_cypher_logging_registered = true
143
137
  end
138
+
139
+ TYPE_SUBSCRIBERS = {
140
+ http: Neo4j::Core::CypherSession::Adaptors::HTTP.method(:subscribe_to_request),
141
+ bolt: Neo4j::Core::CypherSession::Adaptors::Bolt.method(:subscribe_to_request),
142
+ embedded: Neo4j::Core::CypherSession::Adaptors::Embedded.method(:subscribe_to_transaction)
143
+ }
144
+
145
+ def subscribe_to_session_type_logging!(session_type, logger_proc)
146
+ if TYPE_SUBSCRIBERS.key?(session_type.to_sym)
147
+ TYPE_SUBSCRIBERS[session_type.to_sym].call(&logger_proc)
148
+ else
149
+ fail ArgumentError, "Invalid session type: #{session_type.inspect} (expected one of #{TYPE_SUBSCRIBERS.keys.inspect})"
150
+ end
151
+ end
144
152
  end
145
153
  end
data/lib/neo4j/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = '8.0.4'
2
+ VERSION = '8.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.4
4
+ version: 8.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Ronge, Brian Underwood, Chris Grigg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-04 00:00:00.000000000 Z
11
+ date: 2017-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter