soaspec 0.0.62 → 0.0.63
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 +4 -4
- data/ChangeLog +4 -0
- data/lib/soaspec/exchange_handlers/rest_handler.rb +5 -1
- data/lib/soaspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bbd6200218cc74c240264b8f39b0061fb196d175
|
|
4
|
+
data.tar.gz: cbdde5a4d6771a6d91ef00101b27b92de0c35d59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37ab895847c2dd195a646aa19afbacc1135f39bcb3a6062948d7bd09a2a8368291bb0fd27decc027eabfd97653403a58a86233b68fa4990cbc7affd0de445d27
|
|
7
|
+
data.tar.gz: d7cb6508f82c1f4c9c0de7149df0c95c4170347fd73a634fb48d760aa39e812ba29978c2b5790b25912ac80a0c569ea0b45968d5807ae3d38a1d8df023e316bf
|
data/ChangeLog
CHANGED
|
@@ -25,6 +25,10 @@ module Soaspec
|
|
|
25
25
|
# Will create access_token method based on passed parameters
|
|
26
26
|
def oauth2(client_id: nil, client_secret: nil, token_url: nil, username: nil, password: nil, security_token: nil)
|
|
27
27
|
define_method('oauth_response') do
|
|
28
|
+
username = ERB.new(username).result(binding) if username
|
|
29
|
+
security_token = ERB.new(security_token).result(binding) if security_token
|
|
30
|
+
token_url = ERB.new(token_url).result(binding) if token_url
|
|
31
|
+
password = ERB.new(password).result(binding) if password
|
|
28
32
|
payload = if password && username
|
|
29
33
|
{
|
|
30
34
|
grant_type: 'password',
|
|
@@ -67,7 +71,7 @@ module Soaspec
|
|
|
67
71
|
# @param [String] path_to_filename Will have Soaspec.credentials_folder appended to it if set
|
|
68
72
|
def oauth2_file(path_to_filename)
|
|
69
73
|
full_path = Soaspec.credentials_folder ? File.join(Soaspec.credentials_folder, path_to_filename + '.yml') : path_to_filename + '.yml'
|
|
70
|
-
file_hash =
|
|
74
|
+
file_hash = YAML.load_file(full_path)
|
|
71
75
|
raise 'File at ' + full_path + ' is not a hash ' unless file_hash.is_a? Hash
|
|
72
76
|
oauth_hash = file_hash.transform_keys_to_symbols
|
|
73
77
|
oauth2 **oauth_hash
|
data/lib/soaspec/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: soaspec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.63
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SamuelGarrattIQA
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-05-
|
|
11
|
+
date: 2018-05-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|