eac_rails_utils 0.16.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb14216ef2b7c4f5916a504e6e70ac2241845f9f2e16d996e8542efda76f6a6d
4
- data.tar.gz: 29033d3d3ed5ce8df7586c6a06e76651595ce5bd9f07ae75135947818f598d7e
3
+ metadata.gz: 5db88ebd70fa8c047e4b2cd12103ff8298fbb7ebbcad0424c1b968294bb6685f
4
+ data.tar.gz: 7c7b0a90c24ff1880b54f885cbeacc5ba015b28a20783ccbb3fb20f945078ad9
5
5
  SHA512:
6
- metadata.gz: 01f1a1048f1ae3a60c470508f4d1aa733185778b094983d9ea89cb9abd16877b8d86d918b861600977c3ea370ca8c860732c1dcbb2dc261e151c18615e3f6a3a
7
- data.tar.gz: 2d669f20b19a8bbad1426ca62ac1a08a0a1760466afe940c4f7a76d50b5873bd425fd00de12995b3abffdfbe9eb4abf332f245356637c4876afdfee8b21107bd
6
+ metadata.gz: c8ff3b0df58c0625b4b5bfdcf09d343731790faca24071fb2cd8ae8fd56de6bdb271a8d5b057d843bb4dc43f313ae1ed6935c5369146a2c9bbdd8cd813dab3e8
7
+ data.tar.gz: 8eefa5bd70d3c81a40656b3f83de88c2d1ec462b1101cc6c0952bbca5c9efa5a82f8c57438d5f2d24c37165306d9bcdf6b512211fe31b55b062b404fc2a4ba86
@@ -5,10 +5,15 @@ require 'eac_ruby_utils/core_ext'
5
5
  module EacRailsUtils
6
6
  module EngineHelper
7
7
  common_concern do
8
+ append_autoload_paths
8
9
  append_self_migrations
9
10
  end
10
11
 
11
12
  module ClassMethods
13
+ def append_autoload_paths
14
+ config.autoload_paths += Dir["#{config.root}/lib/**/"]
15
+ end
16
+
12
17
  def append_self_migrations
13
18
  initializer :append_migrations do |app|
14
19
  config.paths['db/migrate'].expanded.each do |expanded_path|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRailsUtils
4
- VERSION = '0.16.0'
4
+ VERSION = '0.17.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_rails_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - E.A.C.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-14 00:00:00.000000000 Z
11
+ date: 2022-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel-associations
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.98'
53
+ version: '0.104'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '0.98'
60
+ version: '0.104'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: htmlbeautifier
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -213,7 +213,6 @@ files:
213
213
  - lib/eac_rails_utils/models/test_utils.rb
214
214
  - lib/eac_rails_utils/models/validations.rb
215
215
  - lib/eac_rails_utils/patches.rb
216
- - lib/eac_rails_utils/patches/action_controller_base.rb
217
216
  - lib/eac_rails_utils/patches/active_model_associations.rb
218
217
  - lib/eac_rails_utils/patches/numeric.rb
219
218
  - lib/eac_rails_utils/patches/numeric/number_helper.rb
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'action_controller/base'
4
-
5
- module EacRailsUtils
6
- module Patches
7
- module ActionControllerBasePatch
8
- def self.included(base)
9
- base.include InstanceMethods
10
- end
11
-
12
- module InstanceMethods
13
- def redirect_back(default_path, options = {})
14
- redirect_to :back, options
15
- rescue ActionController::RedirectBackError
16
- redirect_to default_path, options
17
- end
18
- end
19
- end
20
- end
21
- end
22
-
23
- patch = ::EacRailsUtils::Patches::ActionControllerBasePatch
24
- target = ::ActionController::Base
25
- target.send(:include, patch) unless target.included_modules.include?(patch)