socrates 0.1.20 → 0.1.21

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
  SHA256:
3
- metadata.gz: e53d6a963e0727b1bd7ad8d42b330177aed491cf30445ec04258672d97e5f468
4
- data.tar.gz: d316fc17f82718d619484e372dd2a81b8945c07a2018108cf3348842f815c93f
3
+ metadata.gz: 0503a47c1d80b9e475aad24753057be5005b8d262b71ba8c7e2f6ad1c21bdbaa
4
+ data.tar.gz: cdc9a4f69e52277557ea5501ffb555db1478c932182da7335ef0cb5ce0842260
5
5
  SHA512:
6
- metadata.gz: ef55cc21dfb0d23284622656e73da3f2c6c808084324e1a7646d6ea6847a1c29bde36a0e9cd5b0b531a19e9fa6269400f614950017340c7dda431e1593d0e69f
7
- data.tar.gz: 4513826a263c419af60c5b48a5f38204f28b17ce0ad3b937183f346c2d8431792a112035dc487c15885ea9960c2093f02ef06a4955fd17d749eab5ef4bab3f90
6
+ metadata.gz: b10e4449d1f88e9e0ce11f71ba97c2796d811edb670502056b049257a03a84d0c8ff07ed70f3ba8432867c831587c49d10627a36a4fed2406f5b8143382c5e5d
7
+ data.tar.gz: d6558e640848fb481c6defeed68313b2f8116f72cb23911c9f5112af008b3abffe1881919bba759b62e7c946c7c4c960e8023860f27e2ece35c6769a2a25ca5d
data/.circleci/config.yml CHANGED
@@ -4,14 +4,13 @@ jobs:
4
4
  parallelism: 1
5
5
  working_directory: ~/socrates
6
6
  docker:
7
- - image: circleci/ruby:2.5.1
7
+ - image: circleci/ruby:2.6.1
8
8
  steps:
9
9
  - checkout
10
10
 
11
11
  # Restore bundle cache, with fallbacks to increase the likeliness of a cache hit
12
12
  - restore_cache:
13
13
  keys:
14
- - gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
15
14
  - gem-cache-{{ arch }}-{{ .Branch }}
16
15
  - gem-cache
17
16
 
data/.rubocop.yml CHANGED
@@ -1,8 +1,5 @@
1
1
  inherit_from:
2
2
  - https://raw.githubusercontent.com/carbonfive/c5-conventions/master/rubocop/rubocop.yml
3
3
 
4
- AllCops:
5
- TargetRubyVersion: 2.4
6
-
7
4
  Naming/UncommunicativeMethodParamName:
8
5
  Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.1
1
+ 2.6.1
data/README.md CHANGED
@@ -4,7 +4,7 @@ Socrates is a micro-framework for building stateful conversational interfaces. I
4
4
 
5
5
  It's designed for building conversational Slack bots, but is designed in such a way that other adapters could be written. It ships with a Console adapter for testing locally in the terminal as well as a Memory adapter for use in automated tests.
6
6
 
7
- *Disclaimer: This framework is currently experimental and will change.*
7
+ *Disclaimer: This framework is still in its early stages. It's been used for one production bot for the last year or so, but might see some changes as other folks use it and provide feedback.*
8
8
 
9
9
  Conceptually, a conversation is a sequence of asking and listening actions. As a conversation progresses, information is gathered and at some point, acted upon by the system.
10
10
 
data/exe/socrates CHANGED
@@ -12,7 +12,7 @@ require "socrates/sample_states"
12
12
  options = {
13
13
  adapter: "console",
14
14
  storage: "memory",
15
- debug: false
15
+ debug: false
16
16
  }
17
17
 
18
18
  option_parser = OptionParser.new do |parser|
@@ -13,10 +13,12 @@ module Socrates
13
13
  def client_id_from(context: nil, user: nil)
14
14
  unless context.nil?
15
15
  raise ArgumentError, "Expected context to respond to :user" unless context.respond_to?(:user)
16
+
16
17
  return context.user
17
18
  end
18
19
  unless user.nil?
19
20
  raise ArgumentError, "Expected user to respond to :id" unless user.respond_to?(:id)
21
+
20
22
  return user.id
21
23
  end
22
24
  raise ArgumentError, "Must provide one of context or user"
@@ -25,6 +27,7 @@ module Socrates
25
27
  def channel_from(context: nil, user: nil)
26
28
  unless context.nil?
27
29
  raise ArgumentError, "Expected context to respond to :channel" unless context.respond_to?(:channel)
30
+
28
31
  return context.channel
29
32
  end
30
33
  return lookup_dm_channel(user) unless user.nil?
@@ -1,3 +1,3 @@
1
1
  module Socrates
2
- VERSION = "0.1.20"
2
+ VERSION = "0.1.21"
3
3
  end
data/socrates.gemspec CHANGED
@@ -23,16 +23,16 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.required_ruby_version = ">= 2.4.0"
25
25
 
26
- spec.add_development_dependency "bundler", "~> 1.16"
26
+ spec.add_development_dependency "bundler", "~> 1.17"
27
27
  spec.add_development_dependency "rake", "~> 12.3"
28
- spec.add_development_dependency "rspec", "~> 3.7"
29
- spec.add_development_dependency "rubocop", "0.54"
30
- spec.add_development_dependency "simplecov", "~> 0.16.1"
28
+ spec.add_development_dependency "rspec", "~> 3.8"
29
+ spec.add_development_dependency "rubocop", "= 0.65.0"
30
+ spec.add_development_dependency "simplecov", "~> 0.16"
31
31
  spec.add_development_dependency "timecop", "~> 0.9"
32
32
 
33
- spec.add_dependency "activesupport", ">= 5.1.4"
34
- spec.add_dependency "celluloid-io", ">= 0.17.3"
35
- spec.add_dependency "hashie", ">= 3.5.7"
36
- spec.add_dependency "redis", ">= 4.0.1"
37
- spec.add_dependency "slack-ruby-client", ">= 0.11.0"
33
+ spec.add_dependency "activesupport", ">= 5.2"
34
+ spec.add_dependency "async-websocket", ">= 0.7"
35
+ spec.add_dependency "hashie", ">= 3.6"
36
+ spec.add_dependency "redis", ">= 4.1"
37
+ spec.add_dependency "slack-ruby-client", ">= 0.14.1"
38
38
  end
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.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Nelson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-05 00:00:00.000000000 Z
11
+ date: 2019-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.16'
19
+ version: '1.17'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.16'
26
+ version: '1.17'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,42 +44,42 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.7'
47
+ version: '3.8'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.7'
54
+ version: '3.8'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: '0.54'
61
+ version: 0.65.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: '0.54'
68
+ version: 0.65.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.16.1
75
+ version: '0.16'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.16.1
82
+ version: '0.16'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: timecop
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,70 +100,70 @@ dependencies:
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 5.1.4
103
+ version: '5.2'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 5.1.4
110
+ version: '5.2'
111
111
  - !ruby/object:Gem::Dependency
112
- name: celluloid-io
112
+ name: async-websocket
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 0.17.3
117
+ version: '0.7'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 0.17.3
124
+ version: '0.7'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: hashie
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 3.5.7
131
+ version: '3.6'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: 3.5.7
138
+ version: '3.6'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: redis
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: 4.0.1
145
+ version: '4.1'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: 4.0.1
152
+ version: '4.1'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: slack-ruby-client
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: 0.11.0
159
+ version: 0.14.1
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
- version: 0.11.0
166
+ version: 0.14.1
167
167
  description:
168
168
  email:
169
169
  - christian@carbonfive.com
@@ -225,8 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
225
  - !ruby/object:Gem::Version
226
226
  version: '0'
227
227
  requirements: []
228
- rubyforge_project:
229
- rubygems_version: 2.7.6
228
+ rubygems_version: 3.0.1
230
229
  signing_key:
231
230
  specification_version: 4
232
231
  summary: A micro-framework for building stateful conversational bots.