robut-cron 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -15,3 +15,4 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ Chatfile
data/README.md CHANGED
@@ -19,6 +19,39 @@ Or install it yourself as:
19
19
 
20
20
  ## Usage
21
21
 
22
+ The 'Chatfile':
23
+ ```
24
+ # Require your plugins here
25
+ require 'robut/storage/yaml_store'
26
+ require 'robut/plugin/help'
27
+ require 'robut-cron'
28
+ # Add the plugin classes to the Robut plugin list.
29
+ # Plugins are handled in the order that they appear in this array.
30
+ Robut::Plugin.plugins << Robut::Plugin::Help
31
+ Robut::Plugin.plugins << Robut::Plugin::Cron
32
+
33
+ # Configure the robut jabber connection and you're good to go!
34
+ Robut::Connection.configure do |config|
35
+ # Note that the jid must end with /bot if you don't want robut to
36
+ # spam the channel, as described by the last bullet point on this
37
+ # page: https://www.hipchat.com/help/category/xmpp
38
+ config.jid = 'xxxxxxxxxx@chat.hipchat.com/bot'
39
+ config.password = 'xxxxx'
40
+ config.nick = 'Odd Job'
41
+ config.room = 'xxxxxxxxxx@conf.hipchat.com'
42
+
43
+ # Custom @mention name
44
+ config.mention_name = 'odd'
45
+
46
+ # Some plugins require storage
47
+ Robut::Storage::YamlStore.file = ".robut"
48
+ config.store = Robut::Storage::YamlStore
49
+
50
+ # Add a logger if you want to debug the connection
51
+ config.logger = Logger.new(STDOUT)
52
+ end
53
+ ```
54
+
22
55
  Hmmn. Something like this from inside the chat session.
23
56
 
24
57
  "#{at_nick} cron new * * * * * <message> - will send this message on the
@@ -1,5 +1,5 @@
1
1
  module Robut
2
2
  module Cron
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
data/lib/robut-cron.rb CHANGED
@@ -58,7 +58,12 @@ class Robut::Plugin::Cron
58
58
  if @@skeds.empty?
59
59
  "no jobs!"
60
60
  else
61
- @@skeds.keys.to_s
61
+ h = Hash.new
62
+ @@skeds.each do |key, val|
63
+ h[key] = val.t
64
+ end
65
+
66
+ h.to_s
62
67
  end
63
68
  end
64
69
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: robut-cron
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-03 00:00:00.000000000 Z
12
+ date: 2013-09-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: robut