diff options
| author | jpl | 2017-04-26 16:20:57 +0200 |
|---|---|---|
| committer | Xinhui | 2017-04-28 14:48:23 +0200 |
| commit | 24384f902012bb82519c5011520021af0e9ae8e3 (patch) | |
| tree | 7ab041a0f2fd28134dd10be4419d49a71c12dfc9 | |
| parent | 21ce70e31bd1904a621552234e95ce00779702f4 (diff) | |
| download | chouette-core-24384f902012bb82519c5011520021af0e9ae8e3.tar.bz2 | |
more information into output of rake referential:create
| -rw-r--r-- | lib/tasks/referential.rake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tasks/referential.rake b/lib/tasks/referential.rake index 9d98a048b..c89cd3f7a 100644 --- a/lib/tasks/referential.rake +++ b/lib/tasks/referential.rake @@ -15,7 +15,9 @@ namespace :referential do ReferentialMetadata.create!(referential: referential, line_ids: [args[:line_id]], periodes: [Date.parse(args[:start_date])..Date.parse(args[:end_date])]) referential.switch - puts "✓ Created Referential '#{name}' (#{referential.id})" + + print "✓ Created Referential ".green, name, "(#{referential.id})".blue, " switched to schema: ", referential.slug.yellow, "\n" + puts " For inspection of data in the console, do a: `Referential.last.switch'".blueish stop_areas = workbench.stop_area_referential.stop_areas.last(10) @@ -32,6 +34,7 @@ namespace :referential do route.stop_areas = stop_areas.reverse end route.save! + print " ✓ Created Route ".green, route.name, "(#{route.id}), ".blue, "Line (#{line.id}) has #{line.routes.count} routes\n" journey_pattern = Chouette::JourneyPattern.create!(route: route, name: "Journey Pattern #{Faker::Name.unique.name}") journey_pattern.stop_points = stop_areas.inject([]) { |stop_points, stop_area| stop_points += stop_area.stop_points } |
