diff options
| author | Luc Donnet | 2017-10-24 12:40:04 +0200 |
|---|---|---|
| committer | Luc Donnet | 2017-10-24 12:40:04 +0200 |
| commit | 5e5d06c815ea0b67c4e970011470dd7ac4a42431 (patch) | |
| tree | 654bb5a8ab4468b447137b97b18ed78ea9409fb6 | |
| parent | d0668e45ec978e6b5f7f3f98ffe5ebabd9e701d6 (diff) | |
| download | chouette-core-5e5d06c815ea0b67c4e970011470dd7ac4a42431.tar.bz2 | |
Make erd patch for multi relationships and add merge png in output
| -rw-r--r-- | Gemfile.lock | 5 | ||||
| -rw-r--r-- | config/initializers/relationship.rb | 15 | ||||
| -rw-r--r-- | lib/tasks/erd.rake | 4 |
3 files changed, 20 insertions, 4 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index da7c4f3c1..3acc27613 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -256,7 +256,8 @@ GEM htmlbeautifier (1.3.1) httparty (0.14.0) multi_xml (>= 0.5.2) - i18n (0.8.6) + i18n (0.9.0) + concurrent-ruby (~> 1.0) i18n-tasks (0.9.15) activesupport (>= 4.0.2) ast (>= 2.1.0) @@ -380,7 +381,7 @@ GEM activesupport (>= 4.2.0.beta, < 5.0) nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) - rails-erd (1.5.0) + rails-erd (1.5.2) activerecord (>= 3.2) activesupport (>= 3.2) choice (~> 0.2.0) diff --git a/config/initializers/relationship.rb b/config/initializers/relationship.rb new file mode 100644 index 000000000..6f3fc29be --- /dev/null +++ b/config/initializers/relationship.rb @@ -0,0 +1,15 @@ +require 'rails_erd/domain/relationship' + +module RailsERD + class Domain + class Relationship + class << self + private + + def association_identity(association) + Set[association_owner(association), association_target(association)] + end + end + end + end +end diff --git a/lib/tasks/erd.rake b/lib/tasks/erd.rake index 6b79967de..e2665374e 100644 --- a/lib/tasks/erd.rake +++ b/lib/tasks/erd.rake @@ -7,9 +7,9 @@ namespace :generate do sh "bundle exec rake erd only='Organisation,StopAreaReferential,StopAreaReferentialSync,StopAreaReferentialSyncMessage,StopAreaReferentialMembership,LineReferential,LineReferentialSync,LineReferentialSyncMessage,LineReferentialMembership' filename='referentiels_externes' title='Référentiels externes'" sh "bundle exec rake erd only='NetexImport,Import,WorkbenchImport,ImportResource,ImportMessage' filename='import' title='Import'" sh "bundle exec rake erd only='ComplianceControlSet,ComplianceControlBlock,ComplianceControl,ComplianceCheckSet,ComplianceCheckBlock,ComplianceCheck,ComplianceCheckResource,ComplianceCheckMessage' filename='validation' title='Validation'" + sh "bundle exec rake erd only='Organisation,Workbench,ReferentialSuite,Referential' filename='merge' title='Merge'" #sh "bundle exec rake erd only='VehicleJourney,VehicleJourneyExport' filename='export' title='Export'" - #sh "bundle exec rake erd only='' filename='intégration' title='Integration'" - #sh "bundle exec rake erd only='' filename='fusion' title='Fusion'" + #sh "bundle exec rake erd only='' filename='integration' title='Integration'" #sh "bundle exec rake erd only='' filename='publication' title='Publication'" end |
