address_concern 2.1.0 → 2.1.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: 205541c7ef9aedeb7e807bb946274c5a379edc7162592bbb2b1fd1015ce681b5
4
- data.tar.gz: 2dacfdb3da70d8ef88989ea2966e407179af9d536b8e3ae5df0826abe7ab1571
3
+ metadata.gz: fd8e4df80024c5fc3a3bc5984003e412615c3d6345d8408d17859e088183e7f2
4
+ data.tar.gz: eda7df98ac44d1ecc07c7e5a0f3c4afe3c93baa53378b31cdeab6d93a19d6d34
5
5
  SHA512:
6
- metadata.gz: 15f9277026adf1a62dff7561386dae79d021f11eeb3f3b4c3c13ff76bb991c7893861402ad120ec7ff8a4e714fd389cb644580a1a7f2a2fedc4c273018b77c38
7
- data.tar.gz: a5ab51814edaee41313de51bf2fc7fa75b683b79d490dc26af1401b3770c292c4ffd49b0452b3a7f02b1fd49b1d48fa2e052087d8b8e9ae43126dfa6b6fc5fe6
6
+ metadata.gz: a09d2db18101b7b407e52481559cefd69ae17b06384e448e92b160c939d785045725e3c768156a264af182087f1a11a77f1ddc0f5b9e3a9f3202b6cfdce8d719
7
+ data.tar.gz: 7ba89fd64d9f910fe77e5b807f335c6923ca80289549a6c43afe435ed4cbad699196c75f2415f8479b474e63f86943764e881b475e1e7cb2a76fcbbd5f88ec40
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.add_dependency "activesupport", ">= 4.0"
19
19
  s.add_dependency "carmen", '>= 1.1.1'
20
20
  #s.add_dependency "attribute_normalizer"
21
+ s.add_dependency "zeitwerk"
21
22
 
22
23
  s.add_development_dependency 'active_record_ignored_attributes' # for be_same_as
23
24
  s.add_development_dependency 'rspec'
@@ -1,7 +1,7 @@
1
- require_relative '../../../lib/core_extensions/hash/reorder'
1
+ require_relative '../core_extensions/hash/reorder'
2
2
  using Hash::Reorder
3
3
 
4
- require_relative '../../../lib/core_extensions/string/cleanlines'
4
+ require_relative '../core_extensions/string/cleanlines'
5
5
  using String::Cleanlines
6
6
 
7
7
  require_relative 'inspect_base'
@@ -4,15 +4,9 @@ module AddressConcern
4
4
  class Engine < ::Rails::Engine
5
5
  engine_name 'address_concern'
6
6
 
7
- config.autoload_paths += Dir["#{config.root}/app/models/concerns"]
8
- config.eager_load_paths += Dir["#{config.root}/app/models/concerns"]
9
-
10
7
  initializer 'address_concern.active_record' do |app|
11
8
  ActiveSupport.on_load :active_record do
12
- # These are currently required from lib/address_concern.rb
13
- AddressConcern::Address::Base
14
- AddressConcern::AddressAssociations
15
- # ActiveRecord::Base.extend(AddressConcern::Address::Base)
9
+ #
16
10
  end
17
11
  end
18
12
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AddressConcern
4
+
4
5
  module InspectBase
5
6
  def inspect_base(*_items, class: true, id: true)
6
7
  items = _items.map { |item|
@@ -1,5 +1,5 @@
1
1
  module AddressConcern
2
2
  def self.version
3
- "2.1.0"
3
+ "2.1.1"
4
4
  end
5
5
  end
@@ -4,9 +4,21 @@ require 'active_record'
4
4
 
5
5
  Carmen.i18n_backend.append_locale_path File.join(File.dirname(__FILE__), '../config/locale/overlay/en')
6
6
 
7
- require 'address_concern/version'
8
- require 'address_concern/attribute_normalizer'
9
- require 'address_concern/engine'
7
+ require 'zeitwerk'
8
+ loader = Zeitwerk::Loader.for_gem
9
+ # Note: Because this gem has/is an engine, its "engine files" (under app) are autoload managed by
10
+ # the parent app. And you can't have more than one loader managing the same root. Therefore we can't
11
+ # do this:
12
+ # loader.push_dir("#{__dir__}/../app/models")
13
+ # That is one reason, the models/concerns have been moved to lib, where it won't conflict with Rails
14
+ # app's loader.
15
+ loader.ignore("#{__dir__}/address_concern/attribute_normalizer.rb")
16
+ loader.ignore("#{__dir__}/address_concern/version.rb")
17
+ loader.ignore("#{__dir__}/core_extensions")
18
+ loader.ignore("#{__dir__}/generators")
19
+ loader.setup
10
20
 
11
- require_relative '../app/models/concerns/address'
12
- require_relative '../app/models/concerns/address_associations'
21
+ require 'address_concern/version'
22
+ #pp loader.autoloads
23
+ loader.eager_load
24
+ #require_relative '../app/models/address_concern/address'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: address_concern
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Campbell
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-20 00:00:00.000000000 Z
12
+ date: 2022-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -81,6 +81,20 @@ dependencies:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: 1.1.1
84
+ - !ruby/object:Gem::Dependency
85
+ name: zeitwerk
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: active_record_ignored_attributes
86
100
  requirement: !ruby/object:Gem::Requirement
@@ -142,16 +156,16 @@ files:
142
156
  - Readme.md
143
157
  - VERSION
144
158
  - address_concern.gemspec
145
- - app/models/concerns/address.rb
146
- - app/models/concerns/address_associations.rb
147
- - app/models/concerns/attributes_slice.rb
148
- - app/models/concerns/inspect_base.rb
149
159
  - bin/console
150
160
  - config/address_concern.rb
151
161
  - config/locale/overlay/en/id.yml
152
162
  - lib/address_concern.rb
163
+ - lib/address_concern/address.rb
164
+ - lib/address_concern/address_associations.rb
153
165
  - lib/address_concern/attribute_normalizer.rb
166
+ - lib/address_concern/attributes_slice.rb
154
167
  - lib/address_concern/engine.rb
168
+ - lib/address_concern/inspect_base.rb
155
169
  - lib/address_concern/version.rb
156
170
  - lib/core_extensions/hash/reorder.rb
157
171
  - lib/core_extensions/string/cleanlines.rb