edge 0.4.3 → 0.4.4

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
2
  SHA1:
3
- metadata.gz: de6a7e89e268d6a04bcb12ea49f331c0492a12c0
4
- data.tar.gz: d3223c0995b78bc3c9de539948b225ee2c0a148a
3
+ metadata.gz: cbe295739f4d8428d51ab51caaf1ea299388ff1a
4
+ data.tar.gz: 05b0a917146b57191b1a0accc561a90ee457df38
5
5
  SHA512:
6
- metadata.gz: e906301864501743b6848b67a40b33d60e5447c7a34c39023327d577e03e43b0ad926834435c31dbaa5b924f16a1b4dcf3bf095565d18779d8cd180b9b4e3776
7
- data.tar.gz: 85d2f8ea8e2e95dd163f17a2e436cec52b50bb80cc8bda6afc012cedba282548cd23991ea0bb4917b91847832ea9a7fb51734ff9a34bfc1b4a5df9011cd1f115
6
+ metadata.gz: ad2b80707a647c3dadf1bb06b60ca5f4b002b56f5ac9577cbed2c353ab2a08fcf6fa3042999ae07958cc06b6c11a67cd5b2c66ebce5783bbd9336282ee8d235e
7
+ data.tar.gz: 46942d09d2066d6bf901146d3d8d86eb38d341aaa598c77cd57758a5538278e5159f992e62e9981769ccbf16e8bbd809874c1f9c2abdfd1f53e24f0be724ae1b
@@ -1,3 +1,7 @@
1
+ # 0.4.4 (January 29, 2016)
2
+
3
+ * Fix JRuby compatibility (jackc)
4
+
1
5
  # 0.4.3 (October 23, 2015)
2
6
 
3
7
  * Allow dependent option to acts_as_forest (WANG QUANG)
@@ -53,7 +53,18 @@ module Edge
53
53
  manager.order(forest_order) if forest_order
54
54
 
55
55
  bind_values = current_scope ? current_scope.bind_values : []
56
- records = find_by_sql manager.to_sql, bind_values
56
+
57
+ # This is a nasty hack to work around
58
+ # https://github.com/jackc/edge/issues/14 The MRI pg gem and the JRuby
59
+ # activerecord-jdbcpostgresql-adapter gem bind values into the prepared
60
+ # statement at different times. If the binds are still '?' then the bind
61
+ # isn't processed yet. But if it is '$1', '$2', etc. then is has been
62
+ # processed. This determines how we pass the values to find_by_sql.
63
+ records = if connection.respond_to? :jdbc_connection_class
64
+ find_by_sql [manager.to_sql, bind_values.map(&:last)]
65
+ else
66
+ find_by_sql manager.to_sql, bind_values
67
+ end
57
68
 
58
69
  records_by_id = records.each_with_object({}) { |r, h| h[r.id] = r }
59
70
 
@@ -1,3 +1,3 @@
1
1
  module Edge
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
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.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Christensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-23 00:00:00.000000000 Z
11
+ date: 2016-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
159
  version: '0'
160
160
  requirements: []
161
161
  rubyforge_project:
162
- rubygems_version: 2.4.5.1
162
+ rubygems_version: 2.5.1
163
163
  signing_key:
164
164
  specification_version: 4
165
165
  summary: Graph functionality for ActiveRecord. Provides tree/forest modeling structure