aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorRobert2017-08-01 14:44:43 +0200
committerRobert2017-08-01 16:17:16 +0200
commitee75bd1e579ab366eb6cac938f50e7786536472b (patch)
tree6b23231644522b945f29e57fc72b743ab41c93c6 /app
parentf899be88e2b476bae67b5b5bfe2f4a1f7458b24e (diff)
downloadchouette-core-ee75bd1e579ab366eb6cac938f50e7786536472b.tar.bz2
Refs: #3507@2h; CR Step 4
- Added tests for HTTPService (regression) - Removed some dead code (Workbench model spec, Import factory) - Changed front_end_host to rails_host in config
Diffstat (limited to 'app')
-rw-r--r--app/services/http_service.rb2
-rw-r--r--app/workers/workbench_import_worker.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/app/services/http_service.rb b/app/services/http_service.rb
index bdd4ca8d5..ae7d0e413 100644
--- a/app/services/http_service.rb
+++ b/app/services/http_service.rb
@@ -26,7 +26,7 @@ module HTTPService extend self
# token: '13-74009c36638f587c9eafb1ce46e95585',
# params: { netex_import: {referential_id: 13, workbench_id: 1}},
# upload: {file: [StringIO.new('howdy'), 'application/zip', 'greeting']})
- def post_resource(host:, path:, resource_name:, token: nil, params: {}, upload: nil)
+ def post_resource(host:, path:, token: nil, params: {}, upload: nil)
Faraday.new(url: host) do |c|
c.headers['Authorization'] = "Token token=#{token.inspect}" if token
c.request :multipart
diff --git a/app/workers/workbench_import_worker.rb b/app/workers/workbench_import_worker.rb
index 4f9a53c14..57c0f5f4e 100644
--- a/app/workers/workbench_import_worker.rb
+++ b/app/workers/workbench_import_worker.rb
@@ -93,7 +93,7 @@ class WorkbenchImportWorker
# =========
def export_host
- Rails.application.config.front_end_host
+ Rails.application.config.rails_host
end
def export_path
api_v1_netex_imports_path(format: :json)
@@ -103,7 +103,7 @@ class WorkbenchImportWorker
end
def import_host
- Rails.application.config.front_end_host
+ Rails.application.config.rails_host
end
def import_path
@__import_path__ ||= download_workbench_import_path(@import.workbench, @import)