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 +4 -4
- data/README.md +6 -3
- data/lib/botmetrics-rb/version.rb +1 -1
- data/lib/botmetrics.rb +6 -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: bd36442c6ae3e2378923f8351cc251e5d221d943
|
4
|
+
data.tar.gz: efe7679645fd4b0f87a2673b870be5e4568145e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
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
|
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
|
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.
|
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-
|
11
|
+
date: 2016-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|