xapian_db 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +7 -15
- data/Rakefile +43 -0
- data/xapian_source/xapian-bindings-1.2.4.tar.gz +0 -0
- data/xapian_source/xapian-core-1.2.4.tar.gz +0 -0
- metadata +8 -5
    
        data/README.rdoc
    CHANGED
    
    | @@ -34,24 +34,24 @@ If you want to use xapian_db in a Rails app, you need Rails 3 or newer. | |
| 34 34 |  | 
| 35 35 | 
             
            === Install Xapian if not already installed
         | 
| 36 36 |  | 
| 37 | 
            -
            To use xapian_db, make sure you have the Xapian library and ruby bindings installed. At the time of this writing, the newest release of Xapian was 1.2. | 
| 37 | 
            +
            To use xapian_db, make sure you have the Xapian library and ruby bindings installed. At the time of this writing, the newest release of Xapian was 1.2.4. You might
         | 
| 38 38 | 
             
            want to adjust the URLs below to load the most current release of Xapian.
         | 
| 39 39 | 
             
            The example code works for OSX. On linux you might want to use wget instead of curl.
         | 
| 40 40 |  | 
| 41 41 | 
             
            A future release of xapian_db might include the Xapian binaries and make this step obsolete.
         | 
| 42 42 |  | 
| 43 43 | 
             
            ==== Install Xapian
         | 
| 44 | 
            -
              curl -O http://oligarchy.co.uk/xapian/1.2. | 
| 45 | 
            -
              tar xzvf xapian-core-1.2. | 
| 46 | 
            -
              cd xapian-core-1.2. | 
| 44 | 
            +
              curl -O http://oligarchy.co.uk/xapian/1.2.4/xapian-core-1.2.4.tar.gz
         | 
| 45 | 
            +
              tar xzvf xapian-core-1.2.4.tar.gz
         | 
| 46 | 
            +
              cd xapian-core-1.2.4
         | 
| 47 47 | 
             
              ./configure --prefix=/usr/local
         | 
| 48 48 | 
             
              make
         | 
| 49 49 | 
             
              sudo make install
         | 
| 50 50 |  | 
| 51 51 | 
             
            ==== Install ruby bindings for Xapian
         | 
| 52 | 
            -
              curl -O http://oligarchy.co.uk/xapian/1.2.2/xapian-bindings-1.2. | 
| 53 | 
            -
              tar xzvf xapian-bindings-1.2. | 
| 54 | 
            -
              cd xapian-bindings-1.2. | 
| 52 | 
            +
              curl -O http://oligarchy.co.uk/xapian/1.2.2/xapian-bindings-1.2.4.tar.gz
         | 
| 53 | 
            +
              tar xzvf xapian-bindings-1.2.4.tar.gz
         | 
| 54 | 
            +
              cd xapian-bindings-1.2.4
         | 
| 55 55 | 
             
              ./configure --prefix=/usr/local XAPIAN_CONFIG=/usr/local/bin/xapian-config
         | 
| 56 56 | 
             
              make
         | 
| 57 57 | 
             
              sudo make install
         | 
| @@ -102,14 +102,6 @@ If you want to index additional data but do not need access to it from a search | |
| 102 102 |  | 
| 103 103 | 
             
              blueprint.index :remarks, :weight => 5
         | 
| 104 104 |  | 
| 105 | 
            -
            If you config a class that has a language property, e.g.
         | 
| 106 | 
            -
             | 
| 107 | 
            -
              class Person
         | 
| 108 | 
            -
                attr_reader :language
         | 
| 109 | 
            -
              end
         | 
| 110 | 
            -
             | 
| 111 | 
            -
            The method must return the iso code for the language (:en, :de, ...) as a symbol or a string. Don't worry if you have languages in your database that are not supported by Xapian. If the language is not supported, XapianDb will fall back to the global language configuration or none, if you haven't configured one.
         | 
| 112 | 
            -
             | 
| 113 105 | 
             
            If you want to declare multiple attributes or indexes with default options, you can do this in one statement:
         | 
| 114 106 |  | 
| 115 107 | 
             
              XapianDb::DocumentBlueprint.setup(Person) do |blueprint|
         | 
    
        data/Rakefile
    ADDED
    
    | @@ -0,0 +1,43 @@ | |
| 1 | 
            +
            # encoding: utf-8
         | 
| 2 | 
            +
            # Install the xapian binaries into the lib folder of the gem
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            require 'rbconfig'
         | 
| 5 | 
            +
            c = Config::CONFIG
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            def system!(cmd)
         | 
| 8 | 
            +
            	puts cmd
         | 
| 9 | 
            +
            	system(cmd) or raise
         | 
| 10 | 
            +
            end
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            ver = '1.2.4'
         | 
