redhat_access 2.1.7 → 2.1.8

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
  SHA256:
3
- metadata.gz: 873c25168580111018433736f929c05066d2ec87096f52d002863fa11f8d7656
4
- data.tar.gz: 44388a76958c4969d7b24a34d969fe6ad56bb91de39522f1a1d0aa40e01fdcdf
3
+ metadata.gz: 398b7100ad9636ec70b3bdf748afb72499422b26bf5483067e7ddbdbd257466e
4
+ data.tar.gz: 486419ba730f4d1507094210c3c1de446f697a4f7c1668468b5c6a68fca5af26
5
5
  SHA512:
6
- metadata.gz: c1cbc83e65114431494fb138685e1f3e3a5ca3e7b4a0d2253dadbc85a4698406457861c1f23ed504ba7bf38846588793627028da8bab2733d47a39234943c3ad
7
- data.tar.gz: 9ce837ab9130d9afa85edb4199c98f5ebc631789c4156210e13b172f45ed8fb4dd4960b590ab2ff4a5b74682099b473d3c7d83ca0aa4dd0cb54d19412e7a545f
6
+ metadata.gz: a888ddf1090d7c082167e2c23698937202b35a11775e0a6c9cd4f0bb5f306d738ff3b123d90375d44c6c634edcd97c193c73ba917c3cf0782a696e5c1b986aa7
7
+ data.tar.gz: ee35124597ca7f1a849273d830458d5a06b744f5e72a70aba8bbefb57dcf7185d8cbf7ed46f6b71645f64f53454a305e45a3d4ea7f1b7f2e6abd21f77ec9e554
@@ -51,9 +51,14 @@ module RedhatAccess
51
51
  else
52
52
  resource = "uploads/#{params[:id]}"
53
53
  end
54
+ if request.format.json?
55
+ original_payload = original_payload.to_json
56
+ end
54
57
  if params[:file]
58
+ #Overwrite payload if sending a file
55
59
  original_payload = get_file_data(params)
56
60
  end
61
+
57
62
  client = get_api_client
58
63
  Rails.logger.debug("Proxy upload original_payload : #{original_payload}")
59
64
  res = client.call_tapi(original_method, URI.escape(resource), original_params, original_payload, nil, use_subsets)
data/config/routes.rb CHANGED
@@ -16,8 +16,8 @@ RedhatAccess::Engine.routes.draw do
16
16
  get '/v1/branch_info', to: 'api/machine_telemetry_api#get_branch_info'
17
17
  post '/uploads/(:id)', to: 'api/machine_telemetry_api#proxy_upload'
18
18
  get '/view/api/:v/me' , to: 'api/telemetry_api#connection_status', :constraints => {:v =>/(v[0-9]|latest)/}
19
- match '/view/api/:path', to: 'api/telemetry_api#proxy', :constraints => {:path => /.*/} ,via: [:get, :post, :delete,:put]
20
- match '/:path', to: 'api/machine_telemetry_api#proxy', :constraints => {:path => /.*/}, via: [:get, :post, :delete,:put]
19
+ match '/view/api/:path', to: 'api/telemetry_api#proxy', :constraints => {:path => /.*/} ,via: [:get, :post, :delete,:put, :patch]
20
+ match '/:path', to: 'api/machine_telemetry_api#proxy', :constraints => {:path => /.*/}, via: [:get, :post, :delete,:put, :patch]
21
21
  end
22
22
  get 'insights', to: 'analytics_dashboard#index'
23
23
  get 'analytics_configuration', to: 'telemetry_configuration#index'
@@ -1,3 +1,3 @@
1
1
  module RedhatAccess
2
- VERSION = "2.1.7"
2
+ VERSION = "2.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redhat_access
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.7
4
+ version: 2.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lindani Phiri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-01 00:00:00.000000000 Z
11
+ date: 2019-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redhat_access_lib