mandate 1.0.0 → 2.0.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: 6d56daf22931d4b43f0c73217175ee9ff4c100d59086f5d4ecafbca2caa26bb8
4
- data.tar.gz: 6a3b61893705efd5b9f9bf650d53a7d147ac146fe0165b2ef41378b186ca7e20
3
+ metadata.gz: 1c40c3c78438f78715fd0ada9e47b9e9e3b9c9245d43bf29624d486b568852ab
4
+ data.tar.gz: 8954343effdf23246d4d6359c9792ea12720a1573a41ff35fec8ff3a21dea564
5
5
  SHA512:
6
- metadata.gz: 8db9b3480d63328cae72171280e98584f13eb8af7c2778dacfd30cdf50002751cd415c29a431a0f97f6bb0ce2b0e8d5e98d8f27647ecaae9760587d45eaf9f35
7
- data.tar.gz: aca17005769c5c735c127e6f6f852be7eaed2d6288765858fcfa6ac48c88758a22fafbbf55adf65fad101735db267b2e1663d07a2e7e689da01e6796583f9993
6
+ metadata.gz: 63abfab520970461986313ecf404becb3e3689ef62ddc57ffd1d90c4b91440ec211c1335744c1a700ba6602fab5303eca2109b8bd8e7c1c04bd2b82a26ff5fac
7
+ data.tar.gz: fde32f5e6816c618ad6e88bfa1114729519a1eae8a24fe0462a4a7741951c43bcbe05aa86a93a57c7e911471ac4454f4bba15ee18a6526825a6f3b4e0ddb5cf8
@@ -14,9 +14,9 @@ jobs:
14
14
  - uses: actions/checkout@v2
15
15
 
16
16
  - name: Set up Ruby
17
- uses: ruby/setup-ruby@42817531497ae2ef0168458f709e451109306bd5
17
+ uses: ruby/setup-ruby@4726835508d9debb3220096c92d7bf6388485faa
18
18
  with:
19
- ruby-version: 2.6.6
19
+ ruby-version: '3.1.0'
20
20
 
21
21
  - name: Install gems
22
22
  run: |
@@ -15,13 +15,13 @@ jobs:
15
15
  matrix:
16
16
  os:
17
17
  - ubuntu-20.04
18
- ruby-version: [2.6, 2.7, 3.0]
18
+ ruby-version: ['3.0', '3.1']
19
19
 
20
20
  steps:
21
21
  - uses: actions/checkout@v2
22
22
 
23
23
  - name: Set up Ruby
24
- uses: ruby/setup-ruby@42817531497ae2ef0168458f709e451109306bd5
24
+ uses: ruby/setup-ruby@4726835508d9debb3220096c92d7bf6388485faa
25
25
  with:
26
26
  ruby-version: ${{ matrix.ruby-version }}
27
27
  bundler-cache: true
data/.rubocop.yml CHANGED
@@ -3,6 +3,7 @@ require:
3
3
  - rubocop-performance
4
4
 
5
5
  AllCops:
6
+ TargetRubyVersion: 3.0.0
6
7
  NewCops: disable
7
8
  Exclude:
8
9
  - "bin/**/*"
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.6
1
+ 3.1.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
+ # 2.0.0 / 2022-04-19
2
+
3
+ - [FEATURE] Simplify code base for Ruby 3 (thanks to @erikschierboom)
4
+
1
5
  # 0.3.0 / 2019-09-06
2
- * [FEATURE] Add success/failure callbacks
6
+
7
+ - [FEATURE] Add success/failure callbacks
3
8
 
4
9
  # 0.2.0 / 2018-08-11
5
- * [FEATURE] Add initialize_with
10
+
11
+ - [FEATURE] Add initialize_with
data/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  A simple command-pattern helper gem for Ruby.
6
6
 
7
+ **Note: As of 2.0.0, Mandate only supports Ruby 3.x. For Ruby 2.x, please use the 1.0.0 release.**
8
+
7
9
  ## Installation
8
10
 
9
11
  Add this line to your application's Gemfile:
@@ -6,16 +6,8 @@ module Mandate
6
6
  # which internally calls:
7
7
  # Foobar.new(some, args).call()
8
8
  class << base
9
- def call(*args)
10
- # If the last argument is a hash and the last param is a keyword params (signified by
11
- # its type being :key, the we should pass the hash in in using the **kwords syntax.
12
- # This fixes a deprecation issue in Ruby 2.7.
13
- if args.last.is_a?(Hash) &&
14
- instance_method(:initialize).parameters.last&.first == :key
15
- new(*args[0..-2], **args[-1]).()
16
- else
17
- new(*args).()
18
- end
9
+ def call(...)
10
+ new(...).()
19
11
  end
20
12
  end
21
13
  end
@@ -1,3 +1,3 @@
1
1
  module Mandate
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "2.0.0".freeze
3
3
  end
data/mandate.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "mandate/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.required_ruby_version = '>= 2.6.0'
6
+ spec.required_ruby_version = '>= 3.0.0'
7
7
  spec.name = "mandate"
8
8
  spec.version = Mandate::VERSION
9
9
  spec.authors = ["Jeremy Walker"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandate
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Walker
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-11 00:00:00.000000000 Z
11
+ date: 2022-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,14 +95,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - ">="
97
97
  - !ruby/object:Gem::Version
98
- version: 2.6.0
98
+ version: 3.0.0
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  requirements: []
105
- rubygems_version: 3.0.3
105
+ rubygems_version: 3.3.3
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: A simple command-pattern helper gem for Ruby