Class: Danger::DangerSpmVersionUpdates
- Inherits:
-
Plugin
- Object
- Plugin
- Danger::DangerSpmVersionUpdates
- Defined in:
- lib/spm_version_updates/plugin.rb
Overview
A Danger plugin for checking if there are versions upgrades available for SPM dependencies
Instance Attribute Summary collapse
-
#check_branches ⇒ Boolean
Whether to check dependencies pinned to a branch for newer commits, default true.
-
#check_revisions ⇒ Boolean
Whether to report the latest tagged version for dependencies pinned to a revision, default false.
-
#check_when_exact ⇒ Boolean
Whether to check when dependencies are exact versions or commits, default false.
-
#ignore_repos ⇒ Array<String>
A list of repository URLs for packages to ignore entirely.
-
#repo_rules_path ⇒ String
Path to a YAML file with per-repository semantic update suppression rules.
-
#report_above_maximum ⇒ Boolean
Whether to report versions above the maximum version range, default false.
-
#report_pre_releases ⇒ Boolean
Whether to report pre-release versions, default false.
Instance Method Summary collapse
-
#check_for_updates(xcodeproj_path) ⇒ void
A method that you can call from your Dangerfile.
-
#check_manifests(manifest_paths, resolved_paths = nil) ⇒ void
Check for updates to dependencies declared in one or more Package.swift manifests.
Instance Attribute Details
#check_branches ⇒ Boolean
Whether to check dependencies pinned to a branch for newer commits, default true
25 26 27 |
# File 'lib/spm_version_updates/plugin.rb', line 25 def check_branches @check_branches end |
#check_revisions ⇒ Boolean
Whether to report the latest tagged version for dependencies pinned to a revision, default false
29 30 31 |
# File 'lib/spm_version_updates/plugin.rb', line 29 def check_revisions @check_revisions end |
#check_when_exact ⇒ Boolean
Whether to check when dependencies are exact versions or commits, default false
21 22 23 |
# File 'lib/spm_version_updates/plugin.rb', line 21 def check_when_exact @check_when_exact end |
#ignore_repos ⇒ Array<String>
A list of repository URLs for packages to ignore entirely
41 42 43 |
# File 'lib/spm_version_updates/plugin.rb', line 41 def ignore_repos @ignore_repos end |
#repo_rules_path ⇒ String
Path to a YAML file with per-repository semantic update suppression rules
45 46 47 |
# File 'lib/spm_version_updates/plugin.rb', line 45 def repo_rules_path @repo_rules_path end |
#report_above_maximum ⇒ Boolean
Whether to report versions above the maximum version range, default false
33 34 35 |
# File 'lib/spm_version_updates/plugin.rb', line 33 def report_above_maximum @report_above_maximum end |
#report_pre_releases ⇒ Boolean
Whether to report pre-release versions, default false
37 38 39 |
# File 'lib/spm_version_updates/plugin.rb', line 37 def report_pre_releases @report_pre_releases end |
Instance Method Details
#check_for_updates(xcodeproj_path) ⇒ void
This method returns an undefined value.
A method that you can call from your Dangerfile
53 54 55 |
# File 'lib/spm_version_updates/plugin.rb', line 53 def check_for_updates(xcodeproj_path) run_checker { |checker| checker.check_for_updates(xcodeproj_path) } end |
#check_manifests(manifest_paths, resolved_paths = nil) ⇒ void
This method returns an undefined value.
Check for updates to dependencies declared in one or more Package.swift manifests
67 68 69 70 71 72 |
# File 'lib/spm_version_updates/plugin.rb', line 67 def check_manifests(manifest_paths, resolved_paths = nil) paths = Array(manifest_paths).map(&:to_s).reject(&:empty?) raise(ManifestParser::ManifestPathMustBeSet) if paths.empty? run_checker { |checker| checker.check_manifests(paths, Array(resolved_paths)) } end |