unwrappr 0.3.5 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39fe485a8ba714ba4e22b8b7ba8acea5526ff391c47db66a4a10650ce249d7a0
4
- data.tar.gz: b08f8f60715a38c840e2333357e8251d202cdcfb11094a1caa4465aacfc8c8a1
3
+ metadata.gz: 17cf29453a149873809590eabc7cb496b39abe330f47514a24da54ec5f869ef7
4
+ data.tar.gz: e0e5ce8b470ef58e9a341bf70368c0a3e394c4db8322b52294b2fff773a343b0
5
5
  SHA512:
6
- metadata.gz: 5bad3d6eb78341a7053fe4228e963c0e057b518b20cad6056ce006dc981d8e20977ce6095e710b3aa3ae2045ac419871cb370c1454af6ba0eae8386be9a36d5e
7
- data.tar.gz: a2126e6001bfe6b82dba09d4d8a32d01b599589f1d245ed17033662336c895a5a8304afe4d4608b083ed162fea8d76b90d9fa8bcb1ae4ce6b9b9f1cad0761031
6
+ metadata.gz: 392d0cfc8f2f4613616f379765ec8f0ab43ec3aeb5bdb8fbf6fc5ff816337b6a9d9eecdab729caceb2f43fda883a44290821e58f1cfd8e2e5877ed2e2fe384de
7
+ data.tar.gz: 25a9a43fc432e09eb0aeb2cf019d3e6a6b8fe2ef1e4ccd5ffaeccde386b16330679489085f0e5c0bbdec8327e2495c553e50d75672d8d1ae629adf8389b95320
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
+ *.gem
2
+ .rspec_status
1
3
  /.bundle/
2
4
  /.yardoc
3
5
  /Gemfile.lock
@@ -9,6 +11,3 @@
9
11
  /spec/reports/
10
12
  /stdout.txt
11
13
  /tmp/
12
-
13
- # rspec failure tracking
14
- .rspec_status
@@ -1,9 +1,8 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.8
5
- - 2.4.5
6
- - 2.5.3
7
- - 2.6.0
4
+ - 2.5.8
5
+ - 2.6.6
6
+ - 2.7.1
8
7
  before_install:
9
8
  - gem update --system
