diff options
| author | Edouard Maffert | 2016-09-09 10:13:18 +0200 |
|---|---|---|
| committer | Edouard Maffert | 2016-09-09 10:13:18 +0200 |
| commit | febca10492e68c10a18f48860577bf21748bc7cd (patch) | |
| tree | e46ea4f92ae2d8b5408a4f6acbca8660dce29f5d /config | |
| parent | a1f01c4eb5b3f8cc587775fedc825bbfb2f100d9 (diff) | |
| parent | 4425686bdf93f9d90187244b2f336043934cc75e (diff) | |
| download | chouette-core-febca10492e68c10a18f48860577bf21748bc7cd.tar.bz2 | |
Merge branch 'master' into staging
Diffstat (limited to 'config')
49 files changed, 373 insertions, 323 deletions
diff --git a/config/cucumber.yml b/config/cucumber.yml new file mode 100644 index 000000000..836931b61 --- /dev/null +++ b/config/cucumber.yml @@ -0,0 +1,13 @@ +<% +rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : "" +rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}" + +if ENV['JOB_NAME'] + ci_opts = "--format json --out cucumber.json --format html --out cucumber.html" +end + +std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{ci_opts} --strict --tags ~@wip" +%> +default: <%= std_opts %> features +wip: --tags @wip:3 --wip features +rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip diff --git a/config/database.yml b/config/database.yml index 81951d183..2a3ddf5d0 100644 --- a/config/database.yml +++ b/config/database.yml @@ -10,15 +10,18 @@ default: &default development: <<: *default - database: chouette_dev + database: chouette2 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. -test: +test: &test <<: *default database: chouette_test production: <<: *default database: chouette2 + +cucumber: + <<: *test diff --git a/config/deploy.rb b/config/deploy.rb index ce41e5971..f8a7ebdef 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -21,6 +21,15 @@ set :copy_exclude, [ '.git' ] ssh_options[:forward_agent] = true require "bundler/capistrano" +require 'whenever/capistrano' + +# Whenever +set :whenever_variables, ->{ "'environment=#{fetch :whenever_environment}&bundle_command=bin/bundle exec&additionnal_path=/var/lib/gems/2.2.0/bin'" } # invoke bin/bundle to use 'correct' ruby environment + +set :whenever_command, "sudo /usr/local/sbin/whenever-sudo" # use sudo to change www-data crontab +set :whenever_user, "www-data" # use www-data crontab + +set :whenever_output, "2>&1 | logger -t stif-boiv/cron" namespace :deploy do task :start do ; end @@ -37,7 +46,7 @@ namespace :deploy do end task :bundle_link do - run "ln -fs #{bundle_cmd} #{release_path}/script/bundle" + run "ln -fs #{bundle_cmd} #{release_path}/bin/bundle" end after "bundle:install", "deploy:bundle_link" diff --git a/config/environment.rb b/config/environment.rb index 3bc3051d1..000bf1c03 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,3 +1,4 @@ +# coding: utf-8 # Load the Rails application. require File.expand_path('../application', __FILE__) @@ -5,4 +6,4 @@ require File.expand_path('../application', __FILE__) Rails.application.initialize! # Fix version -APP_VERSION = 'Iteration 4' +APP_VERSION = 'Itération 5' diff --git a/config/environments/development.rb b/config/environments/development.rb index a197dd366..12dafdc73 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -56,13 +56,21 @@ Rails.application.configure do config.company_contact = "http://www.chouette.mobi/club-utilisateurs/contact-support/" config.accept_user_creation = false - config.chouette_authentication_settings = { - type: "database" - } + # Reflex api url + config.reflex_api_url = "https://reflex.stif.info/ws/reflex/V1/service=getData" + # config.chouette_authentication_settings = { - # type: "cas", - # cas_server: "http://stif-portail-dev.af83.priv/sessions" + # type: "database" # } + config.chouette_authentication_settings = { + type: "cas", + cas_server: "http://stif-portail-dev.af83.priv/sessions" + } + config.stif_portail_api = + { + key: "Ohphie1Voo6the5hohpi", + url: "http://stif-portail-dev.af83.priv" + } # file to data for demo config.demo_data = "tmp/demo.zip" diff --git a/config/environments/test.rb b/config/environments/test.rb index 9db6ad9f3..512afab4f 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -46,8 +46,18 @@ Rails.application.configure do config.company_contact = "http://www.chouette.mobi/club-utilisateurs/contact-support/" config.accept_user_creation = true + # config.chouette_authentication_settings = { + # type: "database" + # } config.chouette_authentication_settings = { - type: "database" + type: "cas", + cas_server: "http://stif-portail-dev.af83.priv/sessions" + } + + config.stif_portail_api = + { + key: "411e6b8d259bc9900c0caf9db6072013", + url: "http://localhost:3000" } # file to data for demo diff --git a/config/i18n-tasks.yml b/config/i18n-tasks.yml new file mode 100644 index 000000000..c9477e19a --- /dev/null +++ b/config/i18n-tasks.yml @@ -0,0 +1,105 @@ +# i18n-tasks finds and manages missing and unused translations: https://github.com/glebm/i18n-tasks + +# The "main" locale. +base_locale: en +## All available locales are inferred from the data by default. Alternatively, specify them explicitly: +# locales: [es, fr] +## Reporting locale, default: en. Available: en, ru. +# internal_locale: en + +# Read and write translations. +data: + ## Translations are read from the file system. Supported format: YAML, JSON. + ## Provide a custom adapter: + # adapter: I18n::Tasks::Data::FileSystem + + # Locale files or `File.find` patterns where translations are read from: + read: + ## Default: + - config/locales/%{locale}.yml + ## More files: + - config/locales/*.%{locale}.yml + - config/locales/**/*.%{locale}.yml + ## Another gem (replace %#= with %=): + # - "<%#= %x[bundle show vagrant].chomp %>/templates/locales/%{locale}.yml" + + # Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom: + # `i18n-tasks normalize -p` will force move the keys according to these rules + write: + ## For example, write devise and simple form keys to their respective files: + - ['{devise}.*', 'config/locales/devise.%{locale}.yml'] + - ['{simple_form}.*', 'config/locales/simple_form.%{locale}.yml'] + ## Catch-all default: + - config/locales/%{locale}.yml + + ## Specify the router (see Readme for details). Valid values: conservative_router, pattern_router, or a custom class. + # router: convervative_router + + yaml: + write: + # do not wrap lines at 80 characters + line_width: -1 + + ## Pretty-print JSON: + # json: + # write: + # indent: ' ' + # space: ' ' + # object_nl: "\n" + # array_nl: "\n" + +# Find translate calls +search: + ## Paths or `File.find` patterns to search in: + # paths: + # - app/ + + ## Root directories for relative keys resolution. + # relative_roots: + # - app/controllers + # - app/helpers + # - app/mailers + # - app/presenters + # - app/views + + ## Files or `File.fnmatch` patterns to exclude from search. Some files are always excluded regardless of this setting: + ## %w(*.jpg *.png *.gif *.svg *.ico *.eot *.otf *.ttf *.woff *.woff2 *.pdf *.css *.sass *.scss *.less *.yml *.json) + exclude: + - app/assets/images + - app/assets/fonts + + ## Alternatively, the only files or `File.fnmatch patterns` to search in `paths`: + ## If specified, this settings takes priority over `exclude`, but `exclude` still applies. + # include: ["*.rb", "*.html.slim"] + + ## Default scanner finds t() and I18n.t() calls. + # scanner: I18n::Tasks::Scanners::PatternWithScopeScanner + +## Google Translate +# translation: +# # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate +# api_key: "AbC-dEf5" + +## Do not consider these keys missing: +# ignore_missing: +# - 'errors.messages.{accepted,blank,invalid,too_short,too_long}' +# - '{devise,simple_form}.*' + +## Consider these keys used: +# ignore_unused: +# - 'activerecord.attributes.*' +# - '{devise,kaminari,will_paginate}.*' +# - 'simple_form.{yes,no}' +# - 'simple_form.{placeholders,hints,labels}.*' +# - 'simple_form.{error_notification,required}.:' + +## Exclude these keys from the `i18n-tasks eq-base' report: +# ignore_eq_base: +# all: +# - common.ok +# fr,es: +# - common.brand + +## Ignore these keys completely: +# ignore: +# - kaminari.* diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 734e96c33..057d4b215 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -303,7 +303,7 @@ Devise.setup do |config| # By default, devise_cas_authenticatable will create users. If you would rather # require user records to already exist locally before they can authenticate via # CAS, uncomment the following line. - config.cas_create_user = false + # config.cas_create_user = false # You can enable Single Sign Out, which by default is disabled. # config.cas_enable_single_sign_out = true diff --git a/config/initializers/reflex.rb b/config/initializers/reflex.rb new file mode 100644 index 000000000..ab3f9cfb8 --- /dev/null +++ b/config/initializers/reflex.rb @@ -0,0 +1,3 @@ +if Rails.application.config.try(:reflex_api_url) + Reflex::API.base_url = Rails.application.config.reflex_api_url +end diff --git a/config/locales/access_links.en.yml b/config/locales/access_links.en.yml index 048261fc1..a90085588 100644 --- a/config/locales/access_links.en.yml +++ b/config/locales/access_links.en.yml @@ -38,7 +38,7 @@ en: objectid: "Neptune identifier" object_version: "Version" creation_time: "Created on" - creatorid: "Created by " + creator_id: "Created by " formtastic: titles: access_link: diff --git a/config/locales/access_points.en.yml b/config/locales/access_points.en.yml index f304c7621..997d84a34 100644 --- a/config/locales/access_points.en.yml +++ b/config/locales/access_points.en.yml @@ -51,7 +51,7 @@ en: objectid: "Neptune identifier" object_version: "Version" creation_time: "Created on" - creatorid: "Created by" + creator_id: "Created by" coordinates: "Coordinates (lat,lng)" zip_code: "Zip code" city_name: "City" diff --git a/config/locales/companies.en.yml b/config/locales/companies.en.yml index 14f389bf0..760ef91e4 100644 --- a/config/locales/companies.en.yml +++ b/config/locales/companies.en.yml @@ -14,6 +14,7 @@ en: index: title: "Companies" name: "Search by name" + advanced_search: "Advanced search" activerecord: models: company: diff --git a/config/locales/companies.fr.yml b/config/locales/companies.fr.yml index ccb425f1d..b3b437220 100644 --- a/config/locales/companies.fr.yml +++ b/config/locales/companies.fr.yml @@ -14,6 +14,7 @@ fr: index: title: "Transporteurs" name: "Recherche par nom" + advanced_search: "Recherche avancée" activerecord: models: company: diff --git a/config/locales/compliance_check_results.en.yml b/config/locales/compliance_check_results.en.yml index dcc0f4598..7a71f83f0 100644 --- a/config/locales/compliance_check_results.en.yml +++ b/config/locales/compliance_check_results.en.yml @@ -318,6 +318,7 @@ en: 2-NEPTUNE-Timetable-1: "Utilité des calendriers." 2-NEPTUNE-Timetable-2: "Utilité des calendriers." 2-NEPTUNE-Timetable-2: "Validité des dates de début et de fin des périodes des calendriers" + 2-NEPTUNE-Timetable-3: "Validité des dates de début et de fin des périodes des calendriers" 2-NEPTUNE-VehicleJourney-1: "Existence de la séquence d'arrêt <ChouetteRoute> référencée par la course <VehicleJourney>." 2-NEPTUNE-VehicleJourney-2: "Existence de la mission <JourneyPattern> référencée par la course <VehicleJourney>." 2-NEPTUNE-VehicleJourney-3: "Existence de la ligne <Line> référencée par la course <VehicleJourney>." @@ -413,6 +414,8 @@ en: 3-Route-8: "Vérification de l'utilisation des arrêts par les missions" 3-Route-9: "Vérification de l’existence d’une mission passant par tous les arrêts de la séquence" 3-JourneyPattern-1: "Vérification de double définition de missions" + 3-JourneyPattern-2: "Vérification de l’existence d’une mission passant par tous les arrêts de la séquence" + 3-JourneyPattern-3: "Vérification de double définition de missions" 3-VehicleJourney-1: "Vérification de la chronologie des horaires de passage à un arrêt" 3-VehicleJourney-2: "Vérification de la vitesse de transfert entre deux arrêts" 3-VehicleJourney-3: "Vérification de la cohérence des courses successives desservant deux mêmes arrêts" diff --git a/config/locales/compliance_check_results.fr.yml b/config/locales/compliance_check_results.fr.yml index c630e3e83..19f436582 100644 --- a/config/locales/compliance_check_results.fr.yml +++ b/config/locales/compliance_check_results.fr.yml @@ -426,6 +426,7 @@ fr: 4-GroupOfLine-1: "Vérification de contraintes sur les attributs des groupes de lignes" 4-StopArea-1: "Vérification de contraintes sur les attributs des arrêts" 4-StopArea-2: "Vérification de l'existance d'un arrêt commercial pour les arrêts physiques" + 4-StopArea-3: "Vérification de la cohérence entre les noms de communes et leur code INSEE" 4-AccessPoint-1: "Vérification de contraintes sur les attributs des accès" 4-AccessLink-1: "Vérification de contraintes sur les attributs des liens d'accès" 4-ConnectionLink-1: "Vérification de contraintes sur les attributs des correspondances" diff --git a/config/locales/compliance_check_tasks.en.yml b/config/locales/compliance_check_tasks.en.yml index 3b303c1f3..61e56473c 100644 --- a/config/locales/compliance_check_tasks.en.yml +++ b/config/locales/compliance_check_tasks.en.yml @@ -13,4 +13,5 @@ en: name: "Compliance check name" references_type: "Subset" reference_ids: "Subset ids" - object_id_prefix: "Neptune Id prefix"
\ No newline at end of file + object_id_prefix: "Neptune Id prefix" + rule_parameter_set_id: "Jeu de paramètres pour validation"
\ No newline at end of file diff --git a/config/locales/compliance_check_tasks.fr.yml b/config/locales/compliance_check_tasks.fr.yml index 43707574e..d6cc88b1e 100644 --- a/config/locales/compliance_check_tasks.fr.yml +++ b/config/locales/compliance_check_tasks.fr.yml @@ -13,4 +13,5 @@ fr: name: "Nom de la validation" references_type: "Sous ensemble" reference_ids: "Identifiants du sous ensemble" + object_id_prefix: "Préfixe Neptune Id" rule_parameter_set_id: "Jeu de paramètres pour validation" diff --git a/config/locales/compliance_checks.en.yml b/config/locales/compliance_checks.en.yml index 85e146c40..c9bac8bc3 100644 --- a/config/locales/compliance_checks.en.yml +++ b/config/locales/compliance_checks.en.yml @@ -8,6 +8,8 @@ en: show: title: "Neptune Validation" summary: "Rapport de conformité à la norme NEPTUNE" + details: "Details" + parameters: "Tests parameters" completed: "[ Completed ]" failed: "[ Failed ]" pending: "[ In the treatment queue ]" @@ -16,6 +18,7 @@ en: export_csv: "CSV format" report: validation_success: "Validation successfully passed." + action_report: "Action report" actions: destroy_confirm: "Do you confirm to destroy this validation ?" destroy: "Destroy this validation" @@ -33,10 +36,32 @@ en: terminated: "Completed" canceled: "Canceled" aborted: "Failed" + uncheck_count: + zero: "no unappliable" + one: "one unappliable" + other: "%{count} unappliables" + ok_count: + zero: "No successful test" + one: "One successful test" + other: "%{count} successful tests" + warning_count: + zero: "no warning" + one: "one warning" + other: "%{count} warnings" + error_count: + zero: "no error" + one: "one error" + other: "%{count} errors" + fatal_count: + zero: "no fatal error" + one: "one fatal error" + other: "%{count} fatal errors" + import: "Import" + rule_parameter_set: "Rule parameter set" file_validation_log_messages: messages: undefined: "%{key} undefined" - TooMuchDetails: ( %{0} erreurs / warnings supplémentaires ) + TooMuchDetails: ( %{0} errors / suppl. warnings ) ONE: "Catégorie 1 : Syntaxe" severities: uncheck: "Unchecked" @@ -48,12 +73,12 @@ en: rule_parameter_set: "Rule Parameter Set" activemodel: models: - file_validation: + compliance_check: zero: "Validation" one: "Validation" other: "Validation" attributes: - file_validation: + compliance_check: created_at: "Executed at" references_type: "Associated Data Type" reference_ids: "Associated Data" @@ -62,7 +87,7 @@ en: status: "Status" file_name: "Tested data" projection_reference: "Système de projection de référence" - file_validation_log_message: + compliance_check_log_message: created_at: "Date" position: "N." full_message: "Message" diff --git a/config/locales/compliance_checks.fr.yml b/config/locales/compliance_checks.fr.yml index 85255d6f1..14ae7e943 100644 --- a/config/locales/compliance_checks.fr.yml +++ b/config/locales/compliance_checks.fr.yml @@ -62,12 +62,15 @@ fr: messages: undefined: "%{key} non défini" TooMuchDetails: "( %{0} erreurs / warnings supplémentaires )" + ONE: "Catégorie 1 : Syntaxe" severities: uncheck: "Non testé" ok: "Ok" warning: "Alerte" error: "Erreur" fatal: "Fatal" + import: "Import Report" + rule_parameter_set: "Rule Parameter Set" activemodel: models: compliance_check: @@ -83,6 +86,7 @@ fr: resources: "Fichier à valider" status: "Status" file_name: "Jeu de données" + projection_reference: "Système de projection de référence" compliance_check_log_message: created_at: "Date" position: "N." diff --git a/config/locales/connection_links.en.yml b/config/locales/connection_links.en.yml index 914ce0de5..ceb53cf0f 100644 --- a/config/locales/connection_links.en.yml +++ b/config/locales/connection_links.en.yml @@ -19,6 +19,7 @@ en: index: title: "Connection links" name: "Search by name" + advanced_search: "Advanced search" departure: "Start of link" arrival: "End of link" selection: "Selection" diff --git a/config/locales/connection_links.fr.yml b/config/locales/connection_links.fr.yml index 07569a89e..76f1a9b7b 100644 --- a/config/locales/connection_links.fr.yml +++ b/config/locales/connection_links.fr.yml @@ -18,6 +18,7 @@ fr: to: "vers" index: name: "Recherche par nom" + advanced_search: "Recherche avancée" title: "Correspondances" departure: "Arrêt de départ" arrival: "Arrêt d'arrivée" diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 25a5bbeba..af6feed2c 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -35,6 +35,9 @@ validating conformance of data wrt Neptune (French standard NFP 99 506)." new_password: New password new_password_confirmation: New password confirmation commit: Update password + unlock: + new: + title: "Resend unlock instructions" links: sign_in: "Sign in" sign_up: "Sign up" diff --git a/config/locales/devise.fr.yml b/config/locales/devise.fr.yml index b909eeaef..81371ba4c 100644 --- a/config/locales/devise.fr.yml +++ b/config/locales/devise.fr.yml @@ -36,6 +36,9 @@ norme Neptune (NFP 99 506)" new_password: Nouveau mot de passe new_password_confirmation: Confirmation du nouveau mot de passe commit: Changer de mot de passe + unlock: + new: + title: "Renvoyer les instructions de déblocage du compte" links: sign_in: "Se connecter" sign_up: "S'inscrire" diff --git a/config/locales/group_of_lines.en.yml b/config/locales/group_of_lines.en.yml index 00c1e1373..757ed51cf 100644 --- a/config/locales/group_of_lines.en.yml +++ b/config/locales/group_of_lines.en.yml @@ -15,6 +15,7 @@ en: index: title: "Group of Lines" name: "Search by name" + advanced_search: 'Advanced search' form: lines: "Associated lines" activerecord: diff --git a/config/locales/group_of_lines.fr.yml b/config/locales/group_of_lines.fr.yml index 653862fd4..b9b7b8bd2 100644 --- a/config/locales/group_of_lines.fr.yml +++ b/config/locales/group_of_lines.fr.yml @@ -15,6 +15,7 @@ fr: index: title: "Groupes de lignes" name: "Recherche par nom" + advanced_search: 'Recherche avancée' form: lines: "Lignes associées" activerecord: diff --git a/config/locales/journey_patterns.en.yml b/config/locales/journey_patterns.en.yml index 379d184b6..856dd6d15 100644 --- a/config/locales/journey_patterns.en.yml +++ b/config/locales/journey_patterns.en.yml @@ -10,6 +10,7 @@ en: edit: "Edit this journey pattern" destroy: "Remove this journey pattern" destroy_confirm: A"re you sure you want destroy this journey pattern ?" + edit_route_sections: "Update route sections" new: title: "Add a new journey pattern" edit: diff --git a/config/locales/journey_patterns.fr.yml b/config/locales/journey_patterns.fr.yml index bdf220ab0..78860514a 100644 --- a/config/locales/journey_patterns.fr.yml +++ b/config/locales/journey_patterns.fr.yml @@ -10,6 +10,7 @@ fr: edit: "Modifier cette mission" destroy: "Supprimer cette mission" destroy_confirm: "Etes vous sûr de vouloir détruire cette mission ?" + edit_route_sections: "Modifier les sections de parcours" new: title: "Ajouter une mission" edit: diff --git a/config/locales/journey_patterns.yml b/config/locales/journey_patterns.yml deleted file mode 100644 index 3e2ddec99..000000000 --- a/config/locales/journey_patterns.yml +++ /dev/null @@ -1,137 +0,0 @@ -en: - journey_patterns: - journey_pattern: - from_to: "From '%{departure}' to '%{arrival}'" - stop_count: "%{count}/%{route_count} stops" - vehicle_journeys_count: "Vehicle journeys: %{count}" - vehicle_journey_at_stops: "Vehicle journey at stops" - actions: - new: "Add a new journey_pattern" - edit: "Edit this journey pattern" - destroy: "Remove this journey pattern" - destroy_confirm: "Are you sure you want destroy this journey pattern ?" - edit_route_sections: "Edit Shape" - new: - title: "Add a new journey pattern" - edit: - title: "Update journey pattern %{journey_pattern}" - show: - title: "Journey Pattern %{journey_pattern}" - stop_points: "Stop point on journey pattern list" - index: - title: "Journey Patterns" - form: - warning: "Be careful, selection is also applied to the %{count} vehicle journeys associated to this journey pattern" - activerecord: - models: - journey_pattern: - zero: "journey pattern" - one: "journey pattern" - other: "journey patterns" - attributes: - journey_pattern: - route: "Route" - name: "Name" - published_name: "Published name" - comment: "Comments" - registration_number: "Registration number" - stop_point_ids: "Route's stop selection" - objectid: "Neptune identifier" - object_version: "Version" - creation_time: "Created on" - creator_id: "Created by" - formtastic: - titles: - journey_pattern: - name: "Only alphanumerical or underscore characters." - registration_number: "Positif integer." - objectid: "[prefix]:JourneyPattern:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character" - neptune: - journey_pattern: - name: "Only alphanumerical or underscore characters." - registration_number: "Positif integer." - objectid: "[prefix]:JourneyPattern:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character" - netex: - journey_pattern: - name: "Only alphanumerical or underscore characters." - registration_number: "Positif integer." - objectid: "[prefix]:JourneyPattern:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character" - gtfs: - journey_pattern: - name: "Only alphanumerical or underscore characters." - registration_number: "Positif integer." - objectid: "[prefix]:JourneyPattern:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character" - hub: - journey_pattern: - name: "Only alphanumerical or underscore characters. Maximum length = 75." - registration_number: "Positif integer, unique key, of no more than 8 digits." - objectid: "[prefix]:JourneyPattern:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character. Maximum length of the unique key = 30." - -fr: - journey_patterns: - journey_pattern: - from_to: "De '%{departure}' à '%{arrival}'" - stop_count: "%{count}/%{route_count} arrêts" - vehicle_journeys_count: "Courses: %{count}" - vehicle_journey_at_stops: "Horaires des courses" - actions: - new: "Ajouter une mission" - edit: "Modifier cette mission" - destroy: "Supprimer cette mission" - destroy_confirm: "Etes vous sûr de vouloir détruire cette mission ?" - edit_route_sections: "Modifier le tracé" - new: - title: "Ajouter une mission" - edit: - title: "Modifier la mission %{journey_pattern}" - show: - title: "Mission %{journey_pattern}" - stop_points: "Liste des arrêts de la mission" - index: - title: "Missions" - form: - warning: "Attention, la sélection s'applique aussi aux %{count} courses de la mission" - activerecord: - models: - journey_pattern: - zero: "mission" - one: "mission" - other: "missions" - attributes: - journey_pattern: - route: "Séquence d'arrêts" - name: "Nom" - published_name: "Nom public" - comment: "Commentaire" - registration_number: "Numéro d'enregistrement" - stop_point_ids: "Sélection des arrêts desservis" - objectid: "Identifiant Neptune" - object_version: "Version" - creation_time: "Créé le" - creator_id: "Créé par" - formtastic: - titles: - journey_pattern: - name: "Caractères autorisés : alphanumériques et 'souligné'." - registration_number: "Entier positif." - objectid: "[prefixe]:JourneyPattern:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'" - neptune: - journey_pattern: - name: "Caractères autorisés : alphanumériques et 'souligné'." - registration_number: "Entier positif." - objectid: "[prefixe]:JourneyPattern:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'" - netex: - journey_pattern: - name: "Caractères autorisés : alphanumériques et 'souligné'." - registration_number: "Entier positif." - objectid: "[prefixe]:JourneyPattern:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'" - gtfs: - journey_pattern: - name: "Caractères autorisés : alphanumériques et 'souligné'." - registration_number: "Entier positif." - objectid: "[prefixe]:JourneyPattern:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'" - hub: - journey_pattern: - name: "Caractères autorisés : alphanumériques et 'souligné'. Longueur maximale = 75." - registration_number: "Entier positif, clé unique, d'un maximum de 8 chiffres." - objectid: "[prefixe]:JourneyPattern:[clé_unique] caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'. Longueur maximale de la clé unique = 30." diff --git a/config/locales/layouts.en.yml b/config/locales/layouts.en.yml index aa9985a53..debff05e5 100644 --- a/config/locales/layouts.en.yml +++ b/config/locales/layouts.en.yml @@ -39,3 +39,15 @@ en: mail: "Contact us" newsletter: "Newsletter" forum: "Forum" + true: "yes" + false: "no" + or: "or" + back: "Back" + today: "Today" + yesterday: "Yestersday" + edit_periods: "Edit periods" + delete_periods: "Delete periods" + attributes: + author: "Edited by" + created_at: "Created at" + updated_at: "Updated at"
\ No newline at end of file diff --git a/config/locales/line_referentials.en.yml b/config/locales/line_referentials.en.yml new file mode 100644 index 000000000..ad4cfa45c --- /dev/null +++ b/config/locales/line_referentials.en.yml @@ -0,0 +1,8 @@ +en: + synchronization: + message: "Synchronization successful in %{time} seconds with %{imported} objects from Codifligne. %{deleted} objects were deleted." + failure: "Synchronization interrupted after %{time} seconds." + activerecord: + attributes: + line_referential: + sync_interval: "Synchronisation frequency"
\ No newline at end of file diff --git a/config/locales/line_referentials.fr.yml b/config/locales/line_referentials.fr.yml new file mode 100644 index 000000000..6378087d7 --- /dev/null +++ b/config/locales/line_referentials.fr.yml @@ -0,0 +1,9 @@ +fr: + synchronization: + message: + success: "Synchronisation réussie après %{time} secondes avec %{imported} éléments importés de Codifligne. %{deleted} éléments ont été supprimés." + failure: "Synchronisation interrompue après %{time} secondes." + activerecord: + attributes: + line_referential: + sync_interval: "Fréquence de synchronisation"
\ No newline at end of file diff --git a/config/locales/lines_en.yml b/config/locales/lines.en.yml index 21994bc23..d03b5eadc 100644 --- a/config/locales/lines_en.yml +++ b/config/locales/lines.en.yml @@ -8,9 +8,9 @@ en: destroy_selection_confirm: "Are you sure you want destroy those lines?" import: "Import lines" export_kml: "Export KML line" - export__kml_all: "Export KML lines" + export_kml_all: "Export KML lines" export_hub: "Export HUB line" - export__hub_all: "Export HUB lines" + export_hub_all: "Export HUB lines" new: title: "Add a new line" edit: diff --git a/config/locales/lines_fr.yml b/config/locales/lines.fr.yml index 5729800c7..4b871d4ad 100644 --- a/config/locales/lines_fr.yml +++ b/config/locales/lines.fr.yml @@ -20,8 +20,8 @@ fr: itineraries: "Liste des séquences d'arrêts de la ligne" group_of_lines: "Groupes de lignes" index: - name_or_number: "Recherche par nom ou indice" title: "Lignes" + name_or_number: "Recherche par nom ou indice" no_networks: "Aucun réseaux" no_companies: "Aucun transporteurs" no_group_of_lines: "Aucun groupes de ligne" diff --git a/config/locales/networks.en.yml b/config/locales/networks.en.yml index ccb4dd791..0a5555b43 100644 --- a/config/locales/networks.en.yml +++ b/config/locales/networks.en.yml @@ -14,6 +14,7 @@ en: index: title: "Networks" name: "Search by name" + advanced_search: "Advanced search" activerecord: models: network: diff --git a/config/locales/networks.fr.yml b/config/locales/networks.fr.yml index d8572326e..1abd6e1c0 100644 --- a/config/locales/networks.fr.yml +++ b/config/locales/networks.fr.yml @@ -14,6 +14,7 @@ fr: index: title: "Réseaux" name: "Recherche par nom" + advanced_search: "Recherche avancée" activerecord: models: network: diff --git a/config/locales/referentials.en.yml b/config/locales/referentials.en.yml index 4064db841..3691a8227 100644 --- a/config/locales/referentials.en.yml +++ b/config/locales/referentials.en.yml @@ -57,6 +57,7 @@ en: access_points: "Access Points" time_tables: "Time tables" connection_links: "Connection links" + route_sections: "Route sections" quays: "quays" boarding_positions: "boarding positions" commercial_stops: "commercial stops" @@ -76,3 +77,8 @@ en: prefix: "only alphanumerical or underscore characters" upper_corner: "latitude,longitude in WGS84 referential, dot for decimal separator" lower_corner: "latitude,longitude in WGS84 referential, dot for decimal separator" + + notice: + referential: + archived: "The data space has been successfully archived" + unarchived: "The data space has been successfully unarchived"
\ No newline at end of file diff --git a/config/locales/referentials.fr.yml b/config/locales/referentials.fr.yml index d8b72d3e3..cada9c3a0 100644 --- a/config/locales/referentials.fr.yml +++ b/config/locales/referentials.fr.yml @@ -77,3 +77,8 @@ fr: prefix: "caractères autorisés : alphanumériques et 'souligné'" upper_corner: "latitude,longitude dans le référentiel WGS84, le séparateur de décimales est 'point'" lower_corner: "latitude,longitude dans le référentiel WGS84, le séparateur de décimales est 'point'" + + notice: + referential: + archived: "L'espace de données a été correctement archivé" + unarchived: "L'espace de données a été correctement désarchivé" diff --git a/config/locales/stop_areas.en.yml b/config/locales/stop_areas.en.yml index 140c5b296..a556916bf 100644 --- a/config/locales/stop_areas.en.yml +++ b/config/locales/stop_areas.en.yml @@ -66,9 +66,9 @@ en: title: "Manage parent of stop area %{stop_area}" add_children: title: "Manage children of stop area %{stop_area}" - add_lines: + add_routing_lines: title: "Manage lines of routing constraint %{stop_area}" - add_stops: + add_routing_stops: title: "Manage stop areas of routing constraint %{stop_area}" activerecord: models: @@ -80,6 +80,7 @@ en: stop_area: name: "Name" registration_number: "Registration number" + published_name: "Published name" comment: "Comments" stop_area_type: "Area type" nearest_topic_name: "Nearest point of interest" @@ -101,7 +102,7 @@ en: objectid: "Neptune identifier" object_version: "Version" creation_time: "Created on" - creatorid: "Created by" + creator_id: "Created by" children_ids: "Children" routing_stop_ids: "Attached stops" routing_line_ids: "Attached lines" diff --git a/config/locales/subscriptions.en.yml b/config/locales/subscriptions.en.yml index 95f7bd160..56a3eddeb 100644 --- a/config/locales/subscriptions.en.yml +++ b/config/locales/subscriptions.en.yml @@ -7,6 +7,8 @@ en: actions: new: "Create an account" activemodel: + models: + subscription: "account" attributes: subscription: organisation_name: "Organisation" diff --git a/config/locales/time_tables.en.yml b/config/locales/time_tables.en.yml index b25439a1b..72a934421 100644 --- a/config/locales/time_tables.en.yml +++ b/config/locales/time_tables.en.yml @@ -41,12 +41,17 @@ en: overlap_date: "Overlap date" selected_date: "Date directly included" selected_period: "Date included in period" + properties_show: + resume: "From %{start_date} to %{end_date}" + resume_empty: "Empty timetable" index: - title: "Timetables" comment: "Search by name" tag_search: "Tags : hollidays,public holliday" - from: "From : " - to: " to : " + from: "From: " + to: " to: " + start_date: "mm/jj/aaaa" + end_date: "mm/jj/aaaa" + title: "timetables" selection: "Selection" selection_all: "All" advanced_search: "Advanced Search" @@ -74,6 +79,7 @@ en: creation_time: "Created on" creator_id: "Created by " calendars: "Calendar view" + calendar_details: "Calendar details" dates: "Peculiar dates" date: "On" excluded_dates: "Excluded dates" @@ -81,6 +87,7 @@ en: period_start: "From" period_end: "to" tag_search: "Tags" + tag_list: "Tags" formtastic: titles: time_table: diff --git a/config/locales/time_tables.fr.yml b/config/locales/time_tables.fr.yml index b1c9998dc..d2d693c93 100644 --- a/config/locales/time_tables.fr.yml +++ b/config/locales/time_tables.fr.yml @@ -41,6 +41,9 @@ fr: overlap_date: "Date en doublon" selected_date: "Date incluse directement" selected_period: "Date incluse par période" + properties_show: + resume: "Validité comprise du %{start_date} au %{end_date}" + resume_empty: "Calendrier vide" index: comment: "Recherche par nom" tag_search: "Tags : vacances,jour fériés" diff --git a/config/locales/validation_reports.en.yml b/config/locales/validation_reports.en.yml index 5dd8d23ef..3eb4f1b2c 100644 --- a/config/locales/validation_reports.en.yml +++ b/config/locales/validation_reports.en.yml @@ -302,6 +302,8 @@ en: 3-Route-8: "Vérification de l'utilisation des arrêts par les missions" 3-Route-9: "Vérification de l’existence d’une mission passant par tous les arrêts de la séquence" 3-JourneyPattern-1: "Vérification de double définition de missions" + 3-JourneyPattern-2: "Vérification de l’existence d’une mission passant par tous les arrêts de la séquence" + 3-JourneyPattern-3: "Vérification de double définition de missions" 3-VehicleJourney-1: "Vérification de la chronologie des horaires de passage à un arrêt" 3-VehicleJourney-2: "Vérification de la vitesse de transfert entre deux arrêts" 3-VehicleJourney-3: "Vérification de la cohérence des courses successives desservant deux mêmes arrêts" diff --git a/config/locales/validation_reports.fr.yml b/config/locales/validation_reports.fr.yml index 8b1757c3a..5929f7144 100644 --- a/config/locales/validation_reports.fr.yml +++ b/config/locales/validation_reports.fr.yml @@ -315,6 +315,7 @@ fr: 4-GroupOfLine-1: "Vérification de contraintes sur les attributs des groupes de lignes" 4-StopArea-1: "Vérification de contraintes sur les attributs des arrêts" 4-StopArea-2: "Vérification de l'existance d'un arrêt commercial pour les arrêts physiques" + 4-StopArea-3: "Vérification de la cohérence entre les noms de communes et leur code INSEE" 4-AccessPoint-1: "Vérification de contraintes sur les attributs des accès" 4-AccessLink-1: "Vérification de contraintes sur les attributs des liens d'accès" 4-ConnectionLink-1: "Vérification de contraintes sur les attributs des correspondances" diff --git a/config/locales/validation_tasks.en.yml b/config/locales/validation_tasks.en.yml index 9c3e6d719..1b142e992 100644 --- a/config/locales/validation_tasks.en.yml +++ b/config/locales/validation_tasks.en.yml @@ -39,6 +39,20 @@ en: access_points_stats: "Access Points" vehicle_journeys_stats: "Vehicle Journeys" journey_patterns_stats: "Journey Patterns" + table: + line: + name: "Name" + save: "Save" + routes: "Routes" + connection_links: "Connection links" + time_tables: "Time tables" + stop_areas: "Stop areas" + access_points: "Access points" + vehicle_journeys: "Vehicle journeys" + journey_patterns: "Journey patterns" + not_saved: "Not saved" + saved: "Saved" + save_error: "Save error" statuses: created: "Pending ..." scheduled: "Processing ..." diff --git a/config/locales/validations.en.yml b/config/locales/validations.en.yml index 939056d39..5bac62ff3 100644 --- a/config/locales/validations.en.yml +++ b/config/locales/validations.en.yml @@ -18,6 +18,8 @@ en: validated_file: "Validated file" title: "Neptune Validation" summary: "Rapport de conformité à la norme NEPTUNE" + details: "Details" + parameters: "Tests parameters" completed: "[ Completed ]" failed: "[ Failed ]" pending: "[ In the treatment queue ]" @@ -42,6 +44,20 @@ en: access_points_stats: "Access Points" vehicle_journeys_stats: "Vehicle Journeys" journey_patterns_stats: "Journey Patterns" + table: + line: + name: "Name" + save: "Save" + routes: "Routes" + connection_links: "Connection links" + time_tables: "Time tables" + stop_areas: "Stop areas" + access_points: "Acces points" + vehicle_journeys: "Vehicle journeys" + journey_patterns: "Journey patterns" + not_saved: "Not saved" + saved: "Saved" + save_error: "Save error" statuses: created: "Pending ..." scheduled: "Processing ..." diff --git a/config/locales/vehicle_journeys.en.yml b/config/locales/vehicle_journeys.en.yml index 4f5f763b4..0687c32aa 100644 --- a/config/locales/vehicle_journeys.en.yml +++ b/config/locales/vehicle_journeys.en.yml @@ -96,7 +96,7 @@ en: published_journey_name: "Published Name" published_journey_identifier: "Published Identifier" facility: "Facility" - vehicletypeidentifier: "Vehicle Type Identifier" + vehicle_type_identifier: "Vehicle Type Identifier" time_table_ids: "Calendar list" vehicle_journey_at_stop_ids: "Time list" journey_frequency_ids: "Timeband" diff --git a/config/routes.rb b/config/routes.rb index e530ebaa1..af466f640 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -10,8 +10,15 @@ ChouetteIhm::Application.routes.draw do authenticated :user do root :to => 'referentials#index', as: :authenticated_root end + unauthenticated :user do - root :to => 'devise/cas_sessions#new', as: :unauthenticated_root + target = 'devise/sessions#new' + + if Rails.application.config.chouette_authentication_settings[:type] == "cas" + target = 'devise/cas_sessions#new' + end + + root :to => target, as: :unauthenticated_root end end @@ -48,7 +55,7 @@ ChouetteIhm::Application.routes.draw do resources :stop_areas end - resources :line_referentials, :only => [:show] do + resources :line_referentials, :only => [:show, :update] do resources :lines resources :group_of_lines end @@ -65,6 +72,12 @@ ChouetteIhm::Application.routes.draw do end end + # Archive/unarchive + member do + put :archive + put :unarchive + end + resources :networks match 'lines' => 'lines#destroy_all', :via => :delete @@ -193,4 +206,4 @@ ChouetteIhm::Application.routes.draw do get '/422', :to => 'errors#server_error' get '/500', :to => 'errors#server_error' -end +end
\ No newline at end of file diff --git a/config/schedule.rb b/config/schedule.rb new file mode 100644 index 000000000..83c4d7388 --- /dev/null +++ b/config/schedule.rb @@ -0,0 +1,40 @@ +# Use this file to easily define all of your cron jobs. +# +# It's helpful, but not entirely necessary to understand cron before proceeding. +# http://en.wikipedia.org/wiki/Cron + +# Example: +# +# set :output, "/path/to/my/cron_log.log" +# +# every 2.hours do +# command "/usr/bin/some_great_command" +# runner "MyModel.some_method" +# rake "some:great:rake:task" +# end +# +# every 4.days do +# runner "AnotherModel.prune_old_records" +# end + +# Learn more: http://github.com/javan/whenever + +set :additionnal_path, '' +unless additionnal_path.empty? + env :PATH, "#{additionnal_path}:#{ENV['PATH']}" +end +set :NEW_RELIC_LOG, 'stdout' + +set :job_template, "/bin/bash -c ':job'" + +every :hour do + rake "organisations:sync" + rake "users:sync" +end + +every :day, :at => '3:00am' do + rake "reflex:sync" +end +every :day, :at => '4:00 am' do + rake "codifligne:sync" +end diff --git a/config/warble.rb b/config/warble.rb deleted file mode 100644 index 9574700d5..000000000 --- a/config/warble.rb +++ /dev/null @@ -1,155 +0,0 @@ -# Disable Rake-environment-task framework detection by uncommenting/setting to false -# Warbler.framework_detection = false - -# Warbler web application assembly configuration file -Warbler::Config.new do |config| - # Features: additional options controlling how the jar is built. - # Currently the following features are supported: - # - gemjar: package the gem repository in a jar file in WEB-INF/lib - # - executable: embed a web server and make the war executable - # - compiled: compile .rb files to .class files - # config.features = %w(gemjar) - - # Application directories to be included in the webapp. - config.dirs = %w(app config lib vendor db) - - # Additional files/directories to include, above those in config.dirs - #config.includes = FileList["db"] - - # Additional files/directories to exclude - # config.excludes = FileList["lib/tasks/*"] - - # Additional Java .jar files to include. Note that if .jar files are placed - # in lib (and not otherwise excluded) then they need not be mentioned here. - # JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your - # own versions if you directly set the value - # config.java_libs += FileList["lib/java/*.jar"] - - # Loose Java classes and miscellaneous files to be included. - # config.java_classes = FileList["target/classes/**.*"] - - # One or more pathmaps defining how the java classes should be copied into - # the archive. The example pathmap below accompanies the java_classes - # configuration above. See http://rake.rubyforge.org/classes/String.html#M000017 - # for details of how to specify a pathmap. - # config.pathmaps.java_classes << "%{target/classes/,}p" - - # Bundler support is built-in. If Warbler finds a Gemfile in the - # project directory, it will be used to collect the gems to bundle - # in your application. If you wish to explicitly disable this - # functionality, uncomment here. - # config.bundler = false - - # An array of Bundler groups to avoid including in the war file. - # Defaults to ["development", "test"]. - config.bundle_without = %w{development test assets} - - # Other gems to be included. If you don't use Bundler or a gemspec - # file, you need to tell Warbler which gems your application needs - # so that they can be packaged in the archive. - # For Rails applications, the Rails gems are included by default - # unless the vendor/rails directory is present. - # config.gems += ["activerecord-jdbcmysql-adapter", "jruby-openssl"] - # config.gems << "tzinfo" - - # Uncomment this if you don't want to package rails gem. - #config.gems -= ["rails"] - - # The most recent versions of gems are used. - # You can specify versions of gems by using a hash assignment: - # config.gems["rails"] = "2.3.10" - - # You can also use regexps or Gem::Dependency objects for flexibility or - # finer-grained control. - # config.gems << /^merb-/ - # config.gems << Gem::Dependency.new("merb-core", "= 0.9.3") - - # Include gem dependencies not mentioned specifically. Default is - # true, uncomment to turn off. - # config.gem_dependencies = false - - # Array of regular expressions matching relative paths in gems to be - # excluded from the war. Defaults to empty, but you can set it like - # below, which excludes test files. - # config.gem_excludes = [/^(test|spec)\//] - - # Pathmaps for controlling how application files are copied into the archive - # config.pathmaps.application = ["WEB-INF/%p"] - - # Name of the archive (without the extension). Defaults to the basename - # of the project directory. - config.jar_name = "chouette2" - - # Name of the MANIFEST.MF template for the war file. Defaults to a simple - # MANIFEST.MF that contains the version of Warbler used to create the war file. - # config.manifest_file = "config/MANIFEST.MF" - - # When using the 'compiled' feature and specified, only these Ruby - # files will be compiled. Default is to compile all \.rb files in - # the application. - # config.compiled_ruby_files = FileList['app/**/*.rb'] - - # === War files only below here === - - # Path to the pre-bundled gem directory inside the war file. Default - # is 'WEB-INF/gems'. Specify path if gems are already bundled - # before running Warbler. This also sets 'gem.path' inside web.xml. - # config.gem_path = "WEB-INF/vendor/bundler_gems" - - # Files for WEB-INF directory (next to web.xml). This contains - # web.xml by default. If there is an .erb-File it will be processed - # with webxml-config. You may want to exclude this file via - # config.excludes. - # config.webinf_files += FileList["jboss-web.xml"] - - # Files to be included in the root of the webapp. Note that files in public - # will have the leading 'public/' part of the path stripped during staging. - # config.public_html = FileList["public/**/*", "doc/**/*"] - - # Pathmaps for controlling how public HTML files are copied into the .war - # config.pathmaps.public_html = ["%{public/,}p"] - - # Value of RAILS_ENV for the webapp -- default as shown below - # config.webxml.rails.env = ENV['RAILS_ENV'] || 'production' - - # Application booter to use, one of :rack, :rails, or :merb (autodetected by default) - # config.webxml.booter = :rails - - # Set JRuby to run in 1.9 mode. - # config.webxml.jruby.compat.version = "1.9" - - # When using the :rack booter, "Rackup" script to use. - # - For 'rackup.path', the value points to the location of the rackup - # script in the web archive file. You need to make sure this file - # gets included in the war, possibly by adding it to config.includes - # or config.webinf_files above. - # - For 'rackup', the rackup script you provide as an inline string - # is simply embedded in web.xml. - # The script is evaluated in a Rack::Builder to load the application. - # Examples: - # config.webxml.rackup.path = 'WEB-INF/hello.ru' - # config.webxml.rackup = %{require './lib/demo'; run Rack::Adapter::Camping.new(Demo)} - # config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru")) - - # Control the pool of Rails runtimes. Leaving unspecified means - # the pool will grow as needed to service requests. It is recommended - # that you fix these values when running a production server! - config.webxml.jruby.min.runtimes = 2 - config.webxml.jruby.max.runtimes = 4 - - config.webxml.jruby.worker.script = <<EOF -Rails.logger.info "start Delayed::JRubyWorker" -begin -require 'delayed/jruby_worker' -Delayed::JRubyWorker.new(:quiet => false).start -rescue => e - Rails.logger.fatal(e) - raise e -end -EOF - - # JNDI data source name - # config.webxml.jndi = 'jdbc/rails' - - config.init_contents << "config/war_init.rb" -end |
