newrelic-slack-ruby-bot 0.1.1 → 0.2.0

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: e0e44f96d54e71b4eed9a0c096c62eed542f57e9
4
- data.tar.gz: 5d43e93d65dc915e8c9cb61edafe591070fe1bc0
3
+ metadata.gz: dbe6d3164cf6e4048053f40f1b16a86a633ba791
4
+ data.tar.gz: 541d728290a0449c4e55c5672630549bc13dc2c0
5
5
  SHA512:
6
- metadata.gz: 3dfa9bea84998c4c41500141d6290b8b998202c98189013e05fd2bf8ed6fcee4b6f1cf91bd694f5b2d7f8a98ec8d86424377c5e94e1bde648fb05d033a35a713
7
- data.tar.gz: 27dae10eaf4702a41310e5cb25ef47aace9fc425d25114a33ddb9e4e5c06d1c3e3ea9da9b1ad99b26f680db85e3f7d1b548d3fdefe424e123a3e02d9a5121736
6
+ metadata.gz: abd4bc708ba4fe1ccc1286a0a1b0057aaa906f7c74ac7000005274f4b5aefe218bcf8f571bd800d88b7ef4155af063a59f84324bebae2ba10adbcd90266c8764
7
+ data.tar.gz: '0045281a46ba59a104ec4c8a1671d4a1f27f1726f2fa1bc4788fc5dbab03281931b991ed47f80742fcc8f4a15fc3e5a4acf5f2feaec9cee194a34e3b17c7d4dc'
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
+ ### 0.2.0 (9/26/2017)
2
+
3
+ * [#4](https://github.com/slack-ruby/newrelic-slack-ruby-bot/pull/4): Revise New Relic log messages - [@kstole](https://github.com/kstole).
4
+ * [#5](https://github.com/slack-ruby/newrelic-slack-ruby-bot/pull/5): Support latest version of SlackRubyBot by applying instrumentation to message hook - [@kstole](https://github.com/kstole).
5
+
1
6
  ### 0.1.1 (9/26/2017)
2
7
 
3
- * [#2](https://github.com/slack-ruby/newrelic-slack-ruby-bot/pull/2): Lock slack-ruby-bot to latest compatible version (0.7.0) or lower [@kstole](https://github.com/kstole).
8
+ * [#2](https://github.com/slack-ruby/newrelic-slack-ruby-bot/pull/2): Lock slack-ruby-bot to latest compatible version (0.7.0) or lower - [@kstole](https://github.com/kstole).
4
9
 
5
10
  ### 0.1.0 (12/27/2015)
6
11
 
data/Gemfile CHANGED
@@ -2,6 +2,9 @@ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rspec', '~> 3.4.0'
6
- gem 'rake', '< 11.0'
7
- gem 'rubocop', '0.35.1'
5
+ group :test do
6
+ gem 'celluloid-io', require: %w(celluloid/current celluloid/io)
7
+ gem 'rake', '< 11.0'
8
+ gem 'rspec', '~> 3.4.0'
9
+ gem 'rubocop', '0.35.1'
10
+ end
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- newrelic-slack-ruby-bot (0.1.1)
4
+ newrelic-slack-ruby-bot (0.2.0)
5
5
  newrelic_rpm
6
- slack-ruby-bot (<= 0.7.0)
6
+ slack-ruby-bot (>= 0.8.0)
7
7
 
8
8
  GEM
9
9
  remote: http://rubygems.org/
@@ -13,44 +13,48 @@ GEM
13
13
  i18n (~> 0.7)
14
14
  minitest (~> 5.1)
15
15
  tzinfo (~> 1.1)
16
- addressable (2.5.2)
17
- public_suffix (>= 2.0.2, < 4.0)
18
16
  ast (2.3.0)
19
17
  astrolabe (1.3.1)
20
18
  parser (~> 2.2)
19
+ celluloid (0.17.3)
20
+ celluloid-essentials
21
+ celluloid-extras
22
+ celluloid-fsm
23
+ celluloid-pool
24
+ celluloid-supervision
25
+ timers (>= 4.1.1)
26
+ celluloid-essentials (0.20.5)
27
+ timers (>= 4.1.1)
28
+ celluloid-extras (0.20.5)
29
+ timers (>= 4.1.1)
30
+ celluloid-fsm (0.20.5)
31
+ timers (>= 4.1.1)
32
+ celluloid-io (0.17.3)
33
+ celluloid (>= 0.17.2)
34
+ nio4r (>= 1.1)
35
+ timers (>= 4.1.1)
36
+ celluloid-pool (0.20.5)
37
+ timers (>= 4.1.1)
38
+ celluloid-supervision (0.20.6)
39
+ timers (>= 4.1.1)
21
40
  concurrent-ruby (1.0.5)
22
41
  diff-lcs (1.3)
23
- eventmachine (1.2.5)
24
42
  faraday (0.13.1)
25
43
  multipart-post (>= 1.2, < 3)
26
44
  faraday_middleware (0.12.2)
27
45
  faraday (>= 0.7.4, < 1.0)
28
- faraday_middleware-parse_oj (0.3.2)
29
- faraday (~> 0.9)
30
- faraday_middleware (>= 0.9.1, < 1.0)
31
- oj (>= 2.0, < 4.0)
32
- faye-websocket (0.10.7)
33
- eventmachine (>= 0.12.0)
34
- websocket-driver (>= 0.5.1)
35
- giphy (2.0.2)
36
- faraday (~> 0.9)
37
- faraday_middleware (~> 0.9)
38
- faraday_middleware-parse_oj (~> 0.3)
39
- launchy (~> 2.4)
40
46
  gli (2.16.1)
41
47
  hashie (3.5.6)
48
+ hitimes (1.2.6)
42
49
  i18n (0.8.6)
43
50
  json (2.1.0)
44
- launchy (2.4.3)
45
- addressable (~> 2.3)
46
51
  minitest (5.10.3)
47
52
  multipart-post (2.0.0)
48
53
  newrelic_rpm (4.4.0.336)
49
- oj (3.3.6)
54
+ nio4r (2.1.0)
50
55
  parser (2.4.0.0)
51
56
  ast (~> 2.2)
52
57
  powerpack (0.1.1)
53
- public_suffix (3.0.0)
54
58
  rainbow (2.2.2)
55
59
  rake
56
60
  rake (10.5.0)
@@ -75,10 +79,7 @@ GEM
75
79
  ruby-progressbar (~> 1.7)
76
80
  tins (<= 1.6.0)
77
81
  ruby-progressbar (1.8.3)
78
- slack-ruby-bot (0.7.0)
79
- activesupport
80
- faye-websocket
81
- giphy (~> 2.0.2)
82
+ slack-ruby-bot (0.10.4)
82
83
  hashie
83
84
  slack-ruby-client (>= 0.6.0)
84
85
  slack-ruby-client (0.10.0)
@@ -90,6 +91,8 @@ GEM
90
91
  json
91
92
  websocket-driver
92
93
  thread_safe (0.3.6)
94
+ timers (4.1.2)
95
+ hitimes
93
96
  tins (1.6.0)
94
97
  tzinfo (1.2.3)
95
98
  thread_safe (~> 0.1)
@@ -101,6 +104,7 @@ PLATFORMS
101
104
  ruby
102
105
 
103
106
  DEPENDENCIES
107
+ celluloid-io
104
108
  newrelic-slack-ruby-bot!
105
109
  rake (< 11.0)
106
110
  rspec (~> 3.4.0)
data/README.md CHANGED
@@ -3,7 +3,7 @@ NewRelic Instrumentation for SlackRubyBot
3
3
 
4
4
  [![Gem Version](http://img.shields.io/gem/v/newrelic-slack-ruby-bot.svg)](http://badge.fury.io/rb/newrelic-slack-ruby-bot)
5
5
  [![Build Status](http://img.shields.io/travis/slack-ruby/newrelic-slack-ruby-bot.svg)](https://travis-ci.org/slack-ruby/newrelic-slack-ruby-bot)
6
- [![Code Climate](https://codeclimate.com/github/slack-ruby/newrelic-slack-ruby-bot.svg)](https://codeclimate.com/github/slack-ruby/newrelic-slack-ruby-bot)
6
+ [![Code Climate](https://codeclimate.com/github/dblock/newrelic-slack-ruby-bot.svg)](https://codeclimate.com/github/dblock/newrelic-slack-ruby-bot)
7
7
 
8
8
  NewRelic instrumentation for [slack-ruby-bot](https://github.com/slack-ruby/slack-ruby-bot).
9
9
 
@@ -1,5 +1,5 @@
1
1
  DependencyDetection.defer do
2
- named :slack_ruby_bot_instrumentation
2
+ named :slack_ruby_bot
3
3
 
4
4
  depends_on do
5
5
  !::NewRelic::Agent.config[:disable_slack_ruby_bot]
@@ -10,22 +10,22 @@ DependencyDetection.defer do
10
10
  end
11
11
 
12
12
  executes do
13
- NewRelic::Agent.logger.info 'Installing New Relic supported SlackRubyBot instrumentation'
13
+ NewRelic::Agent.logger.info 'Installing SlackRubyBot instrumentation'
14
14
  instrument_call
15
15
  end
16
16
 
17
17
  def instrument_call
18
- ::SlackRubyBot::Server.class_eval do
18
+ ::SlackRubyBot::Hooks::Message.class_eval do
19
19
  include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation
20
20
 
21
21
  def message_with_new_relic(client, data)
22
- perform_action_with_newrelic_trace(name: 'message', category: 'OtherTransaction/Slack') do
22
+ perform_action_with_newrelic_trace(name: 'call', category: 'OtherTransaction/Slack') do
23
23
  message_without_new_relic(client, data)
24
24
  end
25
25
  end
26
26
 
27
- alias_method :message_without_new_relic, :message
28
- alias_method :message, :message_with_new_relic
27
+ alias_method :message_without_new_relic, :call
28
+ alias_method :call, :message_with_new_relic
29
29
  end
30
30
  end
31
31
  end
@@ -2,7 +2,7 @@ module NewRelic
2
2
  module Agent
3
3
  module Instrumentation
4
4
  module SlackRubyBot
5
- VERSION = '0.1.1'
5
+ VERSION = '0.2.0'.freeze
6
6
  end
7
7
  end
8
8
  end
@@ -14,5 +14,5 @@ Gem::Specification.new do |s|
14
14
  s.licenses = ['MIT']
15
15
  s.summary = 'NewRelic instrumentation for slack-ruby-bot.'
16
16
  s.add_dependency 'newrelic_rpm'
17
- s.add_dependency 'slack-ruby-bot', '<= 0.7.0'
17
+ s.add_dependency 'slack-ruby-bot', '>= 0.8.0'
18
18
  end
@@ -1,16 +1,15 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe NewRelic::Agent::Instrumentation do
4
+ subject { SlackRubyBot::Hooks::Message.new }
4
5
  let(:client) { SlackRubyBot::Client.new }
5
- subject do
6
- SlackRubyBot::Server.new
7
- end
6
+
8
7
  it 'perform_action_with_newrelic_trace' do
9
8
  expect(subject)
10
9
  .to receive(:perform_action_with_newrelic_trace)
11
- .with(hash_including(name: 'message'))
10
+ .with(hash_including(name: 'call', category: 'OtherTransaction/Slack'))
12
11
  .and_yield
13
12
 
14
- subject.message(client, Hashie::Mash.new(message: 'message', text: 'hi'))
13
+ subject.call(client, Hashie::Mash.new(message: 'message', text: 'hi'))
15
14
  end
16
15
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic-slack-ruby-bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
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-09-26 00:00:00.000000000 Z
11
+ date: 2017-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: newrelic_rpm
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: slack-ruby-bot
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "<="
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.7.0
33
+ version: 0.8.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "<="
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.7.0
40
+ version: 0.8.0
41
41
  description:
42
42
  email: dblock@dblock.org
43
43
  executables: []
@@ -56,6 +56,7 @@ files:
56
56
  - lib/newrelic-slack-ruby-bot/instrumentation.rb
57
57
  - lib/newrelic-slack-ruby-bot/version.rb
58
58
  - newrelic-slack-ruby-bot.gemspec
59
+ - pkg/newrelic-slack-ruby-bot-0.1.1.gem
59
60
  - screenshots/breakdown.png
60
61
  - spec/newrelic-slack-ruby-bot/instrumentation_spec.rb
61
62
  - spec/newrelic-slack-ruby-bot/version_spec.rb