lunr 2.0.7 → 2.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG.rdoc +4 -0
  2. data/lib/lunr.rb +1 -1
  3. data/lib/lunr/search.rb +4 -0
  4. metadata +3 -15
@@ -1,3 +1,7 @@
1
+ === 2.0.8 / 2010-09-13
2
+
3
+ * Add a default Lunr::Search#as_json.
4
+
1
5
  === 2.0.7 / 2010-09-11
2
6
 
3
7
  * Stop freezing, it's annoying.
@@ -6,7 +6,7 @@ module Lunr
6
6
 
7
7
  # Duh.
8
8
 
9
- VERSION = "2.0.7"
9
+ VERSION = "2.0.8"
10
10
 
11
11
  end
12
12
 
@@ -21,6 +21,10 @@ module Lunr
21
21
  scope(&block) if block_given?
22
22
  end
23
23
 
24
+ def as_json options = nil
25
+ results.map { |r| r.as_json options }
26
+ end
27
+
24
28
  def each &block
25
29
  execute && @results.each(&block)
26
30
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lunr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
5
4
  prerelease: false
6
5
  segments:
7
6
  - 2
8
7
  - 0
9
- - 7
10
- version: 2.0.7
8
+ - 8
9
+ version: 2.0.8
11
10
  platform: ruby
12
11
  authors:
13
12
  - John Barnette
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-09-11 00:00:00 -07:00
17
+ date: 2010-09-13 00:00:00 -07:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -26,7 +25,6 @@ dependencies:
26
25
  requirements:
27
26
  - - "="
28
27
  - !ruby/object:Gem::Version
29
- hash: 19
30
28
  segments:
31
29
  - 1
32
30
  - 1
@@ -42,7 +40,6 @@ dependencies:
42
40
  requirements:
43
41
  - - "="
44
42
  - !ruby/object:Gem::Version
45
- hash: 47
46
43
  segments:
47
44
  - 4
48
45
  - 4
@@ -58,7 +55,6 @@ dependencies:
58
55
  requirements:
59
56
  - - "="
60
57
  - !ruby/object:Gem::Version
61
- hash: 27
62
58
  segments:
63
59
  - 1
64
60
  - 3
@@ -74,7 +70,6 @@ dependencies:
74
70
  requirements:
75
71
  - - "="
76
72
  - !ruby/object:Gem::Version
77
- hash: 19
78
73
  segments:
79
74
  - 2
80
75
  - 6
@@ -90,7 +85,6 @@ dependencies:
90
85
  requirements:
91
86
  - - "="
92
87
  - !ruby/object:Gem::Version
93
- hash: 23
94
88
  segments:
95
89
  - 1
96
90
  - 0
@@ -106,7 +100,6 @@ dependencies:
106
100
  requirements:
107
101
  - - "="
108
102
  - !ruby/object:Gem::Version
109
- hash: 27
110
103
  segments:
111
104
  - 1
112
105
  - 3
@@ -122,7 +115,6 @@ dependencies:
122
115
  requirements:
123
116
  - - "="
124
117
  - !ruby/object:Gem::Version
125
- hash: 9
126
118
  segments:
127
119
  - 1
128
120
  - 7
@@ -138,7 +130,6 @@ dependencies:
138
130
  requirements:
139
131
  - - "="
140
132
  - !ruby/object:Gem::Version
141
- hash: 43
142
133
  segments:
143
134
  - 0
144
135
  - 9
@@ -154,7 +145,6 @@ dependencies:
154
145
  requirements:
155
146
  - - ">="
156
147
  - !ruby/object:Gem::Version
157
- hash: 19
158
148
  segments:
159
149
  - 2
160
150
  - 6
@@ -211,7 +201,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
211
201
  requirements:
212
202
  - - ">="
213
203
  - !ruby/object:Gem::Version
214
- hash: 57
215
204
  segments:
216
205
  - 1
217
206
  - 8
@@ -222,7 +211,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
211
  requirements:
223
212
  - - ">="
224
213
  - !ruby/object:Gem::Version
225
- hash: 3
226
214
  segments:
227
215
  - 0
228
216
  version: "0"