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 +4 -4
- data/.github/workflows/rubocop.yml +2 -2
- data/.github/workflows/tests.yml +2 -2
- data/.rubocop.yml +1 -0
- data/.ruby-version +1 -1
- data/CHANGELOG.md +8 -2
- data/README.md +2 -0
- data/lib/mandate/call_injector.rb +2 -10
- data/lib/mandate/version.rb +1 -1
- data/mandate.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c40c3c78438f78715fd0ada9e47b9e9e3b9c9245d43bf29624d486b568852ab
|
4
|
+
data.tar.gz: 8954343effdf23246d4d6359c9792ea12720a1573a41ff35fec8ff3a21dea564
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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@
|
17
|
+
uses: ruby/setup-ruby@4726835508d9debb3220096c92d7bf6388485faa
|
18
18
|
with:
|
19
|
-
ruby-version:
|
19
|
+
ruby-version: '3.1.0'
|
20
20
|
|
21
21
|
- name: Install gems
|
22
22
|
run: |
|
data/.github/workflows/tests.yml
CHANGED
@@ -15,13 +15,13 @@ jobs:
|
|
15
15
|
matrix:
|
16
16
|
os:
|
17
17
|
- ubuntu-20.04
|
18
|
-
ruby-version: [
|
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@
|
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
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
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
|
-
|
6
|
+
|
7
|
+
- [FEATURE] Add success/failure callbacks
|
3
8
|
|
4
9
|
# 0.2.0 / 2018-08-11
|
5
|
-
|
10
|
+
|
11
|
+
- [FEATURE] Add initialize_with
|
data/README.md
CHANGED
@@ -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(
|
10
|
-
|
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
|
data/lib/mandate/version.rb
CHANGED
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 = '>=
|
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:
|
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:
|
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:
|
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.
|
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
|