slack-ruby-bot-server 0.6.0 → 0.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b91c82bc0a49452c0b3871786fb739b763c8a25
4
- data.tar.gz: 12e73c3db13dcaba4da39f499f0acb797e2db122
3
+ metadata.gz: 0713fb4866e25bc7cc7481ef0d03ce589610f970
4
+ data.tar.gz: 009024facb962ecda5813694df8d0a559d53de1c
5
5
  SHA512:
6
- metadata.gz: bbf49bff1a3f7723468cc5841c68df08de3598451f1868ba4084262faa89a5a044ccbd1ea5a6a57cbbc8aadce2841681fb4e31c82a3d25c151af4099e13c3a5c
7
- data.tar.gz: d9a0fa731ec1b9da48f4ef0e73189ebd6acf473e2f3bb5416e39acc5c1c0385aeea922b1e6d99d137cf2d8101a32356100822741f835b50df7a67a9e0062ba21
6
+ metadata.gz: 196e8d75ea412895c80f7647c3025f881312ba3b631b60905a95f696457a5311e9dfedaeba6a99fb71a072a4fff8dad9dd4711007645471b3645b48ca18f4975
7
+ data.tar.gz: bdc28e22da14129cfcba6fac48733943467e702ea68285dd329600e3f9e432a358e2a71ed1817423c113abb92934afe90f005aea67d6324833a062b379fbec48
@@ -1,5 +1,10 @@
1
1
  ### Changelog
2
2
 
