botmetrics-rb 0.0.5 → 0.0.6

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: d52b84166c8dc99b99d90eca6b723ea10f562a5d
4
- data.tar.gz: cd8db70b02fa23b83af2cec3659601c1de625eb7
3
+ metadata.gz: bd36442c6ae3e2378923f8351cc251e5d221d943
4
+ data.tar.gz: efe7679645fd4b0f87a2673b870be5e4568145e0
5
5
  SHA512:
6
- metadata.gz: 24bd20b4b6522fa31b662ffb298b17cb527b2f5fd5b9a1ff4095d15d1cdeafa10a2baf8596767cd13a7b76105457c4401e3fea7ab28c3ff9da6e6340ac5311e6
7
- data.tar.gz: 359eb18be44c0d2d6a6357ffeb47a930d2b3267e31aa53d4c775966bda98fbd47d873e534d50550b637751238c27246c0b05058d0b8d1531bca80d442906e555
6
+ metadata.gz: c8793f169b7f133304f50b92120927f227ca5862872b9ffc6469cf0d7322f995d58ddddafe74584b1bab140616707d5d6041a3d64c790fcaf18df98be52b4e45
7
+ data.tar.gz: e0ed0a2527b5caec23731201365b41df37820e73e550596f1ecb3640014f9af0fbc62adbcab5bc2bcc776f9ba9cee406127296bbcdff5ff5b703755d7a20fc17
data/README.md CHANGED
@@ -4,6 +4,9 @@ Botmetrics is a Ruby client to the
4
4
  [BotMetrics](https://getbotmetrics.com) service which lets you collect
5
5
  & analyze metrics for your bot.
6
6
 
7
+ [![Build
8
+ Status](https://travis-ci.org/botmetrics/botmetrics-rb.svg?branch=master)](https://travis-ci.org/botmetrics/botmetrics-rb)
9
+
7
10
  ## Installation
8
11
 
9
12
  Add this line to your application's Gemfile:
@@ -33,8 +36,8 @@ client = BotMetrics::Client.new(api_key: '123', bot_id: '123')
33
36
 
34
37
  Alternatively, you can set the following ENV variables
35
38
 
36
- - `ENV['BOTMETRICS_API_KEY']`
37
- - `ENV['BOTMETRICS_BOT_ID']`
39
+ - `ENV['BOTMETRICS_API_KEY']`
40
+ - `ENV['BOTMETRICS_BOT_ID']`
38
41
  - `ENV['BOTMETRICS_API_HOST']`
39
42
 
40
43
  and initialize a `BotMetrics::Client` with the default ENV variables:
@@ -111,7 +114,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
111
114
 
112
115
  ## Contributing
113
116
 
114
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/botmetrics-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
117
+ Bug reports and pull requests are welcome on GitHub at https://github.com/botmetrics/botmetrics-rb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
115
118
 
116
119
 
117
120
  ## License
@@ -1,3 +1,3 @@
1
1
  module BotMetrics
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/botmetrics.rb CHANGED
@@ -30,7 +30,12 @@ module BotMetrics
30
30
  response.code == 201
31
31
  end
32
32
 
33
- def message(team_id:, channel: nil, user: nil, text: nil, attachments: nil)
33
+ def message(team_id, opts = {})
34
+ channel = opts[:channel]
35
+ user = opts[:user]
36
+ text = opts[:text]
37
+ attachments = opts[:attachments]
38
+
34
39
  if blank?(channel) && blank?(user)
35
40
  raise ArgumentError.new("Missing argument channel and user. Please provide at least one.")
36
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: botmetrics-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - arunthampi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-12 00:00:00.000000000 Z
11
+ date: 2016-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json