Skip to content

Commit

Permalink
Added dogapi [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jul 22, 2018
1 parent 0132d4f commit 248f375
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 10 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ gem "hiredis"
gem "docker-api"
gem "fastimage"
gem "restforce"
gem "dogapi"
#gem "azure_mgmt_compute"
#gem "unirest"
#gem "kubeclient", git: "https://github.com/abonas/kubeclient.git"
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ GEM
docker-api (1.34.2)
excon (>= 0.47.0)
multi_json
dogapi (1.30)
multi_json
domain_name (0.5.20180417)
unf (>= 0.0.5, < 1.0.0)
elasticsearch (6.1.0)
Expand Down Expand Up @@ -325,6 +327,7 @@ DEPENDENCIES
curb
dalli
docker-api
dogapi
elasticsearch
em-http-request
excon
Expand Down
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ Other
- [azure](#azure)
- [bitly](#bitly)
- [docker-api](#docker-api)
- [firebase](#firebase)
- [dogapi](#dogapi)
- [fastimage](#fastimage)
- [gibbon](#gibbon)
- [firebase](#firebase)
- [geocoder](#geocoder)
- [gibbon](#gibbon)
- [google-cloud](#google-cloud)
- [hipchat](#hipchat)
- [koala](#koala)
Expand Down Expand Up @@ -725,6 +726,17 @@ Connect timeout not configurable

Raises `Docker::Error::TimeoutError`

### dogapi

```ruby
Dogapi::Client.new(api_key, nil, nil, nil, false, 1)
```

Raises

- `Net::OpenTimeout` on connect timeout
- `Net::ReadTimeout` on read timeout

### fastimage

```ruby
Expand All @@ -749,14 +761,6 @@ Raises
- `HTTPClient::ConnectTimeoutError` on connect timeout
- `HTTPClient::ReceiveTimeoutError` on read timeout

### gibbon

```ruby
Gibbon::Request.new(open_timeout: 1, timeout: 1, ...)
```

Raises `Gibbon::MailChimpError`

### geocoder

```ruby
Expand All @@ -771,6 +775,14 @@ Geocoder.configure(timeout: 1, always_raise: :all, ...)

Raises `Geocoder::LookupTimeout`

### gibbon

```ruby
Gibbon::Request.new(open_timeout: 1, timeout: 1, ...)
```

Raises `Gibbon::MailChimpError`

### google-cloud

```ruby
Expand Down
19 changes: 19 additions & 0 deletions test/dogapi_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require_relative "test_helper"

class DogApiTest < Minitest::Test
def test_connect
dog = Dogapi::Client.new("test", nil, nil, nil, false, 1, connect_url)

assert_timeout(Net::OpenTimeout) do
dog.emit_point("some.metric.name", 50.0)
end
end

def test_read
dog = Dogapi::Client.new("test", nil, nil, nil, false, 1, read_url)

assert_timeout(Net::ReadTimeout) do
dog.emit_point("some.metric.name", 50.0)
end
end
end

0 comments on commit 248f375

Please sign in to comment.