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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66a8d610eaeba785ed28db97ea770fc1cb8dda32
4
- data.tar.gz: 3f11089c5b376be0f65615c51774a568d3b66a50
3
+ metadata.gz: 27db1be9742128fc3fd387fbb1712ee054279b15
4
+ data.tar.gz: a3b1388f90ca72bd0411c2c69f089aa1eace0aa6
5
5
  SHA512:
6
- metadata.gz: e7c8d8f03668c5578ecea8872d6116230d021f83e329ac31ec69f8105a439c167571044b48ee0f058f6da5e57edffea23ae8695f93e8121c3825ac3c6ccc27a4
7
- data.tar.gz: 97392e98bad079d40f0320c3fa147cf8902efa71ccf88847f568604e9a52aed640f0a6ab2e383a734d29b7405ee2b33b573039be6b72f6b74c9e7dcda95ac44b
6
+ metadata.gz: 72fc05eff0781551063b4b1f43842e65bf7a53b9acdbb33decaea5672ff5369324e81e48d8a64b2c2a64e149f7f482775c8c4982a9ac1a37c8f9b416e2029e18
7
+ data.tar.gz: a00a31e5689025f1c62e6d4f761f17b1ff37a645e819d632c844f593b5ab45da1f81d5e22c84276e05d0164f79f6ec0d26565a51acc7b7eb7d20d4ef7d6e2ea9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 0.1.3 / 2013-10-31
2
+
3
+ [BUGFIX] Fix namespacing issue with ActiveSupport::String
4
+
1
5
  0.1.2 / 2013-10-30
2
6
 
3
7
  [BUGFIX] Convert EXCON ERROR to Inquisitio Error
@@ -1,34 +1,32 @@
1
1
  # This is taken from ActiveSupport
2
- module ActiveSupport
3
- module String
4
- def constantize
5
- names = self.gsub("_", "::").split('::')
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
- names.inject(Object) do |constant, name|
9
- if constant == Object
10
- constant.const_get(name)
11
- else
12
- candidate = constant.const_get(name)
13
- next candidate if constant.const_defined?(name, false)
14
- next candidate unless Object.const_defined?(name)
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
- # Go down the ancestors to check it it's owned
17
- # directly before we reach Object or the end of ancestors.
18
- constant = constant.ancestors.inject do |const, ancestor|
19
- break const if ancestor == Object
20
- break ancestor if ancestor.const_defined?(name, false)
21
- const
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 ActiveSupport::String
31
+ include ActiveSupportString
34
32
  end
@@ -40,6 +40,7 @@ module Inquisitio
40
40
  end
41
41
 
42
42
  klasses.map {|klass, ids|
43
+ klass = klass.gsub("_", "::")
43
44
  klass.constantize.where(id: ids)
44
45
  }.flatten
45
46
  end
@@ -1,3 +1,3 @@
1
1
  module Inquisitio
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
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-30 00:00:00.000000000 Z
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.1.9
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