xapian_db 1.3.5 → 1.3.5.1

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: a5a458e6c5f807a089ea34ea91540c095049a046
4
- data.tar.gz: 66bc5684400514aa2f63dc9444818c26eff51712
3
+ metadata.gz: 6e203761f0f1566b21fdc710814a182e16975655
4
+ data.tar.gz: 06d0a9a439ac17159cb3a5bcaa807e037ae3e5c1
5
5
  SHA512:
6
- metadata.gz: bff6ac2e547a3acf7bca24fa5280e78bed0bf850af35cfdae083f0ea053db91d3b8881e40b869f7fbadead3658ca41cac71dba01caaa210d5c2ca7badf886968
7
- data.tar.gz: 45ac15e5c3b513579a0fdbd3bb83555abf8ee2695e0c98057550189d00626ee372352262ab567a757e189a76fad9812e00d06a60bf51f72cf430d0bdf07dbb14
6
+ metadata.gz: 1858b52f0e632241103a29ae0b882bdc4daaac213b44315d0c042da728230be229c99f9f0f4d3e69b1a0c74337dbaa33af915a78b7f4e35fdb5c16107eb61580
7
+ data.tar.gz: cf08d43a0ed01be48ebc5084b1f88478dc9323a925c8674961d7295c30d3e29688e38be5df984b2c965ceb7082717439aaee2ed36ca8f8b567e4ed1fd686c411
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ##1.3.5.1 (August 16th, 2013)
2
+
3
+ Fixes:
4
+
5
+ - namespaced models work again with rails 4
6
+
1
7
  ##1.3.5 (August 3rd, 2013)
2
8
 
3
9
  Changes:
@@ -19,11 +19,26 @@ module XapianDb
19
19
  names = camel_cased_word.split('::')
20
20
  names.shift if names.empty? || names.first.empty?
21
21
 
22
- constant = Object
23
- names.each do |name|
24
- constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name)
22
+ names.inject(Object) do |constant, name|
23
+ if constant == Object
24
+ constant.const_get(name)
25
+ else
26
+ candidate = constant.const_get(name)
27
+ next candidate if constant.const_defined?(name, false)
28
+ next candidate unless Object.const_defined?(name)
29
+
30
+ # Go down the ancestors to check it it's owned
31
+ # directly before we reach Object or the end of ancestors.
32
+ constant = constant.ancestors.inject do |const, ancestor|
33
+ break const if ancestor == Object
34
+ break ancestor if ancestor.const_defined?(name, false)
35
+ const
36
+ end
37
+
38
+ # owner is in Object, so raise
39
+ constant.const_get(name, false)
40
+ end
25
41
  end
26
- constant
27
42
  end
28
43
 
29
44
  # Taken from Rails
@@ -33,4 +48,4 @@ module XapianDb
33
48
  end
34
49
 
35
50
  end
36
- end
51
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xapian_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gernot Kogler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-03 00:00:00.000000000 Z
11
+ date: 2013-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
247
247
  version: 1.3.6
248
248
  requirements: []
249
249
  rubyforge_project:
250
- rubygems_version: 2.0.3
250
+ rubygems_version: 2.0.6
251
251
  signing_key:
252
252
  specification_version: 4
253
253
  summary: Ruby library to use a Xapian db as a key/value store with high performance