Class: ProspectusCircleci::Build

Inherits:
Module
  • Object
show all
Defined in:
lib/prospectus_circleci.rb

Overview

Helper for automatically adding build status check

Instance Method Summary collapse

Constructor Details

#initialize(repo_slug) ⇒ Build

Returns a new instance of Build.



10
11
12
# File 'lib/prospectus_circleci.rb', line 10

def initialize(repo_slug)
  @repo_slug = repo_slug || raise('No repo specified')
end

Instance Method Details

#extended(other) ⇒ Object

rubocop:disable Metrics/MethodLength



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/prospectus_circleci.rb', line 14

def extended(other) # rubocop:disable Metrics/MethodLength
  actual_val, expected_val = parse_status

  other.deps do
    item do
      name 'circleci'

      expected do
        static
        set expected_val
      end

      actual do
        static
        set actual_val
      end
    end
  end
end