soaspec 0.0.86 → 0.0.87

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: 32fc01d8faf3e3605348300c6be499db923da39b
4
- data.tar.gz: ea571b9c2bfdab7ad19d6657429c08d7fe4e92f7
3
+ metadata.gz: 7463616264d1315b533bf2005c8ddafcc8f8f1d4
4
+ data.tar.gz: b02119b036570ab8fcdeeba446cd1148e4a182d6
5
5
  SHA512:
6
- metadata.gz: c9ed4e0de6079eb02bc357f56e719c6c9df1dc01c62991455ea3a3cb5600c9bce6700ee5722ef6b86750697b9f2d476f907008b804e8bb4a24282bbb852e02c0
7
- data.tar.gz: e2e6e18910b617bb6dae289e4c61f14b8d6f98d7c386dea437aeb17a7bb4d05736ab188759e1c2c3223bdfaf32598c1daf562a278fbd70d625960cec4422a955
6
+ metadata.gz: 60c36c8a0c9b98e4ebae2682dcd58a63bedd129f96235d30d89dcdbf540f7f4892a9f1e7cbfe2ac4b68067b231174f2a63d25b9bcb52b4e7fb81911b59c87745
7
+ data.tar.gz: 14fcfaa2252feb628bdd695664915d7822ee500aa53b6bf19d95f8fce420100b247b9a80d14bdd2e418ac7e38af8442edeb67271e8efeb023d987c7b74def480
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Version 0.0.87
2
+ * Bug Fix
3
+ * Fixed incorrect logging for when 'debug_oauth' is off
4
+
1
5
  Version 0.0.86
2
6
  * Enhancements
3
7
  * 'debug_oauth' attribute used to toggle showing params used in retrieving access token
@@ -10,8 +10,6 @@ module Soaspec
10
10
  end
11
11
  end
12
12
 
13
-
14
-
15
13
  # Will create access_token method based on passed parameters
16
14
  # @param [Hash] params Params client_id: nil, client_secret: nil, token_url: nil, username: nil, password: nil, security_token: nil
17
15
  def oauth2(params)
@@ -40,11 +38,11 @@ module Soaspec
40
38
  params[:token_url] = ERB.new(params[:token_url]).result(binding) if params[:token_url]
41
39
  params[:password] = ERB.new(params[:password]).result(binding) if params[:password]
42
40
  payload = oauth_payload(params)
43
- if Soaspec.debug_oauth?
44
- request_message = "request_params: #{payload}"
45
- else
46
- params[:username] ? "User '#{params[:username]}'" : 'client_credentials'
47
- end
41
+ request_message = if Soaspec.debug_oauth?
42
+ "request_params: #{payload}"
43
+ else
44
+ params[:username] ? "User '#{params[:username]}'" : 'client_credentials'
45
+ end
48
46
  Soaspec::SpecLogger.info request_message
49
47
  retry_count = 0
50
48
  begin
@@ -1,3 +1,3 @@
1
1
  module Soaspec
2
- VERSION = '0.0.86'.freeze
2
+ VERSION = '0.0.87'.freeze
3
3
  end
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.86
4
+ version: 0.0.87
5
5
  platform: ruby
6
6
  authors:
7
7
  - SamuelGarrattIQA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-11 00:00:00.000000000 Z
11
+ date: 2018-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -291,7 +291,6 @@ files:
291
291
  - ".gitlab-ci.yml"
292
292
  - ".rspec"
293
293
  - ".rubocop.yml"
294
- - ".travis.yml"
295
294
  - CODE_OF_CONDUCT.md
296
295
  - ChangeLog
297
296
  - Gemfile
@@ -343,7 +342,6 @@ files:
343
342
  - soaspec.gemspec
344
343
  - test.wsdl
345
344
  - test.xml
346
- - test_rest.rb
347
345
  - test_wsdl.rb
348
346
  homepage: https://gitlab.com/samuel-garratt/soaspec
349
347
  licenses:
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.4
5
- before_install: gem install bundler -v 1.16.0
@@ -1,98 +0,0 @@
1
-
2
- require 'rest-client'
3
- require 'json'
4
- require 'data_magic'
5
-
6
- options = {
7
- headers: {
8
- # accept: "application/xml",
9
- accept: "application/json",
10
- content_type: "application/json"
11
- # log: Logger.new('logs/traffic.log')
12
- }
13
- }
14
-
15
- RestClient.log = Logger.new('logs/traffic.log')
16
-
17
- data_string = <<-EOF
18
- {
19
- "id": 1,
20
- "category": {
21
- "id": 1,
22
- "name": "string"
23
- },
24
- "name": "test_rest",
25
- "photoUrls": [
26
- "string"
27
- ],
28
- "tags": [
29
- {
30
- "id": 1,
31
- "name": "string"
32
- }
33
- ],
34
- "status": "sold"
35
- }
36
- EOF
37
-
38
-
39
- data = {
40
- 'id' => '1',
41
- 'category' => {
42
- 'id' => '1',
43
- 'name' => "string"
44
- },
45
- 'name' => "test_rest",
46
- 'photoUrls' => [
47
- "string"
48
- ],
49
- 'tags' => [
50
- {
51
- 'id' => '1',
52
- 'name' => "string"
53
- }
54
- ],
55
- 'status' => "sold"
56
- }
57
-
58
- # puts data.to_s
59
- #
60
-
61
- include DataMagic
62
-
63
- id = '1'
64
- default = data_for 'default/pet'
65
- merged_result = default.merge({ 'id' => id })
66
-
67
- #converted_data = JSON.generate(data).to_s
68
- converted_data = JSON.generate(merged_result).to_s
69
-
70
- puts converted_data
71
- # puts 'data'
72
- # puts data_string
73
-
74
- resource = RestClient::Resource.new('http://petstore.swagger.io/v2', options)
75
- # begin
76
- # response = resource['pet'].post(data)
77
- # rescue RestClient::ExceptionWithResponse => e
78
- # puts e.response
79
- # end
80
-
81
- begin
82
- #response = resource['store/order/1'].get
83
- #response = resource['store/inventory'].get
84
- #
85
- #response = resource['pet/findByStatus?status=sold'].get(accept: 'application/xml')
86
-
87
-
88
- #response = resource['pet'].post(data_string)
89
- #response = resource['pet'].post(converted_data)
90
- response = resource['pet/' + id].get
91
- #response = resource['pet/' + id].delete
92
- rescue RestClient::ExceptionWithResponse => e
93
- puts e.response
94
- end
95
-
96
- puts response.body
97
- puts response.code
98
- puts response.request