adp-connection 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
  SHA1:
3
- metadata.gz: eccddcb699cb5cd3164c45236f896866419522e6
4
- data.tar.gz: bf3a2cb0c4ce268fb8f315a3e908f64fa2644cd6
3
+ metadata.gz: a21fd0beca709c7b667d18e3db8f615d204905f0
4
+ data.tar.gz: 22575af05a9c8fd1cec5fb8db55b11e0e39f05c5
5
5
  SHA512:
6
- metadata.gz: 3da230761842df5eb1da49a24dfab15c3cff681c68a44c0d56daeafc8d39e00f048cccd4069c6313e1fad38e8cb99d291707c4e0c8d44cb484896452134ed9b7
7
- data.tar.gz: c1d4e211b15069fba5080a9b22cabbc0d6b37079c6ef1102f1b809dace8a152def7be0e3a9dd717bc18d29f40dadc86892870bd7522138f1ca5f4d7442abe828
6
+ metadata.gz: 5121ee7ca6838a5f1cc0070be3bc0da639a08f03268ef0080c0e7490c62a89b81e3d9345e16c493878bee5b86fabf44919877ecef946f2815143e1d0a64c6172
7
+ data.tar.gz: e3f1fb3a4431dc6c9a84d4eb2f307b2f1323e2afacdcba3c8b86911ae81d61385e3199950e2c44da9f9080b5cedbed6d433219e871454facdb810163e22a782f
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  The ADP Client Connection Library is intended to simplify and aid the process of authenticating, authorizing and connecting to the ADP Marketplace API Gateway. The Library includes a sample application that can be run out-of-the-box to connect to the ADP Marketplace API **test** gateway.
4
4
 
5
5
  ### Version
6
- 1.0.0 (Beta)
6
+ 0.1.3 (Beta)
7
7
 
8
8
 
9
9
  ## Installation
@@ -9,6 +9,7 @@ require_relative "connection_exception"
9
9
  require_relative "api_connection"
10
10
  require_relative "client_credential_configuration"
11
11
  require_relative "authorization_code_configuration"
12
+ require_relative "connection/version"
12
13
 
13
14
  module Adp
14
15
  module Connection
@@ -125,10 +126,14 @@ module Adp
125
126
  log.debug("Client Secret: #{data["client_secret"]}")
126
127
  log.debug("Grant Type: #{data["grant_type"]}")
127
128
 
129
+ useragent = "adp-connection-ruby/#{Adp::Connection::VERSION}"
128
130
  uri = URI.parse( url );
129
131
  pem = File.read("#{self.connection_configuration.sslCertPath}");
130
132
  key = File.read(self.connection_configuration.sslKeyPath);
131
133
  http = Net::HTTP.new(uri.host, uri.port);
134
+
135
+ log.debug("User agent: #{useragent}")
136
+
132
137
  if (!self.connection_configuration.sslCertPath.nil?)
133
138
  http.use_ssl = true
134
139
  http.cert = OpenSSL::X509::Certificate.new( pem );
@@ -143,6 +148,8 @@ module Adp
143
148
  request = Net::HTTP::Get.new(uri.request_uri)
144
149
  end
145
150
 
151
+ request.initialize_http_header({"User-Agent" => useragent })
152
+
146
153
  request["Content-Type"] = content_type
147
154
 
148
155
  # add credentials if available
@@ -1,5 +1,5 @@
1
1
  module Adp
2
2
  module Connection
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adp-connection
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
  - Napier, Junior (CORP)
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-04 00:00:00.000000000 Z
11
+ date: 2016-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json