capcoauth 0.2.2 → 0.2.3

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: 22c6096e8562d514f12f137427193caee7c93f29
4
- data.tar.gz: dd518c0fe730235d44f6a89105f63f5af29a4741
3
+ metadata.gz: 95d9e9c324526ffa34995e6d9725d10aabefbdfd
4
+ data.tar.gz: bd77a5ce3fff62a79c5d1503b709279992f255ec
5
5
  SHA512:
6
- metadata.gz: 713ff96769caf90b4e512234f27de29ef03506ebc24b85c020b5dbef5cfe389f2401c5d789cef0e2c496d1218a86d6cfcad82eddd7598ea19a1708a2063cc906
7
- data.tar.gz: 681415b738d9e4b78f4f2dd2ef0232061283c00030f67c867b0308fc5e6ba3224d70e067efde78e88eaf2b0d8d37d85a563151786e4d08581eaf6df3f386641e
6
+ metadata.gz: 461d2c47ca66020cad3818c948939a539988e88b551951434b31399b0eb4aca2d5a7ac091d411d5039cb0b94beef87a6c10e060b0f6adbb5a991b64eb70800e4
7
+ data.tar.gz: e3a038b04a75bd2c556d6bdf67629034bc8e2851f966b218fb0dfcc62962bd02265f2736d6c09bdf328a90866be7735b9660395919d7e87d7082084da5d72fa6
@@ -12,7 +12,7 @@ module Capcoauth
12
12
  return @@bearer_token if @@bearer_token.present?
13
13
 
14
14
  res = self.post(
15
- '/oauth/token',
15
+ "#{Capcoauth.configuration.capcoauth_url}/oauth/token",
16
16
  {
17
17
  body: {
18
18
  grant_type: 'client_credentials',
@@ -56,7 +56,7 @@ module Capcoauth
56
56
  }
57
57
  body[:data][:attributes][:environment] = environment if device_type == 'ios'
58
58
  res = self.post(
59
- '/api/v1/user_devices',
59
+ "#{Capcoauth.configuration.capcoauth_url}/api/v1/user_devices",
60
60
  {
61
61
  body: body.to_json,
62
62
  headers: default_headers
@@ -69,14 +69,14 @@ module Capcoauth
69
69
  end
70
70
 
71
71
  def remove_device_token(device_token)
72
- res = self.delete("/api/v1/user_devices/#{device_token}", headers: default_headers)
72
+ res = self.delete("#{Capcoauth.configuration.capcoauth_url}/api/v1/user_devices/#{device_token}", headers: default_headers)
73
73
  @@bearer_token = nil if res.code == 401
74
74
  res.code == 204
75
75
  end
76
76
 
77
77
  def notify(user_id, alert=nil, badge=nil, data=nil)
78
78
  res = self.post(
79
- '/api/v1/user_notifications',
79
+ "#{Capcoauth.configuration.capcoauth_url}/api/v1/user_notifications",
80
80
  {
81
81
  body: {
82
82
  data: {
@@ -1,3 +1,3 @@
1
1
  module Capcoauth
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capcoauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Robertson