| 13 | 
            +
            source_dir = 'xapian_source'
         | 
| 14 | 
            +
            core = "xapian-core-#{ver}"
         | 
| 15 | 
            +
            bindings = "xapian-bindings-#{ver}"
         | 
| 16 | 
            +
            xapian_config = "#{Dir.pwd}/#{core}/xapian-config"
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            task :default do
         | 
| 19 | 
            +
            	[core,bindings].each do |x|
         | 
| 20 | 
            +
            		system! "tar -xzvf #{source_dir}/#{x}.tar.gz"
         | 
| 21 | 
            +
            	end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
            	prefix = Dir.pwd
         | 
| 24 | 
            +
            	ENV['LDFLAGS'] = "-R#{prefix}/lib"
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            	system! "mkdir -p lib"
         | 
| 27 | 
            +
             | 
| 28 | 
            +
            	Dir.chdir core do
         | 
| 29 | 
            +
            		system! "./configure --prefix=#{prefix} --exec-prefix=#{prefix}"
         | 
| 30 | 
            +
            		system! "make clean all"
         | 
| 31 | 
            +
            		system! "cp -r .libs/* ../lib/"
         | 
| 32 | 
            +
            	end
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            	Dir.chdir bindings do
         | 
| 35 | 
            +
            		ENV['RUBY'] ||= "#{c['bindir']}/#{c['RUBY_INSTALL_NAME']}"
         | 
| 36 | 
            +
            		ENV['XAPIAN_CONFIG'] = xapian_config
         | 
| 37 | 
            +
            		system! "./configure --prefix=#{prefix} --exec-prefix=#{prefix} --with-ruby"
         | 
| 38 | 
            +
            		system! "make clean all"
         | 
| 39 | 
            +
            	end
         | 
| 40 | 
            +
             | 
| 41 | 
            +
            	system! "cp -r #{bindings}/ruby/.libs/_xapian.* lib"
         | 
| 42 | 
            +
            	system! "cp #{bindings}/ruby/xapian.rb lib"
         | 
| 43 | 
            +
            end
         | 
| Binary file | 
| Binary file | 
    
        metadata
    CHANGED
    
    | @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version | |
| 5 5 | 
             
              segments: 
         | 
| 6 6 | 
             
              - 0
         | 
| 7 7 | 
             
              - 5
         | 
| 8 | 
            -
              -  | 
| 9 | 
            -
              version: 0.5. | 
| 8 | 
            +
              - 2
         | 
| 9 | 
            +
              version: 0.5.2
         | 
| 10 10 | 
             
            platform: ruby
         | 
| 11 11 | 
             
            authors: 
         | 
| 12 12 | 
             
            - Gernot Kogler
         | 
| @@ -14,7 +14,7 @@ autorequire: | |
| 14 14 | 
             
            bindir: bin
         | 
| 15 15 | 
             
            cert_chain: []
         | 
| 16 16 |  | 
| 17 | 
            -
            date:  | 
| 17 | 
            +
            date: 2011-01-11 00:00:00 +01:00
         | 
| 18 18 | 
             
            default_executable: 
         | 
| 19 19 | 
             
            dependencies: 
         | 
| 20 20 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -66,8 +66,8 @@ description: XapianDb is a ruby gem that combines features of nosql databases an | |
| 66 66 | 
             
            email: gernot.kogler (at) garaio (dot) com
         | 
| 67 67 | 
             
            executables: []
         | 
| 68 68 |  | 
| 69 | 
            -
            extensions:  | 
| 70 | 
            -
             | 
| 69 | 
            +
            extensions: 
         | 
| 70 | 
            +
            - Rakefile
         | 
| 71 71 | 
             
            extra_rdoc_files: []
         | 
| 72 72 |  | 
| 73 73 | 
             
            files: 
         | 
| @@ -104,9 +104,12 @@ files: | |
| 104 104 | 
             
            - lib/xapian_db/stopwords/update_stopwords.rb
         | 
| 105 105 | 
             
            - lib/xapian_db.rb
         | 
| 106 106 | 
             
            - tasks/beanstalk_worker.rake
         | 
| 107 | 
            +
            - xapian_source/xapian-bindings-1.2.4.tar.gz
         | 
| 108 | 
            +
            - xapian_source/xapian-core-1.2.4.tar.gz
         | 
| 107 109 | 
             
            - LICENSE
         | 
| 108 110 | 
             
            - README.rdoc
         | 
| 109 111 | 
             
            - CHANGELOG.md
         | 
| 112 | 
            +
            - Rakefile
         | 
| 110 113 | 
             
            has_rdoc: true
         | 
| 111 114 | 
             
            homepage: https://github.com/garaio/xapian_db
         | 
| 112 115 | 
             
            licenses: []
         |