inquisitio 0.1.2 → 0.1.3
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/inquisitio/active_support.rb +21 -23
- data/lib/inquisitio/searcher.rb +1 -0
- data/lib/inquisitio/version.rb +1 -1
- 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: 27db1be9742128fc3fd387fbb1712ee054279b15
|
4
|
+
data.tar.gz: a3b1388f90ca72bd0411c2c69f089aa1eace0aa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72fc05eff0781551063b4b1f43842e65bf7a53b9acdbb33decaea5672ff5369324e81e48d8a64b2c2a64e149f7f482775c8c4982a9ac1a37c8f9b416e2029e18
|
7
|
+
data.tar.gz: a00a31e5689025f1c62e6d4f761f17b1ff37a645e819d632c844f593b5ab45da1f81d5e22c84276e05d0164f79f6ec0d26565a51acc7b7eb7d20d4ef7d6e2ea9
|
data/CHANGELOG.md
CHANGED
@@ -1,34 +1,32 @@
|
|
1
1
|
# This is taken from ActiveSupport
|
2
|
-
module
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
names.shift if names.empty? || names.first.empty?
|
2
|
+
module ActiveSupportString
|
3
|
+
def constantize
|
4
|
+
names = self.split('::')
|
5
|
+
names.shift if names.empty? || names.first.empty?
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
names.inject(Object) do |constant, name|
|
8
|
+
if constant == Object
|
9
|
+
constant.const_get(name)
|
10
|
+
else
|
11
|
+
candidate = constant.const_get(name)
|
12
|
+
next candidate if constant.const_defined?(name, false)
|
13
|
+
next candidate unless Object.const_defined?(name)
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
# owner is in Object, so raise
|
25
|
-
constant.const_get(name, false)
|
15
|
+
# Go down the ancestors to check it it's owned
|
16
|
+
# directly before we reach Object or the end of ancestors.
|
17
|
+
constant = constant.ancestors.inject do |const, ancestor|
|
18
|
+
break const if ancestor == Object
|
19
|
+
break ancestor if ancestor.const_defined?(name, false)
|
20
|
+
const
|
26
21
|
end
|
22
|
+
|
23
|
+
# owner is in Object, so raise
|
24
|
+
constant.const_get(name, false)
|
27
25
|
end
|
28
26
|
end
|
29
27
|
end
|
30
28
|
end
|
31
29
|
|
32
30
|
class String
|
33
|
-
include
|
31
|
+
include ActiveSupportString
|
34
32
|
end
|
data/lib/inquisitio/searcher.rb
CHANGED
data/lib/inquisitio/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inquisitio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Walker
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-10-
|
13
|
+
date: 2013-10-31 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: excon
|
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
requirements: []
|
177
177
|
rubyforge_project:
|
178
|
-
rubygems_version: 2.
|
178
|
+
rubygems_version: 2.0.3
|
179
179
|
signing_key:
|
180
180
|
specification_version: 4
|
181
181
|
summary: This wraps AWS CloudSearch in a Ruby Gem
|