mutant 0.11.12 → 0.11.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c75928a9c55d93ebfad196c028271b8c82d7d9eb94e48873ac75c9ee4bb212f
4
- data.tar.gz: 27149ec498db15629bb18c55a5840e3ea8c369542a85bf9d3658cadc78fc8f4a
3
+ metadata.gz: 7c08faadc47c13b47986719ddba1ca0437797643ff67c4d16869f6e195352fa2
4
+ data.tar.gz: 3ea0e03ddff19eb0ae3566e611fbd2171dd0624cbae5c40903c4cbf3ade98ebb
5
5
  SHA512:
6
- metadata.gz: 44867690e5c1c367df8b22ec3fa5b35941328e12fd10a26a252baa3815c955fbd37f1adaaaadfafbcdc1f72280ce013d37996d001c163930c084b95b07905362
7
- data.tar.gz: b22e71a0ae7f1ecb96345e7996e61c4ee843c7b82442f21dea3516be132503fa9c0193443f1d7da9196fbb27f23f3ef858ee58f81c03b7cda8d4f4dcced1a9a7
6
+ metadata.gz: c18497e6427a64d05f11dab3a0a177c2bdb99c00a5acb7984bfa76ef7083628afa16ede769a2152b06101dfe0876bd38de02633f8082b38baf1fef7e8c08576b
7
+ data.tar.gz: 96348aa482664e934312d7e6fc363b69d94f5158bbb5af7feaef329814769cc645c1474625675e2def3aab0fafc3ab164fe151958a2650019c45084eeb6bfe87
@@ -39,7 +39,17 @@ module Mutant
39
39
  new(match[:host], match[:path].downcase)
40
40
  end
41
41
  private_class_method :parse_url
42
- end
42
+
43
+ def allow?(other)
44
+ other.host.eql?(host) && path_match?(other.path)
45
+ end
46
+
47
+ private
48
+
49
+ def path_match?(other_path)
50
+ path.eql?(other_path) || (path.end_with?('/*') && other_path.start_with?(path[..-2]))
51
+ end
52
+ end # Opensource
43
53
 
44
54
  def self.from_json(value)
45
55
  new(
@@ -60,7 +70,7 @@ module Mutant
60
70
  private
61
71
 
62
72
  def check_subscription(actual)
63
- if (licensed & actual).any?
73
+ if licensed.any? { |repository| actual.any? { |other| repository.allow?(other) } }
64
74
  success
65
75
  else
66
76
  failure(licensed, actual)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutant
4
4
  # Current mutant version
5
- VERSION = '0.11.12'
5
+ VERSION = '0.11.13'
6
6
  end # Mutant
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.12
4
+ version: 0.11.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Schirp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-27 00:00:00.000000000 Z
11
+ date: 2022-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs
@@ -393,7 +393,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
393
393
  - !ruby/object:Gem::Version
394
394
  version: '0'
395
395
  requirements: []
396
- rubygems_version: 3.1.6
396
+ rubygems_version: 3.3.7
397
397
  signing_key:
398
398
  specification_version: 4
399
399
  summary: ''