boty 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +18 -1
- data/README.md +39 -3
- data/Rakefile +1 -1
- data/boty.gemspec +9 -5
- data/lib/boty.rb +2 -1
- data/lib/boty/action.rb +26 -35
- data/lib/boty/action_description.rb +24 -0
- data/lib/boty/bot.rb +36 -25
- data/lib/boty/dsl.rb +3 -3
- data/lib/boty/eventable.rb +4 -3
- data/lib/boty/http.rb +3 -4
- data/lib/boty/locale.rb +12 -13
- data/lib/boty/logger.rb +14 -3
- data/lib/boty/rspec.rb +15 -16
- data/lib/boty/session.rb +7 -8
- data/lib/boty/slack.rb +11 -3
- data/lib/boty/slack/channel.rb +2 -1
- data/lib/boty/slack/chat.rb +5 -1
- data/lib/boty/slack/rtm.rb +1 -1
- data/lib/boty/slack/url.rb +10 -5
- data/lib/boty/slack/user.rb +2 -1
- data/lib/boty/slack/users.rb +1 -1
- data/lib/boty/version.rb +1 -1
- data/script/knows.rb +10 -9
- data/script/pug.rb +5 -1
- data/spec/boty/bot_spec.rb +89 -72
- data/spec/boty/cli_spec.rb +5 -5
- data/spec/boty/dsl_spec.rb +12 -13
- data/spec/boty/rspec_spec.rb +2 -1
- data/spec/boty/script_loader_spec.rb +8 -6
- data/spec/boty/session_spec.rb +2 -2
- data/spec/boty/slack/chat_spec.rb +18 -18
- data/spec/boty/slack/im_spec.rb +4 -4
- data/spec/boty/slack/message_spec.rb +11 -9
- data/spec/boty/slack/rtm_spec.rb +3 -3
- data/spec/boty/slack/url_spec.rb +5 -5
- data/spec/boty/slack/users_spec.rb +23 -23
- data/spec/happy_path_spec.rb +19 -18
- data/spec/script/i18n_spec.rb +18 -10
- data/spec/script/knows_spec.rb +8 -7
- data/spec/script/pug_spec.rb +27 -10
- data/spec/script/remember_spec.rb +27 -21
- data/spec/spec_helper.rb +4 -3
- data/spec/support/em_support.rb +1 -3
- data/spec/support/faraday_support.rb +0 -1
- data/spec/support/faye_support.rb +9 -6
- data/spec/support/file_system_matchers.rb +4 -4
- data/spec/support/logger_support.rb +9 -12
- data/spec/support/session_support.rb +26 -15
- data/spec/support/slack_support.rb +9 -6
- data/spec/support/template_project_support.rb +24 -23
- data/spec/support/thor_support.rb +3 -3
- data/template/project/%bot_name%.rb +4 -1
- data/template/project/spec/spec_helper.rb +4 -2
- metadata +21 -4
@@ -3,11 +3,11 @@ module ThorSupport
|
|
3
3
|
def capture(stream)
|
4
4
|
begin
|
5
5
|
stream = stream.to_s
|
6
|
-
|
6
|
+
instance_eval "$#{stream} = StringIO.new"
|
7
7
|
yield
|
8
|
-
result =
|
8
|
+
result = instance_eval("$#{stream}").string
|
9
9
|
ensure
|
10
|
-
|
10
|
+
instance_eval("$#{stream} = #{stream.upcase}")
|
11
11
|
end
|
12
12
|
|
13
13
|
result
|
@@ -1,8 +1,10 @@
|
|
1
|
-
require "bundler"
|
1
|
+
require "bundler"
|
2
|
+
Bundler.require :default, :test
|
3
|
+
|
2
4
|
require "boty"
|
3
5
|
require "boty/rspec"
|
4
6
|
|
5
|
-
Dir["./spec/support/**/*.rb"].each
|
7
|
+
Dir["./spec/support/**/*.rb"].each do |f| require f end
|
6
8
|
|
7
9
|
RSpec.configure do |config|
|
8
10
|
config.include Boty::RSpec::Bot, bot: true
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Valeriano
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|
@@ -150,8 +150,23 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
-
|
154
|
-
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rubocop
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: |-
|
168
|
+
Boty is intendted to be a framework for construction of
|
169
|
+
automated Slack Bots for your needs.
|
155
170
|
email:
|
156
171
|
- ricardo.valeriano@gmail.com
|
157
172
|
executables:
|
@@ -161,6 +176,7 @@ extra_rdoc_files: []
|
|
161
176
|
files:
|
162
177
|
- ".env"
|
163
178
|
- ".gitignore"
|
179
|
+
- ".rubocop.yml"
|
164
180
|
- ".travis.yml"
|
165
181
|
- CODE_OF_CONDUCT.md
|
166
182
|
- Gemfile
|
@@ -180,6 +196,7 @@ files:
|
|
180
196
|
- gemfiles/Gemfile.rbx
|
181
197
|
- lib/boty.rb
|
182
198
|
- lib/boty/action.rb
|
199
|
+
- lib/boty/action_description.rb
|
183
200
|
- lib/boty/bot.rb
|
184
201
|
- lib/boty/cli.rb
|
185
202
|
- lib/boty/dsl.rb
|