Middleman Sync
β currently a functioning WIP thats not quite finished yet but its close! β
Synchronise your Middleman build to S3 and more
Middleman-Sync is a Middleman extension...
Installation
gem 'middleman-sync', '~> 4.0'
configure :build do
activate :sync do |config|
# config.verbose = false # turn on verbose logging (defaults to false)
# config.force = false # force syncing of outdated_files (defaults to false)
# config.run_on_build = true # when within a framework which `builds` assets, whether to sync afterwards (defaults to true)
# config.sync_outdated_files = true # when an outdated file is found whether to replace it (defaults to true)
# config.delete_abandoned_files = true # when an abandoned file is found whether to remove it (defaults to true)
# config.upload_missing_files = true # when a missing file is found whether to upload it (defaults to true)
# config.target_pool_size = 8 # how many threads you would like to open for each target (defaults to the amount of CPU core's your machine has)
# config.max_sync_attempts = 3 # how many times a file should be retried if there was an error during sync (defaults to 3)
end
end
Features / Usage Examples
Source
configure :build do
activate :sync_source do |source|
source.name = :middleman
source.type = :local
source.source_dir = MultiSync::Extensions::Middleman.source_dir
end
end
Target
configure :build do
activate :sync_target do |target|
target.name = :assets
target.type = :aws
target.target_dir = 'multi-sync-middleman'
target.credentials = {
region: 'us-east-1',
aws_access_key_id: 'xxx',
aws_secret_access_key: 'xxx'
}
end
end
Badges
Supported Storage Services
Behind the scenes we're using Fog::Storage which allows us to support the most popular storage providers
- Amazon S3
- Rackspace CloudFiles (WIP)
- Google Cloud Storage (WIP)
Supported Ruby Versions
This library aims to support and is tested against the following Ruby implementations: