Sha256: 9aec97fa08a5a11ba89c4be90b1d5c094dd983cd4e07f1a1f7ee6760f0068cd4

Contents?: true

Size: 696 Bytes

Versions: 11

Compression:

Stored size: 696 Bytes

Contents

# frozen_string_literal: true

require_relative 'base'

module Bankai
  module Generators
    # :nodoc:
    class WheneverGenerator < Base
      def add_whenever
        gem 'whenever', require: false
        Bundler.with_clean_env { run 'rubocop -a Gemfile' }
        Bundler.with_clean_env { run 'bundle install' }
      end

      def initialize_whenever
        Bundler.with_clean_env { run "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

11 entries across 11 versions & 1 rubygems

Version Path
bankai-0.8.1 lib/bankai/generators/whenever_generator.rb
bankai-0.8.0 lib/bankai/generators/whenever_generator.rb
bankai-0.7.0 lib/bankai/generators/whenever_generator.rb
bankai-0.6.0 lib/bankai/generators/whenever_generator.rb
bankai-0.5.1 lib/bankai/generators/whenever_generator.rb
bankai-0.5.0 lib/bankai/generators/whenever_generator.rb
bankai-0.4.1 lib/bankai/generators/whenever_generator.rb
bankai-0.4.0 lib/bankai/generators/whenever_generator.rb
bankai-0.3.1 lib/bankai/generators/whenever_generator.rb
bankai-0.3.0 lib/bankai/generators/whenever_generator.rb
bankai-0.2.3 lib/bankai/generators/whenever_generator.rb