Class: Brut::CLI::Apps::BuildAssets::Images
Instance Attribute Summary
#parent_command
Instance Method Summary
collapse
#accepts, #args_description, #argv, #commands, #default_command, #default_command_class, #env, #env_vars, #execute, #name, #options, #opts, #puts, #stderr, #stdin, #stdout, #system!
Instance Method Details
#bootstrap? ⇒ Boolean
50
|
# File 'lib/brut/cli/apps/build_assets.rb', line 50
def bootstrap? = false
|
#default_rack_env ⇒ Object
45
|
# File 'lib/brut/cli/apps/build_assets.rb', line 45
def default_rack_env = "development"
|
#description ⇒ Object
46
|
# File 'lib/brut/cli/apps/build_assets.rb', line 46
def description = "Copy images to the public folder"
|
#detailed_description ⇒ Object
47
48
49
|
# File 'lib/brut/cli/apps/build_assets.rb', line 47
def detailed_description = %{
This is to ensure that any images your code references will end up in the public directory, so they are served properly. This is not for managing images that may be referenced in CSS files. See the `css` command for information on that.
}
|
#run ⇒ Object
52
53
54
55
56
57
|
# File 'lib/brut/cli/apps/build_assets.rb', line 52
def run
src_dir = Brut.container.images_src_dir
dest_dir = Brut.container.images_root_dir
system! "rsync --archive --delete --verbose \"#{src_dir}/\" \"#{dest_dir}\""
end
|