Sha256: 37e918f5a1816b6dc6b80888c69cbd237af5d2675c862c4ba7f2a891cd119bb2

Contents?: true

Size: 1.5 KB

Versions: 17

Compression:

Stored size: 1.5 KB

Contents

module Initial
  class CapistranoGenerator < Rails::Generators::Base
    source_root File.expand_path("../templates", __FILE__)

    def add
      gem_group :development do
        gem 'capistrano'
        gem 'capistrano-rbenv'
        gem 'capistrano-bundler'
        gem 'capistrano-rails'
        gem 'capistrano-sidekiq' , github: 'seuros/capistrano-sidekiq'
        gem 'capistrano3-puma'
      end

      Bundler.with_clean_env do
        run "bundle install"
      end

      directory 'capistrano/tasks', 'lib/capistrano/tasks'
      directory 'capistrano/shared', 'config/deploy/shared'

      run 'cap install'

      uncomment_lines 'Capfile', /require 'capistrano\/rbenv'/
      uncomment_lines 'Capfile', /require 'capistrano\/bundler'/
      uncomment_lines 'Capfile', /require 'capistrano\/rails\/assets'/
      uncomment_lines 'Capfile', /require 'capistrano\/rails\/migrations'/
      insert_into_file "Capfile",
                       "require 'capistrano/sidekiq'\n",
                       after: "require 'capistrano/rails/migrations'\n"
      insert_into_file "Capfile",
                       "require 'capistrano/puma'\n",
                       after: "require 'capistrano/sidekiq'\n"
      insert_into_file "Capfile",
                       "require 'capistrano/puma/monit'\n",
                       after: "require 'capistrano/sidekiq'\n"

      copy_file 'capistrano/deploy/deploy.rb', 'config/deploy.rb'
      copy_file 'capistrano/deploy/production.rb', 'config/deploy/production.rb'

    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
teleporter-1.0.0 lib/generators/initial/capistrano.rb
teleporter-0.1.0 lib/generators/initial/capistrano.rb
teleporter-0.0.34 lib/generators/initial/capistrano.rb
teleporter-0.0.33 lib/generators/initial/capistrano.rb
teleporter-0.0.32 lib/generators/initial/capistrano.rb
teleporter-0.0.31 lib/generators/initial/capistrano.rb
teleporter-0.0.30 lib/generators/initial/capistrano.rb
teleporter-0.0.29 lib/generators/initial/capistrano.rb
teleporter-0.0.28 lib/generators/initial/capistrano.rb
teleporter-0.0.27 lib/generators/initial/capistrano.rb
teleporter-0.0.26 lib/generators/initial/capistrano.rb
teleporter-0.0.25 lib/generators/initial/capistrano.rb
teleporter-0.0.24 lib/generators/initial/capistrano.rb
teleporter-0.0.23 lib/generators/initial/capistrano.rb
teleporter-0.0.22 lib/generators/initial/capistrano.rb
teleporter-0.0.21 lib/generators/initial/capistrano.rb
teleporter-0.0.20 lib/generators/initial/capistrano.rb