diff options
| author | Michel Etienne | 2015-10-26 16:28:01 +0100 | 
|---|---|---|
| committer | Michel Etienne | 2015-10-26 16:28:01 +0100 | 
| commit | da5dab112c875ac4e63089270b5ca3504cb73fa8 (patch) | |
| tree | f4a68594d5cf398ee99316552e7ec92088cf5fbf | |
| parent | 801c4a73eb3c2bf2ba756949fccdc587740b2284 (diff) | |
| download | chouette-core-da5dab112c875ac4e63089270b5ca3504cb73fa8.tar.bz2 | |
HUB profile corrcetions
| -rw-r--r-- | app/views/group_of_lines/_form.erb | 2 | ||||
| -rw-r--r-- | app/views/help/hubexport.textile | 2 | ||||
| -rw-r--r-- | config/deploy/private.rb | 2 | ||||
| -rw-r--r-- | config/deploy/unstable.rb | 2 | ||||
| -rw-r--r-- | config/locales/group_of_lines.yml | 4 | ||||
| -rw-r--r-- | config/locales/referentials.yml | 2 | ||||
| -rw-r--r-- | lib/ninoxe_extension/hub/objectid_restrictions.rb | 6 | ||||
| -rw-r--r-- | lib/ninoxe_extension/hub/stop_area_restrictions.rb | 2 | 
8 files changed, 11 insertions, 11 deletions
| diff --git a/app/views/group_of_lines/_form.erb b/app/views/group_of_lines/_form.erb index cb460c67e..0f92897ca 100644 --- a/app/views/group_of_lines/_form.erb +++ b/app/views/group_of_lines/_form.erb @@ -3,7 +3,7 @@      <%= form.input :name, :input_html => {  :title => I18n.t("formtastic.titles#{format_restriction_for_locales(@referential)}.group_of_line.name") } %>      <%= form.input :registration_number, :input_html => {  :title => I18n.t("formtastic.titles#{format_restriction_for_locales(@referential)}.group_of_line.registration_number") } %>      <%= form.input :comment %> -    <%= form.input :objectid, :required => !@group_of_line.new_record?, :input_html => {  :title => t("formtastic.titles#{format_restriction_for_locales(@referential)}.group_of_line.objectid") } %> +    <%= form.input :objectid, :required => !@group_of_line.new_record?, :input_html => {  :title => I18n.t("formtastic.titles#{format_restriction_for_locales(@referential)}.group_of_line.objectid") } %>    <% end %>    <%= form.inputs do %> diff --git a/app/views/help/hubexport.textile b/app/views/help/hubexport.textile index 498233353..0b85fefaa 100644 --- a/app/views/help/hubexport.textile +++ b/app/views/help/hubexport.textile @@ -43,7 +43,7 @@ Les arrêts de type pôle d'échange ne sont pas pris en charge par le format HU  h4. Contraintes sur les champs :  * Troisième composante de l'identifiant technique : 6 caractères maximum -* Nom de l'arrêt : 75 arrêts maximum +* Nom de l'arrêt : 75 caractères maximum  * Point d'intérêt le plus proche : ce champs est facultatif. S'il est rempli, il ne doit pas contenir plus de 255 caractères pour les arrêts commerciaux et plus de 60 caractères pour les arrêts physiques.  * Géolocalisation : obligatoire et au format WGS84  * Commune : 80 caractères maximum diff --git a/config/deploy/private.rb b/config/deploy/private.rb index 0a9cb5e0c..44823408f 100644 --- a/config/deploy/private.rb +++ b/config/deploy/private.rb @@ -1,3 +1,3 @@  server "chouette-private.marseille.cityway.fr", :app, :web, :db, :primary => true -set :branch, "V2_5" +set :branch, "V3_1"  set :gui_cmd, "2.5.2" diff --git a/config/deploy/unstable.rb b/config/deploy/unstable.rb index d363a6fa4..4fab428c7 100644 --- a/config/deploy/unstable.rb +++ b/config/deploy/unstable.rb @@ -1,3 +1,3 @@  server "chouette-p.aix.cityway.fr", :app, :web, :db, :primary => true -set :branch, "master" +set :branch, "V3_1"  #set :gui_cmd, "2.5.2" diff --git a/config/locales/group_of_lines.yml b/config/locales/group_of_lines.yml index d92cc3410..53e8021a6 100644 --- a/config/locales/group_of_lines.yml +++ b/config/locales/group_of_lines.yml @@ -55,7 +55,7 @@ en:            registration_number: "Positif integer."             objectid: "[prefix]:GroupOfLine:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character"        hub: -        group_of_lines: +        group_of_line:            name: "maximum 75 characters"            registration_number: "Positif integer, unique key, of no more than 8 digits."             objectid: "[prefix]:GroupOfLine:[unique_key] : prefix contains only alphanumerical or underscore characters, unique_key accepts also minus character. Maximum length of the unique key = 6." @@ -117,7 +117,7 @@ fr:            registration_number: "Entier positif."             objectid: "[prefixe]:GroupOfLine:[clé_unique]  caractères autorisés : alphanumériques et 'souligné' pour le préfixe, la clé unique accepte en plus le 'moins'"        hub: -        group_of_lines: +        group_of_line:            name: "maximum 75 caractères"            registration_number: "Entier positif, clé unique, d'un maximum de 8 chiffres."             objectid: "[prefixe]:GroupOfLine:[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 = 6." diff --git a/config/locales/referentials.yml b/config/locales/referentials.yml index c23e748d3..22e923be7 100644 --- a/config/locales/referentials.yml +++ b/config/locales/referentials.yml @@ -144,7 +144,7 @@ fr:          exports: "Exports"          compliance_checks: "Validations"          rule_parameter_sets: "Jeux de paramètres" -        data_format_restrictions: "Appliquer les contraintes de format des données" +        data_format_restrictions: "Format d'export privilégié"          data_format: "Format d'export privilégié"    formtastic:      titles: diff --git a/lib/ninoxe_extension/hub/objectid_restrictions.rb b/lib/ninoxe_extension/hub/objectid_restrictions.rb index 1fcdb94cb..1a71b9e62 100644 --- a/lib/ninoxe_extension/hub/objectid_restrictions.rb +++ b/lib/ninoxe_extension/hub/objectid_restrictions.rb @@ -8,15 +8,15 @@ module NinoxeExtension::Hub::ObjectidRestrictions      end      def validate_specific_objectid( size_max ) -      errors.add( :objectid, I18n.t('hub.invalid')) if ( %r{\A\w+:\w+:\w+\z}).match( self.objectid).nil? +      #errors.add( :objectid, I18n.t('hub.invalid')) if ( %r{\A\w+:\w+:\w+\z}).match( self.objectid).nil?        if third_part_objectid.nil? || ( !third_part_objectid.include?( "_pending_" ) && third_part_objectid.size > size_max)          errors.add( :objectid, I18n.t('hub.invalid'))        end      end      def third_part_objectid -      return nil if ( %r{\A\w+:\w+:\w+\z}).match( self.objectid).nil? -      self.objectid.match(/:(\w+)\z/)[1] +      return nil if ( %r{\A\w+:\w+:[0-9A-Za-z_-]+\z}).match( self.objectid).nil? +      self.objectid.match(/:([0-9A-Za-z_-]+)\z/)[1]      end      def third_part_objectid_uniqueness        return unless hub_restricted? diff --git a/lib/ninoxe_extension/hub/stop_area_restrictions.rb b/lib/ninoxe_extension/hub/stop_area_restrictions.rb index 8d347a7c6..fb5f81598 100644 --- a/lib/ninoxe_extension/hub/stop_area_restrictions.rb +++ b/lib/ninoxe_extension/hub/stop_area_restrictions.rb @@ -56,7 +56,7 @@ module NinoxeExtension::Hub          # HUB-31          # sa.validates_format_of :comment, :with => %r{\A[\w ]{0,255}\z}          sa.validates_length_of :comment, :maximum => 255, :allow_blank => true, :allow_nil => true -        sa.validates_format_of :registration_number, :with => %r{\A[\w]{1,8}\z}, :allow_blank => true, :allow_nil => true +        sa.validates :registration_number, :numericality => { :less_than => 10 ** 8 }, :allow_blank => true, :allow_nil => true        end      end      def specific_objectid | 
