modularity 3.0.1 → 3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f12124ad13bb239a891eb310290f11b78ec59afe6c8b06a5e93a31de25419a62
4
- data.tar.gz: 9b742d62111676d20497e9c847f8a31eca318b292768385b85236f4815eb4f46
3
+ metadata.gz: ae6112d5216094ee4cccfb211acdce311c402126a0108d56910a42b4ffe49776
4
+ data.tar.gz: 91c78a395463428308e3fda20fd7f6788191e49509b565653549f9a2e6e91314
5
5
  SHA512:
6
- metadata.gz: ec89142e9de11baa4f818bd89f33c102cad9695ca03d9b53e4db5519dc0f8dd2a46ac1ed48383a8576e6039948a7a202ef6602aa0ffea5ea4c71c7b8fb3bc171
7
- data.tar.gz: 9888756a4e7f8a964127211a4d1237aa9abea0983ffadac3d1a45862d9d7e1e349a13178d447dbef22c4edd0cd0f84bb60dda9ebe5f089dd0ed6c30f99dd12a4
6
+ metadata.gz: 21c3e3f0553bdc7c7a7367ff59a19ca8d0c374033347492972afa0ba551338aca9009405ba544ea30e50e1a824c94af7d09d9b4c77f53b885fc658e42be48253
7
+ data.tar.gz: 14b814a52fa1cd6623abd1dceca1e85658e6aa503002b0dbc60b4de0940c0bb1adbe2339c5bd70c33c7cb1166c6c02997aa9a195a488aa17e7dcc27d1ca9878f
@@ -16,10 +16,14 @@ jobs:
16
16
  include:
17
17
  - ruby: 2.5.7
18
18
  gemfile: Gemfile
19
+ - ruby: 2.6.10
20
+ gemfile: Gemfile
19
21
  - ruby: 2.7.4
20
22
  gemfile: Gemfile
21
23
  - ruby: 3.0.2
22
24
  gemfile: Gemfile
25
+ - ruby: 3.1.2
26
+ gemfile: Gemfile
23
27
  env:
24
28
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
25
29
  steps:
data/CHANGELOG.md CHANGED
@@ -10,6 +10,13 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
10
10
  ### Compatible changes
11
11
 
12
12
 
13
+ ## 3.1.0 - 2022-06-01
14
+
15
+ ### Compatible changes
16
+
17
+ - Add support for separation of positional and keyword arguments in ruby 3
18
+
19
+
13
20
  ## 3.0.1 - 2022-03-09
14
21
 
15
22
  ### Compatible changes
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- modularity (3.0.1)
4
+ modularity (3.1.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -2,14 +2,19 @@ module Modularity
2
2
 
3
3
  class ParametrizedTrait < Module
4
4
 
5
- def initialize(blank_trait, args)
5
+ def initialize(blank_trait, args, kwargs)
6
6
  @args = args
7
+ @kwargs = kwargs
7
8
  @macro = blank_trait.instance_variable_get(:@modularity_macro)
8
9
  include(blank_trait)
9
10
  end
10
11
 
11
12
  def included(base)
12
- base.class_exec(*@args, &@macro)
13
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7')
14
+ base.class_exec(*@args, &@macro)
15
+ else
16
+ base.class_exec(*@args, **@kwargs, &@macro)
17
+ end
13
18
  end
14
19
 
15
20
  end
@@ -27,9 +32,16 @@ module Modularity
27
32
 
28
33
  end
29
34
 
30
- def self.[](*args)
31
- blank_trait = self
32
- ParametrizedTrait.new(blank_trait, args)
35
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7')
36
+ def self.[](*args)
37
+ blank_trait = self
38
+ ParametrizedTrait.new(blank_trait, args, {})
39
+ end
40
+ else
41
+ def self.[](*args, **kwargs)
42
+ blank_trait = self
43
+ ParametrizedTrait.new(blank_trait, args, kwargs)
44
+ end
33
45
  end
34
46
 
35
47
  end
@@ -1,3 +1,3 @@
1
1
  module Modularity
2
- VERSION = '3.0.1'
2
+ VERSION = '3.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modularity
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-03-09 00:00:00.000000000 Z
11
+ date: 2022-06-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Traits and partial classes for Ruby
14
14
  email: