grape-slack-bot 1.5.7 → 1.5.8

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: 953075c11d83ecf06161ba1ffdda403a08c673c87a598a5d924443a8bf7bb587
4
- data.tar.gz: c99d95f100f8e067e19502c2d144454b9d8416534b2e8ef930d31136d1b13ec7
3
+ metadata.gz: 2b60e4e6431b476b397857caf09be7d11d1f2215e4ab5ab912e77c1289ab5285
4
+ data.tar.gz: 5a11a97b7ed08470a83163f4c77fa52eb895bdbe260159c87c2fbae1c302fe58
5
5
  SHA512:
6
- metadata.gz: 3f184bf86ddce2dacaecce93f8377ef62b562b8ba5cf010993903bac8910af115b5659be794fb9e7961c2ab51d3f48f46622705a595d79aadff089a909c4fce2
7
- data.tar.gz: 6e821e2e1aea7494d01ece594de33ba5264ed6ff9e3ab6937ad44a4fb65ddfda1ff44bd717358c3fc4c0ff5a6bf8368988085e277677086d8dffdc5417d6ed7a
6
+ metadata.gz: 669f0d6b4b8b5475b5fdcfe58d281d9b3b0f3f49fa6b083469708789cbf2fa2202d2cb427a78148a9502154325680a4c6d3f254e10367a25b17441c9b91fcfcf
7
+ data.tar.gz: 8c0e1357083e27ec6477c7cfd9a9f029178bfc38ad68af451af1cee21e16261744b6268782cdd9aada62aae83bfcae328182647f7157f4385ff5ca3de6701a9b
data/README.md CHANGED
@@ -480,7 +480,7 @@ module MySlackBot
480
480
  self.callback = SlackBot::Callback.find_or_create(
481
481
  id: "app_home_opened",
482
482
  user: current_user,
483
- class_name: VacationsBot::AppHomeInteraction.name
483
+ class_name: self.class.name
484
484
  )
485
485
 
486
486
  publish_view :index_view
@@ -26,6 +26,7 @@ module SlackBot
26
26
  end
27
27
 
28
28
  def event(event_type, event_klass)
29
+ handler_class(event_klass.name, event_klass)
29
30
  event_handlers[event_type.to_sym] = event_klass
30
31
  end
31
32
 
@@ -1,5 +1,9 @@
1
1
  module SlackBot
2
2
  class Event
3
+ def self.interaction(klass)
4
+ define_singleton_method(:interaction_klass) { klass }
5
+ end
6
+
3
7
  def self.view(klass)
4
8
  define_singleton_method(:view_klass) { klass }
5
9
  end
data/lib/slack_bot.rb CHANGED
@@ -22,5 +22,5 @@ require 'slack_bot/pager'
22
22
  require 'slack_bot/grape_extension'
23
23
 
24
24
  module SlackBot
25
- VERSION = '1.5.7'.freeze
25
+ VERSION = '1.5.8'.freeze
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-slack-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.7
4
+ version: 1.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrei Makarov