Skip to content

Commit

Permalink
- chattiness when loading indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
floere committed Oct 29, 2010
1 parent d28d269 commit 2eacc1c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions server/lib/picky/index/bundle.rb
Expand Up @@ -174,15 +174,12 @@ def load
load_weights
end
def load_index
timed_exclaim "Loading the index for #{identifier} from the cache."
self.index = files.load_index
end
def load_similarity
timed_exclaim "Loading the similarity for #{identifier} from the cache."
self.similarity = files.load_similarity
end
def load_weights
timed_exclaim "Loading the weights for #{identifier} from the cache."
self.weights = files.load_weights
end

Expand Down
1 change: 1 addition & 0 deletions server/lib/picky/index/category.rb
Expand Up @@ -29,6 +29,7 @@ def initialize name, type, options = {}
# Loads the index from cache.
#
def load_from_cache
timed_exclaim "Loading index #{identifier}."
exact.load
partial.load
end
Expand Down
4 changes: 1 addition & 3 deletions server/spec/lib/index/category_spec.rb
Expand Up @@ -15,6 +15,7 @@

@partial = stub :partial, :dump => nil
@category.stub! :partial => @partial
@category.stub! :exclaim
end

describe 'dump_caches' do
Expand Down Expand Up @@ -179,9 +180,6 @@
end

describe 'generate_caches' do
before(:each) do
@category.stub! :exclaim
end
it 'should call three method in order' do
@category.should_receive(:generate_caches_from_source).once.with().ordered
@category.should_receive(:generate_partial).once.with().ordered
Expand Down

0 comments on commit 2eacc1c

Please sign in to comment.