cogibara 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/bin/cogibara-local CHANGED
@@ -52,6 +52,8 @@ end
52
52
  def configure
53
53
  if @config_file
54
54
  load './' + @config_file.to_s
55
+ else
56
+ Cogibara.default_config
55
57
  end
56
58
  Cogibara.setup do |config|
57
59
  config.name = @name unless @name.nil?
data/bin/cogibara-redis CHANGED
@@ -11,6 +11,8 @@ end
11
11
 
12
12
  if ARGV[0]
13
13
  load "./#{ARGV[0]}"
14
+ else
15
+ Cogibara.default_config
14
16
  end
15
17
 
16
18
  Redis.new.subscribe(:toCapy) do |on|
data/lib/cogibara.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "cogibara/version"
2
+ require 'yaml'
2
3
 
3
4
  module Cogibara
4
5
  class << self
@@ -14,6 +15,11 @@ module Cogibara
14
15
  @config ||= Configuration.new
15
16
  end
16
17
 
18
+ def default_config
19
+ # dispatcher.config_from_yaml(YAML.load_file('cogibara/default_config.yml'))
20
+ load 'cogibara/default_config.rb'
21
+ end
22
+
17
23
  def dispatcher
18
24
  @dispatcher ||= Dispatcher.new
19
25
  end
@@ -1,6 +1,6 @@
1
1
  require 'yaml'
2
2
  Cogibara.setup_dispatcher do |dispatcher|
3
- # yml = YAML.load_file('/home/wstrinz/Documents/Projects/speechrecog/config.yml')
4
- # dispatcher.config_from_yaml(yml)
3
+ yml = YAML.load("---\nname: cucumber\nspeak: false\nhard_parse: true\nsoft_parse: true\nmodules:\n- module_name: chat\n keywords:\n - talk\n - chat\n- module_name: translate\n keywords: translate\n- module_name: Wolfram Alpha\n keywords: ask\n file_name: wolfram_alpha\n API_KEY: \n- module_name: Wiki\n keywords: wiki\n- module_name: Maluuba\n keywords:\n - maluuba\n - parse\n file_name: soft_parser\n API_KEY: \n- module_name: Reminder Setter\n keywords: REMINDER\n- module_name: Calendar\n keywords: CALENDAR\n username: \n password: \n- module_name: Knowledge\n keywords: KNOWLEDGE\n WOLFRAM_KEY: \n- module_name: Weather\n keywords: WEATHER\n API_KEY: \n- module_name: Help\n keywords: HELP\n")
4
+ dispatcher.config_from_yaml(yml)
5
5
  # dispatcher.register_operator(["REMINDER"],{name: "Reminder Setter"})
6
6
  end
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: cucumber
3
+ speak: false
4
+ hard_parse: true
5
+ soft_parse: true
6
+ modules:
7
+ - module_name: chat
8
+ keywords: [talk,chat]
9
+ #Bot_ID: 24007
10
+ #
11
+ - module_name: translate
12
+ keywords: translate
13
+ #
14
+ - module_name: Wolfram Alpha
15
+ keywords: ask
16
+ file_name: wolfram_alpha
17
+ API_KEY: #YourAPIKey
18
+ #
19
+ - module_name: Wiki
20
+ keywords: wiki
21
+ #
22
+ - module_name: Maluuba
23
+ keywords: [maluuba, parse]
24
+ file_name: soft_parser
25
+ API_KEY: #YourAPIKey
26
+ #
27
+ - module_name: Reminder Setter
28
+ keywords: REMINDER
29
+ #
30
+ - module_name: Calendar
31
+ keywords: CALENDAR
32
+ username: #YourGmailName
33
+ password: #YourGmailPassword
34
+ #
35
+ - module_name: Knowledge
36
+ keywords: KNOWLEDGE
37
+ WOLFRAM_KEY: #YourAPIKey
38
+ #
39
+ - module_name: Weather
40
+ keywords: WEATHER
41
+ API_KEY: #YourAPIKey
42
+ #
43
+ - module_name: Help
44
+ keywords: HELP
@@ -1,3 +1,3 @@
1
1
  module Cogibara
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cogibara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -304,6 +304,7 @@ files:
304
304
  - lib/cogibara/configuration.rb
305
305
  - lib/cogibara/confirmer.rb
306
306
  - lib/cogibara/default_config.rb
307
+ - lib/cogibara/default_config.yml
307
308
  - lib/cogibara/dispatcher.rb
308
309
  - lib/cogibara/file_handler.rb
309
310
  - lib/cogibara/message.rb