Sha256: 518f0b0a3a8dfecc4854b0d638814fa7df166e089f0b6d6c59ee2f654fe75bc2

Contents?: true

Size: 681 Bytes

Versions: 7

Compression:

Stored size: 681 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'

module Bankai
  module Generators
    # :nodoc:
    class WheneverGenerator < Base
      def add_whenever
        gem 'whenever', require: false
        execute_command :bundle, 'exec rubocop -a Gemfile'
        execute_command :bundle, 'install'
      end

      def initialize_whenever
        execute_command :bundle, "exec wheneverize #{destination_root}"
      end

      def initialize_capistrano
        return unless capistrano?

        inject_into_file(
          'Capfile',
          "require 'whenerver/capistrano'\n",
          after: "# require \"capistrano/passenger\"\n"
        )
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bankai-0.13.1 lib/bankai/generators/whenever_generator.rb
bankai-0.13.0 lib/bankai/generators/whenever_generator.rb
bankai-0.12.1 lib/bankai/generators/whenever_generator.rb
bankai-0.12.0 lib/bankai/generators/whenever_generator.rb
bankai-0.11.0 lib/bankai/generators/whenever_generator.rb
bankai-0.10.0 lib/bankai/generators/whenever_generator.rb
bankai-0.9.1 lib/bankai/generators/whenever_generator.rb