Class: SyncFog::Configuration
- Inherits:
-
Object
- Object
- SyncFog::Configuration
- Defined in:
- lib/sync_fog/configuration.rb
Instance Attribute Summary collapse
-
#fog_attributes ⇒ Object
Metadata attributes to put for each file Default is { }.
-
#fog_credentials ⇒ Object
Basic Fog configuration see [Fog Docs](fog.io/about/provider_documentation.html) Required to set!.
-
#fog_directory ⇒ Object
Bucket/Container to use for syncing.
-
#hook_enabled ⇒ Object
Enable/Disable automatic sync whenever rake assets:precompile runs.
-
#num_threads ⇒ Object
Number of Threads to use simultaniously Default is 5.
-
#skip_existing ⇒ Object
Set this to true if the file names of your assets change whenever their content updates (asset digests).
-
#source_dir ⇒ Object
Directory to be synced.
-
#use_gzip ⇒ Object
Enable/Disable upload only gzip variants and set correct headers.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
:nodoc:.
Constructor Details
#initialize ⇒ Configuration
:nodoc:
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/sync_fog/configuration.rb', line 64 def initialize #:nodoc: @fog_credentials = { } @fog_directory = "" @fog_attributes = { } @skip_existing = true @source_dir = "" @num_threads = 5 @hook_enabled = true @use_gzip = true end |
Instance Attribute Details
#fog_attributes ⇒ Object
Metadata attributes to put for each file Default is { }
29 30 31 |
# File 'lib/sync_fog/configuration.rb', line 29 def fog_attributes @fog_attributes end |
#fog_credentials ⇒ Object
Basic Fog configuration see [Fog Docs](fog.io/about/provider_documentation.html) Required to set!
15 16 17 |
# File 'lib/sync_fog/configuration.rb', line 15 def fog_credentials @fog_credentials end |
#fog_directory ⇒ Object
Bucket/Container to use for syncing. Note: This container should be only used for assets syncing. All other files will be removed automatically! Required to set!
23 24 25 |
# File 'lib/sync_fog/configuration.rb', line 23 def fog_directory @fog_directory end |
#hook_enabled ⇒ Object
Enable/Disable automatic sync whenever rake assets:precompile runs. Default is true
55 56 57 |
# File 'lib/sync_fog/configuration.rb', line 55 def hook_enabled @hook_enabled end |
#num_threads ⇒ Object
Number of Threads to use simultaniously Default is 5
48 49 50 |
# File 'lib/sync_fog/configuration.rb', line 48 def num_threads @num_threads end |
#skip_existing ⇒ Object
Set this to true if the file names of your assets change whenever their content updates (asset digests). Default is true
42 43 44 |
# File 'lib/sync_fog/configuration.rb', line 42 def skip_existing @skip_existing end |
#source_dir ⇒ Object
Directory to be synced. This would typically point to public/assets Required to set!
35 36 37 |
# File 'lib/sync_fog/configuration.rb', line 35 def source_dir @source_dir end |
#use_gzip ⇒ Object
Enable/Disable upload only gzip variants and set correct headers. Default is true
61 62 63 |
# File 'lib/sync_fog/configuration.rb', line 61 def use_gzip @use_gzip end |