aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Etienne2014-11-13 17:02:08 +0100
committerMichel Etienne2014-11-13 17:02:08 +0100
commit0350755d84ca7c19398799f48914cd1ae2ede23d (patch)
treedd12f2d8ef032398c3189cac7f32795d0608d140
parent28350f95744a03290a28dd8d941d1e6248f2eeb2 (diff)
downloadchouette-core-0350755d84ca7c19398799f48914cd1ae2ede23d.tar.bz2
prepare version 2.5.1
-rw-r--r--CHANGELOG.md8
-rw-r--r--Gemfile4
-rw-r--r--Gemfile.lock8
-rw-r--r--README.md6
-rw-r--r--app/models/gtfs_export.rb12
-rw-r--r--app/views/exports/_fields_gtfs_export.erb1
-rw-r--r--app/views/help/terms.textile7
-rw-r--r--config/environments/production.rb2
-rw-r--r--config/locales/exports.yml4
-rw-r--r--lib/tasks/userdoc.rake23
10 files changed, 52 insertions, 23 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 72dfe74ee..a854ae4b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,10 @@
-# Version 2.5.0 (en cours)
+# Version 2.5.1 (14/11/14)
+* Nouvelles foctionnalités
+ * Reprise des imports/exports GTFS
+ * Ajout des couleurs de lignes
+ * Ajouts de champs pour les échanges GTFS
+
+# Version 2.5.0 (23/10/14)
* Nouvelles foctionnalités
* Ajout d'un lien de création d'objet dans la page de consultation (Mantis 26415)
* Ajout d'un lien vers l'accueil dans le bandeau (Mantis 26820)
diff --git a/Gemfile b/Gemfile
index cd2471ed7..43630ff53 100644
--- a/Gemfile
+++ b/Gemfile
@@ -74,9 +74,9 @@ gem 'google-analytics-rails'
gem 'will_paginate', '~> 3.0'
gem 'ransack'
gem 'squeel'
-gem 'ninoxe', :git => 'https://github.com/afimb/ninoxe.git', :branch => :sismo
+gem 'ninoxe', :git => 'https://github.com/afimb/ninoxe.git', :branch => :gtfs_v2
#gem 'ninoxe',:path => '~/workspace/chouette/ninoxe'
-#gem 'ninoxe', '~> 1.0.3'
+#gem 'ninoxe', '~> 1.1.1'
gem 'acts_as_list', '0.1.6'
gem "acts_as_tree-1.8", '1.1.0', :require => "acts_as_tree"
diff --git a/Gemfile.lock b/Gemfile.lock
index f768b3d6a..59da9599d 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,9 +1,9 @@
GIT
remote: https://github.com/afimb/ninoxe.git
- revision: 9a9563cc869e0353d6b073ce5aacc3d07a7217c0
- branch: sismo
+ revision: 209c87f1a41a6cd475575b4915eabe0b9c00da0b
+ branch: gtfs_v2
specs:
- ninoxe (1.1.0)
+ ninoxe (1.1.1)
activerecord (~> 3.2.13)
acts-as-taggable-on (>= 3)
acts_as_list (>= 0.1.6)
@@ -353,7 +353,7 @@ GEM
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.41)
+ tzinfo (0.3.42)
uglifier (1.2.7)
execjs (>= 0.3.0)
multi_json (~> 1.3)
diff --git a/README.md b/README.md
index 3b0127f99..248455640 100644
--- a/README.md
+++ b/README.md
@@ -65,9 +65,9 @@ Assume Linux user is myuser and its group mygroup (that user is the one who star
sudo mkdir -p /usr/local/opt/chouette-command/
sudo chown -R myuser:mygroup /usr/local/opt/chouette-command/
cd /usr/local/opt/chouette-command/
-wget http://maven.chouette.cityway.fr/fr/certu/chouette/chouette-gui-command/2.5.0/chouette-gui-command-2.5.0.zip
-unzip chouette-gui-command-2.5.0.zip
-cd chouette-cmd_2.5.0
+wget http://maven.chouette.cityway.fr/fr/certu/chouette/chouette-gui-command/2.5.1/chouette-gui-command-2.5.1.zip
+unzip chouette-gui-command-2.5.1.zip
+cd chouette-cmd_2.5.1
sudo chmod a+w .
```
diff --git a/app/models/gtfs_export.rb b/app/models/gtfs_export.rb
index 6f43a93eb..6ee83098f 100644
--- a/app/models/gtfs_export.rb
+++ b/app/models/gtfs_export.rb
@@ -2,21 +2,27 @@ class GtfsExport < Export
validates_presence_of :time_zone
option :time_zone
+ option :object_id_prefix
- after_initialize :init_time_zone
+ after_initialize :init_params
def references_types
[ Chouette::Line, Chouette::Network, Chouette::Company, Chouette::StopArea ]
end
- def init_time_zone
+ def init_params
if time_zone.nil?
self.time_zone = "Paris"
end
end
def export_options
- super.merge(:format => :gtfs, :time_zone => ActiveSupport::TimeZone.find_tzinfo(time_zone).name)
+ opts = super.merge(:format => :gtfs, :time_zone => ActiveSupport::TimeZone.find_tzinfo(time_zone).name)
+ if object_id_prefix.present?
+ opts = opts.merge(:object_id_prefix => object_id_prefix)
+ end
+ puts opts.inspect
+ opts
end
end
diff --git a/app/views/exports/_fields_gtfs_export.erb b/app/views/exports/_fields_gtfs_export.erb
index 60ffd21c8..3ec95c181 100644
--- a/app/views/exports/_fields_gtfs_export.erb
+++ b/app/views/exports/_fields_gtfs_export.erb
@@ -1 +1,2 @@
<%= form.input :time_zone, :as => :time_zone, :input_html => { :title => t("formtastic.titles.export.time_zone")} %>
+<%= form.input :object_id_prefix, :input_html => { :value => @referential.prefix ,:title => t("formtastic.titles.export.object_id_prefix")} %> \ No newline at end of file
diff --git a/app/views/help/terms.textile b/app/views/help/terms.textile
new file mode 100644
index 000000000..aa6c345d3
--- /dev/null
+++ b/app/views/help/terms.textile
@@ -0,0 +1,7 @@
+---
+layout: default
+title: Glossaire
+---
+
+p. à renseigner
+
diff --git a/config/environments/production.rb b/config/environments/production.rb
index de408f29f..a320dc448 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -152,7 +152,7 @@ ChouetteIhm::Application.configure do
# paths for external resources
config.to_prepare do
Devise::Mailer.layout "mailer"
- Chouette::Command.command = ENV['CHOUETTE_GUI_COMMAND'].nil? ? "/usr/local/opt/chouette-command/chouette-cmd_2.5.0/chouette" : ENV['CHOUETTE_GUI_COMMAND']
+ Chouette::Command.command = ENV['CHOUETTE_GUI_COMMAND'].nil? ? "/usr/local/opt/chouette-command/chouette-cmd_2.5.1/chouette" : ENV['CHOUETTE_GUI_COMMAND']
ImportTask.root = "/var/lib/chouette/imports"
Export.root = "/var/lib/chouette/exports"
end
diff --git a/config/locales/exports.yml b/config/locales/exports.yml
index 7b1531314..6ade85762 100644
--- a/config/locales/exports.yml
+++ b/config/locales/exports.yml
@@ -106,6 +106,7 @@ en:
time_zone: "Time Zone"
start_date: "Start of period"
end_date: "End of period"
+ object_id_prefix: "objectId prefix to be ignored"
export_log_message:
created_at: "Date"
position: "N."
@@ -114,6 +115,7 @@ en:
titles:
export:
time_zone: "according to TZ encoding (see http://en.wikipedia.org/wiki/Tz_database)"
+ object_id_prefix: "when prefix has this value, it will be removed to build GTFS id"
start_date: "reduce import to vehicle journeys running from this date"
end_date: "reduce import to vehicle journeys running until this date"
area_types:
@@ -229,6 +231,7 @@ fr:
time_zone: "Fuseau horaire"
start_date: "Début de période"
end_date: "Fin de période"
+ object_id_prefix: "Préfixe d'identifiant Neptune à ignorer"
export_log_message:
created_at: "Date"
position: "No"
@@ -237,6 +240,7 @@ fr:
titles:
export:
time_zone: "selon le codage TZ (http://fr.wikipedia.org/wiki/Tz_database)"
+ object_id_prefix: "lorsque le préfixe d'identifiant Netpune prend cette valeur, il n'est pas utilisé pour composer l'identifiant GTFS"
start_date: "limite l'export aux courses circulant à partir de cette date"
end_date: "limite l'export aux courses circulant jusqu'à cette date"
area_types:
diff --git a/lib/tasks/userdoc.rake b/lib/tasks/userdoc.rake
index df72c32e4..8f93644c7 100644
--- a/lib/tasks/userdoc.rake
+++ b/lib/tasks/userdoc.rake
@@ -27,16 +27,21 @@ namespace :doc do
Dir.chdir "tmp/doc"
system "pandoc -s -o ../../userdoc.docx temp.textile"
- # clean working directory
- puts "clean temp files"
- Dir.chdir "../.."
- FileUtils.rm_r("tmp/doc") if File.exist?("tmp/doc")
-
- # patch docx
- patch_docx "userdoc.docx"
+ if !File.exists?("userdoc.docx")
+ puts "pandoc failed to produce document"
+ else
+ # patch docx
+ patch_docx "userdoc.docx"
+
+ # clean working directory
+ puts "clean temp files"
+ Dir.chdir "../.."
+ FileUtils.rm_r("tmp/doc") if File.exist?("tmp/doc")
+
+ # end job
+ puts "User doc completed"
+ end
- # end job
- puts "User doc completed"
end
def merge_textiles