aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md8
-rw-r--r--Gemfile4
-rw-r--r--Gemfile.lock8
-rw-r--r--README.md8
-rw-r--r--app/assets/stylesheets/main/lines.css.scss16
-rw-r--r--app/helpers/lines_helper.rb17
-rw-r--r--app/models/gtfs_export.rb12
-rw-r--r--app/views/companies/_form.erb2
-rw-r--r--app/views/companies/show.html.erb8
-rw-r--r--app/views/exports/_fields_gtfs_export.erb1
-rw-r--r--app/views/help/terms.textile7
-rw-r--r--app/views/lines/_form.erb3
-rw-r--r--app/views/lines/_line.erb9
-rw-r--r--app/views/lines/show.html.erb23
-rw-r--r--app/views/stop_areas/_form.html.erb2
-rw-r--r--app/views/stop_areas/show.html.erb8
-rw-r--r--config/deploy/unstable.rb2
-rw-r--r--config/environment.rb2
-rw-r--r--config/environments/production.rb2
-rw-r--r--config/locales/companies.yml4
-rw-r--r--config/locales/exports.yml4
-rw-r--r--config/locales/lines.yml8
-rw-r--r--config/locales/stop_areas.yml4
-rw-r--r--db/migrate/20141105123536_add_gtfs_fields_to_companies.ninoxe_engine.rb9
-rw-r--r--db/migrate/20141105123537_add_gtfs_fields_to_stop_areas.ninoxe_engine.rb9
-rw-r--r--db/migrate/20141105123538_add_gtfs_fields_to_lines.ninoxe_engine.rb10
-rw-r--r--db/schema.rb9
-rw-r--r--lib/tasks/userdoc.rake23
28 files changed, 184 insertions, 38 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 0af970b6c..a037fd4a7 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 47272cc14..40076056d 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)
@@ -354,7 +354,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 ba5f8dbf2..58b745561 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 .
```
@@ -191,4 +191,4 @@ Users looking for support should file an issue on the GitHub [issue tracking pag
Credits
-------
-Thanks to Ingolf for his [photo](https://www.flickr.com/photos/ingolfbln/7663851694) under CC BY-SA 2.0 license \ No newline at end of file
+Thanks to Ingolf for his [photo](https://www.flickr.com/photos/ingolfbln/7663851694) under CC BY-SA 2.0 license
diff --git a/app/assets/stylesheets/main/lines.css.scss b/app/assets/stylesheets/main/lines.css.scss
index 3ce3c50e0..6e2f14dc5 100644
--- a/app/assets/stylesheets/main/lines.css.scss
+++ b/app/assets/stylesheets/main/lines.css.scss
@@ -23,20 +23,24 @@
#workspace.lines.edit, #workspace.lines.new, #workspace.lines.create, #workspace.lines.update
{
- #line_color{ width: 100px;
+ #line_color_old{ width: 100px;
color: white;
font-weight: bold;}
}
#workspace.lines.show
{
- .line_color{ color: white;
- font-weight: bold;
- padding: 0 5px 0 5px;}
-
- .summary p label {
+ .summary p
+ {
+ label {
font-weight: bold;
+ }
+ .color
+ {
+ padding: 3px 15px 3px 15px;
+ }
}
+
.group_of_line {
.position {
diff --git a/app/helpers/lines_helper.rb b/app/helpers/lines_helper.rb
index a03868a0a..623d091ca 100644
--- a/app/helpers/lines_helper.rb
+++ b/app/helpers/lines_helper.rb
@@ -1,2 +1,19 @@
module LinesHelper
+
+ def line_sticker( line)
+ return line.name if line.number.blank?
+ line.number
+ end
+
+ def colors?(line)
+ line.text_color.present? || line.color.present?
+ end
+
+ def text_color(line)
+ line.text_color.blank? ? "black" : "##{line.text_color}"
+ end
+
+ def background_color(line)
+ line.color.blank? ? "white" : "#"+line.color
+ end
end
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/companies/_form.erb b/app/views/companies/_form.erb
index 6f89edbbc..f23edbef9 100644
--- a/app/views/companies/_form.erb
+++ b/app/views/companies/_form.erb
@@ -8,6 +8,8 @@
<%= form.input :phone, :as => :phone %>
<%= form.input :fax, :as => :phone %>
<%= form.input :email, :as => :email %>
+ <%= form.input :time_zone, :include_blank => true %>
+ <%= form.input :url %>
<%= form.input :registration_number, :input_html => { :title => t("formtastic.titles.company.registration_number")} %>
<%= form.input :objectid, :required => !@company.new_record?, :input_html => { :title => t("formtastic.titles.company.objectid")} %>
<% end %>
diff --git a/app/views/companies/show.html.erb b/app/views/companies/show.html.erb
index 0c8585a6c..513b0364e 100644
--- a/app/views/companies/show.html.erb
+++ b/app/views/companies/show.html.erb
@@ -32,6 +32,14 @@
<%= @company.email %>
</p>
<p>
+ <label><%= Chouette::Company.human_attribute_name("time_zone") %>: </label>
+ <%= @company.time_zone %>
+ </p>
+ <p>
+ <label><%= Chouette::Company.human_attribute_name("url") %>: </label>
+ <%= @company.url %>
+ </p>
+ <p>
<label><%= Chouette::Company.human_attribute_name("registration_number") %>: </label>
<%= @company.registration_number %>
</p>
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/app/views/lines/_form.erb b/app/views/lines/_form.erb
index c1f59ed01..0e393ac53 100644
--- a/app/views/lines/_form.erb
+++ b/app/views/lines/_form.erb
@@ -8,6 +8,9 @@
<%= form.input :registration_number, :input_html => { :title => t("formtastic.titles.line.registration_number")} %>
<%= form.input :number %>
<%= form.input :transport_mode, :as => :select, :collection => Chouette::Line.transport_modes, :include_blank => false, :member_label => Proc.new { |mode| t("transport_modes.label.#{mode}") } %>
+ <%= form.input :color, :as => :string %>
+ <%= form.input :text_color %>
+ <%= form.input :url %>
<%= form.input :mobility_restricted_suitability, :as => :select, :collection => [[@line.human_attribute_name("accessible"), true], [@line.human_attribute_name("not_accessible"), false]], :include_blank => true %>
<%= form.input :flexible_service, :as => :select, :collection => [[@line.human_attribute_name("on_demaond_fs"), true], [@line.human_attribute_name("regular_fs"), false]], :include_blank => true %>
<%= form.input :comment %>
diff --git a/app/views/lines/_line.erb b/app/views/lines/_line.erb
index f5606d907..24450fa20 100644
--- a/app/views/lines/_line.erb
+++ b/app/views/lines/_line.erb
@@ -12,7 +12,14 @@
<h5>
<%= check_box_tag "ids[]", line.id, false, :class => "multiple_selection", :style => "display: none;" %>
<% if line.number and line.number.length <= 3 %>
- <span class="label label-default line_number"><%= line.number %></span>
+ <% if !line.text_color.blank? || !line.color.blank? %>
+ <% text_color = line.text_color.blank? ? "black" : "##{line.text_color}" %>
+ <% bg_color = line.color.blank? ? "white" : "##{line.color}" %>
+ <% number_style = "color: #{text_color}; background-color: #{bg_color};" %>
+ <% else %>
+ <% number_style = "" %>
+ <% end %>
+ <span class="label label-default line_number" style="<%= number_style %>"><%= line.number %></span>
<% end %>
<%= link_to([@referential, line], :class => "preview", :title => "#{Chouette::Line.model_name.human.capitalize} #{line.name}") do %>
<span class="name">
diff --git a/app/views/lines/show.html.erb b/app/views/lines/show.html.erb
index 24eebd794..12af00ff7 100644
--- a/app/views/lines/show.html.erb
+++ b/app/views/lines/show.html.erb
@@ -1,9 +1,20 @@
+<% text_color = @line.text_color.blank? ? "black" : "##{@line.text_color}" %>
+<% bg_color = @line.color.blank? ? "white" : "#"+@line.color %>
+
<%= title_tag t('lines.show.title', :line => @line.name ) %>
<div class="line_show">
<%= @map.to_html %>
<div class="summary">
+<% text_color = @line.text_color.blank? ? "black" : "##{@line.text_color}" %>
+<% bg_color = @line.color.blank? ? "white" : "#"+@line.color %>
+ <% if colors?(@line) %>
+ <p>
+ <label><%= t('lines.index.color') %>: </label>
+ <label class="color" style='<%="color: #{text_color(@line)}; background-color: #{background_color(@line)};"%>'><%= line_sticker(@line) %></label>
+ </p>
+ <% end %>
<p>
<label><%= @line.human_attribute_name(:network) %>: </label>
<% if @line.network.nil? %>
@@ -21,6 +32,10 @@
<% end %>
</p>
<p>
+ <label><%= @line.human_attribute_name("number") %>: </label>
+ <%= @line.number %>
+ </p>
+ <p>
<label><%= @line.human_attribute_name("published_name") %>: </label>
<%= @line.published_name %>
</p>
@@ -29,13 +44,13 @@
<%= @line.registration_number %>
</p>
<p>
- <label><%= @line.human_attribute_name("number") %>: </label>
- <%= @line.number %>
- </p>
- <p>
<label><%= @line.human_attribute_name("transport_mode") %>: </label>
<%= t("transport_modes.label.#{@line.transport_mode}") %>
</p>
+ <p>
+ <label><%= @line.human_attribute_name("url") %>: </label>
+ <%= @line.url %>
+ </p>
<p>
<label><%= @line.human_attribute_name("mobility_restricted_suitability") %> : </label>
diff --git a/app/views/stop_areas/_form.html.erb b/app/views/stop_areas/_form.html.erb
index d108ef193..9fd549e18 100644
--- a/app/views/stop_areas/_form.html.erb
+++ b/app/views/stop_areas/_form.html.erb
@@ -35,6 +35,8 @@
<%= form.input :fare_code, :as => :number %>
<%= form.input :nearest_topic_name %>
<%= form.input :comment, :as => :text, :input_html => { :rows => 5 } %>
+ <%= form.input :time_zone, :include_blank => true %>
+ <%= form.input :url %>
<% end %>
</div>
<div class="pmr_info">
diff --git a/app/views/stop_areas/show.html.erb b/app/views/stop_areas/show.html.erb
index 3a6d88207..7ca59cf70 100644
--- a/app/views/stop_areas/show.html.erb
+++ b/app/views/stop_areas/show.html.erb
@@ -34,6 +34,14 @@
<%= @stop_area.fare_code %>
</p>
<p>
+ <label><%= @stop_area.human_attribute_name("time_zone") %>: </label>
+ <%= @stop_area.time_zone %>
+ </p>
+ <p>
+ <label><%= @stop_area.human_attribute_name("url") %>: </label>
+ <%= @stop_area.url %>
+ </p>
+ <p>
<label><%= @stop_area.human_attribute_name("registration_number") %>: </label>
<%= @stop_area.registration_number %>
</p>
diff --git a/config/deploy/unstable.rb b/config/deploy/unstable.rb
index 0c19b9fbc..d8d5d30bc 100644
--- a/config/deploy/unstable.rb
+++ b/config/deploy/unstable.rb
@@ -1,2 +1,2 @@
server "chouette-p.aix.cityway.fr", :app, :web, :db, :primary => true
-set :branch, "sismo"
+set :branch, "V2_5"
diff --git a/config/environment.rb b/config/environment.rb
index cc2b4fa95..cc5593ce1 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -6,4 +6,4 @@ require File.expand_path('../application', __FILE__)
ChouetteIhm::Application.initialize!
# Fix version
-APP_VERSION = '2.5.0'
+APP_VERSION = '2.5.1'
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/companies.yml b/config/locales/companies.yml
index aad451fc8..a9b2512a2 100644
--- a/config/locales/companies.yml
+++ b/config/locales/companies.yml
@@ -32,6 +32,8 @@ en:
phone: "Phone number"
fax: "Fax number"
email: "Email"
+ time_zone: "Time zone"
+ url: "Web page"
objectid: "Neptune identifier"
object_version: "Version"
creation_time: "Created on"
@@ -76,6 +78,8 @@ fr:
phone: "Numéro de téléphone"
fax: "Numéro de fax"
email: "Email"
+ time_zone: "Fuseau horaire"
+ url: "Page web associée"
objectid: "Identifiant Neptune"
object_version: "Version"
creation_time: "Créé le"
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/config/locales/lines.yml b/config/locales/lines.yml
index 93f50b6bb..98d93bcd2 100644
--- a/config/locales/lines.yml
+++ b/config/locales/lines.yml
@@ -37,6 +37,7 @@ en:
deselect_all: "Deselect all"
unset: "undefined"
advanced_search: "Advanced Search"
+ color: "Colors"
form:
group_of_lines: "Associated groups of lines"
no_group_of_line: "No group of line"
@@ -56,6 +57,9 @@ en:
published_name: "Published name"
number: "Number"
transport_mode: "Transport mode"
+ url: "Web page"
+ color: "Line color"
+ text_color: "Text color"
mobility_restricted_suitability: "PRM accessibility"
flexible_service: "On demond transportation"
unspecified_mrs: "Not specified"
@@ -123,6 +127,7 @@ fr:
deselect_all: "Tout désélectionner"
unset: "non défini"
advanced_search: "Recherche avancée"
+ color: "Couleurs"
form:
group_of_lines: "Groupes de lignes associés"
no_group_of_line: "Aucun groupe de lignes"
@@ -142,6 +147,9 @@ fr:
published_name: "Nom public"
number: "Indice"
transport_mode: "Mode de transport"
+ url: "Page web associée"
+ color: "Couleur du tracé"
+ text_color: "Couleur du texte"
mobility_restricted_suitability: "Accessibilité PMR"
flexible_service: "Transport à la demande"
unspecified_mrs: "Non spécifié"
diff --git a/config/locales/stop_areas.yml b/config/locales/stop_areas.yml
index 80f05d57c..379838f6e 100644
--- a/config/locales/stop_areas.yml
+++ b/config/locales/stop_areas.yml
@@ -93,6 +93,8 @@ en:
long_lat_type: "Projection type"
longitude: "Longitude"
latitude: "Latitude"
+ time_zone: "Time zone"
+ url: "Web page"
objectid: "Neptune identifier"
object_version: "Version"
creation_time: "Created on"
@@ -209,6 +211,8 @@ fr:
long_lat_type: "Projection"
longitude: "Longitude"
latitude: "Latitude"
+ time_zone: "Fuseau horaire"
+ url: "Page web associée"
objectid: "Identifiant Neptune"
object_version: "Version"
creation_time: "Créé le"
diff --git a/db/migrate/20141105123536_add_gtfs_fields_to_companies.ninoxe_engine.rb b/db/migrate/20141105123536_add_gtfs_fields_to_companies.ninoxe_engine.rb
new file mode 100644
index 000000000..67ad43660
--- /dev/null
+++ b/db/migrate/20141105123536_add_gtfs_fields_to_companies.ninoxe_engine.rb
@@ -0,0 +1,9 @@
+# This migration comes from ninoxe_engine (originally 20141017075349)
+class AddGtfsFieldsToCompanies < ActiveRecord::Migration
+ def change
+ change_table :companies do |t|
+ t.string :url
+ t.string :time_zone
+ end
+ end
+end
diff --git a/db/migrate/20141105123537_add_gtfs_fields_to_stop_areas.ninoxe_engine.rb b/db/migrate/20141105123537_add_gtfs_fields_to_stop_areas.ninoxe_engine.rb
new file mode 100644
index 000000000..e7ea5f4d6
--- /dev/null
+++ b/db/migrate/20141105123537_add_gtfs_fields_to_stop_areas.ninoxe_engine.rb
@@ -0,0 +1,9 @@
+# This migration comes from ninoxe_engine (originally 20141017075515)
+class AddGtfsFieldsToStopAreas < ActiveRecord::Migration
+ def change
+ change_table :stop_areas do |t|
+ t.string :url
+ t.string :time_zone
+ end
+ end
+end
diff --git a/db/migrate/20141105123538_add_gtfs_fields_to_lines.ninoxe_engine.rb b/db/migrate/20141105123538_add_gtfs_fields_to_lines.ninoxe_engine.rb
new file mode 100644
index 000000000..ca960df76
--- /dev/null
+++ b/db/migrate/20141105123538_add_gtfs_fields_to_lines.ninoxe_engine.rb
@@ -0,0 +1,10 @@
+# This migration comes from ninoxe_engine (originally 20141017075627)
+class AddGtfsFieldsToLines < ActiveRecord::Migration
+ def change
+ change_table :lines do |t|
+ t.string :url
+ t.string :color, :limit => 6
+ t.string :text_color, :limit => 6
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 6c45bd44a..89cbf7d87 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20140820074844) do
+ActiveRecord::Schema.define(:version => 20141105123538) do
create_table "access_links", :force => true do |t|
t.integer "access_point_id", :limit => 8
@@ -85,6 +85,8 @@ ActiveRecord::Schema.define(:version => 20140820074844) do
t.string "fax"
t.string "email"
t.string "registration_number"
+ t.string "url"
+ t.string "time_zone"
end
add_index "companies", ["objectid"], :name => "companies_objectid_key", :unique => true
@@ -282,6 +284,9 @@ ActiveRecord::Schema.define(:version => 20140820074844) do
t.boolean "mobility_restricted_suitability"
t.integer "int_user_needs"
t.boolean "flexible_service"
+ t.string "url"
+ t.string "color", :limit => 6
+ t.string "text_color", :limit => 6
end
add_index "lines", ["objectid"], :name => "lines_objectid_key", :unique => true
@@ -394,6 +399,8 @@ ActiveRecord::Schema.define(:version => 20140820074844) do
t.integer "int_user_needs"
t.string "zip_code"
t.string "city_name"
+ t.string "url"
+ t.string "time_zone"
end
add_index "stop_areas", ["objectid"], :name => "stop_areas_objectid_key", :unique => true
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