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

moosetechnology / GitProjectHealth / 10880334038

16 Sep 2024 08:38AM UTC coverage: 20.325% (-0.2%) from 20.538%
10880334038

Pull #54

github

web-flow
Merge 9db8bd0be into aef27716a
Pull Request #54: Metrics fixing

20 of 234 new or added lines in 20 files covered. (8.55%)

252 existing lines in 18 files now uncovered.

1961 of 9648 relevant lines covered (20.33%)

0.2 hits per line

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

0.0
/src/GitLabHealth-Visualization/RSCommitDiff.class.st
1
Class {
2
        #name : 'RSCommitDiff',
3
        #superclass : 'Object',
4
        #instVars : [
5
                'aDiff',
6
                'canvas'
7
        ],
8
        #category : 'GitLabHealth-Visualization',
9
        #package : 'GitLabHealth-Visualization'
10
}
11

12
{ #category : 'as yet unclassified' }
13
RSCommitDiff class >> canvasFor: aGLHDiff [
×
14

×
15
        ^ self new
×
16
                  diffCommit: aGLHDiff;
×
17
                  buildCanvas
×
UNCOV
18
]
×
19

20
{ #category : 'hooks' }
21
RSCommitDiff class >> shapeFor: aCommitDiff [
×
22
        ^ self new
×
23
                  diffCommit: aCommitDiff;
×
24
                  shapeForDiff: aCommitDiff  withColor: Color gray. 
×
25

×
26
        
×
UNCOV
27
]
×
28

29
{ #category : 'canvas' }
30
RSCommitDiff >> buildCanvas [
×
31

×
32
        | shapes |
×
33
"        self
×
34
                deprecated: 'Use #build instead'
×
35
                on: '2 May 2024'
×
36
                in:
×
37
                'Pharo-11.0.0+build.726.sha.aece1b5473acf3830a0e082c1bc3a15d4ff3522b (64 Bit)'."
×
38
        canvas := RSCanvas new.
×
39
        shapes := RSGroup new.
×
40

×
41
        aDiff diffRanges collect: [ :diffRange |
×
42
                self shapeForDiff: diffRange withColor: Color gray ].
×
43

×
44

×
45
        canvas @ RSCanvasController.
×
46

×
47
        ^ canvas
×
48
]
×
NEW
49

×
50
{ #category : 'shape' }
×
51
RSCommitDiff >> buildCompositeLayer: shapes withName: name withColor: color [
×
52

×
53
        | shapesCompo label boxGroup |
×
54
        boxGroup := RSGroup new.
×
55
        label := RSLabel new
×
56
                         text: name;
×
57
                         fontSize: 20;
×
58
                         bold;
×
59
                         yourself.
×
60

×
61
        RSVerticalLineLayout on: shapes.
×
62
        shapesCompo := RSComposite new
×
63
                               shapes: shapes;
×
64
                               yourself.
×
65
        "shapes do: [ :shp | canvas removeShape: shp ]."
×
66
        shapesCompo extent: shapesCompo extent + 5.
×
67

×
68
        "create the group for one class and its method"
×
69
        boxGroup
×
70
                add: label;
×
71
                add: shapesCompo.
×
72
        RSVerticalLineLayout new alignCenter on: boxGroup.
×
73

×
74
        ^ RSComposite new
×
75
                  shapes: boxGroup;
×
76
                  " model: shapes;"color: (color alpha: 0.1);
×
77
                  popup;
×
78
                  yourself
×
79
]
×
NEW
80

×
81
{ #category : 'lines' }
×
82
RSCommitDiff >> createLinesBetweenCommits: shapes [
×
83

×
84
        (RSLineBuilder arrowedLine
×
85
                 withBorderAttachPoint;
×
86
                 color: Color black;
×
87
                 canvas: canvas;
×
88
                 shapes: shapes;
×
89
                 beDirectional;
×
90
                 connectToAll: [ :diff | diff childCommits ]) pushFront
×
91
]
×
NEW
92

×
93
{ #category : 'setter' }
×
94
RSCommitDiff >> diffCommit: aGLHDiff [ 
×
95
        aDiff := aGLHDiff
×
96
]
×
NEW
97

×
98
{ #category : 'shape' }
×
99
RSCommitDiff >> shapeForDiff: aGLHDiff withColor: color [
×
100

×
101
        | box group label |
×
102
        group := RSGroup new.
×
103
        label := RSLabel new
×
104
                         text:
×
105
                                 (aGLHDiff diff new_path asPath segments last
×
106
                                          truncateWithElipsisTo: 50);
×
107
                         yourself.
×
108
        box := RSBox new
×
109
                       height: label height;
×
110
                       width: label width;
×
111
                       color: color.
×
112
        group
×
113
                add: label;
×
114
                add: box.
×
115
        "RSVerticalLineLayout new alignCenter on: group."
×
116

×
117
        ^ RSComposite new
×
118
                  shapes: group;
×
119
                  model: aGLHDiff;
×
120
                  popup;
×
121
                  draggable;
×
122
                  yourself
×
123
]
×
NEW
124

×
125
{ #category : 'shape' }
×
126
RSCommitDiff >> shapeForDiffRange: aGLPHEDiffRange withColor: aColor [
×
127

×
128
        | box group label |
×
129
        group := RSGroup new.
×
130
        label := RSLabel new
×
131
                         text: aGLPHEDiffRange new_path asPath segments last;
×
132
                         yourself.
×
133
        box := RSBox new
×
134
                       height: label height + 5;
×
135
                       width: label width + 10;
×
136
                       color: aColor.
×
137
        group
×
138
                add: box;
×
139
                add: label.
×
140
        "RSVerticalLineLayout new alignCenter on: group."
×
141

×
142
        ^ RSComposite new
×
143
                  shapes: group;
×
144
                  model: aGLPHEDiffRange;
×
145
                  popup;
×
146
                  draggable;
×
147
                  yourself
×
148
]
×
NEW
149

×
150
{ #category : 'shape' }
×
151
RSCommitDiff >> shapeForRange: aGLHDiff withColor: color [
×
152

×
153
        | box group label |
×
154
        group := RSGroup new.
×
155
        label := RSLabel new
×
156
                         text: (aGLHDiff new_path truncateWithElipsisTo: 30);
×
157
                         yourself.
×
158
        box := RSBox new
×
159
                       height: 50;
×
160
                       width: 50;
×
161
                       color: color.
×
162
        group
×
163
                add: label;
×
164
                add: box.
×
165
        RSVerticalLineLayout new alignCenter on: group.
×
166

×
167
        ^ RSComposite new
×
168
                  shapes: group;
×
169
                  model: aGLHDiff;
×
170
                  popup;
×
171
                  draggable;
×
172
                  yourself
×
UNCOV
173
]
×
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

© 2025 Coveralls, Inc