Class: Rails::Generators::Hyperdrive::SyncGenerator

Inherits:
Base
  • Object
show all
Includes:
ContentSyncSupport
Defined in:
lib/generators/hyperdrive/sync/sync_generator.rb

Overview

Content-only by contract: no step may write a bootstrap artifact (.mcp.json, the engine mount, the initializer, the .gitignore rule).

Instance Method Summary collapse

Methods included from ContentSyncSupport

#options

Instance Method Details

#discover_artifactsObject



24
25
26
# File 'lib/generators/hyperdrive/sync/sync_generator.rb', line 24

def discover_artifacts
  runner.discover_artifacts
end


32
33
34
35
36
# File 'lib/generators/hyperdrive/sync/sync_generator.rb', line 32

def print_summary
  say ""
  say_status :done, "hyperdrive synced", :green
  runner.summary_lines.each { |line| say line }
end

#sync_contentObject



28
29
30
# File 'lib/generators/hyperdrive/sync/sync_generator.rb', line 28

def sync_content
  runner.install(mode: options[:overwrite] ? :overwrite : :preserve)
end

#verify_environmentObject



20
21
22
# File 'lib/generators/hyperdrive/sync/sync_generator.rb', line 20

def verify_environment
  runner.verify_environment!
end