szczupac 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d454bd0ac9716b5b3916394e48a0464128931bd4a0fd7fd2e6a12600dd76bfef
4
+ data.tar.gz: ca780cbe6e44e6e445f5a3dace15869843250b262a8719b5e3b80b2b4680a6d3
5
+ SHA512:
6
+ metadata.gz: 249cec6e1117910ac22660d4e4dfb995b47be7f1b971c9ef396fd46f0c1282862222883f48ca378fbe238b935655d0ca99ce4d34860f6243c3dc962edc9a5efa
7
+ data.tar.gz: ddc994f3f9c040664a16829df9153c2595b7cd451174c9077822eecba6400efb3429600602a68e8c411cba1d4cba6ebbc6448f6ab17600d33fd30b2897f852b7
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Szczupac
4
+ VERSION = "0.1.0"
5
+ end
data/lib/szczupac.rb ADDED
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "szczupac/version"
4
+
5
+ module Szczupac
6
+ def call(**named_lanes)
7
+ named_lanes
8
+ .flat_map do |name, values|
9
+ first_from_rest =
10
+ named_lanes
11
+ .reject { |n, _| n == name }
12
+ .map { |n, v| { n => v.first } }
13
+ .reduce(&:merge)
14
+ values
15
+ .map { |v| { name => v } }
16
+ .product([first_from_rest])
17
+ .map { |v| v.reduce(&:merge) }
18
+ end
19
+ .uniq
20
+ end
21
+ module_function :call
22
+ end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: szczupac
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Paweł Pacana
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-07-20 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - pawel.pacana@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/szczupac.rb
21
+ - lib/szczupac/version.rb
22
+ homepage:
23
+ licenses:
24
+ - MIT
25
+ metadata:
26
+ changelog_uri: https://github.com/pawelpacana/szczupac/releases
27
+ source_code_uri: https://github.com/pawelpacana/szczupac
28
+ bug_tracker_uri: https://github.com/pawelpacana/szczupac/issues
29
+ rubygems_mfa_required: 'true'
30
+ post_install_message:
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: 3.0.0
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ requirements: []
45
+ rubygems_version: 3.4.17
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: Generate matrix combinations for CI, that is all.
49
+ test_files: []