socrates 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da36c4903bca86d379dd6bbf2163f325b71fb852
4
- data.tar.gz: ebd41affe29ae7b51ae5cfae2f348779b675d968
3
+ metadata.gz: 7aa5675086ee96c3c8a47ae71f43f3eeb834432c
4
+ data.tar.gz: 4ac0a6948f1b1c46a0adbba2fe82525016e452b2
5
5
  SHA512:
6
- metadata.gz: de3be228b5f26e6c4c2f33d10125f852f8fee4b2a943c5a7eebcfdba8ce18fd0d66498138c86222d438707f0f752f19b3d4a23da063da97b61ca705e3af20dc2
7
- data.tar.gz: 9c5dc64b695f7a767f98461ee984c6bec32cc9bb3ebf8e8e25eeac95f7c70c12e67d8bbae59953e6c1eb1c3cec76b9e19b04f82873a29498651d5f7cc04e9679
6
+ metadata.gz: ef7c44bf3192f787974b132c2b6291c82bc8c864a219727d6bb5e54c89393946379dd6b0dd8b674608d90e35a8b61541afc75a5d8b026708c16427d53d2e0995
7
+ data.tar.gz: fd2a4d81d1ffeb91abf02f0dd48d72a619da2b2cdf64d8c932bb1ff315897039509abc1c858c8407f607215c0439155e1a28f760f4136146366ee4a392d36b78
@@ -3,8 +3,7 @@ module Socrates
3
3
  class CLIBot
4
4
  def initialize(state_factory:)
5
5
  @adapter = ConsoleAdapter.new
6
- @storage = Storage::MemoryStorage.new
7
- @dispatcher = Core::Dispatcher.new(storage: @storage, adapter: @adapter, state_factory: state_factory)
6
+ @dispatcher = Core::Dispatcher.new(adapter: @adapter, state_factory: state_factory)
8
7
  end
9
8
 
10
9
  def start
@@ -9,13 +9,12 @@ module Socrates
9
9
  config.logger = Logger.new(STDOUT)
10
10
  config.logger.level = Logger::INFO
11
11
 
12
- raise "Missing ENV[SLACK_API_TOKEN]!" unless config.token
12
+ raise "Missing ENV['SLACK_API_TOKEN']!" unless config.token
13
13
  end
14
14
 
15
15
  @slack_client = Slack::RealTime::Client.new
16
16
  @adapter = SlackAdapter.new(@slack_client)
17
- @storage = Storage::RedisStorage.new
18
- @dispatcher = Core::Dispatcher.new(storage: @storage, adapter: @adapter, state_factory: state_factory)
17
+ @dispatcher = Core::Dispatcher.new(adapter: @adapter, state_factory: state_factory)
19
18
  end
20
19
 
21
20
  def start
@@ -3,6 +3,7 @@ module Socrates
3
3
  extend self
4
4
 
5
5
  attr_accessor :view_path
6
+ attr_accessor :storage
6
7
  attr_accessor :error_message
7
8
  attr_accessor :logger
8
9
  end
@@ -11,7 +11,7 @@ module Socrates
11
11
  def initialize(adapter:, state_factory:, storage: nil)
12
12
  @adapter = adapter
13
13
  @state_factory = state_factory
14
- @storage = storage || Storage::MemoryStorage.new
14
+ @storage = storage || Socrates::Config.storage || Storage::MemoryStorage.new
15
15
 
16
16
  @logger = Socrates::Config.logger || Socrates::Logger.default
17
17
  @error_message = Socrates::Config.error_message || DEFAULT_ERROR_MESSAGE
@@ -1,3 +1,3 @@
1
1
  module Socrates
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/socrates.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.authors = ["Christian Nelson"]
13
13
  spec.email = ["christian@carbonfive.com"]
14
14
 
15
- spec.summary = "A microframework for building stateful conversational bots."
15
+ spec.summary = "A micro-framework for building stateful conversational bots."
16
16
  spec.homepage = "https://github.com/carbonfive/socrates"
17
17
 
18
18
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socrates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Nelson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-20 00:00:00.000000000 Z
11
+ date: 2017-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -195,5 +195,5 @@ rubyforge_project:
195
195
  rubygems_version: 2.6.11
196
196
  signing_key:
197
197
  specification_version: 4
198
- summary: A microframework for building stateful conversational bots.
198
+ summary: A micro-framework for building stateful conversational bots.
199
199
  test_files: []