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

moosetechnology / GitProjectHealth / 10880355442

16 Sep 2024 08:39AM UTC coverage: 20.332% (-0.2%) from 20.538%
10880355442

Pull #54

github

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

0 of 178 new or added lines in 19 files covered. (0.0%)

18 existing lines in 6 files now uncovered.

1961 of 9645 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
}
10

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

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

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

×
25
        
×
26
]
×
27

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

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

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

×
43

×
44
        canvas @ RSCanvasController.
×
45

×
46
        ^ canvas
×
47
]
×
48

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

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

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

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

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

×
NEW
80
{ #category : #lines }
×
81
RSCommitDiff >> createLinesBetweenCommits: shapes [
×
82

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

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

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

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

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

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

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

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

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

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

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