diff --git a/app/models/recommendable.rb b/app/models/recommendable.rb index ad637f7d3..eb654c5fe 100644 --- a/app/models/recommendable.rb +++ b/app/models/recommendable.rb @@ -69,7 +69,7 @@ def platform_language_mapping 'Go': 'Go', 'JavaScript': 'NPM', 'Objective-C': 'CocoaPods', - 'Swift': 'CocoaPods', + 'Swift': 'SwiftPM', 'HTML': 'Bower', 'CSS': 'Bower', 'CoffeeScript': 'NPM', diff --git a/app/models/repositories/swift.rb b/app/models/repositories/swift_pm.rb similarity index 97% rename from app/models/repositories/swift.rb rename to app/models/repositories/swift_pm.rb index 69c6bcfed..45db97a5a 100644 --- a/app/models/repositories/swift.rb +++ b/app/models/repositories/swift_pm.rb @@ -1,5 +1,5 @@ module Repositories - class Swift < Base + class SwiftPM < Base HAS_VERSIONS = false HAS_DEPENDENCIES = false LIBRARIAN_SUPPORT = false diff --git a/config/routes.rb b/config/routes.rb index 50449ad77..e7f2d43b5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -158,6 +158,12 @@ get '/rails/mailers/*path' => "rails/mailers#preview" end + get '/swift/', to: redirect("/SwiftPM") + get '/Swift/', to: redirect("/SwiftPM") + + get '/swift/:name', to: redirect("/SwiftPM/%{name}"), constraints: { :name => /.*/ } + get '/Swift/:name', to: redirect("/SwiftPM/%{name}"), constraints: { :name => /.*/ } + get '/:platform/:name/suggestions', to: 'project_suggestions#new', as: :project_suggestions, constraints: { :name => /.*/ } post '/:platform/:name/suggestions', to: 'project_suggestions#create', constraints: { :name => /.*/ } diff --git a/lib/tasks/download.rake b/lib/tasks/download.rake index eb9718304..3b2eccd81 100644 --- a/lib/tasks/download.rake +++ b/lib/tasks/download.rake @@ -174,7 +174,7 @@ namespace :download do end task swift: :environment do - Repositories::Swift.import + Repositories::SwiftPM.import end task sublime: :environment do