• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 12 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Synchronise your Middleman build to S3 and more

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

Gem Version Build Status Code Quality Code Coverage Gittip

Supported Storage Services

Behind the scenes we're using Fog::Storage which allows us to support the most popular storage providers

Supported Ruby Versions

This library aims to support and is tested against the following Ruby implementations:

Credits