glia-errors 0.15.2 → 0.17.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: 48f6a6310b82d72e3d0a635c38839b494fc61dc48157ad1373ae02f2c6615d50
4
- data.tar.gz: 10b23d6c1b11dfb98e238a8bb61a52dbec239aaafa632b030e3f0f766428d46c
3
+ metadata.gz: eb306023685715722d62f677ecaf4e0ff4f94af4dcfb89a6a2ac511a739fefab
4
+ data.tar.gz: 5706a493a85f09b8020755166293f9a3f043392ae7866ce697a8d5aa5d9c5e44
5
5
  SHA512:
6
- metadata.gz: 1d4fdd3e92aa7813263b8bdc127f98de09039d0ad6fb0de0115e623ce47025b341ad7717ce94f18b4e03baea4d785dc3214f18cb24221b1c4dc6aad884c1bb54
7
- data.tar.gz: f340b151ad28ea9c896f97dfc9139672ce145fd2a031b8c809d6920f616d561e4bb88574ccabeb139f33e27ad661ea88929c3c9533a79306ffc0bff26fc31a99
6
+ metadata.gz: 5f80dbaf2134afcf36ca4e776bf33553f2c5325831a655c00f537ab787d54b5a141af14f996a0a85855c42a43f25d8aed9edf0bf763323df9ec7db3a238cca61
7
+ data.tar.gz: dd26f9022da7e943829e88e9ed98edb97e7d60246bf149571d9ae7023da37bd1dc039cd65b563898073c6cfaf95e7e242fdc1f2f1257e607ba8b96f25f440a05
data/.rubocop.yml CHANGED
@@ -1,3 +1,9 @@
1
+ require:
2
+ - rubocop-rspec
3
+
4
+ plugins:
5
+ - rubocop-rake
6
+
1
7
  AllCops:
2
8
  TargetRubyVersion: 2.5
3
9
  NewCops: enable
@@ -15,5 +21,17 @@ Metrics/BlockLength:
15
21
  Exclude:
16
22
  - 'spec/**/*'
17
23
 
24
+ RSpec/DescribeClass:
25
+ Enabled: false
26
+
27
+ RSpec/DescribedClass:
28
+ Enabled: false
29
+
30
+ RSpec/MultipleExpectations:
31
+ Enabled: false
32
+
33
+ RSpec/ExampleLength:
34
+ Enabled: false
35
+
18
36
  Gemspec/RequireMFA:
19
37
  Enabled: false
data/.snyk ADDED
@@ -0,0 +1,9 @@
1
+ # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
2
+ version: v1.25.1
3
+ # ignores vulnerabilities until expiry date; change duration by modifying expiry date
4
+ ignore:
5
+ 'snyk:lic:rubygems:json:Ruby':
6
+ - '*':
7
+ reason: >-
8
+ It is a reciprocal license, meaning we can use this dependency in
9
+ unmodified form, which we do.
data/Gemfile CHANGED
@@ -5,10 +5,9 @@ source 'https://rubygems.org'
5
5
  gemspec
6
6
 
7
7
  gem 'dry-validation', '~> 1.10'
8
- gem 'prettier', '~> 0.22'
9
8
  gem 'rake', '~> 13.0'
10
9
  gem 'rspec', '~> 3.10'
11
- gem 'rubocop', '~> 1.5'
12
- gem 'rubocop-rake', '~> 0.5'
10
+ gem 'rubocop', '~> 1.28'
11
+ gem 'rubocop-rake', '~> 0.7'
13
12
  gem 'rubocop-rspec', '~> 2.0'
