usps-support 0.2.51 → 0.2.52

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: 3b6c4b733379c3005f044d0d8e780dcb4b9f1c37124f97ff61eaf3ab5844ba81
4
- data.tar.gz: 00c8be1ab0bc6fa06aac0a195a431ed055300d1be7e44441a13d106045bfc01d
3
+ metadata.gz: d4f7fc7f6a99fe161a6771508a7b03ad3498772967648a59682a18549198e97a
4
+ data.tar.gz: d47d5bf461658c4833fff9d11cc6db4e403a4ec3848842e9a45526e44c6b5316
5
5
  SHA512:
6
- metadata.gz: 1bfca2dd2afc4080aa03b98fb2c1fa88d3049e1c9db9415ae6bd096b14196135718f1846af24900e6db82f82a8c30c3055bd866aa5e187666def7999834b03b7
7
- data.tar.gz: 758b292a1469fd630c0b2281f5ee9db88d0b97a96d2339c19983c4aabd9e1426f12a54762c7547e8b8217abc80d3a6b4629984aa7e52457b7d0475dae4843455
6
+ metadata.gz: fe6bdedc6e048eece2e76210c229ec200cb73f07114cada4655b52de246541c17dba1bfb47bc17671efe14a837ca66fc5b5bce2013a05bab2cef58555827c68a
7
+ data.tar.gz: ab81c2c13eb7ac01c6ce74cbd35ae445740e43c112dd5689c6edeb6e579291da1805dc52227efe3bc44a209125a639adcd5746af5b1f66a036625fe6868c2ce5
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Usps::Support
4
+ # Font Awesome icon names for the branded HTTP error pages, so the error
5
+ # screens stay visually consistent. Keyed by HTTP status code; 403 covers both
6
+ # the forbidden and incorrect-login pages, which render the same glyph.
7
+ #
8
+ module StatusIcons
9
+ ICONS = {
10
+ 400 => 'exclamation-circle',
11
+ 403 => 'ban',
12
+ 404 => 'compass-slash',
13
+ 406 => 'align-slash',
14
+ 422 => 'file-slash',
15
+ 500 => 'exclamation-triangle',
16
+ 503 => 'cloud-slash',
17
+ 504 => 'timer'
18
+ }.freeze
19
+
20
+ def self.for(status) = ICONS.fetch(status)
21
+ end
22
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Support
5
- VERSION = '0.2.51'
5
+ VERSION = '0.2.52'
6
6
  end
7
7
  end
data/lib/usps/support.rb CHANGED
@@ -15,6 +15,7 @@ module Usps
15
15
  end
16
16
 
17
17
  require_relative 'support/helpers'
18
+ require_relative 'support/status_icons'
18
19
  require_relative 'support/models'
19
20
  require_relative 'support/lib'
20
21
  require_relative 'support/health_diagnostics'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.51
4
+ version: 0.2.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander
@@ -137,6 +137,7 @@ files:
137
137
  - lib/usps/support/models/hq/squadrons/website.rb
138
138
  - lib/usps/support/models/toast.rb
139
139
  - lib/usps/support/sidekiq_auth.rb
140
+ - lib/usps/support/status_icons.rb
140
141
  - lib/usps/support/version.rb
141
142
  homepage: https://github.com/unitedstatespowersquadrons/usps-support
142
143
  licenses: []