danger-swiftlint 0.29.3 → 0.29.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: ff4ffa2a084c5b903a14711210a95e1bdfe5044d85c3bbff488d5c092c9de9d5
4
- data.tar.gz: 4a8252e860e488785d35b9283de12873a444f59f6be9ce26510c6bdcc29ad09b
3
+ metadata.gz: '09f08823f729e2d57b4149feb6a5464ba21ca96f7bc0f07d8e156b0c21a90321'
4
+ data.tar.gz: 91fdc081552de5d57997b820c7bdffd6c63a4776f0db5d7358507676b6a58971
5
5
  SHA512:
6
- metadata.gz: 159d9e9f5b4080cc3ed71affa8da60f9e74147c34befb33a75005e9013dc6d26082612251f2c24611dc57bd7f6aa49b7eebcb22bf96ee14e461e1eaf034f98ab
7
- data.tar.gz: 904d07909f3d8720a2ce1f6a774b64f716b6b0b58a373b0e23fbe6c3dba2a132f3b39414b86946efae6746c60c9295ff3498d40571532f7b5a8208aafa70b631
6
+ metadata.gz: cd93c164498ca997aab3c43928a4224c221b9124cda9b1af7a345139625677dd7622ca0d1d003416dbfce07a8e8a04b96c59528850d7c37bd99fa5e897e986ea
7
+ data.tar.gz: b78f4534c8f9882fe81b7a2cbd73d63de101dd3074b91525f72a766b7bbb0565421c913bac521e981e63260fab21eb76ff53a4fe3a1ba3ab6a367893a24bb035
@@ -16,7 +16,7 @@ namespace :swiftlint do
16
16
  SWIFTLINT_MD5_HASH = DangerSwiftlint::SWIFTLINT_HASH
17
17
 
18
18
  puts "Downloading swiftlint@#{VERSION}"
19
- sh "sh #{SCRIPT_PATH}/downloadSwiftlint.sh -u #{URL} -d #{DESTINATION} -a #{ASSET} -dh #{SWIFTLINT_MD5_HASH}"
19
+ sh "#{SCRIPT_PATH}/downloadSwiftlint.sh -u #{URL} -d #{DESTINATION} -a #{ASSET} -dh #{SWIFTLINT_MD5_HASH}"
20
20
  end
21
21
  end
22
22
 
@@ -34,7 +34,16 @@ done
34
34
  ### Download
35
35
  mkdir -p "${destination}"
36
36
  curl -s -L "${url}" -o "${asset}"
37
- if [[ ! -z "${SWIFTLINT_VERSION}" || $(md5 -q "${asset}") == "${default_hash}" ]]; then
37
+
38
+ # If macOS
39
+ if [[ "$OSTYPE" == "darwin"* ]]; then
40
+ resulting_hash=`md5 -q ${asset}`
41
+ # Default to linux
42
+ else
43
+ resulting_hash=`md5sum ${asset} | awk '{ print $1 }'`
44
+ fi
45
+
46
+ if [[ ! -z "${SWIFTLINT_VERSION}" || "$resulting_hash" == "${default_hash}" ]]; then
38
47
  # if another version is set || our hardcoded hash is correct
39
48
  unzip -o -q "${asset}" -d "${destination}"
40
49
  else
data/lib/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DangerSwiftlint
4
- VERSION = '0.29.3'
4
+ VERSION = '0.29.4'
5
5
  SWIFTLINT_VERSION = '0.43.1'
6
6
  SWIFTLINT_HASH = '4eaeabbb43b308975d16e3d9869880dc'
7
7
  end
@@ -220,6 +220,7 @@ module Danger
220
220
  end
221
221
 
222
222
  it 'crashes if renamed_files is not configured properly' do
223
+ allow_any_instance_of(Swiftlint).to receive(:lint).and_return('')
223
224
  allow(@swiftlint.git).to receive(:modified_files).and_return([
224
225
  'spec/fixtures/SwiftFileThatWasRenamedToSomethingElse.swift'
225
226
  ])
@@ -227,6 +228,7 @@ module Danger
227
228
  end
228
229
 
229
230
  it 'does not crash if a modified file was renamed' do
231
+ allow_any_instance_of(Swiftlint).to receive(:lint).and_return('')
230
232
  allow(@swiftlint.git).to receive(:modified_files).and_return([
231
233
  'spec/fixtures/SwiftFileThatWasRenamedToSomethingElse.swift'
232
234
  ])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-swiftlint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.3
4
+ version: 0.29.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ash Furrow
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2021-09-07 00:00:00.000000000 Z
15
+ date: 2021-09-15 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: danger