stbaldricks 10.0.0.alpha.1 → 10.0.0.alpha.2

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
  SHA256:
3
- metadata.gz: ddc14dda441ec5fffd7c82f0b3be237d6f84e14d6b64fd1c19a4481a032a3deb
4
- data.tar.gz: a490fd003103aee515fe0120e38df6aa3347781edacffcb01386714650ca4f7d
3
+ metadata.gz: dcb646bcaf19ec72bb664535820e5e06126026770952da825c46346dd6fffff1
4
+ data.tar.gz: 95916b2719707d7b0f33f7e59f820d714eec7009c7ddd1bbba1cd8384a95b853
5
5
  SHA512:
6
- metadata.gz: 2c500367fc8c60c71087ea9c5b8b2f6e1330d61b787e38b8c7462d9429f4f1cc707a4667ecd53070e901cb5ef24aa2f7cda4ba3ce4e76b6bdd41885777e5abd7
7
- data.tar.gz: 0176ff360246c779546fd83dd097c68a30c65bc58062ff591a15689015505685ba7e0542e6018238324dc2e4e884eed726ccb4a3e0d319a32cd5f5b0dd768eca
6
+ metadata.gz: 17a713ad333e7322da5bcc66143a3aa917872888689f8d8702d50219dca31eb26be9863f3f471fa4899381791dd8ce70472776211035772045359b968295350f
7
+ data.tar.gz: 2c0367f4c6059cc4a269f58e61ad7032c1478ca383f84f654f2fc3a0e5f504d5770601bf11d3d362a7477483085c202101360a28856ad5f6c96ae8546dc357bc
@@ -12,7 +12,7 @@ module SBF
12
12
 
13
13
  class << self
14
14
  attr_writer :base_uri, :user_token, :general_token, :request_id
15
- attr_accessor :user_token
15
+ attr_accessor :user_token, :forwarded_for
16
16
  end
17
17
 
18
18
  def self.base_uri
@@ -1,8 +1,19 @@
1
1
  require 'stbaldricks/endpoints/lib/entity'
2
+ require 'ipaddr'
2
3
 
3
4
  module SBF
4
5
  module Client
5
6
  class DonationEndpoint < SBF::Client::EntityEndpoint
7
+ def create(entity_or_hash, with = {})
8
+ unless SBF::Client::Configuration.forwarded_for
9
+ SBF::Client::LOG.warn {
10
+ "SBF::Client No forwarded_for configured for the client on the donation create route. \
11
+ This may cause your app to be blocked from creating donations if too many errors occur."
12
+ }
13
+ end
14
+ super
15
+ end
16
+
6
17
  def external_sync(data)
7
18
  response = SBF::Client::Api::Request.post_request("#{base_uri}/external_sync", data)
8
19
 
@@ -73,7 +73,7 @@ module SBF
73
73
  end
74
74
  SBF::Client::Configuration.user_token = nil
75
75
 
76
- SBF::Client::LOG.info { "SB::Client - Change Password for user with profile_id: #{profile_id}" }
76
+ SBF::Client::LOG.info { "SBF::Client - Change Password for user with profile_id: #{profile_id}" }
77
77
  SBF::Client::Api::Response.new(http_code: response.code, data: nil, error: error)
78
78
  end
79
79
 
@@ -95,7 +95,7 @@ module SBF
95
95
  error = SBF::Client::ErrorEntity.new(parsed_response)
96
96
  end
97
97
 
98
- SBF::Client::LOG.info { "SB::Client - Disconnecting Facebook user with profile_id: #{profile_id}" }
98
+ SBF::Client::LOG.info { "SBF::Client - Disconnecting Facebook user with profile_id: #{profile_id}" }
99
99
  SBF::Client::Api::Response.new(http_code: response.code, data: nil, error: error)
100
100
  end
101
101
  end
@@ -68,12 +68,15 @@ module SBF
68
68
 
69
69
  def self.options(auth: nil, type: :get, query: nil, body: nil)
70
70
  {}.tap do |options|
71
- options.merge!(base_uri: SBF::Client::Configuration.base_uri,
72
- headers: {
73
- 'Accept' => 'application/json',
74
- 'X-Request-Id' => SBF::Client::Configuration.request_id
75
- },
76
- verify: verify_ssl_peer?)
71
+ options.merge!(
72
+ base_uri: SBF::Client::Configuration.base_uri,
73
+ headers: {}.tap do |hsh|
74
+ hsh['Accept'] = 'application/json'
75
+ hsh['X-Request-Id'] = SBF::Client::Configuration.request_id
76
+ hsh['X-Forwarded-For'] = SBF::Client::Configuration.forwarded_for unless SBF::Client::Configuration.forwarded_for.blank?
77
+ end,
78
+ verify: verify_ssl_peer?
79
+ )
77
80
  options[:body] = body if body
78
81
  options[:query] = query if query
79
82
  options[:headers]['Content-Type'] = 'application/json' if type == :post
@@ -1,5 +1,5 @@
1
1
  module SBF
2
2
  module Client
3
- VERSION = '10.0.0.alpha.1'
3
+ VERSION = '10.0.0.alpha.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stbaldricks
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.0.0.alpha.1
4
+ version: 10.0.0.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-13 00:00:00.000000000 Z
11
+ date: 2019-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel