lib/picky/application.rb in picky-2.6.0 vs lib/picky/application.rb in picky-2.7.0
- old
+ new
@@ -66,11 +66,11 @@
# Let's add a URL path (a Route, see http://github.com/floere/picky/wiki/Routing-configuration) to which we can send our queries. We do that with the route method:
# route %r{^/books$} => books_query
# In full glory:
# class MyGreatSearch < Application
#
-# books = index :books do
+# books = Index::Memory.new :books do
# source Sources::CSV.new(:title, :author, :isbn, file:'app/library.csv')
# category :title
# end
#
# route %r{^/books$} => Search.new(books)
@@ -225,16 +225,10 @@
end
def check_external_interface
"WARNING: No routes defined for application configuration in #{self.class}." if rack_adapter.empty?
end
- def to_s # :nodoc:
- <<-APPLICATION
-\033[1m#{name}\033[m
-#{to_stats.indented_to_s}
-APPLICATION
- end
def to_stats
<<-APP
\033[1mIndexing (default)\033[m:
#{Tokenizers::Index.default.indented_to_s}
@@ -246,11 +240,16 @@
\033[1mRoutes\033[m:
#{to_routes.indented_to_s}
APP
end
+
def to_routes
rack_adapter.to_s
+ end
+
+ def to_s # :nodoc:
+ self.name
end
end
end
\ No newline at end of file