xapian_db 1.3.5 → 1.3.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/xapian_db/utilities.rb +20 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e203761f0f1566b21fdc710814a182e16975655
|
4
|
+
data.tar.gz: 06d0a9a439ac17159cb3a5bcaa807e037ae3e5c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1858b52f0e632241103a29ae0b882bdc4daaac213b44315d0c042da728230be229c99f9f0f4d3e69b1a0c74337dbaa33af915a78b7f4e35fdb5c16107eb61580
|
7
|
+
data.tar.gz: cf08d43a0ed01be48ebc5084b1f88478dc9323a925c8674961d7295c30d3e29688e38be5df984b2c965ceb7082717439aaee2ed36ca8f8b567e4ed1fd686c411
|
data/CHANGELOG.md
CHANGED
data/lib/xapian_db/utilities.rb
CHANGED
@@ -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
|
23
|
-
|
24
|
-
|
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-
|
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.
|
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
|