From 5b7708076978800142fd63a18555cc78f5b3ccd2 Mon Sep 17 00:00:00 2001 From: HLAD Nicolas Date: Thu, 26 Sep 2024 11:58:15 +0200 Subject: [PATCH] put model importer inside super class --- .../GLHModelImporter.class.st | 14 -------------- .../GPModelImporter.class.st | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/GitLabHealth-Model-Importer/GLHModelImporter.class.st b/src/GitLabHealth-Model-Importer/GLHModelImporter.class.st index 18bfeeb..ac81a73 100644 --- a/src/GitLabHealth-Model-Importer/GLHModelImporter.class.st +++ b/src/GitLabHealth-Model-Importer/GLHModelImporter.class.st @@ -924,7 +924,6 @@ GLHModelImporter >> initialize [ yourself. self initReader. - currentImporter := self ] { #category : #importer } @@ -935,19 +934,6 @@ GLHModelImporter >> loadAllProjectsFromRepositorySoftware [ projects := self glhApi projects. ] -{ #category : #'as yet unclassified' } -GLHModelImporter >> makeGlobal [ - ^ self makeGlobal: DateAndTime now printString. -] - -{ #category : #'as yet unclassified' } -GLHModelImporter >> makeGlobal: aLabel [ - - currentImporter := currentImporter ifNil: [ OrderedDictionary new ]. - currentImporter at: aLabel put: self. - ^ self -] - { #category : #private } GLHModelImporter >> newParseCommitResult: result [ diff --git a/src/GitProjectHealth-Model-Importer/GPModelImporter.class.st b/src/GitProjectHealth-Model-Importer/GPModelImporter.class.st index 8be76cf..42299d3 100644 --- a/src/GitProjectHealth-Model-Importer/GPModelImporter.class.st +++ b/src/GitProjectHealth-Model-Importer/GPModelImporter.class.st @@ -25,7 +25,7 @@ GPModelImporter class >> importers [ { #category : #initialization } GPModelImporter class >> reset [ - currentImporter := nil. + currentImporter := OrderedDictionary new. ] { #category : #accessing } @@ -81,6 +81,19 @@ GPModelImporter >> initialize [ self withCommitsSince: (Date today - 1 week) asDateAndTime ] +{ #category : #'as yet unclassified' } +GPModelImporter >> makeGlobal [ + ^ self makeGlobal: DateAndTime now printString. +] + +{ #category : #'as yet unclassified' } +GPModelImporter >> makeGlobal: aLabel [ + + currentImporter := GHModelImporter importers ifNil: [ OrderedDictionary new ]. + currentImporter at: aLabel put: self. + ^ currentImporter +] + { #category : #accessing } GPModelImporter >> withCommitsSince [