Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- nodoc

  • Loading branch information...
commit 1fa904755e1e034c3b2d362ffeff9278bfcd6e19 1 parent c3c31b6
@floere authored
Showing with 57 additions and 55 deletions.
  1. +1 −1  server/aux/picky/cli.rb
  2. +1 −1  server/lib/picky/analyzer.rb
  3. +1 −1  server/lib/picky/calculations/location.rb
  4. +2 −2 server/lib/picky/character_substituters/west_european.rb
  5. +2 −2 server/lib/picky/deployment.rb
  6. +1 −1  server/lib/picky/extensions/array.rb
  7. +1 −1  server/lib/picky/extensions/class.rb
  8. +1 −1  server/lib/picky/extensions/hash.rb
  9. +1 −1  server/lib/picky/extensions/module.rb
  10. +1 −1  server/lib/picky/extensions/object.rb
  11. +1 −1  server/lib/picky/extensions/string.rb
  12. +1 −1  server/lib/picky/extensions/symbol.rb
  13. +1 −1  server/lib/picky/generators/similarity/phonetic.rb
  14. +2 −2 server/lib/picky/index.rb
  15. +1 −1  server/lib/picky/indexers/base.rb
  16. +1 −1  server/lib/picky/loader.rb
  17. +1 −1  server/lib/picky/performant.rb
  18. +5 −3 server/lib/picky/query/allocation.rb
  19. +6 −6 server/lib/picky/query/allocations.rb
  20. +4 −8 server/lib/picky/query/combination.rb
  21. +9 −8 server/lib/picky/query/combinations.rb
  22. +3 −3 server/lib/picky/query/indexes_check.rb
  23. +1 −1  server/lib/picky/query/qualifier_category_mapper.rb
  24. +1 −1  server/lib/picky/query/token.rb
  25. +1 −1  server/lib/picky/query/tokens.rb
  26. +1 −1  server/lib/picky/rack/harakiri.rb
  27. +1 −1  server/lib/picky/search.rb
  28. +1 −1  server/lib/picky/statistics.rb
  29. +4 −1 server/lib/tasks/try.rb
