diff options
| author | Zakaria BOUZIANE | 2015-04-10 15:15:46 +0200 |
|---|---|---|
| committer | Zakaria BOUZIANE | 2015-04-10 15:15:46 +0200 |
| commit | 2ea2c399688d1c2d9d5b246c49fb5a205676e920 (patch) | |
| tree | 7ea5d9bc60ca7e0cff2d6a644bb92e253c269d7c | |
| parent | 0dbb0f6737ba2d98ed2a771d14c3a5bc4efd31d5 (diff) | |
| download | chouette-core-2ea2c399688d1c2d9d5b246c49fb5a205676e920.tar.bz2 | |
URLs are by now given in IEV Server JSON reports
| -rw-r--r-- | app/models/export.rb | 6 | ||||
| -rw-r--r-- | app/models/import.rb | 6 | ||||
| -rw-r--r-- | lib/ievkit/default.rb | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/app/models/export.rb b/app/models/export.rb index 6cb52fb6e..5cd0db17e 100644 --- a/app/models/export.rb +++ b/app/models/export.rb @@ -10,7 +10,7 @@ class Export end def report - report_path = "http://localhost:8080/chouette_iev" + datas.links.select{ |link| link["rel"] == "action_report"}.first.href + report_path = datas.links.select{ |link| link["rel"] == "action_report"}.first.href if report_path response = Ievkit.get(report_path) ExportReport.new(response) @@ -20,7 +20,7 @@ class Export end def compliance_check - compliance_check_path = "http://localhost:8080/chouette_iev" + datas.links.select{ |link| link["rel"] == "validation_report"}.first.href + compliance_check_path = datas.links.select{ |link| link["rel"] == "validation_report"}.first.href if compliance_check_path response = Ievkit.get(compliance_check_path) ComplianceCheck.new(response) @@ -30,7 +30,7 @@ class Export end def delete - delete_path = "http://localhost:8080/chouette_iev" + datas.links.select{ |link| link["rel"] == "delete"}.first.href + delete_path = datas.links.select{ |link| link["rel"] == "delete"}.first.href if delete_path Ievkit.delete(delete_path) else diff --git a/app/models/import.rb b/app/models/import.rb index b159b1688..f445faa3e 100644 --- a/app/models/import.rb +++ b/app/models/import.rb @@ -15,7 +15,7 @@ class Import end def report - report_path = "http://localhost:8080/chouette_iev" + datas.links.select{ |link| link["rel"] == "action_report"}.first.href + report_path = datas.links.select{ |link| link["rel"] == "action_report"}.first.href if report_path response = Ievkit.get(report_path) ImportReport.new(response) @@ -25,7 +25,7 @@ class Import end def compliance_check - compliance_check_path = "http://localhost:8080/chouette_iev" + datas.links.select{ |link| link["rel"] == "validation_report"}.first.href + compliance_check_path = datas.links.select{ |link| link["rel"] == "validation_report"}.first.href if compliance_check_path response = Ievkit.get(compliance_check_path) ComplianceCheck.new(response) @@ -35,7 +35,7 @@ class Import end def delete - delete_path = "http://localhost:8080/chouette_iev" + datas.links.select{ |link| link["rel"] == "delete"}.first.href + delete_path = datas.links.select{ |link| link["rel"] == "delete"}.first.href if delete_path Ievkit.delete(delete_path) else diff --git a/lib/ievkit/default.rb b/lib/ievkit/default.rb index af0df422f..9c62b89b7 100644 --- a/lib/ievkit/default.rb +++ b/lib/ievkit/default.rb @@ -7,7 +7,7 @@ module Ievkit module Default # Default API endpoint - API_ENDPOINT = "http://localhost:8080/chouette_iev/".freeze + API_ENDPOINT = "http://localhost:8080/".freeze # Default User Agent header string USER_AGENT = "Ievkit Ruby Gem #{Ievkit::VERSION}".freeze |
