gruf-commander 1.0.0 → 1.3.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/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/gruf-commander.gemspec +7 -6
- data/lib/autoloader.rb +22 -0
- data/lib/gruf/commander/request_validation_interceptor.rb +1 -0
- data/lib/gruf/commander/version.rb +1 -1
- data/lib/gruf/commander.rb +2 -4
- data/lib/gruf-commander.rb +18 -0
- metadata +24 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41cfc73ca2a7a717e17afc86524aa0f3f6dbfc1d579ccecb0566288c0b17132b
|
4
|
+
data.tar.gz: f833d546d055ab18e8f302a7188910f47f58f98affcfe9b7393c83d60b687db3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c31c795d6cd2c9a7b7564fbc304643146982b38093ac91400da1b78d0f77e56b87c992c074c9e2b3588f5d2d40e968b8e4ae158c52c3e0cea03e48735f1f63bb
|
7
|
+
data.tar.gz: b1a02faca4576d09ea4dbe5e3a8b7819e2196bd32fa7ff6d04dc7288682bfb0d0211c1f5bfd9feffbe2b15bce9b561c815b2dc77893134b7dacf14941bba1388
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,22 @@ Changelog for the gruf-commander gem. This includes internal history before the
|
|
2
2
|
|
3
3
|
### Pending release
|
4
4
|
|
5
|
+
### 1.3.0
|
6
|
+
|
7
|
+
- Add support for Ruby 3.2, 3.3, 3.4
|
8
|
+
- Drop Ruby 2.6, 2.7, 3.0 support
|
9
|
+
- Move to zeitwerk for autoloading
|
10
|
+
|
11
|
+
### 1.2.0
|
12
|
+
|
13
|
+
- Add Ruby 3.0 support
|
14
|
+
|
15
|
+
### 1.1.0
|
16
|
+
|
17
|
+
- Bump minimum required Ruby version to 2.6
|
18
|
+
- Bump Rubocop to 1.4
|
19
|
+
- Add tests for Ruby 2.7
|
20
|
+
|
5
21
|
### 1.0.0
|
6
22
|
|
7
23
|
- Add frozen_string_literal: true to all files
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Gruf Commander
|
2
2
|
|
3
|
-
[](https://circleci.com/gh/bigcommerce/gruf-commander) [](https://badge.fury.io/rb/gruf-commander) [](https://circleci.com/gh/bigcommerce/gruf-commander) [](https://badge.fury.io/rb/gruf-commander) [](https://inch-ci.org/github/bigcommerce/gruf-commander?branch=main)
|
4
4
|
|
5
5
|
Assists with request/command-style syntax and separated validation layer in [gruf](https://github.com/bigcommerce/gruf)
|
6
6
|
requests.
|
data/gruf-commander.gemspec
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
16
16
|
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
17
|
#
|
18
|
-
lib = File.expand_path('
|
18
|
+
lib = File.expand_path('lib', __dir__)
|
19
19
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
20
20
|
require 'gruf/commander/version'
|
21
21
|
|
@@ -24,17 +24,18 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.version = Gruf::Commander::VERSION
|
25
25
|
spec.authors = ['Shaun McCormick']
|
26
26
|
spec.email = ['splittingred@gmail.com']
|
27
|
+
spec.license = 'MIT'
|
27
28
|
|
28
29
|
spec.summary = 'Command/request syntax helper for gruf'
|
29
30
|
spec.description = spec.summary
|
30
31
|
spec.homepage = 'https://github.com/bigcommerce/gruf-commander'
|
32
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
31
33
|
|
32
34
|
spec.files = Dir['README.md', 'CHANGELOG.md', 'CODE_OF_CONDUCT.md', 'lib/**/*', 'gruf-commander.gemspec']
|
33
|
-
spec.require_paths = [
|
35
|
+
spec.require_paths = %w[lib]
|
34
36
|
|
35
|
-
spec.
|
36
|
-
spec.add_development_dependency 'rake', '~> 10.0'
|
37
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
37
|
+
spec.required_ruby_version = '>= 3.2', '< 4'
|
38
38
|
|
39
|
-
spec.
|
39
|
+
spec.add_dependency 'activemodel', '> 7.2'
|
40
|
+
spec.add_dependency 'gruf', '>= 2.19'
|
40
41
|
end
|
data/lib/autoloader.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2018-present, BigCommerce Pty. Ltd. All rights reserved
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
6
|
+
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
7
|
+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
8
|
+
# persons to whom the Software is furnished to do so, subject to the following conditions:
|
9
|
+
#
|
10
|
+
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
11
|
+
# Software.
|
12
|
+
#
|
13
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
14
|
+
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
15
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
16
|
+
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
|
+
|
18
|
+
# use Zeitwerk to lazily autoload all the files in the lib directory
|
19
|
+
require 'zeitwerk'
|
20
|
+
loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false)
|
21
|
+
loader.ignore(File.join(__dir__.to_s, 'gruf-commander.rb'))
|
22
|
+
loader.setup
|
@@ -15,6 +15,7 @@
|
|
15
15
|
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
16
16
|
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
17
|
#
|
18
|
+
|
18
19
|
module Gruf
|
19
20
|
module Commander
|
20
21
|
##
|
data/lib/gruf/commander.rb
CHANGED
@@ -15,11 +15,9 @@
|
|
15
15
|
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
16
16
|
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
17
|
#
|
18
|
+
require 'gruf'
|
18
19
|
require 'active_model'
|
19
|
-
require_relative '
|
20
|
-
require_relative 'commander/command'
|
21
|
-
require_relative 'commander/request'
|
22
|
-
require_relative 'commander/request_validation_interceptor'
|
20
|
+
require_relative '../autoloader'
|
23
21
|
|
24
22
|
module Gruf
|
25
23
|
##
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2020-present, BigCommerce Pty. Ltd. All rights reserved
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
6
|
+
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
7
|
+
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
8
|
+
# persons to whom the Software is furnished to do so, subject to the following conditions:
|
9
|
+
#
|
10
|
+
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
11
|
+
# Software.
|
12
|
+
#
|
13
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
14
|
+
# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
15
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
16
|
+
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
17
|
+
#
|
18
|
+
require_relative 'gruf/commander'
|
metadata
CHANGED
@@ -1,71 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gruf-commander
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaun McCormick
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.16'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.16'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '10.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '10.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
13
|
+
name: activemodel
|
43
14
|
requirement: !ruby/object:Gem::Requirement
|
44
15
|
requirements:
|
45
|
-
- - "
|
16
|
+
- - ">"
|
46
17
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
type: :
|
18
|
+
version: '7.2'
|
19
|
+
type: :runtime
|
49
20
|
prerelease: false
|
50
21
|
version_requirements: !ruby/object:Gem::Requirement
|
51
22
|
requirements:
|
52
|
-
- - "
|
23
|
+
- - ">"
|
53
24
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
25
|
+
version: '7.2'
|
55
26
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
27
|
+
name: gruf
|
57
28
|
requirement: !ruby/object:Gem::Requirement
|
58
29
|
requirements:
|
59
|
-
- - "
|
30
|
+
- - ">="
|
60
31
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
32
|
+
version: '2.19'
|
62
33
|
type: :runtime
|
63
34
|
prerelease: false
|
64
35
|
version_requirements: !ruby/object:Gem::Requirement
|
65
36
|
requirements:
|
66
|
-
- - "
|
37
|
+
- - ">="
|
67
38
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
39
|
+
version: '2.19'
|
69
40
|
description: Command/request syntax helper for gruf
|
70
41
|
email:
|
71
42
|
- splittingred@gmail.com
|
@@ -77,15 +48,18 @@ files:
|
|
77
48
|
- CODE_OF_CONDUCT.md
|
78
49
|
- README.md
|
79
50
|
- gruf-commander.gemspec
|
51
|
+
- lib/autoloader.rb
|
52
|
+
- lib/gruf-commander.rb
|
80
53
|
- lib/gruf/commander.rb
|
81
54
|
- lib/gruf/commander/command.rb
|
82
55
|
- lib/gruf/commander/request.rb
|
83
56
|
- lib/gruf/commander/request_validation_interceptor.rb
|
84
57
|
- lib/gruf/commander/version.rb
|
85
58
|
homepage: https://github.com/bigcommerce/gruf-commander
|
86
|
-
licenses:
|
87
|
-
|
88
|
-
|
59
|
+
licenses:
|
60
|
+
- MIT
|
61
|
+
metadata:
|
62
|
+
rubygems_mfa_required: 'true'
|
89
63
|
rdoc_options: []
|
90
64
|
require_paths:
|
91
65
|
- lib
|
@@ -93,15 +67,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
67
|
requirements:
|
94
68
|
- - ">="
|
95
69
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
70
|
+
version: '3.2'
|
71
|
+
- - "<"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '4'
|
97
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
75
|
requirements:
|
99
76
|
- - ">="
|
100
77
|
- !ruby/object:Gem::Version
|
101
78
|
version: '0'
|
102
79
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
104
|
-
signing_key:
|
80
|
+
rubygems_version: 3.6.7
|
105
81
|
specification_version: 4
|
106
82
|
summary: Command/request syntax helper for gruf
|
107
83
|
test_files: []
|