ripplr 0.0.2.beta → 0.0.3.beta
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.
- data/Gemfile.lock +1 -1
- data/lib/ripplr/queryable.rb +3 -5
- data/lib/ripplr/version.rb +1 -1
- data/spec/ripplr/queryable_spec.rb +2 -2
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/lib/ripplr/queryable.rb
CHANGED
@@ -12,7 +12,7 @@ module Ripplr
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def indexes_as
|
15
|
-
index_data = { :
|
15
|
+
index_data = { :key => self.key }
|
16
16
|
|
17
17
|
self.class.query_fields.each do |field|
|
18
18
|
index_data.merge! field.indexes_as(self)
|
@@ -23,14 +23,12 @@ module Ripplr
|
|
23
23
|
class << self
|
24
24
|
def included(base)
|
25
25
|
base.module_eval do
|
26
|
-
extend
|
27
|
-
|
28
|
-
|
26
|
+
extend QueryableClassMethods
|
29
27
|
end
|
30
28
|
end
|
31
29
|
end
|
32
30
|
|
33
|
-
module
|
31
|
+
module QueryableClassMethods
|
34
32
|
def query_fields
|
35
33
|
@query_fields ||= Array.new
|
36
34
|
@query_fields
|
data/lib/ripplr/version.rb
CHANGED
@@ -27,7 +27,7 @@ describe Ripplr::Queryable do
|
|
27
27
|
Given { lawnmower.stub(:key).and_return "ABCDEF012345" }
|
28
28
|
When (:result) { lawnmower.indexes_as }
|
29
29
|
Then { result.should == {
|
30
|
-
:
|
30
|
+
:key => "ABCDEF012345",
|
31
31
|
:title_text => "Lawnmower",
|
32
32
|
:description_text => "It’s a variation of the classic dumbbell row so it trains the muscles of your back."
|
33
33
|
}
|
@@ -41,7 +41,7 @@ describe Ripplr::Queryable do
|
|
41
41
|
Given { entry.stub(:key).and_return "XYZ1020" }
|
42
42
|
When (:result) { entry.indexes_as }
|
43
43
|
Then { result.should == {
|
44
|
-
:
|
44
|
+
:key => "XYZ1020",
|
45
45
|
:description_text => "4x8 BB Power Clean @ 135lbs.",
|
46
46
|
:created_at_dt => time
|
47
47
|
}
|