Class: Semmy::Tasks::Lint

Inherits:
Base
  • Object
show all
Defined in:
lib/semmy/tasks/lint.rb

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Semmy::Tasks::Base

Instance Method Details

#defineObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/semmy/tasks/lint.rb', line 6

def define
  task 'lint' => ['lint:install', 'lint:locales']

  namespace 'lint' do
    task 'install' do
      Shell.info('Ensuring gem can be installed.')

      unless RubyGems.build_and_test_install
        Shell.error('Test install failed.')
        exit(1)
      end
    end

    task 'locales' do
      Shell.info('Checking for not yet imported locales.')

      if Project.has_not_yet_imported_locales?
        Shell.error('There are still files in config/locales/new.')
        exit(1)
      end
    end
  end
end