botomizer 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/botomizer/message.rb +6 -2
- data/lib/botomizer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 434d32bee68aab392f92b120521676bbd9ad5116
|
4
|
+
data.tar.gz: 2b0bf9db9bdc8bc1ecad9dd9f7d16a821afd429f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbf1aaa89104d06185da8fac062b8a01840e239976ae22636b8d7da1318beff509fae6752e58b6f687646ebcb233942dce473f5053590a38f3b35adabd514397
|
7
|
+
data.tar.gz: 71ae5ea4777518c06cceb8c47d6c91b9eb7e1f52c8e815d79d7afa668250cecae848dfcf62e5619efd5f459d6627db55c39e01adac7cbad3057ed26c3b87986b
|
data/lib/botomizer/message.rb
CHANGED
@@ -4,12 +4,16 @@ class Botomizer::Message
|
|
4
4
|
def initialize(params, options = {})
|
5
5
|
@id = params[:id]
|
6
6
|
@text = params[:text].to_s
|
7
|
-
@data = params[:data]
|
7
|
+
@data = params[:data].to_s
|
8
8
|
|
9
9
|
if @text.index('/') == 0
|
10
10
|
sp = @text.gsub(options[:name] || '', '').split(' ')
|
11
11
|
@cmd = sp.first.downcase.gsub!('/', '')
|
12
12
|
@text = sp.drop(1).join(' ')
|
13
|
+
elsif @data.index('/') == 0
|
14
|
+
sp = @data.gsub(options[:name] || '', '').split(' ')
|
15
|
+
@cmd = sp.first.downcase.gsub!('/', '')
|
16
|
+
@data = sp.drop(1).join(' ')
|
13
17
|
end
|
14
18
|
end
|
15
19
|
|
@@ -22,6 +26,6 @@ class Botomizer::Message
|
|
22
26
|
end
|
23
27
|
|
24
28
|
def data?
|
25
|
-
!@
|
29
|
+
!@data.blank?
|
26
30
|
end
|
27
31
|
end
|
data/lib/botomizer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: botomizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Belenky
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|