danger-spm_version_updates 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e09f13ea3447749c8a464e7583af7df15daa485a2fd4859642686dfa099d6686
4
- data.tar.gz: 29cdfaae73b66e0288cd94c84b14d674f9ab2d1f6c3fd30431f31ad49b1d4fdc
3
+ metadata.gz: 3e6dccc893b317809724b8935dc9525513b583af660f44f93cbd02517c35b331
4
+ data.tar.gz: 67999aeedfae8d6531efbfe451690aaad3d1007a79f6ce9c066c2337085c13e4
5
5
  SHA512:
6
- metadata.gz: 885f9f92765ee4dad799321b3251cf8e8961196470b3e934d6ca25067cad96356759d88b845f1ccd2adde92008cc80239e57caa5d0f4833fefe1f6f49a0c9deb
7
- data.tar.gz: 124352559472f974630fb4a28d3fa436b7f30360a23cc21864c20939b47718047bffd08190e61676c429ee567306089c5e0c6c7dc69b451ea42185b486db7541
6
+ metadata.gz: 83b0cb80c5c3b131ea30e1d03d80fb52afe57d17d6ceea0c90ebb5d6cd0dafe52ab94c4db4dcc6c499af8539fede623f8764a3b2c62fdf890ed782008653ea7b
7
+ data.tar.gz: 7f414ae36bcce2ecb8aad51ecec3a5c47eeee6e9c7430609132a4818d9158f6d2f3d5250b0492334ef5c0b986c2a5bab84e8944ab291af0f08c2ef5d49af04cc
data/.rubocop.yml CHANGED
@@ -18,12 +18,20 @@ Style/TrailingCommaInArrayLiteral:
18
18
  RSpec/ExampleLength:
19
19
  Enabled: false
20
20
 
21
+ RSpec/RepeatedExample:
22
+ Enabled: false
23
+
21
24
  Style/BlockDelimiters:
22
25
  Enabled: true
23
26
  EnforcedStyle: always_braces
24
27
  Exclude:
