Skip to content

Commit

Permalink
+ various 4.0 things
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed Dec 7, 2011
1 parent 0c73d62 commit 96e981b
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 2 additions & 0 deletions history.textile
@@ -1,5 +1,7 @@
h2. Upcoming Version

* hanke: (server) Rake task @index@ now points to task @index:parallel@ by default. Call @rake:serial@ to index serially.

h2. Version 4.0.0pre1

* hanke: (server) BREAKING @Picky::Indexes.index@ does not index in parallel anymore.
Expand Down
7 changes: 4 additions & 3 deletions server/lib/picky/category_realtime.rb
Expand Up @@ -43,16 +43,17 @@ def unshift thing
# strings to the index for the given id.
#
def add_tokenized id, tokens, where = :unshift
tokens.each { |text| add_tokenized_token id, text, where }
tokens.each { |text| add_tokenized_token id.send(key_format), text, where, false }
end

#
#
def add_tokenized_token id, text, where = :unshift
def add_tokenized_token id, text, where = :unshift, format = true
return unless text
id = id.send key_format # TODO Speed this up!

id = id.send key_format if format
# text = text.to_sym if @symbols # TODO Symbols.

exact.add id, text, where
partial.add_partialized id, text, where
end
Expand Down
2 changes: 1 addition & 1 deletion server/lib/picky/console.rb
Expand Up @@ -3,7 +3,7 @@
#
module Picky

# TODO Improve.
# Handles the IRB console for Picky.
#
class Console

Expand Down
2 changes: 0 additions & 2 deletions server/lib/picky/index_indexing.rb
Expand Up @@ -104,8 +104,6 @@ def source some_source = nil, &block
# Extract the actual source if it is wrapped in a time
# capsule, i.e. a block/lambda.
#
# TODO Extract into module.
#
def extract_source
@source = @source.respond_to?(:call) ? @source.call : @source
end
Expand Down
1 change: 0 additions & 1 deletion server/lib/picky/loader.rb
Expand Up @@ -20,7 +20,6 @@ def self.reload
# Loads this file anew.
#
def self.load_self
exclaim 'Loader loading itself.'
load __FILE__
end

Expand Down
4 changes: 2 additions & 2 deletions server/picky.gemspec
Expand Up @@ -26,8 +26,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'rspec'
s.add_development_dependency 'picky-client', "~> #{Picky::VERSION}"

s.add_runtime_dependency 'rack'
s.add_runtime_dependency 'rack_fast_escape'
s.add_runtime_dependency 'text'
s.add_runtime_dependency 'yajl-ruby'
s.add_runtime_dependency 'activesupport', '~> 3.0'
Expand All @@ -37,6 +35,8 @@ Gem::Specification.new do |s|
#
s.add_runtime_dependency 'unicorn'
s.add_runtime_dependency 'sinatra'
s.add_runtime_dependency 'rack'
s.add_runtime_dependency 'rack_fast_escape'

# Optional dependencies.
#
Expand Down
2 changes: 1 addition & 1 deletion server/test_project_sinatra/config.ru
Expand Up @@ -2,6 +2,6 @@ require File.expand_path '../app', __FILE__

# Load all indexes.
#
Picky::Indexes.reload
Picky::Indexes.load

run BookSearch.new

0 comments on commit 96e981b

Please sign in to comment.