Class: Locomotive::Wagon::SyncCommand
- Inherits:
-
Struct
- Object
- Struct
- Locomotive::Wagon::SyncCommand
- Includes:
- ApiConcern, DeployFileConcern, InstrumentationConcern, SpinnerConcern
- Defined in:
- lib/locomotive/wagon/commands/sync_command.rb
Constant Summary collapse
- RESOURCES =
%w(site pages content_entries translations).freeze
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
-
#options ⇒ Object
Returns the value of attribute options.
-
#path ⇒ Object
Returns the value of attribute path.
-
#shell ⇒ Object
Returns the value of attribute shell.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from SpinnerConcern
Methods included from InstrumentationConcern
#instrument, #instrument_scope_name
Methods included from DeployFileConcern
#deploy_file, #read_deploy_settings, #write_deploy_settings
Methods included from ApiConcern
#api_client, #api_credentials, #api_host, #api_site_client, #connection_information_from_env_and_path
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env
16 17 18 |
# File 'lib/locomotive/wagon/commands/sync_command.rb', line 16 def env @env end |
#options ⇒ Object
Returns the value of attribute options
16 17 18 |
# File 'lib/locomotive/wagon/commands/sync_command.rb', line 16 def @options end |
#path ⇒ Object
Returns the value of attribute path
16 17 18 |
# File 'lib/locomotive/wagon/commands/sync_command.rb', line 16 def path @path end |
#shell ⇒ Object
Returns the value of attribute shell
16 17 18 |
# File 'lib/locomotive/wagon/commands/sync_command.rb', line 16 def shell @shell end |
Class Method Details
.sync(env, path, options, shell) ⇒ Object
25 26 27 |
# File 'lib/locomotive/wagon/commands/sync_command.rb', line 25 def self.sync(env, path, , shell) self.new(env, path, , shell).sync end |
Instance Method Details
#sync ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/locomotive/wagon/commands/sync_command.rb', line 29 def sync if [:verbose] SyncLogger.new _sync else show_wait_spinner('Syncing content...') { _sync } end end |