Anatomical “fugitive sheets” are illustrations of the body designed to display internal organs and structures using paper flaps. Their name arose from the frequency with which the accompanying sheets were torn or misplaced. This site reimagines the fugitive sheet as a misplaced code-snippet, framed within a randomly generated cut-out.
namespace :wp do namespace :setup do desc "Generates wp-config.php on remote server" task :generate_remote_files do on roles(:app) do # Get details for WordPress config file secret_keys = capture("curl -s -k https://api.wordpress.org/secret-key/1.1/salt") wp_siteurl = fetch(:stage_url) database = YAML::load_file('../config/database.yml')[fetch(:stage).to_s] # Create config file in remote environment db_config = ERB.new(File.read('config/templates/wp-config.php.erb')).result(binding) io = StringIO.new(db_config) upload! io, File.join(shared_path, "wp-config.php") end # Set some permissions # invoke 'wp:set_permissions' end desc "Setup WP on remote environment" task :remote do invoke 'db:confirm' invoke 'deploy' invoke 'wp:setup:generate_remote_files' on roles(:app) do within release_path do # Get WP details from config in /config wp_siteurl = fetch(:stage_url) title = fetch(:wp_sitename) email = fetch(:wp_email) user = fetch(:wp_user) end end end desc "Setup WP on local environment" task :local do run_locally do if !fetch(:setup_all) # Generate a random password o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten password = (0...18).map { o[rand(o.length)] }.join else password = fetch(:wp_pass) end # Get WP details from config in /config title = fetch(:wp_sitename) email = fetch(:wp_email) user = fetch(:wp_user) wp_siteurl = fetch(:wp_localurl) # Create wp-config.php database = YAML::load_file('../config/database.yml')['local'] secret_keys = capture("curl -s -k https://api.wordpress.org/secret-key/1.1/salt") db_config = ERB.new(File.read('config/templates/wp-config.php.erb')).result(binding) File.open("../wp-config.php", 'w') {|f| f.write(db_config) } end end end end
namespace :wp do namespace :setup do desc "Generates wp-config.php on remote server" task :generate_remote_files do on roles(:app) do # Get details for WordPress config file secret_keys = capture("curl -s -k https://api.wordpress.org/secret-key/1.1/salt") wp_siteurl = fetch(:stage_url) database = YAML::load_file('../config/database.yml')[fetch(:stage).to_s] # Create config file in remote environment db_config = ERB.new(File.read('config/templates/wp-config.php.erb')).result(binding) io = StringIO.new(db_config) upload! io, File.join(shared_path, "wp-config.php") end # Set some permissions # invoke 'wp:set_permissions' end desc "Setup WP on remote environment" task :remote do invoke 'db:confirm' invoke 'deploy' invoke 'wp:setup:generate_remote_files' on roles(:app) do within release_path do # Get WP details from config in /config wp_siteurl = fetch(:stage_url) title = fetch(:wp_sitename) email = fetch(:wp_email) user = fetch(:wp_user) end end end desc "Setup WP on local environment" task :local do run_locally do if !fetch(:setup_all) # Generate a random password o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten password = (0...18).map { o[rand(o.length)] }.join else password = fetch(:wp_pass) end # Get WP details from config in /config title = fetch(:wp_sitename) email = fetch(:wp_email) user = fetch(:wp_user) wp_siteurl = fetch(:wp_localurl) # Create wp-config.php database = YAML::load_file('../config/database.yml')['local'] secret_keys = capture("curl -s -k https://api.wordpress.org/secret-key/1.1/salt") db_config = ERB.new(File.read('config/templates/wp-config.php.erb')).result(binding) File.open("../wp-config.php", 'w') {|f| f.write(db_config) } end end end end