• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / GitProjectHealth / 11163879852

03 Oct 2024 02:24PM UTC coverage: 58.906% (+25.2%) from 33.667%
11163879852

push

github

web-flow
Merge pull request #75 from moosetechnology/develop

V1.0.0

6210 of 8212 new or added lines in 80 files covered. (75.62%)

130 existing lines in 6 files now uncovered.

8903 of 15114 relevant lines covered (58.91%)

0.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

39.68
/src/GitProjectHealth-Model-Importer/GPModelImporter.class.st
1
"
2
I am a superclass for Model importer.
3
I am a try of normalization for the different importer.
4

5
I also define some contract so it is easier to switch from one importer to another
6
"
7
Class {
8
        #name : #GPModelImporter,
9
        #superclass : #Object,
10
        #instVars : [
11
                'withCommitsSince',
12
                'withFiles',
13
                'glhModel'
14
        ],
15
        #classVars : [
16
                'currentImporter'
17
        ],
18
        #category : #'GitProjectHealth-Model-Importer'
19
}
20

21
{ #category : #'accessing - global variables' }
NEW
22
GPModelImporter class >> importers [
×
NEW
23
        ^ currentImporter 
×
NEW
24
]
×
25

26
{ #category : #initialization }
NEW
27
GPModelImporter class >> reset [
×
NEW
28
        currentImporter := nil.
×
NEW
29
]
×
30

31
{ #category : #accessing }
NEW
32
GPModelImporter >> beWithFiles [
×
NEW
33

×
NEW
34
        withFiles := true
×
NEW
35
]
×
36

37
{ #category : #accessing }
NEW
38
GPModelImporter >> beWithoutFiles [
×
NEW
39

×
NEW
40
        withFiles := false
×
NEW
41
]
×
42

43
{ #category : #commit }
NEW
44
GPModelImporter >> chainsCommitsFrom: commitsCollection [
×
NEW
45

×
NEW
46
        | dic |
×
NEW
47
        ('Chains ' , commitsCollection size printString , ' commits')
×
NEW
48
                recordInfo.
×
NEW
49

×
NEW
50
        dic := ((self glhModel allWithType: GLHCommit) collect: [ :commit |
×
NEW
51
                        commit id -> commit ]) asSet asDictionary.
×
NEW
52

×
NEW
53
        commitsCollection do: [ :commit |
×
NEW
54
                commit parent_ids do: [ :parentId |
×
NEW
55
                        dic
×
NEW
56
                                at: parentId
×
NEW
57
                                ifPresent: [ :parentCommit |
×
NEW
58
                                        parentCommit childCommits
×
NEW
59
                                                add: commit
×
NEW
60
                                                unless: [ :existing :new | existing id = new id ] ]
×
NEW
61
                                ifAbsent: [  ] ] ].
×
NEW
62
        ^ commitsCollection
×
NEW
63
]
×
64

65
{ #category : #accessing }
66
GPModelImporter >> glhModel [
1✔
67

1✔
68
        ^ glhModel
1✔
69
]
1✔
70

71
{ #category : #accessing }
72
GPModelImporter >> glhModel: anObject [
1✔
73

1✔
74
        glhModel := anObject
1✔
75
]
1✔
76

77
{ #category : #initialization }
78
GPModelImporter >> initialize [
1✔
79

1✔
80
        super initialize.
1✔
81
        self withCommitsSince: (Date today - 1 week) asDateAndTime
1✔
82
]
1✔
83

84
{ #category : #accessing }
NEW
85
GPModelImporter >> withCommitsSince [
×
NEW
86

×
NEW
87
        ^ withCommitsSince
×
NEW
88
]
×
89

90
{ #category : #accessing }
91
GPModelImporter >> withCommitsSince: anObject [
1✔
92

1✔
93
        withCommitsSince := anObject
1✔
94
]
1✔
95

96
{ #category : #accessing }
97
GPModelImporter >> withFiles [
1✔
98

1✔
99
        ^ withFiles
1✔
100
]
1✔
101

102
{ #category : #accessing }
103
GPModelImporter >> withFiles: anObject [
1✔
104

1✔
105
        withFiles := anObject
1✔
106
]
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc