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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29c9dd6420c34a66220d3865c772226a275ff6b3
4
- data.tar.gz: d3da4672326044957490c7779d10769491f4b972
3
+ metadata.gz: b5ae52fdd776cd21ec8570590a71f01bb92f36d6
4
+ data.tar.gz: d5b3d9640ae94f588d606bbc430b573322844a35
5
5
  SHA512:
6
- metadata.gz: 26eac2082633df1506b629cc4e0e0cc423d607ff7be617cc7ea677d96b43577086f81789cfeffff414ef36aab86fe68f3c83c35497b11b9abd4c239cb53d408a
7
- data.tar.gz: 9c77bbe7e8cf06daa6dc94d85fdab99dc93d3c4eee8bb5bc7eefb8052ed91995d2b80b957e6b0a161de606c3b3f22f393d01ca68874b3f1e714a52894b573d42
6
+ metadata.gz: c08a53c8c456713a63fd5bcdd983ce4526df85aac0fdc133d247c679ce955b8610424c13466279cb6de550ea498d9545af2c49b729c5ac3e0d88da19ddec2ce9
7
+ data.tar.gz: dbf4bf727d158107d2be53cf88b882c72efb825165919b4278db0f786fd39e01a6f462faa8c4e4ff5ffda3d098c271411bffc721377bf3da12b221d18a1d39bc
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
1
  Cogbot Changelog
2
2
  ===================
3
3
 
4
+ ### v0.1.7 - 2016-03-28
5
+ - fix rss plugin polling configurable period
6
+
4
7
  ### v0.1.6 - 2016-03-24
5
8
  - improve rss plugin for dealing with multi-feed/multi-channel
6
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cogbot (0.1.6)
4
+ cogbot (0.1.7)
5
5
  cinch (= 2.3.1)
6
6
  daemons (~> 1.2.3)
7
7
  eventmachine (= 1.0.9.1)
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 = Cogbot::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
- puts p
45
- puts File.join(ROOT_DIR,'plugins',"#{p}.rb")
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
@@ -27,8 +27,6 @@ module Cinch
27
27
  def load_plugin(m, mapping)
28
28
  authorized m do
29
29
  plugin = mapping.downcase.camelize
30
- p plugin
31
- p mapping
32
30
 
33
31
  file_name = "#{ROOT_DIR}/plugins/#{mapping.downcase}.rb"
34
32
  unless File.exist?(file_name)
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 5 minutes
11
+ The RSS plugin will poll rss feed every options['cogconf']['rss']['polling'] minutes
12
12
  EOT
13
13
 
14
- timer 300, method: :fetch_rss
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.6
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-24 00:00:00.000000000 Z
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
@@ -1,4 +0,0 @@
1
- # just the cogbot version
2
- module Cogbot
3
- VERSION = "0.1.6"
4
- end