pricehubble 1.4.0 → 1.5.0
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/price_hubble/{entity/base_entity.rb → base_entity.rb} +5 -5
- data/lib/price_hubble/entity/concern/associations.rb +1 -1
- data/lib/price_hubble/entity/concern/attributes/date_array.rb +1 -1
- data/lib/price_hubble/entity/concern/attributes/enum.rb +1 -1
- data/lib/price_hubble/entity/concern/attributes/range.rb +1 -1
- data/lib/price_hubble/entity/concern/attributes/string_inquirer.rb +1 -1
- data/lib/price_hubble/entity/concern/attributes.rb +1 -1
- data/lib/price_hubble/entity/concern/callbacks.rb +1 -1
- data/lib/price_hubble/entity/concern/client.rb +1 -1
- data/lib/price_hubble/entity/concern/persistence.rb +1 -1
- data/lib/price_hubble/version.rb +1 -1
- data/lib/price_hubble.rb +25 -80
- data/pricehubble.gemspec +1 -0
- metadata +19 -5
- /data/lib/price_hubble/{errors.rb → initializers/errors.rb} +0 -0
- /data/lib/price_hubble/{faraday.rb → initializers/faraday.rb} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9721bb7bde0466664e06c6669668eb4bfe18afbcd922b3e9780cbccf7fab38c4
|
|
4
|
+
data.tar.gz: 96cbc3748db0776ad37c56d0cae090d4c7f181ba5357dc94fdcc05cd138f7fd1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ed6ada92ef2cb5a3ff5a1d715fe1aad5bc68adc9482cf5b383b6497d253552f02c42b908c48e326337886227dc616dcd3210a59e70da3591d5bbb18242a7174c
|
|
7
|
+
data.tar.gz: 17461520b2a3631e0706da2c6b5355ee5fe6c9f0d2228eee4497f6ac068780431f9c5da0585f1862227c4cd86e6b562f19a7e4a1bbcd3a4d9db9c14d878e23c1
|
data/CHANGELOG.md
CHANGED
|
@@ -13,11 +13,11 @@ module PriceHubble
|
|
|
13
13
|
include PriceHubble::Utils::Bangers
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
include
|
|
17
|
-
include
|
|
18
|
-
include
|
|
19
|
-
include
|
|
20
|
-
include
|
|
16
|
+
include Concern::Callbacks
|
|
17
|
+
include Concern::Attributes
|
|
18
|
+
include Concern::Associations
|
|
19
|
+
include Concern::Client
|
|
20
|
+
include Concern::Persistence
|
|
21
21
|
|
|
22
22
|
# We collect all unknown attributes instead of raising while creating a new
|
|
23
23
|
# instance. The unknown attributes are wrapped inside a
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module PriceHubble
|
|
4
|
-
module
|
|
4
|
+
module Concern
|
|
5
5
|
# An ActiveRecord-like attribute management feature, with the exception
|
|
6
6
|
# that the attributes are not generated through a schema file, but are
|
|
7
7
|
# defined inline the entity class.
|
data/lib/price_hubble/version.rb
CHANGED
data/lib/price_hubble.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'zeitwerk'
|
|
3
4
|
require 'active_support'
|
|
4
5
|
require 'active_support/concern'
|
|
5
6
|
require 'active_support/configurable'
|
|
@@ -14,100 +15,44 @@ require 'recursive-open-struct'
|
|
|
14
15
|
require 'faraday'
|
|
15
16
|
require 'faraday_middleware'
|
|
16
17
|
|
|
17
|
-
# Load polyfills if needed
|
|
18
|
-
require 'price_hubble/core_ext/hash'
|
|
19
|
-
|
|
20
18
|
# The top level namespace for the PriceHubble gem.
|
|
21
19
|
module PriceHubble
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
autoload :ConfigurationHandling, 'price_hubble/configuration_handling'
|
|
25
|
-
autoload :Client, 'price_hubble/client'
|
|
26
|
-
autoload :Identity, 'price_hubble/identity'
|
|
27
|
-
autoload :Instrumentation, 'price_hubble/instrumentation'
|
|
28
|
-
|
|
29
|
-
# Entities
|
|
30
|
-
autoload :BaseEntity, 'price_hubble/entity/base_entity'
|
|
31
|
-
autoload :Authentication, 'price_hubble/entity/authentication'
|
|
32
|
-
autoload :Valuation, 'price_hubble/entity/valuation'
|
|
33
|
-
autoload :ValuationScores, 'price_hubble/entity/valuation_scores'
|
|
34
|
-
autoload :ValuationRequest, 'price_hubble/entity/valuation_request'
|
|
35
|
-
autoload :Property, 'price_hubble/entity/property'
|
|
36
|
-
autoload :PropertyConditions, 'price_hubble/entity/property_conditions'
|
|
37
|
-
autoload :PropertyQualities, 'price_hubble/entity/property_qualities'
|
|
38
|
-
autoload :PropertyType, 'price_hubble/entity/property_type'
|
|
39
|
-
autoload :Location, 'price_hubble/entity/location'
|
|
40
|
-
autoload :Address, 'price_hubble/entity/address'
|
|
41
|
-
autoload :Coordinates, 'price_hubble/entity/coordinates'
|
|
42
|
-
autoload :Dossier, 'price_hubble/entity/dossier'
|
|
43
|
-
|
|
44
|
-
# Some general purpose utilities
|
|
45
|
-
module Utils
|
|
46
|
-
autoload :Decision, 'price_hubble/utils/decision'
|
|
47
|
-
autoload :Bangers, 'price_hubble/utils/bangers'
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
# Instrumentation
|
|
51
|
-
module Instrumentation
|
|
52
|
-
autoload :LogSubscriber, 'price_hubble/instrumentation/log_subscriber'
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
# Dedicated application HTTP (low level) client
|
|
56
|
-
module Client
|
|
57
|
-
# All our utilities used for the low level client
|
|
58
|
-
module Utils
|
|
59
|
-
autoload :Request, 'price_hubble/client/utils/request'
|
|
60
|
-
autoload :Response, 'price_hubble/client/utils/response'
|
|
61
|
-
end
|
|
20
|
+
# Configure the relative gem code base location
|
|
21
|
+
root_path = Pathname.new("#{__dir__}/price_hubble")
|
|
62
22
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
autoload :DataSanitization,
|
|
66
|
-
'price_hubble/client/request/data_sanitization'
|
|
67
|
-
autoload :DefaultHeaders, 'price_hubble/client/request/default_headers'
|
|
68
|
-
end
|
|
23
|
+
# Setup a Zeitwerk autoloader instance and configure it
|
|
24
|
+
loader = Zeitwerk::Loader.for_gem
|
|
69
25
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
'price_hubble/client/response/recursive_open_struct'
|
|
76
|
-
end
|
|
26
|
+
# Do not auto load some parts of the gem
|
|
27
|
+
loader.ignore("#{__dir__}/pricehubble*")
|
|
28
|
+
loader.ignore(root_path.join('core_ext'))
|
|
29
|
+
loader.ignore(root_path.join('initializers*'))
|
|
30
|
+
loader.ignore(root_path.join('railtie.rb'))
|
|
77
31
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
end
|
|
32
|
+
# Entity definitions, based on core functionalities,
|
|
33
|
+
# all entities are directly located at the namespace root,
|
|
34
|
+
# together with their shared concerns
|
|
35
|
+
loader.push_dir(root_path.join('entity'), namespace: PriceHubble)
|
|
83
36
|
|
|
84
|
-
#
|
|
85
|
-
|
|
86
|
-
autoload :Callbacks, 'price_hubble/entity/concern/callbacks'
|
|
87
|
-
autoload :Attributes, 'price_hubble/entity/concern/attributes'
|
|
88
|
-
autoload :Associations, 'price_hubble/entity/concern/associations'
|
|
89
|
-
autoload :Client, 'price_hubble/entity/concern/client'
|
|
90
|
-
autoload :Persistence, 'price_hubble/entity/concern/persistence'
|
|
91
|
-
|
|
92
|
-
# Some custom typed attribute helpers
|
|
93
|
-
module Attributes
|
|
94
|
-
base = 'price_hubble/entity/concern/attributes'
|
|
95
|
-
autoload :DateArray, "#{base}/date_array"
|
|
96
|
-
autoload :Enum, "#{base}/enum"
|
|
97
|
-
autoload :Range, "#{base}/range"
|
|
98
|
-
autoload :StringInquirer, "#{base}/string_inquirer"
|
|
99
|
-
end
|
|
100
|
-
end
|
|
37
|
+
# Finish the auto loader configuration
|
|
38
|
+
loader.setup
|
|
101
39
|
|
|
102
40
|
# Load standalone code
|
|
103
41
|
require 'price_hubble/version'
|
|
104
|
-
require 'price_hubble/errors'
|
|
105
|
-
require 'price_hubble/faraday'
|
|
106
42
|
require 'price_hubble/railtie' if defined? Rails
|
|
107
43
|
|
|
44
|
+
# Load all core extension of the gem
|
|
45
|
+
Dir[root_path.join('core_ext/**/*.rb')].sort.each { |path| require path }
|
|
46
|
+
|
|
47
|
+
# Load all initializers of the gem
|
|
48
|
+
Dir[root_path.join('initializers/**/*.rb')].sort.each { |path| require path }
|
|
49
|
+
|
|
108
50
|
# Include top-level features
|
|
109
51
|
include PriceHubble::ConfigurationHandling
|
|
110
52
|
include PriceHubble::Client
|
|
111
53
|
include PriceHubble::Identity
|
|
112
54
|
include PriceHubble::Instrumentation
|
|
55
|
+
|
|
56
|
+
# Make sure to eager load all constants
|
|
57
|
+
loader.eager_load
|
|
113
58
|
end
|
data/pricehubble.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pricehubble
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hermann Mayer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-01-
|
|
11
|
+
date: 2025-01-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|
|
@@ -80,6 +80,20 @@ dependencies:
|
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '2.0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: zeitwerk
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - "~>"
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '2.6'
|
|
90
|
+
type: :runtime
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - "~>"
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '2.6'
|
|
83
97
|
description: Ruby client for the PriceHubble REST API
|
|
84
98
|
email:
|
|
85
99
|
- hermann.mayer92@gmail.com
|
|
@@ -123,6 +137,7 @@ files:
|
|
|
123
137
|
- gemfiles/rails_6.1.gemfile
|
|
124
138
|
- gemfiles/rails_7.1.gemfile
|
|
125
139
|
- lib/price_hubble.rb
|
|
140
|
+
- lib/price_hubble/base_entity.rb
|
|
126
141
|
- lib/price_hubble/client.rb
|
|
127
142
|
- lib/price_hubble/client/authentication.rb
|
|
128
143
|
- lib/price_hubble/client/base.rb
|
|
@@ -139,7 +154,6 @@ files:
|
|
|
139
154
|
- lib/price_hubble/core_ext/hash.rb
|
|
140
155
|
- lib/price_hubble/entity/address.rb
|
|
141
156
|
- lib/price_hubble/entity/authentication.rb
|
|
142
|
-
- lib/price_hubble/entity/base_entity.rb
|
|
143
157
|
- lib/price_hubble/entity/concern/associations.rb
|
|
144
158
|
- lib/price_hubble/entity/concern/attributes.rb
|
|
145
159
|
- lib/price_hubble/entity/concern/attributes/date_array.rb
|
|
@@ -159,9 +173,9 @@ files:
|
|
|
159
173
|
- lib/price_hubble/entity/valuation.rb
|
|
160
174
|
- lib/price_hubble/entity/valuation_request.rb
|
|
161
175
|
- lib/price_hubble/entity/valuation_scores.rb
|
|
162
|
-
- lib/price_hubble/errors.rb
|
|
163
|
-
- lib/price_hubble/faraday.rb
|
|
164
176
|
- lib/price_hubble/identity.rb
|
|
177
|
+
- lib/price_hubble/initializers/errors.rb
|
|
178
|
+
- lib/price_hubble/initializers/faraday.rb
|
|
165
179
|
- lib/price_hubble/instrumentation.rb
|
|
166
180
|
- lib/price_hubble/instrumentation/log_subscriber.rb
|
|
167
181
|
- lib/price_hubble/railtie.rb
|
|
File without changes
|
|
File without changes
|