scrappy 0.1.11 → 0.1.12
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/History.txt +4 -0
- data/bin/scrappy +10 -6
- data/lib/scrappy/agent/agent.rb +2 -2
- data/lib/scrappy.rb +1 -1
- data/scrappy.gemspec +2 -2
- metadata +3 -3
    
        data/History.txt
    CHANGED
    
    
    
        data/bin/scrappy
    CHANGED
    
    | @@ -1,8 +1,11 @@ | |
| 1 1 | 
             
            #!/usr/bin/ruby
         | 
| 2 2 | 
             
            # encoding: UTF-8
         | 
| 3 3 |  | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 4 | 
            +
            if !RUBY_PLATFORM.include?("mswin")
         | 
| 5 | 
            +
              stty_save = `stty -g`.chomp
         | 
| 6 | 
            +
              trap('INT') { system('stty', stty_save); Scrappy::App.quit }
         | 
| 7 | 
            +
            end
         | 
| 8 | 
            +
             | 
| 6 9 | 
             
            module Scrappy
         | 
| 7 10 | 
             
              Root = File.expand_path(File.dirname(File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__) + "/..")
         | 
| 8 11 |  | 
| @@ -13,7 +16,6 @@ module Scrappy | |
| 13 16 | 
             
              gem 'camping', '=2.0'
         | 
| 14 17 | 
             
              require 'camping'
         | 
| 15 18 | 
             
              require 'camping/server'
         | 
| 16 | 
            -
              require 'etc'
         | 
| 17 19 | 
             
              require "#{Root}/lib/scrappy"
         | 
| 18 20 | 
             
              require 'scrappy/shell'
         | 
| 19 21 |  | 
| @@ -123,9 +125,11 @@ Copyright | |
| 123 125 |  | 
| 124 126 | 
             
                def onload
         | 
| 125 127 | 
             
                  # Check local or global knowledge base
         | 
| 126 | 
            -
                   | 
| 127 | 
            -
             | 
| 128 | 
            -
             | 
| 128 | 
            +
                  home = RUBY_PLATFORM.include?("mswin") ? "#{ENV['HOME']}/scrappy" : "#{ENV['HOME']}/.scrappy"
         | 
| 129 | 
            +
                  
         | 
| 130 | 
            +
                  if File.exists?("#{home}/kb")
         | 
| 131 | 
            +
                    data_folder = "#{home}/kb"
         | 
| 132 | 
            +
                    cache_file  = "#{home}/kb.cache"
         | 
| 129 133 | 
             
                  else
         | 
| 130 134 | 
             
                    data_folder = "#{Scrappy::Root}/kb"
         | 
| 131 135 | 
             
                    cache_file  = "#{Dir.tmpdir}/scrappy.kb.cache"
         | 
    
        data/lib/scrappy/agent/agent.rb
    CHANGED
    
    | @@ -74,8 +74,8 @@ module Scrappy | |
| 74 74 | 
             
                    end
         | 
| 75 75 |  | 
| 76 76 | 
             
                    # Cache the request
         | 
| 77 | 
            -
                    cache[request]                       = { :time=>Time.now, :response=>response }
         | 
| 78 | 
            -
                    cache[request.merge(:uri=>self.uri)] = { :time=>Time.now, :response=>response } unless self.uri.nil?
         | 
| 77 | 
            +
            #        cache[request]                       = { :time=>Time.now, :response=>response }
         | 
| 78 | 
            +
            #        cache[request.merge(:uri=>self.uri)] = { :time=>Time.now, :response=>response } unless self.uri.nil?
         | 
| 79 79 |  | 
| 80 80 | 
             
                    response
         | 
| 81 81 | 
             
                  end
         | 
    
        data/lib/scrappy.rb
    CHANGED
    
    
    
        data/scrappy.gemspec
    CHANGED
    
    | @@ -2,11 +2,11 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            Gem::Specification.new do |s|
         | 
| 4 4 | 
             
              s.name = %q{scrappy}
         | 
| 5 | 
            -
              s.version = "0.1. | 
| 5 | 
            +
              s.version = "0.1.12"
         | 
| 6 6 |  | 
| 7 7 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
         | 
| 8 8 | 
             
              s.authors = ["Jose Ignacio"]
         | 
| 9 | 
            -
              s.date = %q{ | 
| 9 | 
            +
              s.date = %q{2011-01-10}
         | 
| 10 10 | 
             
              s.default_executable = %q{scrappy}
         | 
| 11 11 | 
             
              s.description = %q{RDF web scraper}
         | 
| 12 12 | 
             
              s.email = %q{joseignacio.fernandez@gmail.com}
         | 
    
        metadata
    CHANGED
    
    | @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version | |
| 5 5 | 
             
              segments: 
         | 
| 6 6 | 
             
              - 0
         | 
| 7 7 | 
             
              - 1
         | 
| 8 | 
            -
              -  | 
| 9 | 
            -
              version: 0.1. | 
| 8 | 
            +
              - 12
         | 
| 9 | 
            +
              version: 0.1.12
         | 
| 10 10 | 
             
            platform: ruby
         | 
| 11 11 | 
             
            authors: 
         | 
| 12 12 | 
             
            - Jose Ignacio
         | 
| @@ -14,7 +14,7 @@ autorequire: | |
| 14 14 | 
             
            bindir: bin
         | 
| 15 15 | 
             
            cert_chain: []
         | 
| 16 16 |  | 
| 17 | 
            -
            date:  | 
| 17 | 
            +
            date: 2011-01-10 00:00:00 +01:00
         | 
| 18 18 | 
             
            default_executable: 
         | 
| 19 19 | 
             
            dependencies: 
         | 
| 20 20 | 
             
            - !ruby/object:Gem::Dependency 
         |