25
28
  - spec/*.rb
26
29
 
30
+ Metrics/ModuleLength:
31
+ Enabled: true
32
+ Exclude:
33
+ - spec/*.rb
34
+
27
35
  Layout/ClassStructure:
28
36
  Enabled: true
29
37
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-spm_version_updates (0.0.3)
4
+ danger-spm_version_updates (0.1.0)
5
5
  danger-plugin-api (~> 1.0)
6
6
  semantic (~> 1.6)
7
7
  xcodeproj (~> 1.23)
@@ -15,7 +15,7 @@ GEM
15
15
  public_suffix (>= 2.0.2, < 6.0)
16
16
  ast (2.4.2)
17
17
  atomos (0.1.3)
18
- base64 (0.1.1)
18
+ base64 (0.2.0)
19
19
  claide (1.1.0)
20
20
  claide-plugins (0.9.2)
21
21
  cork
@@ -25,7 +25,7 @@ GEM
25
25
  colored2 (3.1.2)
26
26
  cork (0.3.0)
27
27
  colored2 (~> 3.1)
28
- danger (9.3.2)
28
+ danger (9.4.0)
29
29
  claide (~> 1.0)
30
30
  claide-plugins (>= 0.9.2)
31
31
  colored2 (~> 3.1)
@@ -36,7 +36,7 @@ GEM
36
36
  kramdown (~> 2.3)
37
37
  kramdown-parser-gfm (~> 1.0)
38
38
  no_proxy_fix
39
- octokit (~> 6.0)
39
+ octokit (>= 6.0, < 8.0)
40
40
  terminal-table (>= 1, < 4)
41
41
  danger-plugin-api (1.0.0)
42
42
  danger (> 2.0)
@@ -77,7 +77,7 @@ GEM
77
77
  listen (3.0.7)
78
78
  rb-fsevent (>= 0.9.3)
79
79
  rb-inotify (>= 0.9.7)
80
- lumberjack (1.2.9)
80
+ lumberjack (1.2.10)
81
81
  method_source (1.0.0)
82
82
  nanaimo (0.3.0)
83
83
  nap (1.1.0)
@@ -86,7 +86,7 @@ GEM
86
86
  notiffany (0.1.3)
87
87
  nenv (~> 0.1)
88
88
  shellany (~> 0.0)
89
- octokit (6.1.1)
89
+ octokit (7.2.0)
90
90
  faraday (>= 1, < 3)
91
91
  sawyer (~> 0.9)
92
92
  open4 (1.3.4)
data/README.md CHANGED
@@ -23,11 +23,10 @@ gem "danger-spm_version_updates"
23
23
 
24
24
  ## Usage
25
25
 
26
- Just add this to your Dangerfile! Note that it is required to configure the path to your Xcode project.
26
+ Just add this to your Dangerfile! Note that it is required to pass the path to your Xcode project.
27
27
 
28
28
  ```ruby
29
- spm_version_updates.xcodeproj_path = ".../Example.xcodeproj"
30
- spm_version_updates.check_for_updates
29
+ spm_version_updates.check_for_updates("Example.xcodeproj")
31
30
  ```
32
31
 
33
32
  You can also configure custom behaviors:
@@ -36,11 +35,14 @@ You can also configure custom behaviors:
36
35
  # Whether to check when dependencies are exact versions or commits, default false
37
36
  spm_version_updates.check_when_exact = true
38
37
 
39
- # Whether to ignore version above the maximum version range, default true
40
- spm_version_updates.quiet_above_maximum = false
38
+ # Whether to report versions above the maximum version range, default false
39
+ spm_version_updates.report_above_maximum = true
40
+
41
+ # Whether to report pre-release versions, default false
42
+ spm_version_updates.report_pre_releases = true
41
43
 
42
44
  # A list of repositories to ignore entirely, must exactly match the URL as configured in the Xcode project
43
- spm_version_updates.ignore_repositories = ["https://github.com/pointfreeco/swift-snapshot-testing"]
45
+ spm_version_updates.ignore_repos = ["https://github.com/pointfreeco/swift-snapshot-testing"]
44
46
  ```
45
47
 
46
48
  ## Development
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SpmVersionUpdates
4
- VERSION = "0.0.3"
4
+ VERSION = "0.1.0"
5
5
  end
@@ -6,7 +6,7 @@ require "xcodeproj"
6
6
  module Danger
7
7
  # A plugin for checking if there are versions upgrades available for SPM packages
8
8
  #
9
- # @example Ensure people are well warned about merging on Mondays
9
+ # @example Check if MyApp's SPM dependencies are up to date
10
10
  #
11
11
  # spm_version_updates.check_for_updates("MyApp.xcodeproj")
12
12
  #
@@ -18,9 +18,9 @@ module Danger
18
18
  # @return [Boolean]
19
19
  attr_accessor :check_when_exact
20
20
 
21
- # Whether to ignore versions above the maximum version range, default true
21
+ # Whether to report versions above the maximum version range, default false
22
22
  # @return [Boolean]
23
- attr_accessor :quiet_above_maximum
23
+ attr_accessor :report_above_maximum
24
24
 
25
25
  # Whether to report pre-release versions, default false
26
26
  # @return [Boolean]
@@ -65,11 +65,7 @@ module Danger
65
65
  next if available_versions.first.to_s == resolved_version
66
66
 
67
67
  if kind == "exactVersion" && @check_when_exact
68
- warn(
69
- <<-TEXT
70
- Newer version of #{name}: #{available_versions.first} (but this package is set to exact version #{resolved_version})
71
- TEXT
72
- )
68
+ warn_for_new_versions_exact(available_versions, name, resolved_version)
73
69
  elsif kind == "upToNextMajorVersion"
74
70
  warn_for_new_versions(:major, available_versions, name, resolved_version)
75
71
  elsif kind == "upToNextMinorVersion"
@@ -114,40 +110,55 @@ Newer version of #{name}: #{available_versions.first} (but this package is set t
114
110
 
115
111
  private
116
112
 
113
+ def warn_for_new_versions_exact(available_versions, name, resolved_version)
114
+ newest_version = available_versions.find { |version|
115
+ report_pre_releases ? true : version.pre.nil?
116
+ }
117
+ warn(
118
+ <<-TEXT
119
+ Newer version of #{name}: #{newest_version} (but this package is set to exact version #{resolved_version})
120
+ TEXT
121
+ ) unless newest_version.to_s == resolved_version
122
+ end
123
+
117
124
  def warn_for_new_versions_range(available_versions, name, requirement, resolved_version)
118
125
  max_version = Semantic::Version.new(requirement["maximumVersion"])
119
126
  if available_versions.first < max_version
120
127
  warn("Newer version of #{name}: #{available_versions.first}")
121
128
  else
122
129
  newest_meeting_reqs = available_versions.find { |version|
123
- version < max_version && report_pre_releases ? true : version.pre.nil?
130
+ version < max_version && (report_pre_releases ? true : version.pre.nil?)
124
131
  }
125
132
  warn("Newer version of #{name}: #{newest_meeting_reqs} ") unless newest_meeting_reqs.to_s == resolved_version
126
133
  warn(
127
134
  <<-TEXT
128
135
  Newest version of #{name}: #{available_versions.first} (but this package is configured up to the next #{max_version} version)
129
136
  TEXT
130
- ) unless quiet_above_maximum
137
+ ) if report_above_maximum
131
138
  end
132
139
  end
133
140
 
134
141
  def warn_for_new_versions(major_or_minor, available_versions, name, resolved_version_string)
135
142
  resolved_version = Semantic::Version.new(resolved_version_string)
136
- if available_versions.first.send(major_or_minor) == resolved_version.send(major_or_minor)
137
- warn("Newer version of #{name}: #{available_versions.first}")
138
- else
139
- newest_meeting_reqs = available_versions.find { |version|
140
- version.send(major_or_minor) == resolved_version.send(major_or_minor) && report_pre_releases ? true : version.pre.nil?
141
- }
142
- warn("Newer version of #{name}: #{newest_meeting_reqs}") unless newest_meeting_reqs == resolved_version
143
- warn(
144
- <<-TEXT
143
+ newest_meeting_reqs = available_versions.find { |version|
144
+ (version.send(major_or_minor) == resolved_version.send(major_or_minor)) && (report_pre_releases ? true : version.pre.nil?)
145
+ }
146
+
147
+ warn("Newer version of #{name}: #{newest_meeting_reqs}") unless newest_meeting_reqs == resolved_version
148
+ return unless report_above_maximum
149
+
150
+ newest_above_reqs = available_versions.find { |version|
151
+ report_pre_releases ? true : version.pre.nil?
152
+ }
153
+ warn(
154
+ <<-TEXT
145
155
  Newest version of #{name}: #{available_versions.first} (but this package is configured up to the next #{major_or_minor} version)
146
- TEXT
147
- ) unless quiet_above_maximum
148
- end
156
+ TEXT
157
+ ) unless newest_above_reqs == newest_meeting_reqs || newest_meeting_reqs.to_s == resolved_version
149
158
  end
150
159
 
160
+ # Remove git call to list tags
161
+ # @return [Array<Semantic::Version>]
151
162
  def git_versions(repo_url)
152
163
  `git ls-remote -t #{repo_url}`
153
164
  .split("\n")
@@ -8,9 +8,6 @@ module Danger
8
8
  expect(described_class.new(nil)).to be_a Danger::Plugin
9
9
  end
10
10
 
11
- #
12
- # You should test your custom attributes and methods here
13
- #
14
11
  describe "with Dangerfile" do
15
12
  before do
16
13
  @dangerfile = testing_dangerfile
@@ -22,31 +19,126 @@ module Danger
22
19
  allow(@my_plugin.github).to receive(:pr_json).and_return(json)
23
20
  end
24
21
 
25
- it "Reports none without exact version matching" do
26
- allow(@my_plugin).to receive(:git_versions).and_return false
22
+ it "Does not report pre-release versions by default" do
23
+ allow(@my_plugin).to receive(:git_versions)
24
+ .and_return [
25
+ Semantic::Version.new("12.1.6"),
26
+ Semantic::Version.new("12.2.0-beta.1"),
27
+ Semantic::Version.new("12.2.0-beta.2"),
28
+ ].sort.reverse
27
29
 
28
- @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/Example.xcodeproj")
30
+ @my_plugin.check_when_exact = true
31
+ @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/ExactVersion.xcodeproj")
29
32
 
30
33
  expect(@dangerfile.status_report[:warnings]).to eq([])
31
34
  end
32
35
 
33
- it "Reports some with exact version matching" do
34
- # TODO: mock git calls
35
- allow(@my_plugin).to receive(:git_versions).and_return false
36
+ it "Does report new versions for exact versions when configured" do
37
+ allow(@my_plugin).to receive(:git_versions)
38
+ .and_return [
39
+ Semantic::Version.new("12.1.6"),
40
+ Semantic::Version.new("12.1.7"),
41
+ ].sort.reverse
36
42
 
37
43
  @my_plugin.check_when_exact = true
38
- @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/Example.xcodeproj")
44
+ @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/ExactVersion.xcodeproj")
45
+
46
+ expect(@dangerfile.status_report[:warnings]).to eq(
47
+ [
48
+ "Newer version of kean/Nuke: 12.1.7 (but this package is set to exact version 12.1.6)\n",
49
+ ]
50
+ )
51
+ end
52
+
53
+ it "Does report pre-release versions for exact versions when configured" do
54
+ allow(@my_plugin).to receive(:git_versions)
55
+ .and_return [
56
+ Semantic::Version.new("12.1.6"),
57
+ Semantic::Version.new("12.2.0-beta.2"),
58
+ ].sort.reverse
59
+
60
+ @my_plugin.check_when_exact = true
61
+ @my_plugin.report_pre_releases = true
62
+ @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/ExactVersion.xcodeproj")
39
63
 
40
64
  expect(@dangerfile.status_report[:warnings]).to eq(
41
65
  [
42
- "Newer version of pointfreeco/swift-snapshot-testing: 1.14.2 (but this package is set to exact version 1.13.0)\n",
43
66
  "Newer version of kean/Nuke: 12.2.0-beta.2 (but this package is set to exact version 12.1.6)\n",
44
- "Newer version of pointfreeco/swiftui-navigation: 1.0.3 (but this package is set to exact version 1.0.2)\n",
45
- "Newer version of getsentry/sentry-cocoa: 8.15.0 (but this package is set to exact version 8.12.0)\n",
46
- "Newer version of firebase/firebase-ios-sdk: 10.17.0 (but this package is set to exact version 10.15.0)\n",
47
67
  ]
48
68
  )
49
69
  end
70
+
71
+ it "Does report new versions for up to next major" do
72
+ allow(@my_plugin).to receive(:git_versions)
73
+ .and_return [
74
+ Semantic::Version.new("12.1.6"),
75
+ Semantic::Version.new("12.1.7"),
76
+ ].sort.reverse
77
+
78
+ @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/UpToNextMajor.xcodeproj")
79
+
80
+ expect(@dangerfile.status_report[:warnings]).to eq(
81
+ [
82
+ "Newer version of kean/Nuke: 12.1.7",
83
+ ]
84
+ )
85
+ end
86
+
87
+ it "Reports pre-release versions for up to next major when configured" do
88
+ allow(@my_plugin).to receive(:git_versions)
89
+ .and_return [
90
+ Semantic::Version.new("12.1.6"),
91
+ Semantic::Version.new("12.2.0-beta.2"),
92
+ ].sort.reverse
93
+
94
+ @my_plugin.check_when_exact = true
95
+ @my_plugin.report_pre_releases = true
96
+ @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/UpToNextMajor.xcodeproj")
97
+
98
+ expect(@dangerfile.status_report[:warnings]).to eq(
99
+ [
100
+ "Newer version of kean/Nuke: 12.2.0-beta.2",
101
+ ]
102
+ )
103
+ end
104
+
105
+ it "Does not report pre-release versions for up to next major" do
106
+ allow(@my_plugin).to receive(:git_versions)
107
+ .and_return [
108
+ Semantic::Version.new("12.1.6"),
109
+ Semantic::Version.new("12.2.0-beta.2"),
110
+ Semantic::Version.new("13.0.0"),
111
+ ].sort.reverse
112
+
113
+ @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/UpToNextMajor.xcodeproj")
114
+
115
+ expect(@dangerfile.status_report[:warnings]).to eq([])
116
+ end
117
+
118
+ it "Does not report new versions for up to next major when next version is major" do
119
+ allow(@my_plugin).to receive(:git_versions)
120
+ .and_return [
121
+ Semantic::Version.new("12.1.6"),
122
+ Semantic::Version.new("13.0.0"),
123
+ ].sort.reverse
124
+
125
+ @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/UpToNextMajor.xcodeproj")
126
+
127
+ expect(@dangerfile.status_report[:warnings]).to eq([])
128
+ end
129
+
130
+ it "Does report new versions for up to next major when next version is major and configured" do
131
+ allow(@my_plugin).to receive(:git_versions)
132
+ .and_return [
133
+ Semantic::Version.new("12.1.6"),
134
+ Semantic::Version.new("13.0.0"),
135
+ ].sort.reverse
136
+
137
+ @my_plugin.report_above_maximum = true
138
+ @my_plugin.check_for_updates("#{File.dirname(__FILE__)}/support/fixtures/UpToNextMajor.xcodeproj")
139
+
140
+ expect(@dangerfile.status_report[:warnings]).to eq(["Newest version of kean/Nuke: 13.0.0 (but this package is configured up to the next major version)\n"])
141
+ end
50
142
  end
51
143
  end
52
144
  end
@@ -0,0 +1,80 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 54;
7
+ objects = {
8
+ /* Begin PBXGroup section */
9
+ F1465EF423AA94BF0055F7C3 = {
10
+ isa = PBXGroup;
11
+ children = (
12
+ F1465EFF23AA94BF0055F7C3 /* Demo */,
13
+ );
14
+ sourceTree = "<group>";
15
+ };
16
+ F1465EFF23AA94BF0055F7C3 /* Demo */ = {
17
+ isa = PBXGroup;
18
+ children = ();
19
+ path = Demo;
20
+ sourceTree = "<group>";
21
+ };
22
+ /* End PBXGroup section */
23
+
24
+ /* Begin PBXProject section */
25
+ F1465EF523AA94BF0055F7C3 /* Project object */ = {
26
+ isa = PBXProject;
27
+ attributes = {
28
+ BuildIndependentTargetsInParallel = YES;
29
+ LastSwiftUpdateCheck = 1420;
30
+ LastUpgradeCheck = 1420;
31
+ TargetAttributes = {
32
+ F1465EFC23AA94BF0055F7C3 = {
33
+ CreatedOnToolsVersion = 11.2.1;
34
+ };
35
+ };
36
+ };
37
+ buildConfigurationList = F1465EF823AA94BF0055F7C3 /* Build configuration list for PBXProject "Demo" */;
38
+ compatibilityVersion = "Xcode 9.3";
39
+ developmentRegion = en;
40
+ hasScannedForEncodings = 0;
41
+ knownRegions = (
42
+ en,
43
+ Base,
44
+ es,
45
+ "zh-Hans",
46
+ fr,
47
+ );
48
+ mainGroup = F1465EF423AA94BF0055F7C3;
49
+ packageReferences = (
50
+ 11BBD37629C1571400F7A968 /* XCRemoteSwiftPackageReference "Nuke" */,
51
+ );
52
+ productRefGroup = F1465EFE23AA94BF0055F7C3 /* Products */;
53
+ projectDirPath = "";
54
+ projectRoot = "";
55
+ targets = ();
56
+ };
57
+ /* End PBXProject section */
58
+
59
+ /* Begin XCConfigurationList section */
60
+ F1465EF823AA94BF0055F7C3 /* Build configuration list for PBXNativeTarget "Demo" */ = {
61
+ isa = XCConfigurationList;
62
+ buildConfigurations = ();
63
+ defaultConfigurationIsVisible = 0;
64
+ defaultConfigurationName = Release;
65
+ };
66
+ /* End XCConfigurationList section */
67
+
68
+ /* Begin XCRemoteSwiftPackageReference section */
69
+ 11BBD37629C1571400F7A968 /* XCRemoteSwiftPackageReference "Nuke" */ = {
70
+ isa = XCRemoteSwiftPackageReference;
71
+ repositoryURL = "https://github.com/kean/Nuke";
72
+ requirement = {
73
+ kind = exactVersion;
74
+ version = 12.1.6;
75
+ };
76
+ };
77
+ /* End XCRemoteSwiftPackageReference section */
78
+ };
79
+ rootObject = F1465EF523AA94BF0055F7C3 /* Project object */;
80
+ }
@@ -0,0 +1,80 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 54;
7
+ objects = {
8
+ /* Begin PBXGroup section */
9
+ F1465EF423AA94BF0055F7C3 = {
10
+ isa = PBXGroup;
11
+ children = (
12
+ F1465EFF23AA94BF0055F7C3 /* Demo */,
13
+ );
14
+ sourceTree = "<group>";
15
+ };
16
+ F1465EFF23AA94BF0055F7C3 /* Demo */ = {
17
+ isa = PBXGroup;
18
+ children = ();
19
+ path = Demo;
20
+ sourceTree = "<group>";
21
+ };
22
+ /* End PBXGroup section */
23
+
24
+ /* Begin PBXProject section */
25
+ F1465EF523AA94BF0055F7C3 /* Project object */ = {
26
+ isa = PBXProject;
27
+ attributes = {
28
+ BuildIndependentTargetsInParallel = YES;
29
+ LastSwiftUpdateCheck = 1420;
30
+ LastUpgradeCheck = 1420;
31
+ TargetAttributes = {
32
+ F1465EFC23AA94BF0055F7C3 = {
33
+ CreatedOnToolsVersion = 11.2.1;
34
+ };
35
+ };
36
+ };
37
+ buildConfigurationList = F1465EF823AA94BF0055F7C3 /* Build configuration list for PBXProject "Demo" */;
38
+ compatibilityVersion = "Xcode 9.3";
39
+ developmentRegion = en;
40
+ hasScannedForEncodings = 0;
41
+ knownRegions = (
42
+ en,
43
+ Base,
44
+ es,
45
+ "zh-Hans",
46
+ fr,
47
+ );
48
+ mainGroup = F1465EF423AA94BF0055F7C3;
49
+ packageReferences = (
50
+ 11BBD37629C1571400F7A968 /* XCRemoteSwiftPackageReference "Nuke" */,
51
+ );
52
+ productRefGroup = F1465EFE23AA94BF0055F7C3 /* Products */;
53
+ projectDirPath = "";
54
+ projectRoot = "";
55
+ targets = ();
56
+ };
57
+ /* End PBXProject section */
58
+
59
+ /* Begin XCConfigurationList section */
60
+ F1465EF823AA94BF0055F7C3 /* Build configuration list for PBXNativeTarget "Demo" */ = {
61
+ isa = XCConfigurationList;
62
+ buildConfigurations = ();
63
+ defaultConfigurationIsVisible = 0;
64
+ defaultConfigurationName = Release;
65
+ };
66
+ /* End XCConfigurationList section */
67
+
68
+ /* Begin XCRemoteSwiftPackageReference section */
69
+ 11BBD37629C1571400F7A968 /* XCRemoteSwiftPackageReference "Nuke" */ = {
70
+ isa = XCRemoteSwiftPackageReference;
71
+ repositoryURL = "https://github.com/kean/Nuke";
72
+ requirement = {
73
+ kind = upToNextMajorVersion;
74
+ minimumVersion = 12.1.6;
75
+ };
76
+ };
77
+ /* End XCRemoteSwiftPackageReference section */
78
+ };
79
+ rootObject = F1465EF523AA94BF0055F7C3 /* Project object */;
80
+ }
@@ -0,0 +1,265 @@
1
+ {
2
+ "pins" : [
3
+ {
4
+ "identity" : "abseil-cpp-binary",
5
+ "kind" : "remoteSourceControl",
6
+ "location" : "https://github.com/google/abseil-cpp-binary.git",
7
+ "state" : {
8
+ "revision" : "bfc0b6f81adc06ce5121eb23f628473638d67c5c",
9
+ "version" : "1.2022062300.0"
10
+ }
11
+ },
12
+ {
13
+ "identity" : "analytics-swift",
14
+ "kind" : "remoteSourceControl",
15
+ "location" : "git@github.com:hbmartin/analytics-swift.git",
16
+ "state" : {
17
+ "branch" : "main",
18
+ "revision" : "81ed4a83fc87ef074bb71b2b0bced199811dc3bb"
19
+ }
20
+ },
21
+ {
22
+ "identity" : "firebase-ios-sdk",
23
+ "kind" : "remoteSourceControl",
24
+ "location" : "https://github.com/firebase/firebase-ios-sdk",
25
+ "state" : {
26
+ "revision" : "8a8ec57a272e0d31480fb0893dda0cf4f769b57e",
27
+ "version" : "10.15.0"
28
+ }
29
+ },
30
+ {
31
+ "identity" : "googleappmeasurement",
32
+ "kind" : "remoteSourceControl",
33
+ "location" : "https://github.com/google/GoogleAppMeasurement.git",
34
+ "state" : {
35
+ "revision" : "03b9beee1a61f62d32c521e172e192a1663a5e8b",
36
+ "version" : "10.13.0"
37
+ }
38
+ },
39
+ {
40
+ "identity" : "googledatatransport",
41
+ "kind" : "remoteSourceControl",
42
+ "location" : "https://github.com/google/GoogleDataTransport.git",
43
+ "state" : {
44
+ "revision" : "aae45a320fd0d11811820335b1eabc8753902a40",
45
+ "version" : "9.2.5"
46
+ }
47
+ },
48
+ {
49
+ "identity" : "googleutilities",
50
+ "kind" : "remoteSourceControl",
51
+ "location" : "https://github.com/google/GoogleUtilities.git",
52
+ "state" : {
53
+ "revision" : "c38ce365d77b04a9a300c31061c5227589e5597b",
54
+ "version" : "7.11.5"
55
+ }
56
+ },
57
+ {
58
+ "identity" : "grpc-binary",
59
+ "kind" : "remoteSourceControl",
60
+ "location" : "https://github.com/google/grpc-binary.git",
61
+ "state" : {
62
+ "revision" : "f1b366129d1125be7db83247e003fc333104b569",
63
+ "version" : "1.50.2"
64
+ }
65
+ },
66
+ {
67
+ "identity" : "gtm-session-fetcher",
68
+ "kind" : "remoteSourceControl",
69
+ "location" : "https://github.com/google/gtm-session-fetcher.git",
70
+ "state" : {
71
+ "revision" : "d415594121c9e8a4f9d79cecee0965cf35e74dbd",
72
+ "version" : "3.1.1"
73
+ }
74
+ },
75
+ {
76
+ "identity" : "interop-ios-for-google-sdks",
77
+ "kind" : "remoteSourceControl",
78
+ "location" : "https://github.com/google/interop-ios-for-google-sdks.git",
79
+ "state" : {
80
+ "revision" : "2d12673670417654f08f5f90fdd62926dc3a2648",
81
+ "version" : "100.0.0"
82
+ }
83
+ },
84
+ {
85
+ "identity" : "leveldb",
86
+ "kind" : "remoteSourceControl",
87
+ "location" : "https://github.com/firebase/leveldb.git",
88
+ "state" : {
89
+ "revision" : "0706abcc6b0bd9cedfbb015ba840e4a780b5159b",
90
+ "version" : "1.22.2"
91
+ }
92
+ },
93
+ {
94
+ "identity" : "lookingglassui",
95
+ "kind" : "remoteSourceControl",
96
+ "location" : "https://github.com/ryanlintott/LookingGlassUI",
97
+ "state" : {
98
+ "revision" : "3257e1b5392a8b39e4620e09cfdb672d2be42855",
99
+ "version" : "0.3.1"
100
+ }
101
+ },
102
+ {
103
+ "identity" : "maplibre-gl-native-distribution",
104
+ "kind" : "remoteSourceControl",
105
+ "location" : "https://github.com/maplibre/maplibre-gl-native-distribution",
106
+ "state" : {
107
+ "revision" : "ffda61e298c1490d4860d5184e80d618aaadc089",
108
+ "version" : "5.13.0"
109
+ }
110
+ },
111
+ {
112
+ "identity" : "nanopb",
113
+ "kind" : "remoteSourceControl",
114
+ "location" : "https://github.com/firebase/nanopb.git",
115
+ "state" : {
116
+ "revision" : "819d0a2173aff699fb8c364b6fb906f7cdb1a692",
117
+ "version" : "2.30909.0"
118
+ }
119
+ },
120
+ {
121
+ "identity" : "nuke",
122
+ "kind" : "remoteSourceControl",
123
+ "location" : "https://github.com/kean/Nuke",
124
+ "state" : {
125
+ "revision" : "3f666f120b63ea7de57d42e9a7c9b47f8e7a290b",
126
+ "version" : "12.1.6"
127
+ }
128
+ },
129
+ {
130
+ "identity" : "phonenumberkit",
131
+ "kind" : "remoteSourceControl",
132
+ "location" : "https://github.com/marmelroy/PhoneNumberKit.git",
133
+ "state" : {
134
+ "revision" : "b456f2f9be10c1d183158220b831afd22697dd68",
135
+ "version" : "3.7.4"
136
+ }
137
+ },
138
+ {
139
+ "identity" : "promises",
140
+ "kind" : "remoteSourceControl",
141
+ "location" : "https://github.com/google/promises.git",
142
+ "state" : {
143
+ "revision" : "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
144
+ "version" : "2.3.1"
145
+ }
146
+ },
147
+ {
148
+ "identity" : "sentry-cocoa",
149
+ "kind" : "remoteSourceControl",
150
+ "location" : "https://github.com/getsentry/sentry-cocoa.git",
151
+ "state" : {
152
+ "revision" : "14aa6e47b03b820fd2b338728637570b9e969994",
153
+ "version" : "8.12.0"
154
+ }
155
+ },
156
+ {
157
+ "identity" : "sovran-swift",
158
+ "kind" : "remoteSourceControl",
159
+ "location" : "https://github.com/segmentio/Sovran-Swift.git",
160
+ "state" : {
161
+ "revision" : "64f3b5150c282a34af4578188dce2fd597e600e3",
162
+ "version" : "1.1.0"
163
+ }
164
+ },
165
+ {
166
+ "identity" : "swift-algorithms",
167
+ "kind" : "remoteSourceControl",
168
+ "location" : "https://github.com/apple/swift-algorithms.git",
169
+ "state" : {
170
+ "revision" : "bcd4f369ac962bc3e5244c9df778739f8f5bdbf1",
171
+ "version" : "1.1.0"
172
+ }
173
+ },
174
+ {
175
+ "identity" : "swift-argument-parser",
176
+ "kind" : "remoteSourceControl",
177
+ "location" : "https://github.com/apple/swift-argument-parser.git",
178
+ "state" : {
179
+ "revision" : "8f4d2753f0e4778c76d5f05ad16c74f707390531",
180
+ "version" : "1.2.3"
181
+ }
182
+ },
183
+ {
184
+ "identity" : "swift-asn1",
185
+ "kind" : "remoteSourceControl",
186
+ "location" : "https://github.com/apple/swift-asn1.git",
187
+ "state" : {
188
+ "revision" : "3664efa98bd302ec90e5b27ee1c0649fbcc365bc"
189
+ }
190
+ },
191
+ {
192
+ "identity" : "swift-case-paths",
193
+ "kind" : "remoteSourceControl",
194
+ "location" : "https://github.com/pointfreeco/swift-case-paths",
195
+ "state" : {
196
+ "revision" : "5da6989aae464f324eef5c5b52bdb7974725ab81",
197
+ "version" : "1.0.0"
198
+ }
199
+ },
200
+ {
201
+ "identity" : "swift-custom-dump",
202
+ "kind" : "remoteSourceControl",
203
+ "location" : "https://github.com/pointfreeco/swift-custom-dump",
204
+ "state" : {
205
+ "revision" : "3efbfba0e4e56c7187cc19137ee16b7c95346b79",
206
+ "version" : "1.1.0"
207
+ }
208
+ },
209
+ {
210
+ "identity" : "swift-numerics",
211
+ "kind" : "remoteSourceControl",
212
+ "location" : "https://github.com/apple/swift-numerics.git",
213
+ "state" : {
214
+ "revision" : "0a5bc04095a675662cf24757cc0640aa2204253b",
215
+ "version" : "1.0.2"
216
+ }
217
+ },
218
+ {
219
+ "identity" : "swift-protobuf",
220
+ "kind" : "remoteSourceControl",
221
+ "location" : "https://github.com/apple/swift-protobuf.git",
222
+ "state" : {
223
+ "revision" : "cf62cdaea48b77f1a631e5cb3aeda6047c2cba1d",
224
+ "version" : "1.23.0"
225
+ }
226
+ },
227
+ {
228
+ "identity" : "swift-snapshot-testing",
229
+ "kind" : "remoteSourceControl",
230
+ "location" : "https://github.com/pointfreeco/swift-snapshot-testing",
231
+ "state" : {
232
+ "revision" : "696b86a6d151578bca7c1a2a3ed419a5f834d40f",
233
+ "version" : "1.13.0"
234
+ }
235
+ },
236
+ {
237
+ "identity" : "swift-syntax",
238
+ "kind" : "remoteSourceControl",
239
+ "location" : "https://github.com/apple/swift-syntax.git",
240
+ "state" : {
241
+ "revision" : "74203046135342e4a4a627476dd6caf8b28fe11b",
242
+ "version" : "509.0.0"
243
+ }
244
+ },
245
+ {
246
+ "identity" : "swiftui-navigation",
247
+ "kind" : "remoteSourceControl",
248
+ "location" : "https://github.com/pointfreeco/swiftui-navigation",
249
+ "state" : {
250
+ "revision" : "6eb293c49505d86e9e24232cb6af6be7fff93bd5",
251
+ "version" : "1.0.2"
252
+ }
253
+ },
254
+ {
255
+ "identity" : "xctest-dynamic-overlay",
256
+ "kind" : "remoteSourceControl",
257
+ "location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
258
+ "state" : {
259
+ "revision" : "23cbf2294e350076ea4dbd7d5d047c1e76b03631",
260
+ "version" : "1.0.2"
261
+ }
262
+ }
263
+ ],
264
+ "version" : 2
265
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-spm_version_updates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harold Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-13 00:00:00.000000000 Z
11
+ date: 2023-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api
@@ -246,8 +246,10 @@ files:
246
246
  - lib/spm_version_updates/plugin.rb
247
247
  - spec/spec_helper.rb
248
248
  - spec/spm_version_updates_spec.rb
249
- - spec/support/fixtures/Example.xcodeproj/project.pbxproj
250
- - spec/support/fixtures/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
249
+ - spec/support/fixtures/ExactVersion.xcodeproj/project.pbxproj
250
+ - spec/support/fixtures/ExactVersion.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
251
+ - spec/support/fixtures/UpToNextMajor.xcodeproj/project.pbxproj
252
+ - spec/support/fixtures/UpToNextMajor.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
251
253
  - spec/support/fixtures/github_pr.json
252
254
  homepage: https://github.com/hbmartin/danger-spm_version_updates
253
255
  licenses:
@@ -276,6 +278,8 @@ summary: A Danger plugin to detect if there are any updates to your Swift Packag
276
278
  test_files:
277
279
  - spec/spec_helper.rb
278
280
  - spec/spm_version_updates_spec.rb
279
- - spec/support/fixtures/Example.xcodeproj/project.pbxproj
280
- - spec/support/fixtures/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
281
+ - spec/support/fixtures/ExactVersion.xcodeproj/project.pbxproj
282
+ - spec/support/fixtures/ExactVersion.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
283
+ - spec/support/fixtures/UpToNextMajor.xcodeproj/project.pbxproj
284
+ - spec/support/fixtures/UpToNextMajor.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
281
285
  - spec/support/fixtures/github_pr.json
@@ -1,152 +0,0 @@
1
- // !$*UTF8*$!
2
- {
3
- archiveVersion = 1;
4
- classes = {
5
- };
6
- objectVersion = 54;
7
- objects = {
8
- /* Begin PBXGroup section */
9
- F1465EF423AA94BF0055F7C3 = {
10
- isa = PBXGroup;
11
- children = (
12
- F1465EFF23AA94BF0055F7C3 /* Demo */,
13
- );
14
- sourceTree = "<group>";
15
- };
16
- F1465EFF23AA94BF0055F7C3 /* Demo */ = {
17
- isa = PBXGroup;
18
- children = ();
19
- path = Demo;
20
- sourceTree = "<group>";
21
- };
22
- /* End PBXGroup section */
23
-
24
- /* Begin PBXProject section */
25
- F1465EF523AA94BF0055F7C3 /* Project object */ = {
26
- isa = PBXProject;
27
- attributes = {
28
- BuildIndependentTargetsInParallel = YES;
29
- LastSwiftUpdateCheck = 1420;
30
- LastUpgradeCheck = 1420;
31
- TargetAttributes = {
32
- F1465EFC23AA94BF0055F7C3 = {
33
- CreatedOnToolsVersion = 11.2.1;
34
- };
35
- };
36
- };
37
- buildConfigurationList = F1465EF823AA94BF0055F7C3 /* Build configuration list for PBXProject "Demo" */;
38
- compatibilityVersion = "Xcode 9.3";
39
- developmentRegion = en;
40
- hasScannedForEncodings = 0;
41
- knownRegions = (
42
- en,
43
- Base,
44
- es,
45
- "zh-Hans",
46
- fr,
47
- );
48
- mainGroup = F1465EF423AA94BF0055F7C3;
49
- packageReferences = (
50
- 115E40CB29B6D0EC00887A45 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */,
51
- 11BBD37629C1571400F7A968 /* XCRemoteSwiftPackageReference "Nuke" */,
52
- 11B8EE072A01A5AA00201115 /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */,
53
- 116B05982A66192400EB92A4 /* XCRemoteSwiftPackageReference "swiftui-navigation" */,
54
- F21242692A88338C005407A6 /* XCRemoteSwiftPackageReference "sentry-cocoa" */,
55
- 1179CA742AAF97DB006EF58C /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
56
- 112F9EF52ABD298C003D2CE6 /* XCRemoteSwiftPackageReference "LookingGlassUI" */,
57
- CA7732012ADDBF49009F6B1B /* XCRemoteSwiftPackageReference "PhoneNumberKit" */,
58
- F2C780582AEDB44700588969 /* XCRemoteSwiftPackageReference "analytics-swift" */,
59
- );
60
- productRefGroup = F1465EFE23AA94BF0055F7C3 /* Products */;
61
- projectDirPath = "";
62
- projectRoot = "";
63
- targets = ();
64
- };
65
- /* End PBXProject section */
66
-
67
- /* Begin XCConfigurationList section */
68
- F1465EF823AA94BF0055F7C3 /* Build configuration list for PBXNativeTarget "Demo" */ = {
69
- isa = XCConfigurationList;
70
- buildConfigurations = ();
71
- defaultConfigurationIsVisible = 0;
72
- defaultConfigurationName = Release;
73
- };
74
- /* End XCConfigurationList section */
75
-
76
- /* Begin XCRemoteSwiftPackageReference section */
77
- 112F9EF52ABD298C003D2CE6 /* XCRemoteSwiftPackageReference "LookingGlassUI" */ = {
78
- isa = XCRemoteSwiftPackageReference;
79
- repositoryURL = "https://github.com/ryanlintott/LookingGlassUI";
80
- requirement = {
81
- kind = upToNextMajorVersion;
82
- minimumVersion = 0.3.1;
83
- };
84
- };
85
- 115E40CB29B6D0EC00887A45 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = {
86
- isa = XCRemoteSwiftPackageReference;
87
- repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing";
88
- requirement = {
89
- kind = exactVersion;
90
- version = 1.13.0;
91
- };
92
- };
93
- 116B05982A66192400EB92A4 /* XCRemoteSwiftPackageReference "swiftui-navigation" */ = {
94
- isa = XCRemoteSwiftPackageReference;
95
- repositoryURL = "https://github.com/pointfreeco/swiftui-navigation";
96
- requirement = {
97
- kind = exactVersion;
98
- version = 1.0.2;
99
- };
100
- };
101
- 1179CA742AAF97DB006EF58C /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
102
- isa = XCRemoteSwiftPackageReference;
103
- repositoryURL = "https://github.com/firebase/firebase-ios-sdk";
104
- requirement = {
105
- kind = exactVersion;
106
- version = 10.15.0;
107
- };
108
- };
109
- 11B8EE072A01A5AA00201115 /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */ = {
110
- isa = XCRemoteSwiftPackageReference;
111
- repositoryURL = "https://github.com/maplibre/maplibre-gl-native-distribution";
112
- requirement = {
113
- kind = exactVersion;
114
- version = 5.13.0;
115
- };
116
- };
117
- 11BBD37629C1571400F7A968 /* XCRemoteSwiftPackageReference "Nuke" */ = {
118
- isa = XCRemoteSwiftPackageReference;
119
- repositoryURL = "https://github.com/kean/Nuke";
120
- requirement = {
121
- kind = exactVersion;
122
- version = 12.1.6;
123
- };
124
- };
125
- CA7732012ADDBF49009F6B1B /* XCRemoteSwiftPackageReference "PhoneNumberKit" */ = {
126
- isa = XCRemoteSwiftPackageReference;
127
- repositoryURL = "https://github.com/marmelroy/PhoneNumberKit.git";
128
- requirement = {
129
- kind = upToNextMajorVersion;
130
- minimumVersion = 3.7.4;
131
- };
132
- };
133
- F21242692A88338C005407A6 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {
134
- isa = XCRemoteSwiftPackageReference;
135
- repositoryURL = "https://github.com/getsentry/sentry-cocoa.git";
136
- requirement = {
137
- kind = exactVersion;
138
- version = 8.12.0;
139
- };
140
- };
141
- F2C780582AEDB44700588969 /* XCRemoteSwiftPackageReference "analytics-swift" */ = {
142
- isa = XCRemoteSwiftPackageReference;
143
- repositoryURL = "git@github.com:hbmartin/analytics-swift.git";
144
- requirement = {
145
- branch = main;
146
- kind = branch;
147
- };
148
- };
149
- /* End XCRemoteSwiftPackageReference section */
150
- };
151
- rootObject = F1465EF523AA94BF0055F7C3 /* Project object */;
152
- }