14
13
  gem 'super_diff'
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- glia-errors (0.15.2)
4
+ glia-errors (0.17.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- ast (2.4.2)
9
+ ast (2.4.3)
10
10
  attr_extras (6.2.5)
11
- concurrent-ruby (1.1.10)
11
+ concurrent-ruby (1.3.7)
12
12
  diff-lcs (1.5.0)
13
13
  dry-configurable (1.0.1)
14
14
  dry-core (~> 1.0, < 2)
@@ -42,17 +42,21 @@ GEM
42
42
  dry-initializer (~> 3.0)
43
43
  dry-schema (>= 1.12, < 2)
44
44
  zeitwerk (~> 2.6)
45
+ json (2.21.2)
46
+ language_server-protocol (3.17.0.5)
47
+ lint_roller (1.1.0)
45
48
  optimist (3.0.1)
46
- parallel (1.22.1)
47
- parser (3.1.1.0)
49
+ parallel (1.28.0)
50
+ parser (3.3.11.1)
48
51
  ast (~> 2.4.1)
52
+ racc
49
53
  patience_diff (1.2.0)
50
54
  optimist (~> 3.0)
51
- prettier (0.22.0)
55
+ prism (1.9.0)
56
+ racc (1.8.1)
52
57
  rainbow (3.1.1)
53
58
  rake (13.0.1)
54
- regexp_parser (2.2.1)
55
- rexml (3.2.5)
59
+ regexp_parser (2.12.0)
56
60
  rspec (3.10.0)
57
61
  rspec-core (~> 3.10.0)
58
62
  rspec-expectations (~> 3.10.0)
@@ -66,27 +70,33 @@ GEM
66
70
  diff-lcs (>= 1.2.0, < 2.0)
67
71
  rspec-support (~> 3.10.0)
68
72
  rspec-support (3.10.0)
69
- rubocop (1.26.1)
70
- parallel (~> 1.10)
71
- parser (>= 3.1.0.0)
73
+ rubocop (1.86.1)
74
+ json (~> 2.3)
75
+ language_server-protocol (~> 3.17.0.2)
76
+ lint_roller (~> 1.1.0)
77
+ parallel (>= 1.10)
78
+ parser (>= 3.3.0.2)
72
79
  rainbow (>= 2.2.2, < 4.0)
73
- regexp_parser (>= 1.8, < 3.0)
74
- rexml
75
- rubocop-ast (>= 1.16.0, < 2.0)
80
+ regexp_parser (>= 2.9.3, < 3.0)
81
+ rubocop-ast (>= 1.49.0, < 2.0)
76
82
  ruby-progressbar (~> 1.7)
77
- unicode-display_width (>= 1.4.0, < 3.0)
78
- rubocop-ast (1.16.0)
79
- parser (>= 3.1.1.0)
80
- rubocop-rake (0.5.1)
81
- rubocop
83
+ unicode-display_width (>= 2.4.0, < 4.0)
84
+ rubocop-ast (1.49.1)
85
+ parser (>= 3.3.7.2)
86
+ prism (~> 1.7)
87
+ rubocop-rake (0.7.1)
88
+ lint_roller (~> 1.1)
89
+ rubocop (>= 1.72.1)
82
90
  rubocop-rspec (2.9.0)
83
91
  rubocop (~> 1.19)
84
- ruby-progressbar (1.11.0)
92
+ ruby-progressbar (1.13.0)
85
93
  super_diff (0.8.0)
86
94
  attr_extras (>= 6.2.4)
87
95
  diff-lcs
88
96
  patience_diff
89
- unicode-display_width (2.1.0)
97
+ unicode-display_width (3.2.0)
98
+ unicode-emoji (~> 4.1)
99
+ unicode-emoji (4.2.0)
90
100
  zeitwerk (2.6.6)
91
101
 
92
102
  PLATFORMS
@@ -96,13 +106,12 @@ PLATFORMS
96
106
  DEPENDENCIES
97
107
  dry-validation (~> 1.10)
98
108
  glia-errors!
99
- prettier (~> 0.22)
100
109
  rake (~> 13.0)
101
110
  rspec (~> 3.10)
102
- rubocop (~> 1.5)
103
- rubocop-rake (~> 0.5)
111
+ rubocop (~> 1.28)
112
+ rubocop-rake (~> 0.7)
104
113
  rubocop-rspec (~> 2.0)
105
114
  super_diff
106
115
 
107
116
  BUNDLED WITH
108
- 2.3.9
117
+ 2.4.19
data/README.md CHANGED
@@ -107,7 +107,7 @@ end
107
107
  ## Releasing a new version
108
108
 
109
109
  A new version is created when a change is merged into the master branch that changes the version number in `glia-errors.gemspec`.
110
- A Github Action will push the `.gem` file to [rubygems.org](https://rubygems.org)
110
+ A Github Action will push the `.gem` file to [rubygems.org](https://rubygems.org) and tag the commit as `ruby-v<version>`.
111
111
 
112
112
  ## Contributing
113
113
 
@@ -117,8 +117,8 @@ A Github Action will push the `.gem` file to [rubygems.org](https://rubygems.org
117
117
  bundle exec rake spec
118
118
  ```
119
119
 
120
- ### Formatting
120
+ ### Linting
121
121
 
122
122
  ```
123
- bundle exec rake format
123
+ bundle exec rubocop
124
124
  ```
data/Rakefile CHANGED
@@ -11,12 +11,4 @@ RuboCop::RakeTask.new do |task|
11
11
  task.requires << 'rubocop-rspec'
12
12
  end
13
13
 
14
- task default: %i[lint spec]
15
-
16
- task :lint do
17
- sh "rubocop && rbprettier --check '**/*.rb'"
18
- end
19
-
20
- task :format do
21
- sh "rbprettier --write '**/*.rb'"
22
- end
14
+ task default: %i[rubocop spec]
data/catalog-info.yaml CHANGED
@@ -13,4 +13,4 @@ metadata:
13
13
  spec:
14
14
  type: library
15
15
  lifecycle: production
16
- owner: tm-messenger
16
+ owner: tm-atlas
data/glia-errors.gemspec CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'glia-errors'
8
- spec.version = '0.15.2'
8
+ spec.version = '0.17.0'
9
9
  spec.authors = ['Glia TechMovers']
10
10
  spec.email = ['techmovers@glia.com']
11
11
 
@@ -16,7 +16,6 @@ Gem::Specification.new do |spec|
16
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
17
  f.match(%r{^(test|spec|features)/})
18
18
  end
19
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
19
  spec.require_paths = ['lib']
21
20
 
22
21
  spec.required_ruby_version = '>= 2.5', '< 4.0'
@@ -5,7 +5,7 @@ module Glia
5
5
  # rubocop:disable Style/Documentation
6
6
  class InputValidationError < Error
7
7
  def initialize(error_details:, message: nil)
8
- raise ArgumentError, 'At least 1 error detail is required' if error_details.keys.count.zero?
8
+ raise ArgumentError, 'At least 1 error detail is required' if error_details.keys.none?
9
9
 
10
10
  error_details.each_value do |value|
11
11
  raise ArgumentError, 'error_details values must be lists' unless value.is_a?(Array)
@@ -373,7 +373,7 @@ module Glia
373
373
 
374
374
  class HeadersValidationError < Error
375
375
  def initialize(error_details:, message: nil)
376
- raise ArgumentError, 'At least 1 error detail is required' if error_details.keys.count.zero?
376
+ raise ArgumentError, 'At least 1 error detail is required' if error_details.keys.none?
377
377
 
378
378
  error_details.each_value do |value|
379
379
  raise ArgumentError, 'error_details values must be lists' unless value.is_a?(Array)
@@ -489,6 +489,36 @@ module Glia
489
489
  end
490
490
  end
491
491
 
492
+ class NoMatchingRoutingRuleError < Error
493
+ def initialize(message: nil)
494
+ super(
495
+ type: NO_MATCHING_ROUTING_RULE_ERROR,
496
+ ref: create_ref(NO_MATCHING_ROUTING_RULE_ERROR),
497
+ message: message || 'Matching routing rule not found'
498
+ )
499
+ end
500
+ end
501
+
502
+ class PayloadTooLargeError < Error
503
+ def initialize(message: nil)
504
+ super(
505
+ type: PAYLOAD_TOO_LARGE_ERROR,
506
+ ref: create_ref(PAYLOAD_TOO_LARGE_ERROR),
507
+ message: message || 'Payload Too Large'
508
+ )
509
+ end
510
+ end
511
+
512
+ class RequestTimeoutError < Error
513
+ def initialize(message: nil)
514
+ super(
515
+ type: REQUEST_TIMEOUT_ERROR,
516
+ ref: create_ref(REQUEST_TIMEOUT_ERROR),
517
+ message: message || 'Request Timeout'
518
+ )
519
+ end
520
+ end
521
+
492
522
  # rubocop:enable Style/Documentation
493
523
  end
494
524
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './naming'
3
+ require_relative 'naming'
4
4
 
5
5
  module Glia
6
6
  module Errors
@@ -41,6 +41,9 @@ module Glia
41
41
  FEATURE_DISABLED_ERROR = 'feature_disabled_error'
42
42
  UNSUPPORTED_MEDIA_TYPE_ERROR = 'unsupported_media_type'
43
43
  TOO_MANY_REQUESTS_ERROR = 'too_many_requests'
44
+ NO_MATCHING_ROUTING_RULE_ERROR = 'no_matching_routing_rule_error'
45
+ PAYLOAD_TOO_LARGE_ERROR = 'payload_too_large_error'
46
+ REQUEST_TIMEOUT_ERROR = 'request_timeout_error'
44
47
 
45
48
  # Server errors
46
49
  INTERNAL_SERVER_ERROR = 'internal_server_error'
data/lib/glia/errors.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './errors/error'
4
- require_relative './errors/error_types'
5
- require_relative './errors/client_errors'
6
- require_relative './errors/server_errors'
7
- require_relative './errors/mapper'
3
+ require_relative 'errors/error'
4
+ require_relative 'errors/error_types'
5
+ require_relative 'errors/client_errors'
6
+ require_relative 'errors/server_errors'
7
+ require_relative 'errors/mapper'
8
8
 
9
9
  module Glia
10
10
  # Glia REST API errors
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glia-errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glia TechMovers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-16 00:00:00.000000000 Z
11
+ date: 2026-08-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: ''
14
14
  email:
@@ -18,11 +18,9 @@ extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
20
  - ".gitignore"
21
- - ".prettierignore"
22
- - ".prettierrc"
23
21
  - ".rspec"
24
22
  - ".rubocop.yml"
25
- - ".ruby-version"
23
+ - ".snyk"
26
24
  - Gemfile
27
25
  - Gemfile.lock
28
26
  - README.md
@@ -36,11 +34,11 @@ files:
36
34
  - lib/glia/errors/mapper.rb
37
35
  - lib/glia/errors/naming.rb
38
36
  - lib/glia/errors/server_errors.rb
39
- homepage:
37
+ homepage:
40
38
  licenses:
41
39
  - MIT
42
40
  metadata: {}
43
- post_install_message:
41
+ post_install_message:
44
42
  rdoc_options: []
45
43
  require_paths:
46
44
  - lib
@@ -58,8 +56,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
56
  - !ruby/object:Gem::Version
59
57
  version: '0'
60
58
  requirements: []
61
- rubygems_version: 3.3.5
62
- signing_key:
59
+ rubygems_version: 3.4.20
60
+ signing_key:
63
61
  specification_version: 4
64
62
  summary: Glia REST API errors
65
63
  test_files: []
data/.prettierignore DELETED
@@ -1,2 +0,0 @@
1
- vendor
2
- gemfiles
data/.prettierrc DELETED
@@ -1 +0,0 @@
1
- printWidth: 120
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- ruby-3.1