diff options
| -rw-r--r-- | app/assets/stylesheets/components/_calendar.sass | 2 | ||||
| -rw-r--r-- | app/assets/stylesheets/modules/_timetables.sass | 2 | ||||
| -rw-r--r-- | app/views/time_tables/edit.html.slim | 2 | ||||
| -rw-r--r-- | db/schema.rb | 482 | ||||
| -rw-r--r-- | spec/features/time_tables_spec.rb | 20 | ||||
| -rw-r--r-- | spec/views/time_tables/edit.html.erb_spec.rb | 10 |
6 files changed, 252 insertions, 266 deletions
diff --git a/app/assets/stylesheets/components/_calendar.sass b/app/assets/stylesheets/components/_calendar.sass index 64f2eda77..c3d93d325 100644 --- a/app/assets/stylesheets/components/_calendar.sass +++ b/app/assets/stylesheets/components/_calendar.sass @@ -44,7 +44,7 @@ table.calendar height: 24px line-height: 24px color: $darkgrey - background-color: $gold + background-color: rgba($gold, 0.75) border-radius: 50% &:hover, &:focus diff --git a/app/assets/stylesheets/modules/_timetables.sass b/app/assets/stylesheets/modules/_timetables.sass index 4d05e0966..27188060f 100644 --- a/app/assets/stylesheets/modules/_timetables.sass +++ b/app/assets/stylesheets/modules/_timetables.sass @@ -74,7 +74,7 @@ background-color: transparent &.included - background-color: rgba($gold, 0.5) + background-color: rgba($gold, 0.75) > .td-group width: 40px diff --git a/app/views/time_tables/edit.html.slim b/app/views/time_tables/edit.html.slim index f66f3b4b8..7f4cd18df 100644 --- a/app/views/time_tables/edit.html.slim +++ b/app/views/time_tables/edit.html.slim @@ -10,5 +10,3 @@ #periods = javascript_include_tag 'es6_browserified/time_tables/index.js' - -== render 'form' diff --git a/db/schema.rb b/db/schema.rb index 9c1379002..161f0a839 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -21,12 +21,12 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "access_links", id: :bigserial, force: :cascade do |t| t.integer "access_point_id", limit: 8 t.integer "stop_area_id", limit: 8 - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.string "comment" - t.decimal "link_distance", precision: 19, scale: 2 + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "comment", limit: 255 + t.decimal "link_distance", precision: 19, scale: 2 t.boolean "lift_availability" t.boolean "mobility_restricted_suitability" t.boolean "stairs_availability" @@ -34,9 +34,9 @@ ActiveRecord::Schema.define(version: 20170414080922) do t.time "frequent_traveller_duration" t.time "occasional_traveller_duration" t.time "mobility_restricted_traveller_duration" - t.string "link_type" + t.string "link_type", limit: 255 t.integer "int_user_needs" - t.string "link_orientation" + t.string "link_orientation", limit: 255 t.datetime "created_at" t.datetime "updated_at" end @@ -44,26 +44,26 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "access_links", ["objectid"], name: "access_links_objectid_key", unique: true, using: :btree create_table "access_points", id: :bigserial, force: :cascade do |t| - t.string "objectid" + t.string "objectid", limit: 255 t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.string "comment" - t.decimal "longitude", precision: 19, scale: 16 - t.decimal "latitude", precision: 19, scale: 16 - t.string "long_lat_type" - t.string "country_code" - t.string "street_name" - t.string "contained_in" + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "comment", limit: 255 + t.decimal "longitude", precision: 19, scale: 16 + t.decimal "latitude", precision: 19, scale: 16 + t.string "long_lat_type", limit: 255 + t.string "country_code", limit: 255 + t.string "street_name", limit: 255 + t.string "contained_in", limit: 255 t.time "openning_time" t.time "closing_time" - t.string "access_type" + t.string "access_type", limit: 255 t.boolean "lift_availability" t.boolean "mobility_restricted_suitability" t.boolean "stairs_availability" t.integer "stop_area_id", limit: 8 - t.string "zip_code" - t.string "city_name" + t.string "zip_code", limit: 255 + t.string "city_name", limit: 255 t.text "import_xml" t.datetime "created_at" t.datetime "updated_at" @@ -73,18 +73,18 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "api_keys", id: :bigserial, force: :cascade do |t| t.integer "referential_id", limit: 8 - t.string "token" - t.string "name" + t.string "token", limit: 255 + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" end create_table "calendars", id: :bigserial, force: :cascade do |t| - t.string "name" - t.string "short_name" - t.daterange "date_ranges", array: true - t.date "dates", array: true - t.boolean "shared", default: false + t.string "name", limit: 255 + t.string "short_name", limit: 255 + t.daterange "date_ranges", array: true + t.date "dates", array: true + t.boolean "shared", default: false t.integer "organisation_id", limit: 8 t.datetime "created_at" t.datetime "updated_at" @@ -94,7 +94,7 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "calendars", ["short_name"], name: "index_calendars_on_short_name", unique: true, using: :btree create_table "clean_up_results", id: :bigserial, force: :cascade do |t| - t.string "message_key" + t.string "message_key", limit: 255 t.hstore "message_attributs" t.integer "clean_up_id", limit: 8 t.datetime "created_at" @@ -104,7 +104,7 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "clean_up_results", ["clean_up_id"], name: "index_clean_up_results_on_clean_up_id", using: :btree create_table "clean_ups", id: :bigserial, force: :cascade do |t| - t.string "status" + t.string "status", limit: 255 t.datetime "started_at" t.datetime "ended_at" t.integer "referential_id", limit: 8 @@ -117,20 +117,20 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "clean_ups", ["referential_id"], name: "index_clean_ups_on_referential_id", using: :btree create_table "companies", id: :bigserial, force: :cascade do |t| - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.string "short_name" - t.string "organizational_unit" - t.string "operating_department_name" - t.string "code" - t.string "phone" - t.string "fax" - t.string "email" - t.string "registration_number" - t.string "url" - t.string "time_zone" + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "short_name", limit: 255 + t.string "organizational_unit", limit: 255 + t.string "operating_department_name", limit: 255 + t.string "code", limit: 255 + t.string "phone", limit: 255 + t.string "fax", limit: 255 + t.string "email", limit: 255 + t.string "registration_number", limit: 255 + t.string "url", limit: 255 + t.string "time_zone", limit: 255 t.integer "line_referential_id", limit: 8 t.text "import_xml" t.datetime "created_at" @@ -144,13 +144,13 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "connection_links", id: :bigserial, force: :cascade do |t| t.integer "departure_id", limit: 8 t.integer "arrival_id", limit: 8 - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.string "comment" - t.decimal "link_distance", precision: 19, scale: 2 - t.string "link_type" + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "comment", limit: 255 + t.decimal "link_distance", precision: 19, scale: 2 + t.string "link_type", limit: 255 t.time "default_duration" t.time "frequent_traveller_duration" t.time "occasional_traveller_duration" @@ -165,15 +165,31 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "connection_links", ["objectid"], name: "connection_links_objectid_key", unique: true, using: :btree + create_table "delayed_jobs", id: :bigserial, force: :cascade do |t| + t.integer "priority", default: 0 + t.integer "attempts", default: 0 + t.text "handler" + t.text "last_error" + t.datetime "run_at" + t.datetime "locked_at" + t.datetime "failed_at" + t.string "locked_by", limit: 255 + t.string "queue", limit: 255 + t.datetime "created_at" + t.datetime "updated_at" + end + + add_index "delayed_jobs", ["priority", "run_at"], name: "delayed_jobs_priority", using: :btree + create_table "exports", id: :bigserial, force: :cascade do |t| t.integer "referential_id", limit: 8 - t.string "status" - t.string "type" - t.string "options" + t.string "status", limit: 255 + t.string "type", limit: 255 + t.string "options", limit: 255 t.datetime "created_at" t.datetime "updated_at" - t.string "references_type" - t.string "reference_ids" + t.string "references_type", limit: 255 + t.string "reference_ids", limit: 255 end add_index "exports", ["referential_id"], name: "index_exports_on_referential_id", using: :btree @@ -183,23 +199,23 @@ ActiveRecord::Schema.define(version: 20170414080922) do t.integer "line_id", limit: 8 t.integer "connection_link_id", limit: 8 t.integer "stop_point_id", limit: 8 - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 t.datetime "creation_time" - t.string "creator_id" - t.string "name" - t.string "comment" - t.string "description" + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "comment", limit: 255 + t.string "description", limit: 255 t.boolean "free_access" - t.decimal "longitude", precision: 19, scale: 16 - t.decimal "latitude", precision: 19, scale: 16 - t.string "long_lat_type" - t.decimal "x", precision: 19, scale: 2 - t.decimal "y", precision: 19, scale: 2 - t.string "projection_type" - t.string "country_code" - t.string "street_name" - t.string "contained_in" + t.decimal "longitude", precision: 19, scale: 16 + t.decimal "latitude", precision: 19, scale: 16 + t.string "long_lat_type", limit: 255 + t.decimal "x", precision: 19, scale: 2 + t.decimal "y", precision: 19, scale: 2 + t.string "projection_type", limit: 255 + t.string "country_code", limit: 255 + t.string "street_name", limit: 255 + t.string "contained_in", limit: 255 end add_index "facilities", ["objectid"], name: "facilities_objectid_key", unique: true, using: :btree @@ -211,8 +227,8 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "footnotes", id: :bigserial, force: :cascade do |t| t.integer "line_id", limit: 8 - t.string "code" - t.string "label" + t.string "code", limit: 255 + t.string "label", limit: 255 t.datetime "created_at" t.datetime "updated_at" end @@ -223,12 +239,12 @@ ActiveRecord::Schema.define(version: 20170414080922) do end create_table "group_of_lines", id: :bigserial, force: :cascade do |t| - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.string "comment" - t.string "registration_number" + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "comment", limit: 255 + t.string "registration_number", limit: 255 t.integer "line_referential_id", limit: 8 t.text "import_xml" t.datetime "created_at" @@ -245,7 +261,7 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "import_messages", id: :bigserial, force: :cascade do |t| t.integer "criticity" - t.string "message_key" + t.string "message_key", limit: 255 t.hstore "message_attributs" t.integer "import_id", limit: 8 t.integer "resource_id", limit: 8 @@ -259,31 +275,31 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "import_resources", id: :bigserial, force: :cascade do |t| t.integer "import_id", limit: 8 - t.string "status" + t.string "status", limit: 255 t.datetime "created_at" t.datetime "updated_at" - t.string "type" - t.string "reference" - t.string "name" + t.string "type", limit: 255 + t.string "reference", limit: 255 + t.string "name", limit: 255 t.hstore "metrics" end add_index "import_resources", ["import_id"], name: "index_import_resources_on_import_id", using: :btree create_table "imports", id: :bigserial, force: :cascade do |t| - t.string "status" - t.string "current_step_id" + t.string "status", limit: 255 + t.string "current_step_id", limit: 255 t.float "current_step_progress" t.integer "workbench_id", limit: 8 t.integer "referential_id", limit: 8 - t.string "name" + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" - t.string "file" + t.string "file", limit: 255 t.datetime "started_at" t.datetime "ended_at" - t.string "token_download" - t.string "type" + t.string "token_download", limit: 255 + t.string "type", limit: 255 end add_index "imports", ["referential_id"], name: "index_imports_on_referential_id", using: :btree @@ -317,16 +333,16 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "journey_patterns", id: :bigserial, force: :cascade do |t| t.integer "route_id", limit: 8 - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.string "comment" - t.string "registration_number" - t.string "published_name" + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "comment", limit: 255 + t.string "registration_number", limit: 255 + t.string "published_name", limit: 255 t.integer "departure_stop_point_id", limit: 8 t.integer "arrival_stop_point_id", limit: 8 - t.integer "section_status", default: 0, null: false + t.integer "section_status", default: 0, null: false t.datetime "created_at" t.datetime "updated_at" end @@ -348,7 +364,7 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "line_referential_sync_messages", id: :bigserial, force: :cascade do |t| t.integer "criticity" - t.string "message_key" + t.string "message_key", limit: 255 t.hstore "message_attributs" t.integer "line_referential_sync_id", limit: 8 t.datetime "created_at" @@ -363,42 +379,42 @@ ActiveRecord::Schema.define(version: 20170414080922) do t.datetime "updated_at" t.datetime "started_at" t.datetime "ended_at" - t.string "status" + t.string "status", limit: 255 end add_index "line_referential_syncs", ["line_referential_id"], name: "index_line_referential_syncs_on_line_referential_id", using: :btree create_table "line_referentials", id: :bigserial, force: :cascade do |t| - t.string "name" + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" - t.integer "sync_interval", default: 1 + t.integer "sync_interval", default: 1 end create_table "lines", id: :bigserial, force: :cascade do |t| t.integer "network_id", limit: 8 t.integer "company_id", limit: 8 - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.string "number" - t.string "published_name" - t.string "transport_mode" - t.string "registration_number" - t.string "comment" + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "number", limit: 255 + t.string "published_name", limit: 255 + t.string "transport_mode", limit: 255 + t.string "registration_number", limit: 255 + t.string "comment", limit: 255 t.boolean "mobility_restricted_suitability" t.integer "int_user_needs" t.boolean "flexible_service" - t.string "url" + t.string "url", limit: 255 t.string "color", limit: 6 t.string "text_color", limit: 6 - t.string "stable_id" + t.string "stable_id", limit: 255 t.integer "line_referential_id", limit: 8 - t.boolean "deactivated", default: false + t.boolean "deactivated", default: false t.text "import_xml" - t.string "transport_submode" - t.integer "secondary_company_ids", limit: 8, array: true + t.string "transport_submode", limit: 255 + t.integer "secondary_company_ids", limit: 8, array: true t.datetime "created_at" t.datetime "updated_at" end @@ -409,17 +425,17 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "lines", ["secondary_company_ids"], name: "index_lines_on_secondary_company_ids", using: :gin create_table "networks", id: :bigserial, force: :cascade do |t| - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" + t.string "creator_id", limit: 255 t.date "version_date" - t.string "description" - t.string "name" - t.string "registration_number" - t.string "source_name" - t.string "source_type" - t.string "source_identifier" - t.string "comment" + t.string "description", limit: 255 + t.string "name", limit: 255 + t.string "registration_number", limit: 255 + t.string "source_name", limit: 255 + t.string "source_type", limit: 255 + t.string "source_identifier", limit: 255 + t.string "comment", limit: 255 t.text "import_xml" t.integer "line_referential_id", limit: 8 t.datetime "created_at" @@ -431,11 +447,11 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "networks", ["registration_number"], name: "networks_registration_number_key", using: :btree create_table "organisations", id: :bigserial, force: :cascade do |t| - t.string "name" + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" - t.string "data_format", default: "neptune" - t.string "code" + t.string "data_format", limit: 255, default: "neptune" + t.string "code", limit: 255 t.datetime "synced_at" t.hstore "sso_attributes" end @@ -446,12 +462,12 @@ ActiveRecord::Schema.define(version: 20170414080922) do t.integer "start_of_link_id", limit: 8 t.integer "end_of_link_id", limit: 8 t.integer "route_id", limit: 8 - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.string "comment" - t.decimal "link_distance", precision: 19, scale: 2 + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "comment", limit: 255 + t.decimal "link_distance", precision: 19, scale: 2 t.datetime "created_at" t.datetime "updated_at" end @@ -459,7 +475,7 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "pt_links", ["objectid"], name: "pt_links_objectid_key", unique: true, using: :btree create_table "referential_clonings", id: :bigserial, force: :cascade do |t| - t.string "status" + t.string "status", limit: 255 t.datetime "started_at" t.datetime "ended_at" t.integer "source_referential_id", limit: 8 @@ -480,30 +496,30 @@ ActiveRecord::Schema.define(version: 20170414080922) do t.daterange "periodes", array: true end - add_index "referential_metadata", ["line_ids"], name: "index_referential_metadata_on_line_ids", using: :gin + add_index "referential_metadata", ["line_ids"], name: "index_referential_metadata_on_line_ids", using: :btree add_index "referential_metadata", ["referential_id"], name: "index_referential_metadata_on_referential_id", using: :btree add_index "referential_metadata", ["referential_source_id"], name: "index_referential_metadata_on_referential_source_id", using: :btree create_table "referentials", id: :bigserial, force: :cascade do |t| - t.string "name" - t.string "slug" + t.string "name", limit: 255 + t.string "slug", limit: 255 t.datetime "created_at" t.datetime "updated_at" - t.string "prefix" - t.string "projection_type" - t.string "time_zone" - t.string "bounds" + t.string "prefix", limit: 255 + t.string "projection_type", limit: 255 + t.string "time_zone", limit: 255 + t.string "bounds", limit: 255 t.integer "organisation_id", limit: 8 t.text "geographical_bounds" t.integer "user_id", limit: 8 - t.string "user_name" - t.string "data_format" + t.string "user_name", limit: 255 + t.string "data_format", limit: 255 t.integer "line_referential_id", limit: 8 t.integer "stop_area_referential_id", limit: 8 t.integer "workbench_id", limit: 8 t.datetime "archived_at" t.integer "created_from_id", limit: 8 - t.boolean "ready", default: false + t.boolean "ready", default: false end add_index "referentials", ["created_from_id"], name: "index_referentials_on_created_from_id", using: :btree @@ -511,29 +527,29 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "route_sections", id: :bigserial, force: :cascade do |t| t.integer "departure_id", limit: 8 t.integer "arrival_id", limit: 8 - t.geometry "input_geometry", limit: {:srid=>4326, :type=>"line_string"} - t.geometry "processed_geometry", limit: {:srid=>4326, :type=>"line_string"} - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" + t.string "creator_id", limit: 255 t.float "distance" t.boolean "no_processing" + t.geometry "input_geometry", limit: {:srid=>4326, :type=>"line_string"} + t.geometry "processed_geometry", limit: {:srid=>4326, :type=>"line_string"} t.datetime "created_at" t.datetime "updated_at" end create_table "routes", id: :bigserial, force: :cascade do |t| t.integer "line_id", limit: 8 - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.string "comment" + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "comment", limit: 255 t.integer "opposite_route_id", limit: 8 - t.string "published_name" - t.string "number" - t.string "direction" - t.string "wayback" + t.string "published_name", limit: 255 + t.string "number", limit: 255 + t.string "direction", limit: 255 + t.string "wayback", limit: 255 t.datetime "created_at" t.datetime "updated_at" end @@ -541,14 +557,14 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "routes", ["objectid"], name: "routes_objectid_key", unique: true, using: :btree create_table "routing_constraint_zones", id: :bigserial, force: :cascade do |t| - t.string "name" + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" + t.string "creator_id", limit: 255 t.integer "route_id", limit: 8 - t.integer "stop_point_ids", limit: 8, array: true + t.integer "stop_point_ids", limit: 8, array: true end create_table "routing_constraints_lines", id: false, force: :cascade do |t| @@ -558,7 +574,7 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "rule_parameter_sets", id: :bigserial, force: :cascade do |t| t.text "parameters" - t.string "name" + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" t.integer "organisation_id", limit: 8 @@ -572,7 +588,7 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "stop_area_referential_sync_messages", id: :bigserial, force: :cascade do |t| t.integer "criticity" - t.string "message_key" + t.string "message_key", limit: 255 t.hstore "message_attributs" t.integer "stop_area_referential_sync_id", limit: 8 t.datetime "created_at" @@ -587,48 +603,48 @@ ActiveRecord::Schema.define(version: 20170414080922) do t.datetime "updated_at" t.datetime "ended_at" t.datetime "started_at" - t.string "status" + t.string "status", limit: 255 end add_index "stop_area_referential_syncs", ["stop_area_referential_id"], name: "index_stop_area_referential_syncs_on_stop_area_referential_id", using: :btree create_table "stop_area_referentials", id: :bigserial, force: :cascade do |t| - t.string "name" + t.string "name", limit: 255 t.datetime "created_at" t.datetime "updated_at" end create_table "stop_areas", id: :bigserial, force: :cascade do |t| t.integer "parent_id", limit: 8 - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.string "comment" - t.string "area_type" - t.string "registration_number" - t.string "nearest_topic_name" + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.string "comment", limit: 255 + t.string "area_type", limit: 255 + t.string "registration_number", limit: 255 + t.string "nearest_topic_name", limit: 255 t.integer "fare_code" - t.decimal "longitude", precision: 19, scale: 16 - t.decimal "latitude", precision: 19, scale: 16 - t.string "long_lat_type" - t.string "country_code" - t.string "street_name" + t.decimal "longitude", precision: 19, scale: 16 + t.decimal "latitude", precision: 19, scale: 16 + t.string "long_lat_type", limit: 255 + t.string "country_code", limit: 255 + t.string "street_name", limit: 255 t.boolean "mobility_restricted_suitability" t.boolean "stairs_availability" t.boolean "lift_availability" t.integer "int_user_needs" - t.string "zip_code" - t.string "city_name" - t.string "url" - t.string "time_zone" + t.string "zip_code", limit: 255 + t.string "city_name", limit: 255 + t.string "url", limit: 255 + t.string "time_zone", limit: 255 t.integer "stop_area_referential_id", limit: 8 - t.string "status" + t.string "status", limit: 255 t.text "import_xml" t.datetime "deleted_at" t.datetime "created_at" t.datetime "updated_at" - t.string "stif_type" + t.string "stif_type", limit: 255 end add_index "stop_areas", ["name"], name: "index_stop_areas_on_name", using: :btree @@ -644,12 +660,12 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "stop_points", id: :bigserial, force: :cascade do |t| t.integer "route_id", limit: 8 t.integer "stop_area_id", limit: 8 - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" + t.string "creator_id", limit: 255 t.integer "position" - t.string "for_boarding" - t.string "for_alighting" + t.string "for_boarding", limit: 255 + t.string "for_alighting", limit: 255 t.datetime "created_at" t.datetime "updated_at" end @@ -659,9 +675,9 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "taggings", id: :bigserial, force: :cascade do |t| t.integer "tag_id", limit: 8 t.integer "taggable_id", limit: 8 - t.string "taggable_type" + t.string "taggable_type", limit: 255 t.integer "tagger_id", limit: 8 - t.string "tagger_type" + t.string "tagger_type", limit: 255 t.string "context", limit: 128 t.datetime "created_at" end @@ -670,8 +686,8 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree create_table "tags", id: :bigserial, force: :cascade do |t| - t.string "name" - t.integer "taggings_count", default: 0 + t.string "name", limit: 255 + t.integer "taggings_count", default: 0 end add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree @@ -695,18 +711,18 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "time_table_periods", ["time_table_id"], name: "index_time_table_periods_on_time_table_id", using: :btree create_table "time_tables", id: :bigserial, force: :cascade do |t| - t.string "objectid", null: false - t.integer "object_version", limit: 8, default: 1 - t.string "creator_id" - t.string "version" - t.string "comment" - t.integer "int_day_types", default: 0 + t.string "objectid", limit: 255, null: false + t.integer "object_version", limit: 8, default: 1 + t.string "creator_id", limit: 255 + t.string "version", limit: 255 + t.string "comment", limit: 255 + t.integer "int_day_types", default: 0 t.date "start_date" t.date "end_date" t.integer "calendar_id", limit: 8 t.datetime "created_at" t.datetime "updated_at" - t.string "color" + t.string "color", limit: 255 end add_index "time_tables", ["calendar_id"], name: "index_time_tables_on_calendar_id", using: :btree @@ -721,49 +737,49 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "time_tables_vehicle_journeys", ["vehicle_journey_id"], name: "index_time_tables_vehicle_journeys_on_vehicle_journey_id", using: :btree create_table "timebands", id: :bigserial, force: :cascade do |t| - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "name" - t.time "start_time", null: false - t.time "end_time", null: false + t.string "creator_id", limit: 255 + t.string "name", limit: 255 + t.time "start_time", null: false + t.time "end_time", null: false t.datetime "created_at" t.datetime "updated_at" end create_table "users", id: :bigserial, force: :cascade do |t| - t.string "email", default: "", null: false - t.string "encrypted_password", default: "" - t.string "reset_password_token" + t.string "email", limit: 255, default: "", null: false + t.string "encrypted_password", limit: 255, default: "" + t.string "reset_password_token", limit: 255 t.datetime "reset_password_sent_at" t.datetime "remember_created_at" - t.integer "sign_in_count", default: 0 + t.integer "sign_in_count", default: 0 t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" - t.string "current_sign_in_ip" - t.string "last_sign_in_ip" + t.string "current_sign_in_ip", limit: 255 + t.string "last_sign_in_ip", limit: 255 t.datetime "created_at" t.datetime "updated_at" t.integer "organisation_id", limit: 8 - t.string "name" - t.string "confirmation_token" + t.string "name", limit: 255 + t.string "confirmation_token", limit: 255 t.datetime "confirmed_at" t.datetime "confirmation_sent_at" - t.string "unconfirmed_email" - t.integer "failed_attempts", default: 0 - t.string "unlock_token" + t.string "unconfirmed_email", limit: 255 + t.integer "failed_attempts", default: 0 + t.string "unlock_token", limit: 255 t.datetime "locked_at" - t.string "authentication_token" - t.string "invitation_token" + t.string "authentication_token", limit: 255 + t.string "invitation_token", limit: 255 t.datetime "invitation_sent_at" t.datetime "invitation_accepted_at" t.integer "invitation_limit" t.integer "invited_by_id", limit: 8 - t.string "invited_by_type" + t.string "invited_by_type", limit: 255 t.datetime "invitation_created_at" - t.string "username" + t.string "username", limit: 255 t.datetime "synced_at" - t.string "permissions", array: true + t.string "permissions", limit: 255, array: true end add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree @@ -774,12 +790,12 @@ ActiveRecord::Schema.define(version: 20170414080922) do create_table "vehicle_journey_at_stops", id: :bigserial, force: :cascade do |t| t.integer "vehicle_journey_id", limit: 8 t.integer "stop_point_id", limit: 8 - t.string "connecting_service_id" - t.string "boarding_alighting_possibility" + t.string "connecting_service_id", limit: 255 + t.string "boarding_alighting_possibility", limit: 255 t.time "arrival_time" t.time "departure_time" - t.string "for_boarding" - t.string "for_alighting" + t.string "for_boarding", limit: 255 + t.string "for_alighting", limit: 255 t.integer "departure_day_offset" t.integer "arrival_day_offset" end @@ -791,20 +807,20 @@ ActiveRecord::Schema.define(version: 20170414080922) do t.integer "route_id", limit: 8 t.integer "journey_pattern_id", limit: 8 t.integer "company_id", limit: 8 - t.string "objectid", null: false + t.string "objectid", limit: 255, null: false t.integer "object_version", limit: 8 - t.string "creator_id" - t.string "comment" - t.string "status_value" - t.string "transport_mode" - t.string "published_journey_name" - t.string "published_journey_identifier" - t.string "facility" - t.string "vehicle_type_identifier" + t.string "creator_id", limit: 255 + t.string "comment", limit: 255 + t.string "status_value", limit: 255 + t.string "transport_mode", limit: 255 + t.string "published_journey_name", limit: 255 + t.string "published_journey_identifier", limit: 255 + t.string "facility", limit: 255 + t.string "vehicle_type_identifier", limit: 255 t.integer "number", limit: 8 t.boolean "mobility_restricted_suitability" t.boolean "flexible_service" - t.integer "journey_category", default: 0, null: false + t.integer "journey_category", default: 0, null: false t.datetime "created_at" t.datetime "updated_at" end @@ -813,7 +829,7 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "vehicle_journeys", ["route_id"], name: "index_vehicle_journeys_on_route_id", using: :btree create_table "workbenches", id: :bigserial, force: :cascade do |t| - t.string "name" + t.string "name", limit: 255 t.integer "organisation_id", limit: 8 t.datetime "created_at" t.datetime "updated_at" @@ -825,20 +841,18 @@ ActiveRecord::Schema.define(version: 20170414080922) do add_index "workbenches", ["organisation_id"], name: "index_workbenches_on_organisation_id", using: :btree add_index "workbenches", ["stop_area_referential_id"], name: "index_workbenches_on_stop_area_referential_id", using: :btree - add_foreign_key "access_links", "access_points", name: "aclk_acpt_fkey" + add_foreign_key "access_links", "access_points", name: "aclk_acpt_fkey", on_delete: :cascade add_foreign_key "group_of_lines_lines", "group_of_lines", name: "groupofline_group_fkey", on_delete: :cascade - add_foreign_key "journey_frequencies", "timebands", on_delete: :nullify - add_foreign_key "journey_frequencies", "vehicle_journeys", on_delete: :nullify - add_foreign_key "journey_pattern_sections", "journey_patterns", on_delete: :cascade - add_foreign_key "journey_pattern_sections", "route_sections", on_delete: :cascade + add_foreign_key "journey_frequencies", "timebands", name: "journey_frequencies_timeband_id_fk", on_delete: :nullify + add_foreign_key "journey_frequencies", "vehicle_journeys", name: "journey_frequencies_vehicle_journey_id_fk", on_delete: :nullify + add_foreign_key "journey_pattern_sections", "journey_patterns", name: "journey_pattern_sections_journey_pattern_id_fk", on_delete: :cascade + add_foreign_key "journey_pattern_sections", "route_sections", name: "journey_pattern_sections_route_section_id_fk", on_delete: :cascade add_foreign_key "journey_patterns", "routes", name: "jp_route_fkey", on_delete: :cascade add_foreign_key "journey_patterns", "stop_points", column: "arrival_stop_point_id", name: "arrival_point_fkey", on_delete: :nullify add_foreign_key "journey_patterns", "stop_points", column: "departure_stop_point_id", name: "departure_point_fkey", on_delete: :nullify add_foreign_key "journey_patterns_stop_points", "journey_patterns", name: "jpsp_jp_fkey", on_delete: :cascade add_foreign_key "journey_patterns_stop_points", "stop_points", name: "jpsp_stoppoint_fkey", on_delete: :cascade - add_foreign_key "route_sections", "stop_areas", column: "arrival_id" - add_foreign_key "route_sections", "stop_areas", column: "departure_id" - add_foreign_key "routes", "routes", column: "opposite_route_id", name: "route_opposite_route_fkey" + add_foreign_key "routes", "routes", column: "opposite_route_id", name: "route_opposite_route_fkey", on_delete: :nullify add_foreign_key "stop_areas", "stop_areas", column: "parent_id", name: "area_parent_fkey", on_delete: :nullify add_foreign_key "stop_areas_stop_areas", "stop_areas", column: "child_id", name: "stoparea_child_fkey", on_delete: :cascade add_foreign_key "stop_areas_stop_areas", "stop_areas", column: "parent_id", name: "stoparea_parent_fkey", on_delete: :cascade diff --git a/spec/features/time_tables_spec.rb b/spec/features/time_tables_spec.rb index 66da59fe9..06ae9bac3 100644 --- a/spec/features/time_tables_spec.rb +++ b/spec/features/time_tables_spec.rb @@ -120,24 +120,6 @@ describe "TimeTables", :type => :feature do end end - describe "new" do - it "creates time_table and return to show" do - visit referential_time_tables_path(referential) - click_link "Ajouter" - fill_in "Nom", :with => "TimeTable 1" - click_button("Valider") - expect(page).to have_content("TimeTable 1") - end - end - - describe "edit and return to show" do - it "edit time_table" do - visit referential_time_table_path(referential, subject) - click_link "Editer" - fill_in "Nom", :with => "TimeTable Modified" - click_button("Valider") - expect(page).to have_content("TimeTable Modified") - end - end + # No more test for the form, as it is now managed by React/Redux. end diff --git a/spec/views/time_tables/edit.html.erb_spec.rb b/spec/views/time_tables/edit.html.erb_spec.rb index 35d360042..c84c5eb74 100644 --- a/spec/views/time_tables/edit.html.erb_spec.rb +++ b/spec/views/time_tables/edit.html.erb_spec.rb @@ -11,13 +11,5 @@ describe "/time_tables/edit", :type => :view do end end - describe "form" do - it "should render input for comment" do - render - expect(rendered).to have_selector("form") do - with_tag "input[type=text][comment='time_table[comment]'][value=?]", time_table.comment - end - end - - end + # No more test for the form, as it is now managed by React/Redux. end |
