Class: Coveralls::CommandLine

Inherits:
Thor
  • Object
show all
Defined in:
lib/coveralls/command.rb

Instance Method Summary collapse

Instance Method Details

#lastObject



36
37
38
# File 'lib/coveralls/command.rb', line 36

def last
  open_token_based_url "https://coveralls.io/repos/%@/last_build"
end

#openObject



26
27
28
# File 'lib/coveralls/command.rb', line 26

def open
  open_token_based_url "https://coveralls.io/repos/%@"
end

#pushObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/coveralls/command.rb', line 7

def push
  return unless ensure_can_run_locally!
  ENV["COVERALLS_RUN_LOCALLY"] = "true"
  cmds = "bundle exec rake"
  if File.exist?('.travis.yml')
    cmds = YAML.load_file('.travis.yml')["script"] || cmds rescue cmds
  end
  cmds.each { |cmd| system cmd }
  ENV["COVERALLS_RUN_LOCALLY"] = nil
end

#reportObject



19
20
21
22
23
# File 'lib/coveralls/command.rb', line 19

def report
  ENV["COVERALLS_NOISY"] = "true"
  exec "bundle exec rake"
  ENV["COVERALLS_NOISY"] = nil
end

#serviceObject



31
32
33
# File 'lib/coveralls/command.rb', line 31

def service
  open_token_based_url "https://coveralls.io/repos/%@/service"
end

#versionObject



41
42
43
# File 'lib/coveralls/command.rb', line 41

def version
  Coveralls::Output.puts Coveralls::VERSION
end