cogbot 0.1.6 → 0.1.7
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/cogbot.gemspec +1 -2
- data/lib/cogbot.rb +2 -6
- data/plugins/manager.rb +0 -2
- data/plugins/rss.rb +7 -5
- metadata +2 -3
- data/lib/cogbot/version.rb +0 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: b5ae52fdd776cd21ec8570590a71f01bb92f36d6
         | 
| 4 | 
            +
              data.tar.gz: d5b3d9640ae94f588d606bbc430b573322844a35
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: c08a53c8c456713a63fd5bcdd983ce4526df85aac0fdc133d247c679ce955b8610424c13466279cb6de550ea498d9545af2c49b729c5ac3e0d88da19ddec2ce9
         | 
| 7 | 
            +
              data.tar.gz: dbf4bf727d158107d2be53cf88b882c72efb825165919b4278db0f786fd39e01a6f462faa8c4e4ff5ffda3d098c271411bffc721377bf3da12b221d18a1d39bc
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/cogbot.gemspec
    CHANGED
    
    | @@ -1,5 +1,4 @@ | |
| 1 1 | 
             
            # -*- encoding: utf-8 -*-
         | 
| 2 | 
            -
            require File.expand_path('../lib/cogbot/version', __FILE__)
         | 
| 3 2 |  | 
| 4 3 | 
             
            Gem::Specification.new do |gem|
         | 
| 5 4 | 
             
              gem.authors       = ["mose"]
         | 
| @@ -14,7 +13,7 @@ Gem::Specification.new do |gem| | |
| 14 13 | 
             
              gem.test_files    = gem.files.grep(%r{^(test|spec|features)/})
         | 
| 15 14 | 
             
              gem.name          = "cogbot"
         | 
| 16 15 | 
             
              gem.require_paths = ["lib"]
         | 
| 17 | 
            -
              gem.version       =  | 
| 16 | 
            +
              gem.version       = File.read(File.expand_path('../CHANGELOG.md', __FILE__))[/([0-9]+\.[0-9]+\.[0-9]+)/]
         | 
| 18 17 |  | 
| 19 18 | 
             
              gem.add_dependency 'cinch', '2.3.1'
         | 
| 20 19 | 
             
              gem.add_dependency "thor", '~> 0.19.1'
         | 
    
        data/lib/cogbot.rb
    CHANGED
    
    | @@ -6,7 +6,6 @@ require 'net/http' | |
| 6 6 | 
             
            require 'daemons'
         | 
| 7 7 | 
             
            require 'thor'
         | 
| 8 8 | 
             
            require 'yajl'
         | 
| 9 | 
            -
            require "lib/cogbot/version"
         | 
| 10 9 | 
             
            require "lib/cogbot/utils"
         | 
| 11 10 | 
             
            require "lib/cogbot/server"
         | 
| 12 11 |  | 
| @@ -41,11 +40,8 @@ module Cogbot | |
| 41 40 | 
             
                  # checkout plugins
         | 
| 42 41 | 
             
                  plugins = []
         | 
| 43 42 | 
             
                  config['main']['plugins'].each do |p|
         | 
| 44 | 
            -
                     | 
| 45 | 
            -
             | 
| 46 | 
            -
                    if File.exists?(File.join(ROOT_DIR,'plugins',"#{p}.rb"))
         | 
| 47 | 
            -
                      puts p
         | 
| 48 | 
            -
                      require File.join(ROOT_DIR,'plugins',p)
         | 
| 43 | 
            +
                    if File.exists?(File.join(ROOT_DIR, 'plugins', "#{p}.rb"))
         | 
| 44 | 
            +
                      require File.join(ROOT_DIR, 'plugins', p)
         | 
| 49 45 | 
             
                      plugins.push Cinch::Plugins.const_get(p.camelize)
         | 
| 50 46 | 
             
                    end
         | 
| 51 47 | 
             
                  end
         | 
    
        data/plugins/manager.rb
    CHANGED
    
    
    
        data/plugins/rss.rb
    CHANGED
    
    | @@ -8,17 +8,19 @@ module Cinch | |
| 8 8 |  | 
| 9 9 | 
             
                  set :plugin_name, 'rss'
         | 
| 10 10 | 
             
                  set :help, <<EOT
         | 
| 11 | 
            -
            The RSS plugin will poll rss feed every  | 
| 11 | 
            +
            The RSS plugin will poll rss feed every options['cogconf']['rss']['polling'] minutes
         | 
| 12 12 | 
             
            EOT
         | 
| 13 13 |  | 
| 14 | 
            -
                   | 
| 15 | 
            -
             | 
| 16 | 
            -
                  def new(bot)
         | 
| 14 | 
            +
                  def initialize(bot)
         | 
| 15 | 
            +
                    super
         | 
| 17 16 | 
             
                    @bot = bot
         | 
| 18 | 
            -
                    @feeds =  | 
| 17 | 
            +
                    @feeds = {}
         | 
| 18 | 
            +
                    timer = Timer @bot.config.options['cogconf']['rss']['polling'], method: :fetch_rss
         | 
| 19 | 
            +
                    timers << timer
         | 
| 19 20 | 
             
                  end
         | 
| 20 21 |  | 
| 21 22 | 
             
                  def fetch_rss
         | 
| 23 | 
            +
                    @bot.debug 'Fetching rss'
         | 
| 22 24 | 
             
                    @feeds ||= {}
         | 
| 23 25 | 
             
                    @bot.config.options['cogconf']['rss']['channels'].each do |chan|
         | 
| 24 26 | 
             
                      prefix = chan['prefix']
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: cogbot
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.7
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - mose
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2016-03- | 
| 11 | 
            +
            date: 2016-03-28 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: cinch
         | 
| @@ -285,7 +285,6 @@ files: | |
| 285 285 | 
             
            - lib/cogbot/server.rb
         | 
| 286 286 | 
             
            - lib/cogbot/setup.rb
         | 
| 287 287 | 
             
            - lib/cogbot/utils.rb
         | 
| 288 | 
            -
            - lib/cogbot/version.rb
         | 
| 289 288 | 
             
            - plugins/dice.rb
         | 
| 290 289 | 
             
            - plugins/exec.rb
         | 
| 291 290 | 
             
            - plugins/fortune.rb
         | 
    
        data/lib/cogbot/version.rb
    DELETED