@@ -16,11 +16,12 @@ class RepositoryGitExtra < ActiveRecord::Base
16
16
ALLOWED_URLS = %w[ ssh http https go git git_annex ]
17
17
18
18
URLS_ICONS = {
19
- go : { label : 'Go' , icon : 'fa-google' } ,
20
- http : { label : 'HTTP' , icon : 'fa-external-link' } ,
21
- https : { label : 'HTTPS' , icon : 'fa-external-link' } ,
22
- ssh : { label : 'SSH' , icon : 'fa-shield' } ,
23
- git : { label : 'Git' , icon : 'fa-git' }
19
+ go : { label : 'Go' , icon : 'fa-google' } ,
20
+ http : { label : 'HTTP' , icon : 'fa-external-link' } ,
21
+ https : { label : 'HTTPS' , icon : 'fa-external-link' } ,
22
+ ssh : { label : 'SSH' , icon : 'fa-shield' } ,
23
+ git : { label : 'Git' , icon : 'fa-git' } ,
24
+ git_annex : { label : 'GitAnnex' , icon : 'fa-git' }
24
25
}
25
26
26
27
## Attributes
@@ -83,6 +84,7 @@ def check_urls_order_consistency
83
84
# Add go url only for existing record to avoid chicken/egg issue
84
85
check_go_url unless new_record?
85
86
check_git_url
87
+ check_git_annex_url
86
88
end
87
89
88
90
@@ -116,6 +118,11 @@ def check_go_url
116
118
end
117
119
118
120
121
+ def check_git_annex_url
122
+ git_annex? ? add_url ( 'git_annex' ) : remove_url ( 'git_annex' )
123
+ end
124
+
125
+
119
126
def check_git_url
120
127
git_daemon? ? add_url ( 'git' ) : remove_url ( 'git' )
121
128
end
0 commit comments