unwrappr 0.6.0 → 0.7.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: 197b63d85c71cc3d7701f8f22cd1a0c305bf07a6eade0c5e7c8ca52ec0538bb3
4
- data.tar.gz: 07546ef3c1f66c5a6e9dd632d0f1ac07a5bae6c56897ec6908b9f5ae360dc682
3
+ metadata.gz: 716600410b7247858c17de5f15be9934b38014a8d4726e362381db3cc97e1bc5
4
+ data.tar.gz: a7856db5a3f7c3b968f5ed9999c569aab80b3498e429950a1543f745d5febd98
5
5
  SHA512:
6
- metadata.gz: c0eb4bed6b570378cc213667250f9fbca23e3a25ac84779d8ec2d54ebe4c7fb1cd601c1bac84a92ebff2861a52950f9c048f7c79fb947001c259289ca54272bd
7
- data.tar.gz: 2ccbd4e9c68b2d38746b5a88bd37730f1bd211d65d94ceed575b6573e151d733cc7dae0dc4331dd9381d1b8084a05d92d932ad6800d83e726ed456dc4bcce2f1
6
+ metadata.gz: 29c64e12848728098873c2267c75a8ec6c5d2b04b0efa82305a1774f3c2a0aac14c3aa8089ae5c61e6e8cf4ee8302a86d6fd4d2710d38508ce864f4bdb6a7b43
7
+ data.tar.gz: 8bfaf10e97b15b062208187e91f4b9647bd9a0836245b20e7aa20c7d91c045bd0ba04ee2ab8fb15a9ebe50646333c880e07151e82ef037e4fdc9c0815d541590
data/CHANGELOG.md CHANGED
@@ -6,7 +6,19 @@ 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.6.0...HEAD
9
+ [Unreleased]: https://github.com/envato/unwrappr/compare/v0.7.0...HEAD
10
+
11
+ ## [0.7.0] 2021-07-15
12
+
13
+ ### Add
14
+ - Include link to gem contents diff in gem change annotation ([#88]).
15
+
16
+ ### Fix
17
+ - Fix Rubocop issues ([#89]).
18
+
19
+ [0.7.0]: https://github.com/envato/unwrappr/compare/v0.6.0...v0.7.0
20
+ [#88]: https://github.com/envato/unwrappr/pull/88
21
+ [#89]: https://github.com/envato/unwrappr/pull/89
10
22
 
11
23
  ## [0.6.0] 2021-05-12
12
24
 
@@ -28,7 +28,7 @@ module Unwrappr
28
28
 
29
29
  def error_message(response:, name:)
30
30
  "Rubygems response for #{name}: "\
31
- "HTTP #{response.status}: #{response.body}"
31
+ "HTTP #{response.status}: #{response.body}"
32
32
  end
33
33
  end
34
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Unwrappr
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.0'
5
5
  end
@@ -18,19 +18,36 @@ module Unwrappr
18
18
  end
19
19
 
20
20
  def write
21
- "[_#{change_log}, #{source_code}_]\n"
21
+ "[_#{change_log}, #{source_code}, #{gem_diff}_]\n"
22
22
  end
23
23
 
24
24
  private
25
25
 
26
26
  def change_log
27
27
  link_or_strikethrough('change-log',
28
- @gem_change_info[:ruby_gems]&.changelog_uri)
28
+ ruby_gems_info&.changelog_uri)
29
29
  end
30
30
 
31
31
  def source_code
32
32
  link_or_strikethrough('source-code',
33
- @gem_change_info[:ruby_gems]&.source_code_uri)
33
+ ruby_gems_info&.source_code_uri)
34
+ end
35
+
36
+ GEM_DIFF_URL_TEMPLATE = 'https://my.diffend.io/gems/%s/%s/%s'
37
+ private_constant :GEM_DIFF_URL_TEMPLATE
38
+
39
+ def gem_diff
40
+ if !ruby_gems_info.nil? && !@gem_change.added? && !@gem_change.removed?
41
+ gem_diff_url = format(GEM_DIFF_URL_TEMPLATE,
42
+ @gem_change.name,
43
+ @gem_change.base_version.to_s,
44
+ @gem_change.head_version.to_s)
45
+ end
46
+ link_or_strikethrough('gem-diff', gem_diff_url)
47
+ end
48
+
49
+ def ruby_gems_info
50
+ @gem_change_info[:ruby_gems]
34
51
  end
35
52
 
36
53
  def link_or_strikethrough(text, url)
@@ -88,7 +88,7 @@ module Unwrappr
88
88
  # rubocop:disable Style/GuardClause
89
89
  if advisory.cvss_v2
90
90
  "CVSS V2: [#{advisory.cvss_v2} #{advisory.criticality}]"\
91
- "(#{cvss_v2_url(advisory.cve_id)})"
91
+ "(#{cvss_v2_url(advisory.cve_id)})"
92
92
  end
93
93
  # rubocop:enable Style/GuardClause
94
94
  end
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.6.0
4
+ version: 0.7.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: 2021-05-12 00:00:00.000000000 Z
15
+ date: 2021-07-15 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
@@ -292,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
292
292
  - !ruby/object:Gem::Version
293
293
  version: '2.7'
294
294
  requirements: []
295
- rubygems_version: 3.2.11
295
+ rubygems_version: 3.2.23
296
296
  signing_key:
297
297
  specification_version: 4
298
298
  summary: A tool to unwrap your gems and see what's changed easily