3
+ #### 0.6.1 (3/29/2017)
4
+
5
+ * [#54](https://github.com/slack-ruby/slack-ruby-bot-server/pull/54): Removing one more Mongoid dependency when rescuing from _invoke - [@alexagranov](https://github.com/alexagranov).
6
+ * [#53](https://github.com/slack-ruby/slack-ruby-bot-server/pull/53): No need for `otr-activerecord` if using activerecord under Rails - [@alexagranov](https://github.com/alexagranov).
7
+
3
8
  #### 0.6.0 (3/12/2017)
4
9
 
5
10
  * [#38](https://github.com/slack-ruby/slack-ruby-bot-server/issues/7): Added ActiveRecord support - [@zachfeldman](https://github.com/zachfeldman), [@spencerldixon](https://github.com/spencerldixon), [@dblock](https://github.com/dblock).
data/README.md CHANGED
@@ -13,7 +13,7 @@ A library that contains a [Grape](http://github.com/ruby-grape/grape) API servin
13
13
 
14
14
  ### Stable Release
15
15
 
16
- You're reading the documentation for the **stable** release of slack-ruby-bot-server, 0.6.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
16
+ You're reading the documentation for the **stable** release of slack-ruby-bot-server, 0.6.1. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
17
17
 
18
18
  ### Try Me
19
19
 
@@ -157,6 +157,8 @@ end
157
157
  * [slack-amber-alert](https://github.com/dblock/slack-amber-alert), free service at [missingkidsbot.org](https://www.missingkidsbot.org)
158
158
  * [slack-gamebot](https://github.com/dblock/slack-gamebot), free service at [www.playplay.io](https://www.playplay.io)
159
159
  * [slack-market](https://github.com/dblock/slack-market), free service at [market.playplay.io](https://market.playplay.io)
160
+ * [slack-shallbot](https://github.com/slack-ruby/slack-shellbot), free service at [shell.playplay.io](https://shell.playplay.io)
161
+ * [slack-api-explorer](https://github.com/slack-ruby/slack-api-explorer), free service at [api-explorer.playplay.io](https://shell.playplay.io)
160
162
 
161
163
  ### Copyright & License
162
164
 
@@ -1,6 +1,6 @@
1
1
  # Releasing Slack-Ruby-Bot-Server
2
2
 
3
- There're no hard rules about when to release slack-ruby-bot-server. Release bug fixes frequenty, features not so frequently and breaking API changes rarely.
3
+ There're no hard rules about when to release slack-ruby-bot-server. Release bug fixes frequently, features not so frequently and breaking API changes rarely.
4
4
 
5
5
  ### Release
6
6
 
@@ -13,12 +13,7 @@ rake
13
13
 
14
14
  Check that the last build succeeded in [Travis CI](https://travis-ci.org/slack-ruby/slack-ruby-bot-server) for all supported platforms.
15
15
 
16
- Increment the version, modify [lib/slack-ruby-bot-server/version.rb](lib/slack-ruby-bot-server/version.rb).
17
-
18
- * Increment the third number if the release has bug fixes and/or very minor features, only (eg. change `0.2.1` to `0.2.2`).
19
- * Increment the second number if the release contains major features or breaking API changes (eg. change `0.2.1` to `0.3.0`).
20
-
21
- Change "Next Release" in [CHANGELOG.md](CHANGELOG.md) to the new version.
16
+ Change "Next" in [CHANGELOG.md](CHANGELOG.md) to the current date.
22
17
 
23
18
  ```
24
19
  ### 0.2.2 (7/10/2015)
@@ -26,12 +21,18 @@ Change "Next Release" in [CHANGELOG.md](CHANGELOG.md) to the new version.
26
21
 
27
22
  Remove the line with "Your contribution here.", since there will be no more contributions to this release.
28
23
 
29
- Remove the "Stable Release" section in README that warns users that they are reading the documentation for an unreleased version.
24
+ Change `**next**` in the "Stable Release" section in README that warns users that they are reading the documentation for an unreleased version with `**stable**`.
25
+
26
+ ```
27
+ ## Stable Release
28
+
29
+ You're reading the documentation for the **stable** release of slack-ruby-bot-server, 0.2.2. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
30
+ ```
30
31
 
31
32
  Commit your changes.
32
33
 
33
34
  ```
34
- git add README.md CHANGELOG.md lib/slack-ruby-bot-server/version.rb
35
+ git add README.md CHANGELOG.md
35
36
  git commit -m "Preparing for release, 0.2.2."
36
37
  git push origin master
37
38
  ```
@@ -52,18 +53,25 @@ Pushed slack-ruby-bot-server 0.2.2 to rubygems.org.
52
53
  Add the next release to [CHANGELOG.md](CHANGELOG.md).
53
54
 
54
55
  ```
55
- Next Release
56
- ============
56
+ ### 0.2.3 (Next)
57
57
 
58
58
  * Your contribution here.
59
59
  ```
60
60
 
61
61
  Increment the third version number in [lib/slack-ruby-bot-server/version.rb](lib/slack-ruby-bot-server/version.rb).
62
62
 
63
- Comit your changes.
63
+ Undo your change in README about the stable release.
64
64
 
65
65
  ```
66
- git add CHANGELOG.md lib/slack-ruby-bot-server/version.rb
66
+ ## Stable Release
67
+
68
+ You're reading the documentation for the **next** release of slack-ruby-bot-server. Please see the documentation for the [last stable release, v0.2.2](https://github.com/slack-ruby/slack-ruby-bot-server/blob/v0.2.2/README.md) unless you're integrating with HEAD. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
69
+ ```
70
+
71
+ Commit your changes.
72
+
73
+ ```
74
+ git add README.md CHANGELOG.md lib/slack-ruby-bot-server/version.rb
67
75
  git commit -m "Preparing for next development iteration, 0.2.3."
68
76
  git push origin master
69
77
  ```
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'rspec/core'
5
5
  require 'rspec/core/rake_task'
6
6
 
7
7
  RSpec::Core::RakeTask.new(:spec) do |spec|
8
- spec.pattern = FileList['spec/**/*_spec.rb']
8
+ spec.pattern = FileList['spec/**/*_spec.rb'].exclude(%r{ext\/(?!#{ENV['DATABASE_ADAPTER']})})
9
9
  end
10
10
 
11
11
  require 'rubocop/rake_task'
@@ -1,7 +1,7 @@
1
1
  require 'rack/cors'
2
2
  require 'rack-rewrite'
3
3
  require 'rack-server-pages'
4
- require 'otr-activerecord' if SlackRubyBotServer::Config.activerecord?
4
+ require 'otr-activerecord' if SlackRubyBotServer::Config.activerecord? && !defined?(::Rails)
5
5
 
6
6
  module SlackRubyBotServer
7
7
  module Api
@@ -0,0 +1,17 @@
1
+ module SlackRubyBot
2
+ module Commands
3
+ class Base
4
+ class << self
5
+ alias _invoke invoke
6
+
7
+ def invoke(client, data)
8
+ _invoke client, data
9
+ rescue StandardError => e
10
+ logger.info "#{name.demodulize.upcase}: #{client.owner}, #{e.class}: #{e}"
11
+ client.say(channel: data.channel, text: e.message, gif: 'error')
12
+ true
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -1,3 +1,2 @@
1
- %w(client commands/base).each do |ext|
2
- require_relative "slack-ruby-bot/#{ext}"
3
- end
1
+ require_relative 'slack-ruby-bot/client'
2
+ require_relative "#{SlackRubyBotServer::Config.database_adapter}/slack-ruby-bot/commands/base"
@@ -1,3 +1,3 @@
1
1
  module SlackRubyBotServer
2
- VERSION = '0.6.0'.freeze
2
+ VERSION = '0.6.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-ruby-bot-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-12 00:00:00.000000000 Z
11
+ date: 2017-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slack-ruby-bot
@@ -214,11 +214,12 @@ files:
214
214
  - lib/slack-ruby-bot-server/config/database_adapters/activerecord.rb
215
215
  - lib/slack-ruby-bot-server/config/database_adapters/mongoid.rb
216
216
  - lib/slack-ruby-bot-server/ext.rb
217
+ - lib/slack-ruby-bot-server/ext/activerecord/slack-ruby-bot/commands/base.rb
217
218
  - lib/slack-ruby-bot-server/ext/bson/object_id.rb
218
219
  - lib/slack-ruby-bot-server/ext/grape/sort_extension.rb
220
+ - lib/slack-ruby-bot-server/ext/mongoid/slack-ruby-bot/commands/base.rb
219
221
  - lib/slack-ruby-bot-server/ext/slack-ruby-bot.rb
220
222
  - lib/slack-ruby-bot-server/ext/slack-ruby-bot/client.rb
221
- - lib/slack-ruby-bot-server/ext/slack-ruby-bot/commands/base.rb
222
223
  - lib/slack-ruby-bot-server/info.rb
223
224
  - lib/slack-ruby-bot-server/models.rb
224
225
  - lib/slack-ruby-bot-server/models/team/activerecord.rb
@@ -293,7 +294,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
294
  version: '0'
294
295
  requirements: []
295
296
  rubyforge_project:
296
- rubygems_version: 2.5.1
297
+ rubygems_version: 2.6.10
297
298
  signing_key:
298
299
  specification_version: 4
299
300
  summary: A Grape API serving a Slack bot to multiple teams.