Updated zendesk_api gem because of "You are setting a key that conflicts with a built-in method Hashie::Mash#class defined in Kernel" warnings.

This commit is contained in:
Martin Edenhofer 2017-08-01 23:35:54 +02:00
parent 52f36f4edc
commit 4eec956cbe
3 changed files with 9 additions and 8 deletions

View file

@ -60,7 +60,7 @@ GEM
childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11)
clavius (1.0.2)
clearbit (0.2.5)
clearbit (0.2.7)
nestful (~> 1.1.0)
coderay (1.1.1)
coffee-rails (4.2.1)
@ -155,7 +155,7 @@ GEM
guard
guard-compat (~> 1.1)
hashdiff (0.3.2)
hashie (3.5.5)
hashie (3.5.6)
htmlentities (4.3.4)
http (1.0.4)
addressable (~> 2.3)
@ -341,7 +341,6 @@ GEM
sawyer (0.7.0)
addressable (>= 2.3.5, < 2.5)
faraday (~> 0.8, < 0.10)
scrub_rb (1.0.1)
selenium-webdriver (2.53.4)
childprocess (~> 0.5)
rubyzip (~> 1.0)
@ -413,13 +412,12 @@ GEM
hashdiff
websocket (1.2.3)
writeexcel (1.0.5)
zendesk_api (1.14.0)
zendesk_api (1.14.4)
faraday (~> 0.9)
hashie (>= 1.2, < 4.0, != 3.3.0)
hashie (>= 3.5.2, < 4.0.0)
inflection
mime-types
multipart-post (~> 2.0)
scrub_rb (~> 1.0.1)
PLATFORMS
ruby

View file

@ -116,7 +116,8 @@ class Index extends App.ControllerContent
showCredentials: (e) =>
e.preventDefault()
@urlStatus.attr('data-state', '')
@zendeskUrlApiToken.attr('href', @zendeskUrl.val() + 'agent/admin/api')
url = @zendeskUrl.val() + '/agent/admin/api'
@zendeskUrlApiToken.attr('href', url.replace('//', '/'))
@zendeskUrlApiToken.val('HERE')
@$('[data-slide=zendesk-url]').toggleClass('hide')
@$('[data-slide=zendesk-credentials]').toggleClass('hide')

View file

@ -49,7 +49,9 @@ class ImportZendeskController < ApplicationController
return
end
Setting.set('import_zendesk_endpoint', "#{params[:url]}api/v2")
endpoint = "#{params[:url]}/api/v2"
endpoint.gsub('//', '/')
Setting.set('import_zendesk_endpoint', endpoint)
render json: {
result: 'ok',