@@ -6,7 +6,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- [Unreleased]: https://github.com/envato/unwrappr/compare/v0.3.5...HEAD
9
+ [Unreleased]: https://github.com/envato/unwrappr/compare/v0.4.0...HEAD
10
+
11
+ ## [0.4.0] 2020-04-14
12
+ ### Changed
13
+ - `bundler-audit` limited to `>= 0.6.0` ([#71])
14
+
15
+ ### Removed
16
+ - Support for Ruby 2.3 and 2.4 ([#73])
17
+
18
+ ### Added
19
+ - Rake vulnerability CVE-2020-8130 fixes ([#72])
20
+ - Support for Ruby 2.6 and 2.7 ([#73])
21
+ - Support for version numbers including a fourth segment (_e.g._ "6.0.2.2") ([#74])
22
+ - Support for GitHub URIs including anchors ([#75])
23
+
24
+ [0.4.0]: https://github.com/envato/unwrappr/compare/v0.3.5..v0.4.0
25
+ [#71]: https://github.com/envato/unwrappr/pull/71
26
+ [#72]: https://github.com/envato/unwrappr/pull/72
27
+ [#73]: https://github.com/envato/unwrappr/pull/73
28
+ [#74]: https://github.com/envato/unwrappr/pull/74
29
+ [#75]: https://github.com/envato/unwrappr/pull/75
10
30
 
11
31
  ## [0.3.5] 2019-11-28
12
32
  ### Changed
data/README.md CHANGED
@@ -63,13 +63,12 @@ See https://github.com/settings/tokens to set up personal access tokens.
63
63
 
64
64
  ## Requirements
65
65
 
66
- - Ruby (tested against v2.3 and above)
66
+ - Ruby (tested against v2.5 and above)
67
67
  - GitHub access (see Configuration section)
68
68
 
69
- ## Contact ![Join the chat at https://gitter.im/envato/unwrappr](https://badges.gitter.im/Join%20Chat.svg)
69
+ ## Contact
70
70
 
71
71
  - [GitHub project](https://github.com/envato/unwrappr)
72
- - [Gitter chat room](https://gitter.im/envato/unwrappr)
73
72
  - Bug reports and feature requests are welcome via [GitHub Issues](https://github.com/envato/unwrappr/issues)
74
73
 
75
74
  ## Maintainers
@@ -43,6 +43,11 @@ module Unwrappr
43
43
  head_version.patch_difference?(base_version)
44
44
  end
45
45
 
46
+ def hotfix?
47
+ head_version && base_version &&
48
+ head_version.hotfix_difference?(base_version)
49
+ end
50
+
46
51
  def upgrade?
47
52
  head_version && base_version && (head_version > base_version)
48
53
  end
@@ -13,9 +13,10 @@ module Unwrappr
13
13
  @major = segment(0)
14
14
  @minor = segment(1)
15
15
  @patch = segment(2)
16
+ @hotfix = segment(3)
16
17
  end
17
18
 
18
- attr_reader :major, :minor, :patch, :version
19
+ attr_reader :major, :minor, :patch, :hotfix, :version
19
20
 
20
21
  def major_difference?(other)
21
22
  (major != other.major)
@@ -32,6 +33,13 @@ module Unwrappr
32
33
  (patch != other.patch)
33
34
  end
34
35
 
36
+ def hotfix_difference?(other)
37
+ (major == other.major) &&
38
+ (minor == other.minor) &&
39
+ (patch == other.patch) &&
40
+ (hotfix != other.hotfix)
41
+ end
42
+
35
43
  def <=>(other)
36
44
  @version <=> other.version
37
45
  end
@@ -7,7 +7,10 @@ module Unwrappr
7
7
  # Implements the `gem_researcher` interface required by the
8
8
  # LockFileAnnotator.
9
9
  class GithubRepo
10
- GITHUB_URI_PATTERN = %r{^https?://github.com/(?<repo>[^/]+/[^/]+)}i.freeze
10
+ GITHUB_URI_PATTERN = %r{^https?://
11
+ github.com/
12
+ (?<repo>[^/]+/[[:alnum:]_.-]+)
13
+ }ix.freeze
11
14
 
12
15
  def research(_gem_change, gem_change_info)
13
16
  repo = match_repo(gem_change_info, :source_code_uri) ||
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Unwrappr
4
- VERSION = '0.3.5'
4
+ VERSION = '0.4.0'
5
5
  end
@@ -27,18 +27,28 @@ module Unwrappr
27
27
  private
28
28
 
29
29
  def_delegators(:@gem_change,
30
- :added?, :removed?, :major?, :minor?, :patch?,
30
+ :added?, :removed?, :major?, :minor?, :patch?, :hotfix?,
31
31
  :upgrade?, :downgrade?, :base_version, :head_version)
32
32
 
33
33
  def change_description
34
- if added? then 'Gem added :snowman:'
35
- elsif removed? then 'Gem removed :fire:'
36
- elsif major?
34
+ if added?
35
+ 'Gem added :snowman:'
36
+ elsif removed?
37
+ 'Gem removed :fire:'
38
+ else
39
+ version_description
40
+ end
41
+ end
42
+
43
+ def version_description
44
+ if major?
37
45
  "**Major** version #{grade}:exclamation: #{version_diff}"
38
46
  elsif minor?
39
47
  "**Minor** version #{grade}:large_orange_diamond: #{version_diff}"
40
48
  elsif patch?
41
49
  "**Patch** version #{grade}:small_blue_diamond: #{version_diff}"
50
+ elsif hotfix?
51
+ "**Hotfix** version #{grade}:small_red_triangle: #{version_diff}"
42
52
  end
43
53
  end
44
54
 
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength:
22
22
  spec.description = 'bundle update PRs: Automated. Annotated.'
23
23
  spec.homepage = 'http://www.unwrappr.com.org'
24
24
  spec.license = 'MIT'
25
- spec.required_ruby_version = '~> 2.3'
25
+ spec.required_ruby_version = '~> 2.5'
26
26
  spec.required_rubygems_version = '>= 2.7'
27
27
 
28
28
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength:
33
33
  spec.require_paths = ['lib']
34
34
 
35
35
  spec.add_dependency 'bundler', '< 3'
36
- spec.add_dependency 'bundler-audit', '~> 0'
36
+ spec.add_dependency 'bundler-audit', '>= 0.6.0'
37
37
  spec.add_dependency 'clamp', '~> 1'
38
38
  spec.add_dependency 'faraday', '~> 0'
39
39
  spec.add_dependency 'git', '~> 1'
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength:
43
43
  spec.add_development_dependency 'guard', '~> 2'
44
44
  spec.add_development_dependency 'guard-rspec', '~> 4'
45
45
  spec.add_development_dependency 'pry', '~> 0'
46
- spec.add_development_dependency 'rake', '~> 10.0'
46
+ spec.add_development_dependency 'rake', '>= 12.3.3'
47
47
  spec.add_development_dependency 'rspec', '~> 3.0'
48
48
  spec.add_development_dependency 'rspec-its', '~> 1'
49
49
  spec.add_development_dependency 'rubocop', '>= 0.49.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unwrappr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emilyn Escabarte
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2019-11-28 00:00:00.000000000 Z
15
+ date: 2020-04-14 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
@@ -32,16 +32,16 @@ dependencies:
32
32
  name: bundler-audit
33
33
  requirement: !ruby/object:Gem::Requirement
34
34
  requirements:
35
- - - "~>"
35
+ - - ">="
36
36
  - !ruby/object:Gem::Version
37
- version: '0'
37
+ version: 0.6.0
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - "~>"
42
+ - - ">="
43
43
  - !ruby/object:Gem::Version
44
- version: '0'
44
+ version: 0.6.0
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: clamp
47
47
  requirement: !ruby/object:Gem::Requirement
@@ -158,16 +158,16 @@ dependencies:
158
158
  name: rake
159
159
  requirement: !ruby/object:Gem::Requirement
160
160
  requirements:
161
- - - "~>"
161
+ - - ">="
162
162
  - !ruby/object:Gem::Version
163
- version: '10.0'
163
+ version: 12.3.3
164
164
  type: :development
165
165
  prerelease: false
166
166
  version_requirements: !ruby/object:Gem::Requirement
167
167
  requirements:
168
- - - "~>"
168
+ - - ">="
169
169
  - !ruby/object:Gem::Version
170
- version: '10.0'
170
+ version: 12.3.3
171
171
  - !ruby/object:Gem::Dependency
172
172
  name: rspec
173
173
  requirement: !ruby/object:Gem::Requirement
@@ -284,14 +284,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
284
284
  requirements:
285
285
  - - "~>"
286
286
  - !ruby/object:Gem::Version
287
- version: '2.3'
287
+ version: '2.5'
288
288
  required_rubygems_version: !ruby/object:Gem::Requirement
289
289
  requirements:
290
290
  - - ">="
291
291
  - !ruby/object:Gem::Version
292
292
  version: '2.7'
293
293
  requirements: []
294
- rubygems_version: 3.0.6
294
+ rubygems_version: 3.0.3
295
295
  signing_key:
296
296
  specification_version: 4
297
297
  summary: A tool to unwrap your gems and see what's changed easily