Skip to content
Commits on Dec 16, 2011
  1. @szehnder
Commits on Dec 12, 2011
  1. @vhyza
  2. @vhyza
Commits on Dec 10, 2011
  1. @dylanahsmith @karmi

    [FIX] Use currently set `Configuration.url` in `Search::Search#perfor…

    …m` and don't freeze it in initializer
    
    Makes it easier to re-perform a failed search on another server, eg.:
    
        search = Tire::Search::Search.new('articles')
        # build search ...
        servers = ["http://localhost:9200", "http://localhost:9201"]
        begin
          Tire::Configuration.url servers[0]
          search.perform
        rescue Errno::ECONNREFUSED => e
          Tire::Configuration.url servers[1]
          search.perform
        end
        # do something with results ...
    
    Closes #163.
    dylanahsmith committed with karmi Dec 8, 2011
Commits on Dec 1, 2011
  1. @vhyza
Commits on Nov 30, 2011
  1. @karmi @vhyza

    [PERSISTENCE] Changed that search in persistence returns instances of…

    … model not Item
    karmi committed with vhyza Nov 30, 2011
  2. @vhyza

    [FIX][PERSISTENCE] Fixed an error where find by ids was not returning…

    … more than 10 results
    vhyza committed Nov 30, 2011
Commits on Nov 29, 2011
  1. @karmi

    [DOC] README updates

    karmi committed Nov 29, 2011
  2. @karmi

    [ACTIVEMODEL] Added the support for casting model properties as Ruby …

    …objects
    
    In Tire::Persistence, you define a model property to be casted
    as a custom Ruby class instance.
    
    Currently, the implementation expects your class to take a Hash of attributes
    on initialization. (There are plans to support custom initialization logic.)
    
    You can cast either single values (see `Author` in the example below),
    or collections of values (see `[Comment]`). The behaviour was inspired
    by the CouchRest-Model gem.
    
    Also, all strings which conform to the UTC time format are automatically
    converted to Time objects.
    
    Also, all Hashes are automatically converted to Hashr [https://rubygems.org/gems/hashr]
    instances, allowing easy "dot-style" access to nested hash properties.
    
    Example:
    
        class Article
          include Tire::Model::Persistence
    
          validates_presence_of :title, :author
    
          property :title,        :analyzer => 'snowball'
          property :published_on, :type => 'date'
          property :tags,         :default => [], :analyzer => 'keyword'
          property :author,       :class => Author
          property :comments,     :class => [Comment]
        end
    
    See the test suite for more information.
    karmi committed Nov 29, 2011
  3. @karmi

    [GEMS] Added Hashr (https://rubygems.org/gems/hashr) as dependency

    Hashr allows to easily wrap Hashes in object-like manner:
    
        config = Hashr.new('foo' => { 'bar' => 'bar' })
    
        config.foo?     # => true
        config.foo      # => { :bar => 'bar' }
    
        config.foo.bar? # => true
        config.foo.bar  # => 'bar'
    
    See <https://github.com/svenfuchs/hashr> for more info.
    karmi committed Nov 29, 2011
  4. @karmi

    [REFACTORING] Extracted updating item/model instance attributes to de…

    …dicated method (`__update_attributes`)
    karmi committed Nov 29, 2011
  5. @karmi

    [ACTIVEMODEL] Added support for property defaults in Tire::Model::Per…

    …sistence
    
    In the new implementation of the `property` method, you can define default values for your model attributes:
    
        class Article
          include Tire::Model::Persistence
    
          property :title
          property :tags, :default => []
        end
    
        Article.create title: 'Test'
    
        Article.all.first.title
        # => 'Test'
    
        Article.all.first.tags
        # => []
    karmi committed Nov 29, 2011
  6. @karmi

    Release 0.3.12

    karmi committed Nov 29, 2011
  7. @karmi
  8. @karmi

    [REFACTORING] Removed mysterious `store_mapping` method and checks, r…

    …emoved `id` and `type` from serialized document
    
    Accidentally closes #147.
    karmi committed Nov 29, 2011
Commits on Nov 25, 2011
  1. @karmi

    [FIX] Added proper Github URL to Rails application template to README

    For some users, the `rails new` command cannot accept redirects. Closes #154.
    Jakub Dušek committed with karmi Nov 25, 2011
Commits on Nov 12, 2011
  1. @karmi
Commits on Nov 11, 2011
  1. @karmi

    Release 0.3.11

    karmi committed Nov 11, 2011
  2. @karmi
Commits on Nov 10, 2011
  1. @karmi

    Release 0.3.10

    karmi committed Nov 10, 2011
  2. @karmi
Commits on Nov 7, 2011
  1. @karmi

    [FIX] Tighten up the Logger interface and make it easier to pass inst…

    …ances of Logger/Log4r etc.
    
    Example usage:
    
        require 'fileutils'
        require 'active_support/buffered_logger'
    
        mylog = ActiveSupport::BufferedLogger.new 'buffered-logger.log'
        mylog.instance_eval do
          alias :write :info
        end
    
        require 'tire'
    
        Tire.configure { logger mylog }
    
    Closes #142.
    karmi committed Nov 7, 2011
Commits on Nov 6, 2011
  1. @dylanahsmith @karmi
Commits on Nov 4, 2011
  1. @karmi

    [FIX] [REFACTORING] Extracted getting the response body to Logger#log…

    …ged in index methods
    karmi committed Nov 4, 2011
  2. @karmi
  3. @karmi
  4. @karmi
Commits on Oct 30, 2011
  1. @karmi

    Release 0.3.9

    karmi committed Oct 30, 2011
  2. @karmi
  3. @karmi

    Amended integration tests for the "custom_score" queries [#133] [#139]

    Also updated docs in examples/tire-dsl.rb.
    karmi committed Oct 30, 2011
  4. @karmi
Commits on Oct 28, 2011
  1. @dylanahsmith @karmi

    [FIX] Avoid doing a map if wrapper is Hash

    This also speeds up map by moving the check out of the block.
    
    Closes #135.
    dylanahsmith committed with karmi Oct 25, 2011
  2. @dylanahsmith @karmi
  3. @karmi

    [TEST] Fix technically not-working test for "outer scope variables" i…

    …n boolean query unit test
    karmi committed Oct 28, 2011
  4. @karmi
Something went wrong with that request. Please try again.