access_watch 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb430f02e966b18abe67fe3e084f3afc2f238e9c
4
- data.tar.gz: 88fccc2487ad1bc736225764d28ae27458d2e54f
3
+ metadata.gz: 1a2811b7d8c0c24f0b1f1126c3753502843003b8
4
+ data.tar.gz: 0b2587a05ed8b53832923fe0ab39023827436599
5
5
  SHA512:
6
- metadata.gz: 58e3a063a475136a229d2381cb0f1799e547df51c175cfe8210aae09c1baf323cb381bd7e400330104bf260ab30496601546e9eb9aa8222be5d654b278e7fdc2
7
- data.tar.gz: d4a8379a77376565e9a8751d3bb6b997228d070ac9eccbcde4833252a6343997c129d316052b0cce6c5b6621dc47582e20bd636d3faf881beaf22cfeba55db8a
6
+ metadata.gz: 17e257429006ba1b81ac5ea1ccaaaa12547db1353949b92290ed1e8b5b8e1a54fd5f99fda535b1eaef7767ec59a48ccecc094ebdf1e1f36e29f419237ecc0f61
7
+ data.tar.gz: ae7180104311ef19e6bee8e4bd8c6e1dad65bc6d2977a0772a1c7df90ad5d2db2dac021a6215c7d88181685492aae18f1f512c1e3a02a1afc70f5c847ac055c8
@@ -34,9 +34,17 @@ module AccessWatch
34
34
  "Api-Key" => api_key,
35
35
  "Accept" => "application/json",
36
36
  "Content-Type" => "application/json",
37
+ "User-Agent" => user_agent,
37
38
  }
38
39
  end
39
40
 
41
+ def user_agent
42
+ return @user_agent if @user_agent
43
+ result = "Access Watch/#{AccessWatch::VERSION} Ruby/#{RUBY_VERSION}"
44
+ result += " Rails/#{Rails.version}" if defined?(Rails)
45
+ @user_agent = result
46
+ end
47
+
40
48
  private
41
49
 
42
50
  HTTPS = "https".freeze
@@ -1,3 +1,3 @@
1
1
  module AccessWatch
2
- VERSION = "0.0.4".freeze
2
+ VERSION = "0.0.5".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: access_watch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Bernard