@@ -17,40 +17,40 @@ def initialize line
17
17
end
18
18
19
19
def provider_name
20
- @line [ : provider_name]
20
+ @line . provider_name
21
21
end
22
22
23
23
def provider_name_url
24
24
hal_browser_url ( pacticipant_url_from_params ( pacticipant_name : provider_name ) )
25
25
end
26
26
27
27
def consumer_name
28
- @line [ : consumer_name]
28
+ @line . consumer_name
29
29
end
30
30
31
31
def consumer_name_url
32
32
hal_browser_url ( pacticipant_url_from_params ( pacticipant_name : consumer_name ) )
33
33
end
34
34
35
35
def pact_version_sha
36
- @line [ : pact_version_sha]
36
+ @line . pact_version_sha
37
37
end
38
38
39
39
# verification number, used in verification_url method
40
40
def number
41
- @line [ : verification_number]
41
+ @line . verification_number
42
42
end
43
43
44
44
def pact_revision_number
45
- @line [ : pact_revision_number]
45
+ @line . pact_revision_number
46
46
end
47
47
48
48
def consumer_name
49
- @line [ : consumer_name]
49
+ @line . consumer_name
50
50
end
51
51
52
52
def consumer_version_number
53
- @line [ : consumer_version_number]
53
+ @line . consumer_version_number
54
54
end
55
55
56
56
def display_consumer_version_number
@@ -63,23 +63,23 @@ def consumer_version_number_url
63
63
end
64
64
65
65
def consumer_version_order
66
- @line [ : consumer_version_order]
66
+ @line . consumer_version_order
67
67
end
68
68
69
69
def provider_name
70
- @line [ : provider_name]
70
+ @line . provider_name
71
71
end
72
72
73
73
def provider_version_number
74
- @line [ : provider_version_number]
74
+ @line . provider_version_number
75
75
end
76
76
77
77
def display_provider_version_number
78
78
PactBroker ::Versions ::AbbreviateNumber . call ( provider_version_number )
79
79
end
80
80
81
81
def provider_version_order
82
- @line [ : provider_version_order]
82
+ @line . provider_version_order
83
83
end
84
84
85
85
def provider_version_number_url
@@ -88,52 +88,52 @@ def provider_version_number_url
88
88
end
89
89
90
90
def provider_version_order
91
- if @line [ : verification_executed_at]
92
- @line [ : verification_executed_at] . to_time . to_i
91
+ if @line . verification_executed_at
92
+ @line . verification_executed_at . to_time . to_i
93
93
else
94
94
0
95
95
end
96
96
end
97
97
98
98
def latest_consumer_version_tags
99
- @line [ : consumer_version_tags]
100
- . select { | tag | tag [ : latest] }
99
+ @line . consumer_version_tags
100
+ . select { | tag | tag . latest }
101
101
. collect { | tag | MatrixTag . new ( tag . to_hash . merge ( pacticipant_name : consumer_name , version_number : consumer_version_number ) ) }
102
102
end
103
103
104
104
def other_consumer_version_tags
105
- @line [ : consumer_version_tags]
106
- . select { | tag | !tag [ : latest] }
105
+ @line . consumer_version_tags
106
+ . select { | tag | !tag . latest }
107
107
. collect { | tag | MatrixTag . new ( tag . to_hash . merge ( pacticipant_name : consumer_name , version_number : consumer_version_number ) ) }
108
108
end
109
109
110
110
def latest_provider_version_tags
111
- @line [ : provider_version_tags]
112
- . select { | tag | tag [ : latest] }
111
+ @line . provider_version_tags
112
+ . select { | tag | tag . latest }
113
113
. collect { | tag | MatrixTag . new ( tag . to_hash . merge ( pacticipant_name : provider_name , version_number : provider_version_number ) ) }
114
114
end
115
115
116
116
def other_provider_version_tags
117
- @line [ : provider_version_tags]
118
- . select { | tag | !tag [ : latest] }
117
+ @line . provider_version_tags
118
+ . select { | tag | !tag . latest }
119
119
. collect { | tag | MatrixTag . new ( tag . to_hash . merge ( pacticipant_name : provider_name , version_number : provider_version_number ) ) }
120
120
end
121
121
122
122
def orderable_fields
123
- [ consumer_name , consumer_version_order , pact_revision_number , provider_name , @line [ : verification_id] ]
123
+ [ consumer_name , consumer_version_order , pact_revision_number , provider_name , @line . verification_id ]
124
124
end
125
125
126
126
def <=> other
127
127
( self . orderable_fields <=> other . orderable_fields ) * -1
128
128
end
129
129
130
130
def pseudo_branch_verification_status
131
- if @line [ : verification_executed_at]
132
- DateHelper . distance_of_time_in_words ( @line [ : verification_executed_at] , DateTime . now ) + " ago"
131
+ if @line . verification_executed_at
132
+ DateHelper . distance_of_time_in_words ( @line . verification_executed_at , DateTime . now ) + " ago"
133
133
else
134
134
''
135
135
end
136
- # case @line[: success]
136
+ # case @line. success
137
137
# when true then "Verified"
138
138
# when false then "Failed"
139
139
# else ''
@@ -145,7 +145,7 @@ def verification_status_url
145
145
end
146
146
147
147
def pact_publication_date
148
- relative_date ( @line [ : pact_created_at] )
148
+ relative_date ( @line . pact_created_at )
149
149
end
150
150
151
151
def pact_publication_date_url
@@ -157,11 +157,11 @@ def relative_date date
157
157
end
158
158
159
159
def pact_published_order
160
- @line [ : pact_created_at] . to_time . to_i
160
+ @line . pact_created_at . to_time . to_i
161
161
end
162
162
163
163
def verification_status_class
164
- case @line [ : success]
164
+ case @line . success
165
165
when true then 'success'
166
166
when false then 'danger'
167
167
else ''
@@ -177,7 +177,7 @@ def overwritten= overwritten
177
177
end
178
178
179
179
def inherited_verification_message
180
- if @line [ : verification_executed_at] && @line [ : pact_created_at] > @line [ : verification_executed_at]
180
+ if @line . verification_executed_at && @line . pact_created_at > @line . verification_executed_at
181
181
"The verification date is before the pact publication date because this verification has been inherited from a previously verified pact with identical content."
182
182
end
183
183
end
0 commit comments