Class: Dependabot::MetadataFinders::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/dependabot/metadata_finders/base.rb,
lib/dependabot/metadata_finders/base/commits_finder.rb,
lib/dependabot/metadata_finders/base/release_finder.rb,
lib/dependabot/metadata_finders/base/changelog_finder.rb,
lib/dependabot/metadata_finders/base/changelog_pruner.rb

Defined Under Namespace

Classes: ChangelogFinder, ChangelogPruner, CommitsFinder, ReleaseFinder

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dependency:, credentials:) ⇒ Base

Returns a new instance of Base.



14
15
16
17
# File 'lib/dependabot/metadata_finders/base.rb', line 14

def initialize(dependency:, credentials:)
  @dependency = dependency
  @credentials = credentials
end

Instance Attribute Details

#credentialsObject (readonly)

Returns the value of attribute credentials.



12
13
14
# File 'lib/dependabot/metadata_finders/base.rb', line 12

def credentials
  @credentials
end

#dependencyObject (readonly)

Returns the value of attribute dependency.



12
13
14
# File 'lib/dependabot/metadata_finders/base.rb', line 12

def dependency
  @dependency
end

Instance Method Details

#changelog_textObject



36
37
38
39
40
41
42
43
# File 'lib/dependabot/metadata_finders/base.rb', line 36

def changelog_text
  @changelog_finder ||= ChangelogFinder.new(
    dependency: dependency,
    source: source,
    credentials: credentials
  )
  @changelog_finder.changelog_text
end

#changelog_urlObject



27
28
29
30
31
32
33
34
# File 'lib/dependabot/metadata_finders/base.rb', line 27

def changelog_url
  @changelog_finder ||= ChangelogFinder.new(
    dependency: dependency,
    source: source,
    credentials: credentials
  )
  @changelog_finder.changelog_url
end

#commitsObject



90
91
92
93
94
95
96
97
# File 'lib/dependabot/metadata_finders/base.rb', line 90

def commits
  @commits_finder ||= CommitsFinder.new(
    dependency: dependency,
    source: source,
    credentials: credentials
  )
  @commits_finder.commits
end

#commits_urlObject



81
82
83
84
85
86
87
88
# File 'lib/dependabot/metadata_finders/base.rb', line 81

def commits_url
  @commits_finder ||= CommitsFinder.new(
    dependency: dependency,
    source: source,
    credentials: credentials
  )
  @commits_finder.commits_url
end

#homepage_urlObject



23
24
25
# File 'lib/dependabot/metadata_finders/base.rb', line 23

def homepage_url
  source_url
end

#maintainer_changesObject



99
100
101
# File 'lib/dependabot/metadata_finders/base.rb', line 99

def maintainer_changes
  nil
end

#releases_textObject



72
73
74
75
76
77
78
79
# File 'lib/dependabot/metadata_finders/base.rb', line 72

def releases_text
  @release_finder ||= ReleaseFinder.new(
    dependency: dependency,
    source: source,
    credentials: credentials
  )
  @release_finder.releases_text
end

#releases_urlObject



63
64
65
66
67
68
69
70
# File 'lib/dependabot/metadata_finders/base.rb', line 63

def releases_url
  @release_finder ||= ReleaseFinder.new(
    dependency: dependency,
    source: source,
    credentials: credentials
  )
  @release_finder.releases_url
end

#source_urlObject



19
20
21
# File 'lib/dependabot/metadata_finders/base.rb', line 19

def source_url
  source&.url
end

#upgrade_guide_textObject



54
55
56
57
58
59
60
61
# File 'lib/dependabot/metadata_finders/base.rb', line 54

def upgrade_guide_text
  @changelog_finder ||= ChangelogFinder.new(
    dependency: dependency,
    source: source,
    credentials: credentials
  )
  @changelog_finder.upgrade_guide_text
end

#upgrade_guide_urlObject



45
46
47
48
49
50
51
52
# File 'lib/dependabot/metadata_finders/base.rb', line 45

def upgrade_guide_url
  @changelog_finder ||= ChangelogFinder.new(
    dependency: dependency,
    source: source,
    credentials: credentials
  )
  @changelog_finder.upgrade_guide_url
end