bot_mob 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: f8b5e4bf2a1e375906e4dcfe40746bf90a17ee9f
4
- data.tar.gz: 629956ead0e3bccbcb96d835d3d7f399b992c8e3
3
+ metadata.gz: 06931f3388ebdfe67f7457368c871dbab52471d8
4
+ data.tar.gz: 22bf96d21900c9f7ad9a1295b0d2de505d1c9b8c
5
5
  SHA512:
6
- metadata.gz: c4d75c04c0238daa3fcd5f3cb33574d5b474a06bdc8ee2fcbfad1dee96de6003def0e5c8a44ab53d801873abd97bb269497052364a0b6cdc5519bac15c0623c7
7
- data.tar.gz: 766edd7dac3c2d329f4648e5254263ec0e2b227700fb05c0a0e8cf6dbe4a7e3de93ab67b402ee6db36430d66d6144ff0d67b525ca2996a4b8ca9c65e35986db4
6
+ metadata.gz: 26ec6266478293e6dd4ed4b78972255e7b0c968bb002794a9294dab499918615d6702ffbe0400ec9c1946425740da493812d29af5d62833e6ca905bb6a823ee1
7
+ data.tar.gz: 282eecbcd50a76b887c2cb628bb07a972ae7e3c7b1e456f23d6dc97da7c186e62973ed8fed7e4210df8b00c8f844058b73dc621ce46214c1e42606c9d9398415
data/bot_mob.gemspec CHANGED
@@ -22,7 +22,6 @@ Gem::Specification.new do |spec|
22
22
  spec.require_paths = ['lib']
23
23
 
24
24
  spec.add_dependency 'bunny', '~> 2.5'
25
- spec.add_dependency 'simplecov', '~> 0.12'
26
25
  spec.add_dependency 'crypt_keeper', '~> 0.21'
27
26
  spec.add_dependency 'slack-ruby-client', '~> 0.7'
28
27
  spec.add_dependency 'celluloid-io', '~> 0.17'
@@ -31,7 +30,7 @@ Gem::Specification.new do |spec|
31
30
  spec.add_development_dependency 'bundler', '~> 1.12'
32
31
  spec.add_development_dependency 'rake', '~> 10.0'
33
32
  spec.add_development_dependency 'rubocop', '~> 0.40'
34
- spec.add_development_dependency 'simplecov', '~> 0.7'
33
+ spec.add_development_dependency 'simplecov', '~> 0.12'
35
34
  spec.add_development_dependency 'rspec', '~> 3.0'
36
35
  spec.add_development_dependency 'sqlite3', '~> 1.3'
37
36
  end
@@ -13,6 +13,7 @@ module BotMob
13
13
  end
14
14
 
15
15
  def start!
16
+ BotMob.logger.info("=> BotMob #{BotMob::VERSION} application starting")
16
17
  wire.connect(self)
17
18
  loop { sleep(10) }
18
19
  end
@@ -1,3 +1,3 @@
1
1
  module BotMob
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
data/lib/bot_mob/wire.rb CHANGED
@@ -29,9 +29,14 @@ module BotMob
29
29
  end
30
30
 
31
31
  def connection
32
- @connection ||= Bunny.new.tap do |conn|
33
- Rails.logger.info('=> Connecting BotMob Wire')
34
- conn.start
32
+ @connection ||= begin
33
+ Bunny.new.tap do |conn|
34
+ Rails.logger.info('=> Connecting BotMob Wire')
35
+ conn.start
36
+ end
37
+ rescue Bunny::TCPConnectionFailedForAllHosts => e
38
+ puts "No RabbitMQ Server"
39
+ raise
35
40
  end
36
41
  end
37
42
  end
data/lib/bot_mob.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  $LOAD_PATH.unshift File.dirname(__FILE__)
2
2
  require 'bunny'
3
+ require 'crypt_keeper'
3
4
  require 'slack-ruby-client'
4
5
  require 'bot_mob/version'
5
6
 
@@ -20,11 +21,12 @@ module BotMob
20
21
 
21
22
  def self.logger
22
23
  @logger ||= begin
23
- $stdout.sync = true
24
- log = Logger.new($stdout)
25
- log.datetime_format = '%Y-%m-%d %H:%M:%S'
26
- log.level = Logger::DEBUG
27
- log
24
+ buffer = Logger.new(STDOUT)
25
+ if buffer
26
+ buffer.level = ($PROGRAM_NAME == 'irb' ? Logger::DEBUG : Logger::INFO)
27
+ buffer.formatter = proc { |severity, datetime, progname, msg| "#{msg}\n" }
28
+ end
29
+ buffer
28
30
  end
29
31
  end
30
32
  end
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Werner
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.5'
27
- - !ruby/object:Gem::Dependency
28
- name: simplecov
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0.12'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0.12'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: crypt_keeper
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +128,14 @@ dependencies:
142
128
  requirements:
143
129
  - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: '0.7'
131
+ version: '0.12'
146
132
  type: :development
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: '0.7'
138
+ version: '0.12'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: rspec
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -220,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
206
  version: '0'
221
207
  requirements: []
222
208
  rubyforge_project:
223
- rubygems_version: 2.5.1
209
+ rubygems_version: 2.4.6
224
210
  signing_key:
225
211
  specification_version: 4
226
212
  summary: Build your bots