View
2  server/aux/picky/cli.rb
@@ -2,7 +2,7 @@ module Picky
# A very simple CLI selector.
#
- class CLI # :nodoc:all
+ class CLI
# Execute a command.
#
View
2  server/lib/picky/analyzer.rb
@@ -3,7 +3,7 @@
# Analyzes indexes (index bundles, actually).
#
-class Analyzer # :nodoc:all
+class Analyzer
attr_reader :analysis, :comments
View
2  server/lib/picky/calculations/location.rb
@@ -1,6 +1,6 @@
module Picky
- module Calculations # :nodoc:all
+ module Calculations
# A location calculation recalculates a 1-d location
# to the Picky internal 1-d "grid".
View
4 server/lib/picky/character_substituters/west_european.rb
@@ -12,7 +12,7 @@ module CharacterSubstituters
#
class WestEuropean
- def initialize # :nodoc:
+ def initialize
@chars = ActiveSupport::Multibyte.proxy_class
end
@@ -45,7 +45,7 @@ def substitute text
}.pack 'U*'
end
- def to_s # :nodoc:
+ def to_s
self.class.name
end
View
4 server/lib/picky/deployment.rb
@@ -1,7 +1,7 @@
require File.expand_path '../constants', __FILE__
-module Picky # :nodoc:
- module Capistrano # :nodoc:all
+module Picky
+ module Capistrano
# Include all
#
View
2  server/lib/picky/extensions/array.rb
@@ -1,6 +1,6 @@
# The Array class we all know and love.
#
-class Array # :nodoc:all
+class Array
# Cluster-uniqs equal neighborly elements.
#
View
2  server/lib/picky/extensions/class.rb
@@ -1,6 +1,6 @@
# The original Class class.
#
-class Class # :nodoc:all
+class Class
def instance_delegate *methods
methods.each do |method|
View
2  server/lib/picky/extensions/hash.rb
@@ -1,6 +1,6 @@
# Extensions for the Hash.
#
-class Hash # :nodoc:all
+class Hash
# Use yajl's encoding.
#
View
2  server/lib/picky/extensions/module.rb
@@ -1,6 +1,6 @@
# The original Module class.
#
-class Module # :nodoc:all
+class Module
def each_delegate *methods
options = methods.pop
View
2  server/lib/picky/extensions/object.rb
@@ -1,4 +1,4 @@
-class Object # :nodoc:all
+class Object
# TODO Remove.
View
2  server/lib/picky/extensions/string.rb
@@ -1,6 +1,6 @@
# Extending the String class.
#
-class String # :nodoc:all
+class String
# Returns a _single_ double metaphone code
# for this string.
View
2  server/lib/picky/extensions/symbol.rb
@@ -1,6 +1,6 @@
# Extending the Symbol class.
#
-class Symbol # :nodoc:all
+class Symbol
# Returns a _single_ double metaphone code
# for this symbol.
View
2  server/lib/picky/generators/similarity/phonetic.rb
@@ -27,7 +27,7 @@ def initialize amount = 3
# Tries to require the text gem.
#
- def check_gem # :nodoc:
+ def check_gem
require 'text'
rescue LoadError
warn_gem_missing 'text', 'a phonetic Similarity'
View
4 server/lib/picky/index.rb
@@ -288,7 +288,7 @@ def ranged_category category_name, range, options = {}
# THINK Will have to write a wrapper that combines two categories that are
# indexed simultaneously, since lat/lng are correlated.
#
- def geo_categories lat_name, lng_name, radius, options = {} # :nodoc:
+ def geo_categories lat_name, lng_name, radius, options = {}
# Extract lat/lng specific options.
#
@@ -316,7 +316,7 @@ def geo_categories lat_name, lng_name, radius, options = {} # :nodoc:
end
- def to_stats # :nodoc:
+ def to_stats
stats = <<-INDEX
#{name} (#{self.class}):
#{"source: #{source}".indented_to_s}
View
2  server/lib/picky/indexers/base.rb
@@ -35,7 +35,7 @@ def reset source
source.reconnect! if source.respond_to?(:reconnect!)
end
- def check source # :nodoc:
+ def check source
raise "Trying to index without a source for #{@index_or_category.name}." unless source
end
View
2  server/lib/picky/loader.rb
@@ -2,7 +2,7 @@ module Picky
# Loads the search engine and it
#
- module Loader # :nodoc:all
+ module Loader
class << self
View
2  server/lib/picky/performant.rb
@@ -1,6 +1,6 @@
module Picky
- module Performant # :nodoc:all
+ module Performant
# C Code here.
end
View
8 server/lib/picky/query/allocation.rb
@@ -2,13 +2,15 @@ module Picky
module Query
- # An #Allocation contains an ordered list of
- # tuples (#Combination s).
- # The #Combination s are ordered according to the order
+ # An Allocation contains an ordered list of
+ # tuples (Combinations).
+ # The Combinations are ordered according to the order
# of the words in the query.
#
# It offers convenience methods to calculate the #ids etc.
#
+ # An Allocation is normally contained in an Allocations container.
+ #
class Allocation
attr_reader :count,
View
12 server/lib/picky/query/allocations.rb
@@ -2,17 +2,17 @@ module Picky
module Query
- # Container class for #Allocation s.
+ # Container class for Allocation s.
#
- # This class is asked by the #Results class to
+ # This class is asked by the Results class to
# compile and process a query.
- # It then asks the #Allocation s to process their
- # ids and scores, each in turn.
+ # It then asks each Allocation to process their
+ # ids and scores.
#
# It also offers convenience methods to access #ids
- # of its #Allocation s.
+ # of its Allocation s.
#
- class Allocations # :nodoc:all
+ class Allocations
delegate :each,
:empty?,
View
12 server/lib/picky/query/combination.rb
@@ -2,14 +2,10 @@ module Picky
module Query
- # Describes the #Combination of a #Token (the text) and
- # the index (the bundle): [text, index_bundle]
+ # Describes the Combination of a Token (the text) and
+ # the index (the bundle): [text, index_bundle].
#
- # A #Combination is a single part of an allocation:
- # [..., [text2, index_bundle2], ...]
- #
- # An #Allocation consists of an ordered number of #Combinations:
- # [[text1, index_bundle1], [text2, index_bundle2], [text3, index_bundle1]]
+ # An Allocation consists of an ordered number of Combinations.
#
class Combination
@@ -74,7 +70,7 @@ def to_result
end
# Example:
- # "exact title:Peter*:peter"
+ # "exact title:Peter*:peter"
#
def to_s
"#{category.bundle_for(token).identifier}(#{to_result.join(':')})"
View
17 server/lib/picky/query/combinations.rb
@@ -2,14 +2,15 @@ module Picky
module Query
- # #Combinations represent an ordered list of #Combination s.
+ # Combinations represent an ordered list of Combination s.
#
- # They are the core of an #Allocation.
- # An #Allocation consists of a number of #Combinations.
+ # Combinations contain methods for calculating score (including
+ # the boost) and ids for each of its Combination s.
+ #
+ # They are the core of an Allocation.
+ # An Allocation consists of a number of Combinations.
#
- # #Combinations contain methods for calculating score (including the boost) and ids.
- #
- class Combinations # :nodoc:all
+ class Combinations
attr_reader :combinations
@@ -36,8 +37,8 @@ def boost_for weights
# that are passed in, are removed.
#
# Note: This method is not totally independent of the calculate_ids one.
- # Since identifiers are only nullified, we need to not include the
- # ids that have an associated identifier that is nil.
+ # Since identifiers are only nullified, we need to not include the
+ # ids that have an associated identifier that is nil.
#
def remove categories = []
@combinations.reject! { |combination| categories.include?(combination.category) }
View
6 server/lib/picky/query/indexes_check.rb
@@ -14,13 +14,13 @@ class << self
#
# Picky will raise a Query::Indexes::DifferentBackendsError.
#
- def check_backends indexes # :nodoc:
+ def check_backends indexes
backends = indexes.map &:backend
backends.uniq! &:class
raise_different backends if backends.size > 1
backends
end
- def raise_different backends # :nodoc:
+ def raise_different backends
raise DifferentBackendsError.new(backends)
end
@@ -31,7 +31,7 @@ def raise_different backends # :nodoc:
# Currently it isn't possible using Memory and Redis etc.
# indexes in the same query index group.
#
- class DifferentBackendsError < StandardError # :nodoc:all
+ class DifferentBackendsError < StandardError
def initialize backends
@backends = backends
end
View
2  server/lib/picky/query/qualifier_category_mapper.rb
@@ -6,7 +6,7 @@ module Query
# Collection class for qualifiers.
#
- class QualifierCategoryMapper # :nodoc:all
+ class QualifierCategoryMapper
attr_reader :mapping
View
2  server/lib/picky/query/token.rb
@@ -9,7 +9,7 @@ module Query
# It also knows whether it needs to look for similarity (bla~),
# or whether it is a partial (bla*).
#
- class Token # :nodoc:all
+ class Token
attr_reader :text, :original
attr_writer :similar
View
2  server/lib/picky/query/tokens.rb
@@ -6,7 +6,7 @@ module Query
# This class primarily handles switching through similar token constellations.
#
- class Tokens # :nodoc:all
+ class Tokens
attr_reader :ignore_unassigned
View
2  server/lib/picky/rack/harakiri.rb
@@ -1,4 +1,4 @@
-module Rack # :nodoc:
+module Rack
# Simple Rack Middleware to kill Unicorns after X requests.
#
View
2  server/lib/picky/search.rb
@@ -227,7 +227,7 @@ def tokenized text
# Gets sorted allocations for the tokens.
#
- def sorted_allocations tokens, amount = nil # :nodoc:
+ def sorted_allocations tokens, amount = nil
indexes.prepared_allocations_for tokens, boosts, amount
end
View
2  server/lib/picky/statistics.rb
@@ -6,7 +6,7 @@ module Picky
# Gathers various statistics.
#
- class Statistics # :nodoc:all
+ class Statistics
def initialize
@indexes = ["\033[1mIndexes analysis\033[m:"]
View
5 server/lib/tasks/try.rb
@@ -1,5 +1,8 @@
module Picky
-
+
+ # Try is used by
+ # rake try[index,category]
+ #
class Try
attr_reader :text, :specific
Please sign in to comment.
Something went wrong with that request. Please try again.