Class: Fastlane::Actions::CoverallsAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/coveralls/actions/coveralls_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject


19
20
21
# File 'lib/fastlane/plugin/coveralls/actions/coveralls_action.rb', line 19

def self.authors
  ["Atsushi Nagase"]
end

.available_optionsObject


29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/fastlane/plugin/coveralls/actions/coveralls_action.rb', line 29

def self.available_options
  return [] unless Helper.mac?
  require 'fastlane/core_ext/bundler_monkey_patch'

  begin
    Gem::Specification.find_by_name('xccoveralls')
  rescue Gem::LoadError
    return []
  end

  require 'xccoveralls/options'
  Xccoveralls::Options.available_options
end

.categoryObject


58
59
60
# File 'lib/fastlane/plugin/coveralls/actions/coveralls_action.rb', line 58

def self.category
  :testing
end

.descriptionObject


15
16
17
# File 'lib/fastlane/plugin/coveralls/actions/coveralls_action.rb', line 15

def self.description
  "Send coverage information to Coveralls"
end

.detailsObject


23
24
25
26
27
# File 'lib/fastlane/plugin/coveralls/actions/coveralls_action.rb', line 23

def self.details
  "Send coverage information to Coveralls\n" \
    "Make sure `Gather coverage` is turned on for your test target.\n" \
    "More informmation: [https://github.com/ngs/xccoveralls](https://github.com/ngs/xccoveralls)"
end

.example_codeObject


47
48
49
50
51
52
53
54
55
56
# File 'lib/fastlane/plugin/coveralls/actions/coveralls_action.rb', line 47

def self.example_code
  [
    'coveralls(
      repo_token: "(secret)",
      derived_data_path: "your/custom/DerivedData",
      source_path: "your/src",
      ignorefile_path: "your/src/.coverallsignore"
    )'
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)

43
44
45
# File 'lib/fastlane/plugin/coveralls/actions/coveralls_action.rb', line 43

def self.is_supported?(platform)
  [:ios, :mac].include?(platform)
end

.run(params) ⇒ Object


7
8
9
10
11
12
13
# File 'lib/fastlane/plugin/coveralls/actions/coveralls_action.rb', line 7

def self.run(params)
  Actions.verify_gem!('xccoveralls')
  require 'xccoveralls'
  require 'xccoveralls/runner'

  Xccoveralls::Runner.new(params.values).run!
end