diff --git a/.gitignore b/.gitignore index aed673d..39a8092 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,6 @@ .bundle Gemfile.lock pkg/* -Chatfile +Chatfile.testing .DS_Store ceilingcat.yml \ No newline at end of file diff --git a/examples/Chatfile b/examples/Chatfile index e5cb5f8..46f140c 100644 --- a/examples/Chatfile +++ b/examples/Chatfile @@ -4,21 +4,25 @@ require 'ceiling_cat/plugins/calc' require 'ceiling_cat/plugins/greeter' CeilingCat::Setup.configure do |config| + # Campfire Settings. Only use one service per chatfile config.service = 'campfire' - config.username = 'username' - config.token = '12345abcde' + config.subdomain = 'username' + config.token = '12345abcde' # The API token of the account Ceiling Cat will use. Available at https://.campfirenow.com/member/edit config.room = 'Test Room' config.ssl = true + + # IRC Settings. Only use one service per chatfile + # config.service = 'irc' + # config.server = 'irc.freenode.org' + # config.nick = 'nickname' + # config.password = 'Q7Af6laDKza2SOM' + # config.room = '#my_room' config.plugins = [CeilingCat::Plugin::About, CeilingCat::Plugin::Greeter, CeilingCat::Plugin::Calc] # Some plugins require storage - # Robut::Storage::YamlStore.file = ".robut" CeilingCat::Storage::Yaml.file = "ceilingcat.yml" config.storage = CeilingCat::Storage::Yaml - - # Add a logger if you want to debug the connection - # config.logger = Logger.new(STDOUT) end \ No newline at end of file diff --git a/setup/Chatfile b/setup/Chatfile new file mode 100644 index 0000000..46f140c --- /dev/null +++ b/setup/Chatfile @@ -0,0 +1,28 @@ +# Require your plugins here +require 'ceiling_cat/plugins/about' +require 'ceiling_cat/plugins/calc' +require 'ceiling_cat/plugins/greeter' + +CeilingCat::Setup.configure do |config| + # Campfire Settings. Only use one service per chatfile + config.service = 'campfire' + config.subdomain = 'username' + config.token = '12345abcde' # The API token of the account Ceiling Cat will use. Available at https://.campfirenow.com/member/edit + config.room = 'Test Room' + config.ssl = true + + # IRC Settings. Only use one service per chatfile + # config.service = 'irc' + # config.server = 'irc.freenode.org' + # config.nick = 'nickname' + # config.password = 'Q7Af6laDKza2SOM' + # config.room = '#my_room' + + config.plugins = [CeilingCat::Plugin::About, + CeilingCat::Plugin::Greeter, + CeilingCat::Plugin::Calc] + + # Some plugins require storage + CeilingCat::Storage::Yaml.file = "ceilingcat.yml" + config.storage = CeilingCat::Storage::Yaml +end \ No newline at end of file diff --git a/spec/fixtures/Chatfile b/spec/fixtures/Chatfile new file mode 100644 index 0000000..e4abc4c --- /dev/null +++ b/spec/fixtures/Chatfile @@ -0,0 +1,20 @@ +# Require your plugins here +require 'ceiling_cat/plugins/about' + +CeilingCat::Setup.configure do |config| + config.service = 'campfire' + config.username = 'user' + config.token = '1234abcd' + config.room = 'Room 1' + config.ssl = true + + # Plugns are executed in the order set. + # Execution ends once a response is returned by a plugin. + # + # If any plugins are collecting stats or otherwise not + # interacting directly with users but you want to ensure + # that they run, list them first. + config.plugins = [CeilingCat::Plugin::About] + + config.storage = CeilingCat::Storage::Hash +end