rifle 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rifle.rb +3 -2
- data/lib/rifle/version.rb +1 -1
- metadata +21 -21
data/lib/rifle.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'set'
|
3
|
+
require 'date'
|
3
4
|
require 'redis'
|
4
5
|
require 'text'
|
5
6
|
require_relative 'rifle/settings'
|
@@ -40,7 +41,7 @@ module Rifle
|
|
40
41
|
|
41
42
|
# Now get the new ones
|
42
43
|
words = traverse_object_for_word_set(hash)
|
43
|
-
words_and_search_terms = words + Array(additional_search_terms).map {|w| w.nil? ? nil : w.downcase}.compact
|
44
|
+
words_and_search_terms = words + Array(additional_search_terms).map { |w| w.nil? ? nil : w.downcase }.compact
|
44
45
|
metaphones = get_metaphones_from_word_set(words_and_search_terms)
|
45
46
|
|
46
47
|
# Clear out words that have been removed (but leave ones that are still present in the new version)
|
@@ -79,7 +80,7 @@ module Rifle
|
|
79
80
|
payload: get_payload_for_urn(u)
|
80
81
|
}
|
81
82
|
}
|
82
|
-
full_results.sort! { |a, b|
|
83
|
+
full_results.sort! { |a, b| (b[:payload]['updated_at'] || '') <=> (a[:payload]['updated_at'] || '' )}
|
83
84
|
end
|
84
85
|
end
|
85
86
|
|
data/lib/rifle/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rifle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,136 +9,136 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
type: :runtime
|
16
16
|
name: rails
|
17
17
|
prerelease: false
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
19
20
|
requirements:
|
20
21
|
- - ! '>='
|
21
22
|
- !ruby/object:Gem::Version
|
22
23
|
version: '0'
|
23
|
-
none: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
25
26
|
requirements:
|
26
27
|
- - ! '>='
|
27
28
|
- !ruby/object:Gem::Version
|
28
29
|
version: '0'
|
29
|
-
none: false
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
type: :runtime
|
32
32
|
name: redis
|
33
33
|
prerelease: false
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
35
36
|
requirements:
|
36
37
|
- - ! '>='
|
37
38
|
- !ruby/object:Gem::Version
|
38
39
|
version: '0'
|
39
|
-
none: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
41
42
|
requirements:
|
42
43
|
- - ! '>='
|
43
44
|
- !ruby/object:Gem::Version
|
44
45
|
version: '0'
|
45
|
-
none: false
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
type: :runtime
|
48
48
|
name: text
|
49
49
|
prerelease: false
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
51
52
|
requirements:
|
52
53
|
- - ! '>='
|
53
54
|
- !ruby/object:Gem::Version
|
54
55
|
version: '0'
|
55
|
-
none: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
57
58
|
requirements:
|
58
59
|
- - ! '>='
|
59
60
|
- !ruby/object:Gem::Version
|
60
61
|
version: '0'
|
61
|
-
none: false
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
type: :runtime
|
64
64
|
name: resque
|
65
65
|
prerelease: false
|
66
66
|
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
67
68
|
requirements:
|
68
69
|
- - ! '>='
|
69
70
|
- !ruby/object:Gem::Version
|
70
71
|
version: '0'
|
71
|
-
none: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
73
74
|
requirements:
|
74
75
|
- - ! '>='
|
75
76
|
- !ruby/object:Gem::Version
|
76
77
|
version: '0'
|
77
|
-
none: false
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
type: :runtime
|
80
80
|
name: rest-client
|
81
81
|
prerelease: false
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
83
84
|
requirements:
|
84
85
|
- - ! '>='
|
85
86
|
- !ruby/object:Gem::Version
|
86
87
|
version: '0'
|
87
|
-
none: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
89
90
|
requirements:
|
90
91
|
- - ! '>='
|
91
92
|
- !ruby/object:Gem::Version
|
92
93
|
version: '0'
|
93
|
-
none: false
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
type: :runtime
|
96
96
|
name: session_off
|
97
97
|
prerelease: false
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
99
100
|
requirements:
|
100
101
|
- - ! '>='
|
101
102
|
- !ruby/object:Gem::Version
|
102
103
|
version: '0'
|
103
|
-
none: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
105
106
|
requirements:
|
106
107
|
- - ! '>='
|
107
108
|
- !ruby/object:Gem::Version
|
108
109
|
version: '0'
|
109
|
-
none: false
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
type: :runtime
|
112
112
|
name: fitter-happier
|
113
113
|
prerelease: false
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
115
116
|
requirements:
|
116
117
|
- - ! '>='
|
117
118
|
- !ruby/object:Gem::Version
|
118
119
|
version: '0'
|
119
|
-
none: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
121
122
|
requirements:
|
122
123
|
- - ! '>='
|
123
124
|
- !ruby/object:Gem::Version
|
124
125
|
version: '0'
|
125
|
-
none: false
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
type: :runtime
|
128
128
|
name: lograge
|
129
129
|
prerelease: false
|
130
130
|
requirement: !ruby/object:Gem::Requirement
|
131
|
+
none: false
|
131
132
|
requirements:
|
132
133
|
- - ! '>='
|
133
134
|
- !ruby/object:Gem::Version
|
134
135
|
version: '0'
|
135
|
-
none: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
137
138
|
requirements:
|
138
139
|
- - ! '>='
|
139
140
|
- !ruby/object:Gem::Version
|
140
141
|
version: '0'
|
141
|
-
none: false
|
142
142
|
description:
|
143
143
|
email:
|
144
144
|
- harry@harrylascelles.com
|
@@ -162,20 +162,20 @@ rdoc_options: []
|
|
162
162
|
require_paths:
|
163
163
|
- lib
|
164
164
|
required_ruby_version: !ruby/object:Gem::Requirement
|
165
|
+
none: false
|
165
166
|
requirements:
|
166
167
|
- - ! '>='
|
167
168
|
- !ruby/object:Gem::Version
|
168
169
|
version: '0'
|
169
|
-
none: false
|
170
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
|
+
none: false
|
171
172
|
requirements:
|
172
173
|
- - ! '>='
|
173
174
|
- !ruby/object:Gem::Version
|
174
175
|
version: '0'
|
175
|
-
none: false
|
176
176
|
requirements: []
|
177
177
|
rubyforge_project:
|
178
|
-
rubygems_version: 1.8.
|
178
|
+
rubygems_version: 1.8.25
|
179
179
|
signing_key:
|
180
180
|
specification_version: 3
|
181
181
|
summary: Redis search server
|