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 +4 -4
- data/address_concern.gemspec +1 -0
- data/{app/models/concerns → lib/address_concern}/address.rb +2 -2
- data/{app/models/concerns → lib/address_concern}/address_associations.rb +0 -0
- data/{app/models/concerns → lib/address_concern}/attributes_slice.rb +0 -0
- data/lib/address_concern/engine.rb +1 -7
- data/{app/models/concerns → lib/address_concern}/inspect_base.rb +1 -0
- data/lib/address_concern/version.rb +1 -1
- data/lib/address_concern.rb +17 -5
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd8e4df80024c5fc3a3bc5984003e412615c3d6345d8408d17859e088183e7f2
|
4
|
+
data.tar.gz: eda7df98ac44d1ecc07c7e5a0f3c4afe3c93baa53378b31cdeab6d93a19d6d34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a09d2db18101b7b407e52481559cefd69ae17b06384e448e92b160c939d785045725e3c768156a264af182087f1a11a77f1ddc0f5b9e3a9f3202b6cfdce8d719
|
7
|
+
data.tar.gz: 7ba89fd64d9f910fe77e5b807f335c6923ca80289549a6c43afe435ed4cbad699196c75f2415f8479b474e63f86943764e881b475e1e7cb2a76fcbbd5f88ec40
|
data/address_concern.gemspec
CHANGED
@@ -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 '
|
1
|
+
require_relative '../core_extensions/hash/reorder'
|
2
2
|
using Hash::Reorder
|
3
3
|
|
4
|
-
require_relative '
|
4
|
+
require_relative '../core_extensions/string/cleanlines'
|
5
5
|
using String::Cleanlines
|
6
6
|
|
7
7
|
require_relative 'inspect_base'
|
File without changes
|
File without changes
|
@@ -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
|
-
#
|
13
|
-
AddressConcern::Address::Base
|
14
|
-
AddressConcern::AddressAssociations
|
15
|
-
# ActiveRecord::Base.extend(AddressConcern::Address::Base)
|
9
|
+
#
|
16
10
|
end
|
17
11
|
end
|
18
12
|
|
data/lib/address_concern.rb
CHANGED
@@ -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 '
|
8
|
-
|
9
|
-
|
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
|
-
|
12
|
-
|
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.
|
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-
|
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
|