limiter-ruby 0.2.1 → 0.2.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: be6797974aa664c4b6dcc7db96803ca1f09dddec82ae5d4e8399b0c765b405c9
4
- data.tar.gz: d9f651b84e46d8548bdf165aa87b9bd354b4fb99f0539ae6f998d9af4c1727ac
3
+ metadata.gz: a9ba8ac345e89fbc58649c0c06431b2ce0029d80c3973ca245783d754a24b6f3
4
+ data.tar.gz: 51dd4e3fea76756e19af4fc80bab6dd65e9ce3f98142e51aff291062ea4e653a
5
5
  SHA512:
6
- metadata.gz: 36fff074641761c6d1503f27c8e776b49c0516265b1a3d3b9ac8cc04b2a2ab9f2aa8024365ae26bae0a94a561a6a88b94e3c64f5fa5401e721f4fbc472eda890
7
- data.tar.gz: e304ec1299c69c11b908bcfc31c79a1850296ab054dace630337baa9f7fe1f4022e32f577944313a5a2ee1b477c38e33eb2ea2e3ed2dc4af429168d96405a7cc
6
+ metadata.gz: 111c8a224408fab34f680f2772ad2c171df274bbe8aa67ba20a95484b92ab785dba9f1cb341a337325a5633fe2a3713678cc57c15f162ef3a5da8c3b449a8f6d
7
+ data.tar.gz: bd53e9bd59342b45898b32e71d3f4c904fbbff547cc1439756490d18b672a2ac544a511efe99f567f3fc9f76f4c8021449e998861421697e7abe2da66199b7e6
@@ -45,7 +45,10 @@ module Limiter
45
45
  end
46
46
 
47
47
  def request(params = {})
48
- HTTP.auth("Bearer #{Limiter.configuration.api_token}").get(url, params: params)
48
+ HTTP
49
+ .auth("Bearer #{Limiter.configuration.api_token}")
50
+ .headers("User-Agent" => "Limiter-Ruby/#{Limiter::VERSION}")
51
+ .get(Limiter.configuration::API_BASE_URL + limiter_path, params: params)
49
52
  end
50
53
  end
51
54
  end
@@ -2,7 +2,7 @@ module Limiter
2
2
  class Configuration
3
3
  API_BASE_URL = "https://api.limiter.dev"
4
4
 
5
- attr_reader :api_token, :raise_errors
5
+ attr_accessor :api_token, :raise_errors
6
6
 
7
7
  def initialize
8
8
  @api_token = ENV["LIMITER_TOKEN"]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Limiter
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: limiter-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bilal Budhani