Class: Recipes::Ci

Inherits:
Rails::AppBuilder
  • Object
show all
Defined in:
lib/potassium/recipes/ci.rb

Instance Method Summary collapse

Instance Method Details

#createObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/potassium/recipes/ci.rb', line 2

def create
  template '../assets/.circleci/config.yml.erb', '.circleci/config.yml'

  gather_gems(:test) do
    gather_gem 'rspec_junit_formatter', '~> 0.4'
  end

  gather_gems(:development, :test) do
    gather_gem('brakeman')
  end

  add_readme_header :ci
  application 'config.assets.js_compressor = :uglifier', env: 'test'
end

#installObject



17
18
19
# File 'lib/potassium/recipes/ci.rb', line 17

def install
  create
end

#installed?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/potassium/recipes/ci.rb', line 21

def installed?
  file_exist?('.circleci/config.yml')
end