pricehubble 1.4.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -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 +26 -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: ca74576289a2d5c061f6b2dac3ddb4d6fa077934e95ea9b8bcf94eb1b9a54d9a
|
4
|
+
data.tar.gz: d33c524b50b308f86e8205363fc3f9ab30c775b5ac9795edf8c7aa706403f96d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 961026ab2f5102b5066e1351da519788e0d23b6d29fb232b691345f1cf9561ac589e65469c424e0ed1d19c36a2be741cf75fbdf83ec26f78a384468305a8eff0
|
7
|
+
data.tar.gz: a610548c3064c6c98a711dcb5b3763bef901dc8be8b45ec6aa3e345e2d839018aeb1d2156bc7548078eecd34457947a32a2b5ddfd02daa6eb31d503ab951ab0d
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
* TODO: Replace this bullet point with an actual description of a change.
|
4
4
|
|
5
|
+
### 1.5.1 (17 January 2025)
|
6
|
+
|
7
|
+
* Added the logger dependency (#13)
|
8
|
+
|
9
|
+
### 1.5.0 (12 January 2025)
|
10
|
+
|
11
|
+
* Switched to Zeitwerk as autoloader (#12)
|
12
|
+
|
5
13
|
### 1.4.0 (3 January 2025)
|
6
14
|
|
7
15
|
* Raised minimum supported Ruby/Rails version to 2.7/6.1 (#11)
|
@@ -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,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'zeitwerk'
|
4
|
+
require 'logger'
|
3
5
|
require 'active_support'
|
4
6
|
require 'active_support/concern'
|
5
7
|
require 'active_support/configurable'
|
@@ -14,100 +16,44 @@ require 'recursive-open-struct'
|
|
14
16
|
require 'faraday'
|
15
17
|
require 'faraday_middleware'
|
16
18
|
|
17
|
-
# Load polyfills if needed
|
18
|
-
require 'price_hubble/core_ext/hash'
|
19
|
-
|
20
19
|
# The top level namespace for the PriceHubble gem.
|
21
20
|
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
|
21
|
+
# Configure the relative gem code base location
|
22
|
+
root_path = Pathname.new("#{__dir__}/price_hubble")
|
62
23
|
|
63
|
-
|
64
|
-
|
65
|
-
autoload :DataSanitization,
|
66
|
-
'price_hubble/client/request/data_sanitization'
|
67
|
-
autoload :DefaultHeaders, 'price_hubble/client/request/default_headers'
|
68
|
-
end
|
24
|
+
# Setup a Zeitwerk autoloader instance and configure it
|
25
|
+
loader = Zeitwerk::Loader.for_gem
|
69
26
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
'price_hubble/client/response/recursive_open_struct'
|
76
|
-
end
|
27
|
+
# Do not auto load some parts of the gem
|
28
|
+
loader.ignore("#{__dir__}/pricehubble*")
|
29
|
+
loader.ignore(root_path.join('core_ext'))
|
30
|
+
loader.ignore(root_path.join('initializers*'))
|
31
|
+
loader.ignore(root_path.join('railtie.rb'))
|
77
32
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
end
|
33
|
+
# Entity definitions, based on core functionalities,
|
34
|
+
# all entities are directly located at the namespace root,
|
35
|
+
# together with their shared concerns
|
36
|
+
loader.push_dir(root_path.join('entity'), namespace: PriceHubble)
|
83
37
|
|
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
|
38
|
+
# Finish the auto loader configuration
|
39
|
+
loader.setup
|
101
40
|
|
102
41
|
# Load standalone code
|
103
42
|
require 'price_hubble/version'
|
104
|
-
require 'price_hubble/errors'
|
105
|
-
require 'price_hubble/faraday'
|
106
43
|
require 'price_hubble/railtie' if defined? Rails
|
107
44
|
|
45
|
+
# Load all core extension of the gem
|
46
|
+
Dir[root_path.join('core_ext/**/*.rb')].sort.each { |path| require path }
|
47
|
+
|
48
|
+
# Load all initializers of the gem
|
49
|
+
Dir[root_path.join('initializers/**/*.rb')].sort.each { |path| require path }
|
50
|
+
|
108
51
|
# Include top-level features
|
109
52
|
include PriceHubble::ConfigurationHandling
|
110
53
|
include PriceHubble::Client
|
111
54
|
include PriceHubble::Identity
|
112
55
|
include PriceHubble::Instrumentation
|
56
|
+
|
57
|
+
# Make sure to eager load all constants
|
58
|
+
loader.eager_load
|
113
59
|
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.1
|
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-17 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
|