bake-test-external 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/bake/test/external.rb +57 -0
- data/lib/bake/test/external/version.rb +27 -0
- data.tar.gz.sig +3 -0
- metadata +101 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2cdfc0de727bd5d7a45e403bf50d03218d0945e0d1de9cf498299ec612183b62
|
4
|
+
data.tar.gz: 4da2a23621d4a7d165cd39e9ec81219b6cab4a1eba324989aef5c54da35303b6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 72f29732719928235dac8ac60a7d98c81fae1df402d7c43f55f42b8f94b16ce49d9fd2f705d654b37b58955c1e8d1717973b58c198656f3d1120a9088426ead3
|
7
|
+
data.tar.gz: 5cefe5fab7bb85ea572b4683b8d605231d8c5438f575280462a38534025e9568b1c0ad859b4dbd8b031b1cd1ba30a190ee19d7c74b92a04a21f2c626e7f3bc11
|
checksums.yaml.gz.sig
ADDED
Binary file
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Run external tests.
|
4
|
+
# @parameter gemspec [String] The input gemspec path.
|
5
|
+
def external(input: nil, gemspec: self.find_gemspec)
|
6
|
+
require 'bundler'
|
7
|
+
require 'yaml'
|
8
|
+
|
9
|
+
input ||= YAML.load_file('config/external.yaml', symbolize_names: true)
|
10
|
+
|
11
|
+
input.each do |key, config|
|
12
|
+
url = config[:url]
|
13
|
+
command = config[:command]
|
14
|
+
|
15
|
+
Bundler.with_unbundled_env do
|
16
|
+
clone_and_test(gemspec.name, key, url, command)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def find_gemspec(glob = "*.gemspec")
|
24
|
+
paths = Dir.glob(glob, base: @root).sort
|
25
|
+
|
26
|
+
if paths.size > 1
|
27
|
+
raise "Multiple gemspecs found: #{paths}, please specify one!"
|
28
|
+
end
|
29
|
+
|
30
|
+
if path = paths.first
|
31
|
+
return ::Gem::Specification.load(path)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def clone_and_test(name, key, url, command)
|
36
|
+
require 'fileutils'
|
37
|
+
|
38
|
+
path = "external/#{key}"
|
39
|
+
|
40
|
+
unless File.directory?(path)
|
41
|
+
FileUtils.mkdir_p path
|
42
|
+
system("git", "clone", url, path)
|
43
|
+
|
44
|
+
# I tried using `bundle config --local local.async ../` but it simply doesn't work.
|
45
|
+
# system("bundle", "config", "--local", "local.async", __dir__, chdir: path)
|
46
|
+
|
47
|
+
gemfile_paths = ["#{path}/Gemfile", "#{path}/gems.rb"]
|
48
|
+
gemfile_path = gemfile_paths.find{|path| File.exist?(path)}
|
49
|
+
|
50
|
+
File.open(gemfile_path, "a") do |file|
|
51
|
+
file.puts nil, "# Added by external testing:"
|
52
|
+
file.puts("gem #{name.to_s.dump}, path: '../../'")
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
system(*command, chdir: path) or abort("External tests #{key} failed!")
|
57
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Copyright, 2022, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
# of this software and associated documentation files (the "Software"), to deal
|
5
|
+
# in the Software without restriction, including without limitation the rights
|
6
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
# copies of the Software, and to permit persons to whom the Software is
|
8
|
+
# furnished to do so, subject to the following conditions:
|
9
|
+
#
|
10
|
+
# The above copyright notice and this permission notice shall be included in
|
11
|
+
# all copies or substantial portions of the Software.
|
12
|
+
#
|
13
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
# THE SOFTWARE.
|
20
|
+
|
21
|
+
module Bake
|
22
|
+
module Test
|
23
|
+
module External
|
24
|
+
VERSION = "0.1.0"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data.tar.gz.sig
ADDED
metadata
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bake-test-external
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Samuel Williams
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIEhDCCAuygAwIBAgIBATANBgkqhkiG9w0BAQsFADA3MTUwMwYDVQQDDCxzYW11
|
14
|
+
ZWwud2lsbGlhbXMvREM9b3Jpb250cmFuc2Zlci9EQz1jby9EQz1uejAeFw0yMTA4
|
15
|
+
MTYwNjMzNDRaFw0yMjA4MTYwNjMzNDRaMDcxNTAzBgNVBAMMLHNhbXVlbC53aWxs
|
16
|
+
aWFtcy9EQz1vcmlvbnRyYW5zZmVyL0RDPWNvL0RDPW56MIIBojANBgkqhkiG9w0B
|
17
|
+
AQEFAAOCAY8AMIIBigKCAYEAyXLSS/cw+fXJ5e7hi+U/TeChPWeYdwJojDsFY1xr
|
18
|
+
xvtqbTTL8gbLHz5LW3QD2n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
bYt5ocnEpKSomR9ZtnCGljds/aeO1Xgpn2r9HHcjwnH346iNrnHmMlC7BtHUFPDg
|
34
|
+
Ts92S47PTOXzwPBDsrFiq3VLbRjHSwf8rpqybQBH9MfzxGGxTaETQYOd6b4e4Ag6
|
35
|
+
y92abGna0bmIEb4+Tx9rQ10Uijh1POzvr/VTH4bbIPy9FbKrRsIQ24qDbNJRtOpE
|
36
|
+
RAOsIl+HOBTb252nx1kIRN5hqQx272AJCbCjKx8egcUQKffFVVCI0nye09v5CK+a
|
37
|
+
HiLJ8VOFx6w=
|
38
|
+
-----END CERTIFICATE-----
|
39
|
+
date: 2022-08-05 00:00:00.000000000 Z
|
40
|
+
dependencies:
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
executables: []
|
72
|
+
extensions: []
|
73
|
+
extra_rdoc_files: []
|
74
|
+
files:
|
75
|
+
- bake/test/external.rb
|
76
|
+
- lib/bake/test/external/version.rb
|
77
|
+
homepage: https://github.com/ioquatix/bake-test-external
|
78
|
+
licenses:
|
79
|
+
- MIT
|
80
|
+
metadata:
|
81
|
+
funding_uri: https://github.com/sponsors/ioquatix/
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
requirements: []
|
97
|
+
rubygems_version: 3.3.7
|
98
|
+
signing_key:
|
99
|
+
specification_version: 4
|
100
|
+
summary: Run external test suites to check for breakage.
|
101
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|