github_changelog_generator 1.16.3 → 1.16.4

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: 8c1d6d65e8dbae7462cb4af0ef5dcef7ccd69fa0d77cb4d36b2e1e340f955e0e
4
- data.tar.gz: 44f3e31077975a41154b8843253eb2dd56a1f37e6b8536fde56e825496568b7b
3
+ metadata.gz: 36cb65499e406ed1e554d4239e9d36806888d1ca9c3fe0f47e0e8e49053dd2b9
4
+ data.tar.gz: 991b1251d601d2504d2c610087b43d0deaebbe7f031987eda8dc5a84e7ac46cb
5
5
  SHA512:
6
- metadata.gz: 9dfcc5e4330a6bf05c098e0d5187259cb0993d7eb3d7c680a0bd12d70fa0ee5f00a2a334866460f5d011b19f6e4086109b8670590b8223885297fb0711beb102
7
- data.tar.gz: c77fd119b4bd3d854f9873bd726076460253eecc66bfc20d35f127053f5a8c448568c4bdec9b69f0e80992b7b2eb9032483dc4ccf8b4e428fad3bb1aaadcaa69
6
+ metadata.gz: d5d733ce47da1d762b8dd3c4513989955ecd1adfe973ba044baef80fec2917d621841e9779d97b8298f04cd5b05d64c97d78cc872ba73d9b46ed2db3ae709344
7
+ data.tar.gz: ecfad19e0066fb2e9ddbdbc6c514f1c86bf57c6ff0704999adc05a181812fc182469ad77ba7d9fdabe1cbf06adff20680df06b0121c35e602c27222cab983106
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "tmpdir"
4
- require "retriable"
5
4
  require "set"
6
5
  require "async"
7
6
  require "async/barrier"
@@ -456,10 +455,21 @@ Make sure, that you push tags to remote repo via 'git push --tags'"
456
455
  #
457
456
  # @return [Object] returns exactly the same, what you put in the block, but wrap it with begin-rescue block
458
457
  # @param [Proc] block
459
- def check_github_response(&block)
460
- Retriable.retriable(retry_options, &block)
458
+ def check_github_response
459
+ yield
461
460
  rescue MovedPermanentlyError => e
462
461
  fail_with_message(e, "The repository has moved, update your configuration")
462
+ rescue Octokit::TooManyRequests => e
463
+ resets_in = client.rate_limit.resets_in
464
+ Helper.log.error("#{e.class} #{e.message}; sleeping for #{resets_in}s...")
465
+
466
+ if (task = Async::Task.current?)
467
+ task.sleep(resets_in)
468
+ else
469
+ sleep(resets_in)
470
+ end
471
+
472
+ retry
463
473
  rescue Octokit::Forbidden => e
464
474
  fail_with_message(e, "Exceeded retry limit")
465
475
  rescue Octokit::Unauthorized => e
@@ -474,31 +484,6 @@ Make sure, that you push tags to remote repo via 'git push --tags'"
474
484
  sys_abort(message)
475
485
  end
476
486
 
477
- # Exponential backoff
478
- def retry_options
479
- {
480
- on: [Octokit::Forbidden],
481
- tries: MAX_FORBIDDEN_RETRIES,
482
- base_interval: sleep_base_interval,
483
- multiplier: 1.0,
484
- rand_factor: 0.0,
485
- on_retry: retry_callback
486
- }
487
- end
488
-
489
- def sleep_base_interval
490
- 1.0
491
- end
492
-
493
- def retry_callback
494
- proc do |exception, try, elapsed_time, next_interval|
495
- Helper.log.warn("RETRY - #{exception.class}: '#{exception.message}'")
496
- Helper.log.warn("#{try} tries in #{elapsed_time} seconds and #{next_interval} seconds until the next try")
497
- Helper.log.warn GH_RATE_LIMIT_EXCEEDED_MSG
498
- Helper.log.warn(client.rate_limit)
499
- end
500
- end
501
-
502
487
  # @param [Object] msg
503
488
  def sys_abort(msg)
504
489
  abort(msg)
@@ -29,7 +29,7 @@ module GitHubChangelogGenerator
29
29
  defaults = {
30
30
  heading_level: "##",
31
31
  heading_structures: [
32
- /^## \[(?<version>.+?)\]\((?<url>.+?)\)( \((?<date>.+?)\))?$/, # rubocop:disable Lint/MixedRegexpCaptureTypes
32
+ /^## \[(?<version>.+?)\](\((?<url>.+?)\))?( \((?<date>.+?)\))?$/, # rubocop:disable Lint/MixedRegexpCaptureTypes
33
33
  /^## (?<version>.+?)( \((?<date>.+?)\))?$/ # rubocop:disable Lint/MixedRegexpCaptureTypes
34
34
  ]
35
35
  }
@@ -45,6 +45,8 @@ module GitHubChangelogGenerator
45
45
  # The following heading structures are currently valid:
46
46
  # - ## [v1.0.2](https://github.com/zanui/chef-thumbor/tree/v1.0.1) (2015-03-24)
47
47
  # - ## [v1.0.2](https://github.com/zanui/chef-thumbor/tree/v1.0.1)
