supergood 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: a0cdb2377e5748a6ed76d61765fe3b15b648f397a97d6c9cdd28b592d68fd323
4
- data.tar.gz: '099acaa41f71ef93c745960d9ec046b6643f68501fd95d140a1dd7c62eec76d1'
3
+ metadata.gz: 8b55de34e8a2ab872a9d2556a4e1e8a4e544bff0536c02fcf123fb93c30fde87
4
+ data.tar.gz: 974a1af1a188f5a85e77c603e9545370c360367edeb4327c009c6b12ec44a8b9
5
5
  SHA512:
6
- metadata.gz: 2c15df0347deb5fcb0a0fdf04054595f8c4c9ef8b4da4fabc7879d6098fbe9595c507902ed6f7ccab95b47877f139d9121a1ecea885cb5f814ec86942cb37b3b
7
- data.tar.gz: 97beed9cd863cd1175756b3084601a40f53928c205b3a3583ca04931a88f6a4804041b8506dfd7277f4232ed1bb7bad3a6eaf5494fe847955dff22439e1882c7
6
+ metadata.gz: c0c8f7c3b9af56109324314aa9af0220624bf9d05d2e06a8d2706b5cfac3f6d6ba2e7e8613b82803cc7365e66e6e76d85b1180c62d368ae01f55892276b730c3
7
+ data.tar.gz: 5bf07755f863ca866c5381f465957689616826f6db09734beda707a15099fc55b3a1fcee4b76f5c9df6623a5b5b1d9b26cb1782924a480e5f66dc279ae353a8b
data/README.md CHANGED
@@ -1,50 +1,50 @@
1
- # Supergood
1
+ # Ruby
2
2
 
3
- Monitor the cost and performance of your external API's with two lines of code.
3
+ The Supergood Ruby client connects Supergood to your Ruby application. Follow these steps to integrate with the Ruby client.
4
4
 
5
- Interested in learning more? Check us out at https://supergood.ai or Reach out to alex@supergood.ai .
5
+ ## 1. Install the Supergood library
6
6
 
7
- Not built on Ruby? We've got a node client, python client and golang client as well.
7
+ ```bash
8
+ gem install supergood
9
+ ```
8
10
 
9
- ## Installation
11
+ ## 2. Initialize the Supergood Library
10
12
 
11
- Add this line to your application's Gemfile:
13
+ **Environment variables**
12
14
 
13
- ```ruby
14
- gem 'supergood'
15
- ```
15
+ Set the environment variables `SUPERGOOD_CLIENT_ID` and `SUPERGOOD_CLIENT_SECRET` using the API keys generated in the [getting started instructions](../../getting-started.md).
16
16
 
17
- And then execute:
17
+ Initialize the Supergood client at the root of your application, or anywhere you're making API calls with the following code:
18
18
 
19
- $ bundle install
20
-
21
- Or install it yourself as:
19
+ ```ruby
20
+ require 'supergood'
22
21
 
23
- $ gem install supergood
22
+ Supergood.init()
23
+ ```
24
24
 
25
- ## Usage
25
+ **Passing keys**
26
26
 
27
- 1. Head over to https://dashboard.supergood.ai and make an account, make sure to use your work email address!
28
- 2. Click on the tab labeled "API Keys" and generate a client id and client secret.
29
- 3. Head back to your code and initialize the Supergood client one of two ways:
27
+ You can also pass the API keys in manually without setting environment variables.\
28
+ \
29
+ Replace `<CLIENT_ID>` and `<CLIENT_SECRET>` with the API keys you generated in the [getting started instructions](../../getting-started.md).
30
30
 
31
- ```
31
+ ```ruby
32
32
  require 'supergood'
33
33
 
34
- Supergood.init(<client_id>, <client_secret>)
34
+ Supergood.init({ client_id: "<CLIENT_ID>", client_secret: "<CLIENT_SECRET>" })
35
35
  ```
36
- OR
37
-
38
- set `SUPERGOOD_CLIENT_ID` and `SUPERGOOD_CLIENT_SECRET` as environment variables and leave the init function as `Supergood.init`
39
36
 
37
+ #### Local development
40
38
 
41
- ## Development
39
+ Setting the `CLIENT_ID` and `CLIENT_SECRET_ID` to `local-client-id` and `local-client-secret`, respectively, will disable making API calls to the supergood.ai server and instead log the payloads to the local console.
42
40
 
43
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
41
+ ## 3. Monitor your API calls
44
42
 
45
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
43
+ You're all set to use Supergood!
46
44
 
47
- ## Contributing
45
+ Head back to your [dashboard](https://dashboard.supergood.ai) to start monitoring your API calls and receiving reports.
48
46
 
49
- Bug reports and pull requests are welcome on GitHub at https://github.com/supergoodsystems/supergood-rb.
47
+ ## Links
50
48
 
49
+ * [Supergood RubyGems Project](https://rubygems.org/gems/supergood)
50
+ * [Supergood-rb Source Code](https://github.com/supergoodsystems/supergood-rb)
@@ -75,7 +75,6 @@ module Supergood
75
75
  api.post_events(data)
76
76
  rescue => e
77
77
  log.error(data, e, e.message)
78
- cleanup()
79
78
  ensure
80
79
  @response_cache.clear
81
80
  @request_cache.clear if force
@@ -147,7 +146,6 @@ module Supergood
147
146
  }
148
147
  rescue => e
149
148
  log.error({ request: request }, e, ERRORS[:CACHING_REQUEST])
150
- cleanup()
151
149
  end
152
150
  end
153
151
 
@@ -173,7 +171,6 @@ module Supergood
173
171
  { request: request_payload, response: response_payload },
174
172
  e, ERRORS[:CACHING_RESPONSE]
175
173
  )
176
- cleanup()
177
174
  end
178
175
  end
179
176
 
@@ -1,3 +1,3 @@
1
1
  module Supergood
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supergood
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Klarfeld