@@ -16,11 +16,12 @@ class RepositoryGitExtra < ActiveRecord::Base
1616 ALLOWED_URLS = %w[ ssh http https go git git_annex ]
1717
1818 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' }
2425 }
2526
2627 ## Attributes
@@ -83,6 +84,7 @@ def check_urls_order_consistency
8384 # Add go url only for existing record to avoid chicken/egg issue
8485 check_go_url unless new_record?
8586 check_git_url
87+ check_git_annex_url
8688 end
8789
8890
@@ -116,6 +118,11 @@ def check_go_url
116118 end
117119
118120
121+ def check_git_annex_url
122+ git_annex? ? add_url ( 'git_annex' ) : remove_url ( 'git_annex' )
123+ end
124+
125+
119126 def check_git_url
120127 git_daemon? ? add_url ( 'git' ) : remove_url ( 'git' )
121128 end
0 commit comments