9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/select2-rails/source_file.rb', line 9
def fetch
filtered_tags = fetch_tags
tag = select("Which tag do you want to fetch?", filtered_tags)
self.destination_root = "vendor/assets"
remote = "https://github.com/select2/select2"
get "#{remote}/raw/#{tag}/dist/css/select2.css", "stylesheets/select2.css"
get "#{remote}/raw/#{tag}/dist/js/select2.full.js", "javascripts/select2-full.js"
get "#{remote}/raw/#{tag}/dist/js/select2.js", "javascripts/select2.js"
languages(tag).each do |lang|
get "#{remote}/raw/#{tag}/dist/js/i18n/#{lang}.js", "javascripts/select2_locale_#{lang}.js"
end
end
|