Class: Dev::Template::Eol

Inherits:
BaseInterface show all
Defined in:
lib/firespring_dev_commands/templates/eol.rb

Overview

Class contains rake templates for managing upcoming eol dates for configured projects

Instance Attribute Summary

Attributes inherited from BaseInterface

#exclude

Instance Method Summary collapse

Methods inherited from BaseInterface

#create_tasks!, #initialize

Constructor Details

This class inherits a constructor from Dev::Template::BaseInterface

Instance Method Details

#create_eol_task! ⇒ Object

Create the rake task for the eol method



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/firespring_dev_commands/templates/eol.rb', line 8

def create_eol_task!
  # Have to set a local variable to be accessible inside of the instance_eval block
  exclude = @exclude

  DEV_COMMANDS_TOP_LEVEL.instance_eval do
    return if exclude.include?(:eol)

    desc 'Compares the current date to the EOL date for all configured projects'
    task eol: %w(init) do
      Dev::EndOfLife.new.check
    end
  end
end