bot_mob 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bot_mob.gemspec +1 -1
- data/lib/bot_mob/authority.rb +1 -1
- data/lib/bot_mob/install.rb +13 -0
- data/lib/bot_mob/version.rb +1 -1
- data/lib/bot_mob.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46ecaa6f92c8dfe8dd02af18cdabe5a23cbadc66
|
4
|
+
data.tar.gz: e1228884787f48e1937ce6d6647a7b0055caf44c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd4d141e4327eb958c38fcf250be695eb0741a566cff18f5cc2118549d7afcc72bc4148758e0863c34e27c949c6b8d517f023130a08393f3bc1bdcaf456c7445
|
7
|
+
data.tar.gz: 6bae5bb2d3c39698a391155680084827ba9512a2bbb2892debd6dcc80632ecaffa5973ebb0eb9a7a630b208ccf5bf09e0820e90d21e70e8e862b7836b4c92504
|
data/bot_mob.gemspec
CHANGED
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency 'crypt_keeper', '~> 0.21'
|
26
26
|
spec.add_dependency 'slack-ruby-client', '~> 0.7'
|
27
27
|
spec.add_dependency 'celluloid-io', '~> 0.17'
|
28
|
+
spec.add_dependency 'activerecord', '~> 4.2'
|
28
29
|
|
29
|
-
spec.add_development_dependency 'activerecord', '~> 4.2'
|
30
30
|
spec.add_development_dependency 'bundler', '~> 1.12'
|
31
31
|
spec.add_development_dependency 'rake', '~> 10.0'
|
32
32
|
spec.add_development_dependency 'rubocop', '~> 0.40'
|
data/lib/bot_mob/authority.rb
CHANGED
@@ -13,7 +13,7 @@ module BotMob
|
|
13
13
|
def process
|
14
14
|
return unless ambassador.success?
|
15
15
|
|
16
|
-
install = Install.create_with_ambassador(ambassador)
|
16
|
+
install = BotMob::Install.create_with_ambassador(ambassador)
|
17
17
|
# check for install's success
|
18
18
|
wire.publish(external_id: install.external_id)
|
19
19
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module BotMob
|
2
|
+
class Install < ActiveRecord::Base
|
3
|
+
crypt_keeper :token, encryptor: :postgres_pgp, key: ENV['BOTMOB_SECRET'], salt: ENV['BOTMOB_SALT']
|
4
|
+
self.table_name = "botmob_installs"
|
5
|
+
|
6
|
+
def self.create_with_ambassador(auth)
|
7
|
+
where(external_id: auth.external_id).first_or_initialize.tap do |i|
|
8
|
+
i.token = auth.token
|
9
|
+
i.save!
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/bot_mob/version.rb
CHANGED
data/lib/bot_mob.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bot_mob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Werner
|
@@ -73,7 +73,7 @@ dependencies:
|
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '4.2'
|
76
|
-
type: :
|
76
|
+
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- lib/bot_mob/authority.rb
|
188
188
|
- lib/bot_mob/bot.rb
|
189
189
|
- lib/bot_mob/inbound_message.rb
|
190
|
+
- lib/bot_mob/install.rb
|
190
191
|
- lib/bot_mob/version.rb
|
191
192
|
- lib/bot_mob/wire.rb
|
192
193
|
homepage: https://github.com/mwerner/bot_mob
|