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

moosetechnology / GitProjectHealth / 11496926157

24 Oct 2024 09:54AM UTC coverage: 58.906% (+0.6%) from 58.319%
11496926157

push

github

web-flow
Merge pull request #93 from moosetechnology/revert-92-develop

Revert "Develop"

810 of 1504 new or added lines in 51 files covered. (53.86%)

31 existing lines in 4 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' }
22
GPModelImporter class >> importers [
×
23
        ^ currentImporter 
×
24
]
×
25

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

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

×
34
        withFiles := true
×
35
]
×
36

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

×
40
        withFiles := false
×
41
]
×
42

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

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

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

×
UNCOV
53
        commitsCollection do: [ :commit |
×
UNCOV
54
                commit parent_ids do: [ :parentId |
×
UNCOV
55
                        dic
×
UNCOV
56
                                at: parentId
×
UNCOV
57
                                ifPresent: [ :parentCommit |
×
UNCOV
58
                                        parentCommit childCommits
×
UNCOV
59
                                                add: commit
×
UNCOV
60
                                                unless: [ :existing :new | existing id = new id ] ]
×
UNCOV
61
                                ifAbsent: [  ] ] ].
×
UNCOV
62
        ^ commitsCollection
×
UNCOV
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 }
85
GPModelImporter >> withCommitsSince [
×
86

×
87
        ^ withCommitsSince
×
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