Methods
A
D
G
H
I
K
N
R
T
Constants
MAP = { 'railties' => 'railties', 'ap' => 'actionpack', 'am' => 'actionmailer', 'amo' => 'activemodel', 'as' => 'activesupport', 'ar' => 'activerecord', 'av' => 'actionview', 'aj' => 'activejob' }
 
Attributes
[R] component
[R] options
Class Public methods
new(component, options = {})
# File ci/travis.rb, line 30
def initialize(component, options = {})
  @component = component
  @options = options
end
Instance Public methods
activerecord?()
# File ci/travis.rb, line 70
def activerecord?
  gem == 'activerecord'
end
adapter()
# File ci/travis.rb, line 87
def adapter
  component.split(':').last
end
announce(heading)
# File ci/travis.rb, line 43
def announce(heading)
  puts "\n\e[1;33m[Travis CI] #{heading}\e[m\n"
end
dir()
Alias for: gem
gem()
Also aliased as: dir
# File ci/travis.rb, line 82
def gem
  MAP[component.split(':').first]
end
heading()
# File ci/travis.rb, line 47
def heading
  heading = [gem]
  heading << "with #{adapter}" if activerecord?
  heading << "in isolation" if isolated?
  heading << "integration" if integration?
  heading.join(' ')
end
integration?()
# File ci/travis.rb, line 78
def integration?
  component.split(':').last == 'integration'
end
isolated?()
# File ci/travis.rb, line 74
def isolated?
  options[:isolated]
end
key()
# File ci/travis.rb, line 63
def key
  key = [gem]
  key << adapter if activerecord?
  key << 'isolated' if isolated?
  key.join(':')
end
rake(*tasks)
# File ci/travis.rb, line 91
def rake(*tasks)
  tasks.each do |task|
    cmd = "bundle exec rake #{task}"
    puts "Running command: #{cmd}"
    return false unless system(cmd)
  end
  true
end
run!(options = {})
# File ci/travis.rb, line 35
def run!(options = {})
  self.options.update(options)
  Dir.chdir(dir) do
    announce(heading)
    rake(*tasks)
  end
end
tasks()
# File ci/travis.rb, line 55
def tasks
  if activerecord?
    ['db:mysql:rebuild', "#{adapter}:#{'isolated_' if isolated?}test"]
  else
    ["test", ('isolated' if isolated?), ('integration' if integration?)].compact.join(":")
  end
end