bake-test-external 0.3.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/test/external.rb +19 -3
- data/lib/bake/test/external/version.rb +1 -1
- data/license.md +1 -0
- data/readme.md +1 -0
- data.tar.gz.sig +0 -0
- metadata +3 -2
- metadata.gz.sig +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 436b2f2def2f96fc9bcb105b293e068bf78b7a1343d4cece9d1c82601260eece
|
4
|
+
data.tar.gz: 2311ade76f8454a7cc535e8c7717e21b56ebbe92b4a419072def38c750bd1907
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3619f8a89b6a4b7aab0e0962519f0ab28176314e70189d5917ef6008afceeb34dd960bcad22be6cc0569d6f850fe772cee491586d9190439ead1fcdbf6452932
|
7
|
+
data.tar.gz: fa462ccd174b03d27d06f368a91048ab50b2e5b0d8f3139598fb53b2dff4f32ebdae880031b89994ce8a495b245c828181f3327ab6b801af43cad8732a9d3e98
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/bake/test/external.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
# Released under the MIT License.
|
4
4
|
# Copyright, 2022, by Samuel Williams.
|
5
5
|
# Copyright, 2022, by Akshay Birajdar.
|
6
|
+
# Copyright, 2022, by Hiroaki Osawa.
|
6
7
|
|
7
8
|
DEFAULT_EXTERNALS_PATH = 'config/external.yaml'
|
8
9
|
DEFAULT_COMMAND = "bake test"
|
@@ -42,10 +43,14 @@ def find_gemspec(glob = "*.gemspec")
|
|
42
43
|
end
|
43
44
|
|
44
45
|
def clone_and_test(name, key, config)
|
46
|
+
path = clone_repository(name, key, config)
|
47
|
+
test_repository(path, config) or abort("External tests #{key} failed!")
|
48
|
+
end
|
49
|
+
|
50
|
+
def clone_repository(name, key, config)
|
45
51
|
require 'fileutils'
|
46
52
|
|
47
53
|
url = config[:url]
|
48
|
-
command = config.fetch(:command, DEFAULT_COMMAND)
|
49
54
|
|
50
55
|
path = "external/#{key}"
|
51
56
|
|
@@ -57,6 +62,10 @@ def clone_and_test(name, key, config)
|
|
57
62
|
command << "--branch" << branch
|
58
63
|
end
|
59
64
|
|
65
|
+
if tag = config[:tag]
|
66
|
+
command << "--tag" << tag
|
67
|
+
end
|
68
|
+
|
60
69
|
command << url << path
|
61
70
|
system(*command)
|
62
71
|
|
@@ -65,12 +74,13 @@ def clone_and_test(name, key, config)
|
|
65
74
|
|
66
75
|
gemfile_paths = ["#{path}/Gemfile", "#{path}/gems.rb"]
|
67
76
|
gemfile_path = gemfile_paths.find{|path| File.exist?(path)}
|
68
|
-
|
77
|
+
|
69
78
|
File.open(gemfile_path, 'r+') do |file|
|
70
79
|
pattern = /gem.*?['"]#{name}['"]/
|
71
80
|
lines = file.grep_v(pattern)
|
72
81
|
|
73
82
|
file.seek(0)
|
83
|
+
file.truncate(0)
|
74
84
|
file.puts(lines)
|
75
85
|
file.puts nil, "# Added by external testing:"
|
76
86
|
file.puts("gem #{name.to_s.dump}, path: '../../'")
|
@@ -83,5 +93,11 @@ def clone_and_test(name, key, config)
|
|
83
93
|
system("bundle", "install", chdir: path)
|
84
94
|
end
|
85
95
|
|
86
|
-
|
96
|
+
return path
|
97
|
+
end
|
98
|
+
|
99
|
+
def test_repository(path, config)
|
100
|
+
command = config.fetch(:command, DEFAULT_COMMAND)
|
101
|
+
|
102
|
+
system(*command, chdir: path)
|
87
103
|
end
|
data/license.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
Copyright, 2022, by Samuel Williams.
|
4
4
|
Copyright, 2022, by Akshay Birajdar.
|
5
|
+
Copyright, 2022, by Hiroaki Osawa.
|
5
6
|
|
6
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
8
|
of this software and associated documentation files (the "Software"), to deal
|
data/readme.md
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bake-test-external
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
- Akshay Birajdar
|
9
|
+
- Hiroaki Osawa
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain:
|
@@ -38,7 +39,7 @@ cert_chain:
|
|
38
39
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
39
40
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
40
41
|
-----END CERTIFICATE-----
|
41
|
-
date: 2022-10-
|
42
|
+
date: 2022-10-13 00:00:00.000000000 Z
|
42
43
|
dependencies:
|
43
44
|
- !ruby/object:Gem::Dependency
|
44
45
|
name: bake
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
IW�fȎ�}9��RNqVt57�eP/��}IC���n�;��R��r�L�E�JK �ʒ��b�\紖�iq�\(������ێ�����Z'�榘啔
|
2
|
+
�|:�K��Nb�s��p���;�=�(�S�8������p�`�̗(ki��X'ph[w����{��e���I�o��9����29'��̤�Fj�=�ɲ*�M�>�_ʣcb�
|