Sha256: 415246eec96367ea2dd7e1339bdfc4a89c95acad46d2a0a49d93e3cb98db2d9c
Contents?: true
Size: 1.52 KB
Versions: 5
Compression:
Stored size: 1.52 KB
Contents
module DigitalHeroesStartkit require 'thor' require 'thor/group' class InstallGenerator < Rails::Generators::Base include Thor::Actions def upload_files p 'upload_files' src = File.expand_path('../../project', __FILE__) files = [ 'app/controllers/application_controller.rb', 'Capfile', 'Procfile', 'config/capistrano.yml', 'config/deploy.rb', 'config/cable.yml', 'config/database.yml', 'config/application.access.yml', 'config/application.db.yml', 'config/application.oauth.yml', 'config/application.robokassa.yml', 'config/application.telegram.yml', 'config/application.sendgrid.yml', 'config/application.yml', 'config/environments/development.rb', 'config/environments/production.rb', 'config/initializers/session_store.rb', 'config/locales/ru.yml' ] entries = [ 'app/assets/stylesheets', 'app/views/layouts', 'config/deploy/virgin_conf', 'config/deploy/virgin_sh', 'config/deploy', 'db', 'public', 'geodata' ] files.each do |path| p path FileUtils.cp_r "#{src}/#{path}", path end entries.each do |entry| p entry # создание директорий FileUtils.makedirs entry # полная синхронизация FileUtils.copy_entry "#{src}/#{entry}", entry, false, true, true end end end end
Version data entries
5 entries across 5 versions & 1 rubygems