Module: FiverunsTuneupMerb::APIKey

Included in:
FiverunsTuneupMerb
Defined in:
lib/fiveruns_tuneup_merb/api_key.rb

Instance Method Summary collapse

Instance Method Details

#can_share?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/fiveruns_tuneup_merb/api_key.rb', line 7

def can_share?
  Fiveruns::Tuneup::Run.api_key? && routed?
end

#log_share_statusObject



11
12
13
14
15
16
17
18
# File 'lib/fiveruns_tuneup_merb/api_key.rb', line 11

def log_share_status
  if Fiveruns::Tuneup::Run.api_key?
    Merb.logger.debug "TuneUp is configured for sharing."
  else
    Merb.logger.warn "TuneUp is NOT configured for sharing."
    Merb.logger.warn "You must set Merb::Slices.config[:fiveruns_tuneup_merb][:api_key] to share runs."
  end
end