knapsack_pro 5.2.0 → 5.2.1

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: f00531028caf0501edea4bf33df1bd81fe7ec9fbc888875797289f488e51851e
4
- data.tar.gz: dbe2e29cdb257ef772348653e40bcccc0ae4d70e8fc0fdd72fd26193784a60b7
3
+ metadata.gz: ebf6661c02960aefdda92e8fd84ce692e22e59e9fb4d593f677577cda62acb57
4
+ data.tar.gz: c56e9069badb8ed6090e1b8afb6f2c7d5aebb52a8b7e484484399586b3b7f82c
5
5
  SHA512:
6
- metadata.gz: 8ac1af3bf5eff25233ddb17294c56d9de6c9ec0d94c6412182a69ce2f4c04082eb705b0f204e42a342486c2001862171503d6726012421b336fe25c851e103c8
7
- data.tar.gz: 52d4b68c5793defaf162659597d63afa7461964c78e6b78385ffe21af5cdf529124a15c9d5d96f2ca7216e175daa8b9aa6d2b04698e23c59b2a71b6603b13318
6
+ metadata.gz: df2abe40a8b601acd3db8eedce7fc985273e4ff0100346300080ef0de7c8a3df96ecb98f7ab038f121f365d852da0ff877c579a57a652c1c5fb8318a72bc53a7
7
+ data.tar.gz: 032132b675a088531b3dd112f3258823ec4fd7b9beae8f982dbb3abc85508b4d4ccbd56112ab0e8f1faaf9b0af74edc98fd6896fb01d25ba77f20bef14f61273
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ### 5.2.1
4
+
5
+ * Shallow fetch the last month of commits only on CI
6
+ * Ensure input to `git shortlog`
7
+
8
+ https://github.com/KnapsackPro/knapsack_pro-ruby/pull/209
9
+
10
+ https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v5.2.0...v5.2.1
11
+
3
12
  ### 5.2.0
4
13
 
5
14
  * Send authors to the API
@@ -285,6 +285,11 @@ module KnapsackPro
285
285
  ENV['KNAPSACK_PRO_TEST_RUNNER_ADAPTER'] = adapter_class.to_s.split('::').last
286
286
  end
287
287
 
288
+ def ci?
289
+ ENV.fetch('CI', 'false').downcase == 'true' ||
290
+ detected_ci != KnapsackPro::Config::CI::Base
291
+ end
292
+
288
293
  private
289
294
 
290
295
  def required_env(env_name)
@@ -41,7 +41,11 @@ module KnapsackPro
41
41
  private
42
42
 
43
43
  def git_commit_authors
44
- `git fetch --shallow-since "1 month ago" >/dev/null 2>&1 && git shortlog --summary --email --since "one month ago"`
44
+ if KnapsackPro::Config::Env.ci?
45
+ `git fetch --shallow-since "one month ago" --quiet`
46
+ end
47
+
48
+ `git log --since "one month ago" | git shortlog --summary --email`
45
49
  end
46
50
 
47
51
  def git_build_author
@@ -1,3 +1,3 @@
1
1
  module KnapsackPro
2
- VERSION = '5.2.0'
2
+ VERSION = '5.2.1'
3
3
  end
@@ -1041,4 +1041,18 @@ describe KnapsackPro::Config::Env do
1041
1041
  end
1042
1042
  end
1043
1043
  end
1044
+
1045
+ describe '.ci?' do
1046
+ [
1047
+ ['CI from env', { 'CI' => 'True' }, true],
1048
+ ['Travis CI', { 'TRAVIS' => 'true' }, true],
1049
+ ['Unsupported', {}, false],
1050
+ ].each do |ci, env, expected|
1051
+ it "detects #{ci}" do
1052
+ stub_const("ENV", env)
1053
+
1054
+ expect(described_class.ci?).to eq(expected)
1055
+ end
1056
+ end
1057
+ end
1044
1058
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knapsack_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 5.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ArturT
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-17 00:00:00.000000000 Z
11
+ date: 2023-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake