seasy 0.0.6 → 0.0.7
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/VERSION +1 -1
- data/lib/seasy/index.rb +1 -0
- data/seasy.gemspec +2 -2
- data/spec/index_spec.rb +19 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.7
|
data/lib/seasy/index.rb
CHANGED
data/seasy.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "seasy"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Fredrik Rubensson"]
|
12
|
-
s.date = "2011-
|
12
|
+
s.date = "2011-11-20"
|
13
13
|
s.description = "An easy to use search index (requiring no external servers) with a pluggable design for index storage."
|
14
14
|
s.email = "fredrik@eldfluga.se"
|
15
15
|
s.extra_rdoc_files = [
|
data/spec/index_spec.rb
CHANGED
@@ -87,12 +87,23 @@ describe Index do
|
|
87
87
|
DummyStorage.should be_searched_once
|
88
88
|
end
|
89
89
|
|
90
|
+
it "should set name in init if name= is present" do
|
91
|
+
configure do |config|
|
92
|
+
config.storage = DummyStorage
|
93
|
+
end
|
94
|
+
|
95
|
+
i = Index.with_name 'a_name'
|
96
|
+
DummyStorage.should be_name_setter_called
|
97
|
+
end
|
98
|
+
|
90
99
|
end
|
91
100
|
|
92
101
|
class DummyStorage
|
102
|
+
|
93
103
|
def initialize
|
94
104
|
@@saved_count = 0
|
95
105
|
@@searched_count = 0
|
106
|
+
@@name_setter_called = false
|
96
107
|
end
|
97
108
|
|
98
109
|
def save target, weights, options = {}
|
@@ -111,6 +122,14 @@ class DummyStorage
|
|
111
122
|
@@searched_count == 1
|
112
123
|
end
|
113
124
|
|
125
|
+
def DummyStorage::name_setter_called?
|
126
|
+
@@name_setter_called
|
127
|
+
end
|
128
|
+
|
129
|
+
def name= name
|
130
|
+
@@name_setter_called = true
|
131
|
+
end
|
132
|
+
|
114
133
|
def clear
|
115
134
|
end
|
116
135
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: seasy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.7
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Fredrik Rubensson
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-11-20 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
hash:
|
96
|
+
hash: 29671186243817504
|
97
97
|
segments:
|
98
98
|
- 0
|
99
99
|
version: "0"
|