Install VLC files from a given folder into Fastly.
Add this line to your application's Gemfile:
gem 'fastly_vcl_upload'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fastly_vcl_upload
If you are wanting to use this with rails. Then add the following to your assets:precompile rake task
FastlyVclUpload.install "#{Rails.root}/config",
service_name: Rails.configuration.base_domain,
api_key: ENV['FASTLY_API_KEY']
Example:
namespace :assets do
desc "Precompile assets, including install fastly's VCL"
task :precompile do
if %w(production).include? Rails.env
FastlyVclUpload.install "#{Rails.root}/config",
service_name: "service_name",
api_key: ENV['FASTLY_API_KEY']
end
end
end
- Fork it ( https://github.com/[my-github-username]/fastly_vcl_upload/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request