48
+ # - ## [v1.0.2] (2015-03-24)
49
+ # - ## [v1.0.2]
48
50
  # - ## v1.0.2 (2015-03-24)
49
51
  # - ## v1.0.2
50
52
  #
@@ -1,7 +1,7 @@
1
1
  ##
2
2
  ## Bundle of CA Root Certificates
3
3
  ##
4
- ## Certificate data from Mozilla as of: Tue Apr 13 03:12:04 2021 GMT
4
+ ## Certificate data from Mozilla as of: Tue May 25 03:12:05 2021 GMT
5
5
  ##
6
6
  ## This is a bundle of X.509 certificates of public Certificate Authorities
7
7
  ## (CA). These were automatically extracted from Mozilla's root certificates
@@ -14,7 +14,7 @@
14
14
  ## Just configure this file as the SSLCACertificateFile.
15
15
  ##
16
16
  ## Conversion done with mk-ca-bundle.pl version 1.28.
17
- ## SHA256: f377673fa3c22ba2188a4cea041c7b8c99a4817ffde6821e98325ce89324e5aa
17
+ ## SHA256: e292bd4e2d500c86df45b830d89417be5c42ee670408f1d2c454c63d8a782865
18
18
  ##
19
19
 
20
20
 
@@ -893,82 +893,6 @@ Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z
893
893
  WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
894
894
  -----END CERTIFICATE-----
895
895
 
896
- Chambers of Commerce Root - 2008
897
- ================================
898
- -----BEGIN CERTIFICATE-----
899
- MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD
900
- MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
901
- bS9hZGRyZXN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vbxrN8y8NmBGuScvfaAFPDRLLmF
928
- 9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK
929
- zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG
930
- nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
931
- OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ
932
- -----END CERTIFICATE-----
933
-
934
- Global Chambersign Root - 2008
935
- ==============================
936
- -----BEGIN CERTIFICATE-----
937
- MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD
938
- MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
939
- bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
940
- QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx
941
- NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg
942
- Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ
943
- QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
944
- aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf
945
- VtPkOpt2RbQT2//BthmLN0EYlVJ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24gUm9vdCAtIDIwMDiCCQDJzdPp
959
- 1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0
960
- dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG
961
- /5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6
962
- ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s
963
- dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg
964
- 9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH
965
- foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du
966
- qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr
967
- P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq
968
- c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
969
- 09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
970
- -----END CERTIFICATE-----
971
-
972
896
  Go Daddy Root Certificate Authority - G2
973
897
  ========================================
974
898
  -----BEGIN CERTIFICATE-----
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitHubChangelogGenerator
4
- VERSION = "1.16.3"
4
+ VERSION = "1.16.4"
5
5
  end
@@ -29,9 +29,6 @@ describe GitHubChangelogGenerator::OctoFetcher do
29
29
 
30
30
  context "when raises Octokit::Forbidden" do
31
31
  it "sleeps and retries and then aborts" do
32
- retry_limit = GitHubChangelogGenerator::OctoFetcher::MAX_FORBIDDEN_RETRIES - 1
33
- allow(fetcher).to receive(:sleep_base_interval).exactly(retry_limit).times.and_return(0)
34
-
35
32
  expect(fetcher).to receive(:sys_abort).with("Exceeded retry limit")
36
33
  fetcher.send(:check_github_response) { raise(Octokit::Forbidden) }
37
34
  end
@@ -38,6 +38,15 @@ describe GitHubChangelogGenerator::Reader do
38
38
  it { is_expected.to include("url" => "https://github.com/github-changelog-generator/Github-Changelog-Generator/tree/1.3.10") }
39
39
  it { is_expected.to include("date" => "2015-03-18") }
40
40
  end
41
+ context "when given a named link" do
42
+ subject { @reader.parse_heading("## [1.3.10]") }
43
+ it { is_expected.to include("version" => "1.3.10") }
44
+ end
45
+ context "when given a named link with date" do
46
+ subject { @reader.parse_heading("## [1.3.10] (2015-03-18)") }
47
+ it { is_expected.to include("version" => "1.3.10") }
48
+ it { is_expected.to include("date" => "2015-03-18") }
49
+ end
41
50
  context "when no url and date is provided" do
42
51
  subject { @reader.parse_heading("## foobar") }
43
52
  it { is_expected.to include("version" => "foobar", "url" => nil, "date" => nil) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github_changelog_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.3
4
+ version: 1.16.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Korolev
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-05-14 00:00:00.000000000 Z
13
+ date: 2021-06-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -124,20 +124,6 @@ dependencies:
124
124
  - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: '10.0'
127
- - !ruby/object:Gem::Dependency
128
- name: retriable
129
- requirement: !ruby/object:Gem::Requirement
130
- requirements:
131
- - - "~>"
132
- - !ruby/object:Gem::Version
133
- version: '3.0'
134
- type: :runtime
135
- prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- requirements:
138
- - - "~>"
139
- - !ruby/object:Gem::Version
140
- version: '3.0'
141
127
  description: Changelog generation has never been so easy. Fully automate changelog
142
128
  generation - this gem generate changelog file based on tags, issues and merged pull
143
129
  requests from GitHub.