usps-support 0.2.25 → 0.2.26

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: 9f99b23db7bb362080785a59d911fd245db2c275e711d1c57c7c1e23adad47a6
4
- data.tar.gz: 7b679be331e8013b9e6c590da7efce055e0166ee3a27aec92273f50f9ef19146
3
+ metadata.gz: 898b9b3981d27d35e971db1989153c9a01d52fc72255c633f4296b889843e5c7
4
+ data.tar.gz: dcae62557ba345f6cd63725b23e52de3f47fe6f6ddf81c6ece79671806c33ca4
5
5
  SHA512:
6
- metadata.gz: 62be219931f610630e316702c62a16600db301f8631ccc0035b68e3a9ffddf196931dd94ce17e3f766f09a71f24de8f1b94bdaa15d0748b015687f3a5349bf86
7
- data.tar.gz: 64e822a0d5625c4aeecb13afb4a2612f99532c2f401d3018ba95d3a955c6ccd3bc26ac386a6e7be27e9f09424fbec33c1d91fc0fcb089bf85c2f23416bf007ad
6
+ metadata.gz: 2b691967e76aec582bd5dbfee9d1fffeb564b3211402400dbd934de597d0bb9baacfa7ab757ea8121482faff45f23fd47dfcc2945b8e16ecdac5eb21f49006a2
7
+ data.tar.gz: 1a75510cd066087329218fca26ec81ae8ba97620f5ddff76eba7e6655d2153e306459e8167c5f760795b4435efd1160a20e05a75f53c5c9f00e2cb9233e571a5
data/config/routes.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  Usps::Support::Engine.routes.draw do
2
- resource :admin, only: [], controller: '/usps/support/admins' do
2
+ resource :admin, only: [], controller: 'usps/support/admins' do
3
3
  collection do
4
4
  post :impersonate
5
5
  post :expand
data/lib/usps/all.rb CHANGED
@@ -3,3 +3,10 @@
3
3
  require 'usps/imis'
4
4
  require 'usps/jwt_auth'
5
5
  require_relative 'support'
6
+
7
+ # :nocov:
8
+ if defined?(Rails)
9
+ require 'usps/support/railtie'
10
+ require 'usps/support/engine'
11
+ end
12
+ # :nocov:
@@ -10,6 +10,10 @@ module Usps
10
10
  # helpers, and authentication plumbing.
11
11
  #
12
12
  class Engine < ::Rails::Engine
13
+ # The installed gem has no gemspec at its root, so Rails::Engine.find_root
14
+ # otherwise resolves to lib/usps/support and misses our app/ and config/
15
+ # directories. Pin the root to the gem root explicitly.
16
+ config.root = File.expand_path('../../..', __dir__)
13
17
  end
14
18
  end
15
19
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Usps
4
4
  module Support
5
- VERSION = '0.2.25'
5
+ VERSION = '0.2.26'
6
6
  end
7
7
  end
data/lib/usps/support.rb CHANGED
@@ -14,9 +14,8 @@ require_relative 'support/helpers'
14
14
  require_relative 'support/models'
15
15
  require_relative 'support/lib'
16
16
 
17
- # :nocov:
18
- if defined?(Rails)
19
- require 'usps/support/railtie'
20
- require 'usps/support/engine'
21
- end
22
- # :nocov:
17
+ # The Railtie and Engine requires live in `usps/all`, not here. This file can
18
+ # legitimately be required before Rails is loaded (e.g. from .simplecov to pull
19
+ # in Usps::Support::Lib helpers), and because Ruby caches loaded files, a
20
+ # conditional `if defined?(Rails)` block here would be evaluated once with
21
+ # Rails undefined and then never re-run even after the Rails boot completes.
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.25
4
+ version: 0.2.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Fiander