pricehubble 1.6.0 → 1.6.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdab94d0db6b8d52953fec4af77bc72a063eb384a08f8d0f9c94a2cbc495887a
4
- data.tar.gz: 2e3e154a4a4fcbc49cbc1f17b3b738f2c808ff200a82377884eef7463499b9ec
3
+ metadata.gz: 9e4560c6511f4825274bd9f0c8f0d992afbba0146124ef0bd3190a245cb9b034
4
+ data.tar.gz: 809942c34cc2b1bb219f91d0dae42b56454d34df87ed04684693c2dda40bab28
5
5
  SHA512:
6
- metadata.gz: de8cce6ca9891a70b60afdc7621c848c1d9cdce76a895276f5986df113cc5c0c5a4edd0ddabcc150f4ca1ff8e8d8f74947da5fa89008a8a84dcb67c8bb08e765
7
- data.tar.gz: eb755dc661fa163d417f6be206561e9accf27a435e15fbbec128d30e26aa8c8fb475ae86a86d0fcb0425ff50047f2dcb1b6acc9ef2d4afdffea0934e98490fe5
6
+ metadata.gz: 3f2cc01cce2b6dd5966eb73a656d1c4dc914259a5c1b147bfbe2c6fb22408863382b89f2a18fa6f8392ec26355587b928aecfae5a1503eece017d2a673f60ea1
7
+ data.tar.gz: d3b0f23dbff8ca220ca69f1c54aa091b6839f53129d4b0afa06c71188e5723730fe30137a76ee4b85a3ec087c2956fa7f5dacb56e0ac741bada2040f4b1470f1
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rspec
3
3
  - rubocop-rails
4
4
 
@@ -63,7 +63,7 @@ RSpec/NestedGroups:
63
63
  Max: 4
64
64
 
65
65
  # Disable regular Rails spec paths.
66
- RSpec/FilePath:
66
+ Rails/FilePath:
67
67
  Enabled: false
68
68
 
69
69
  # Because we just implemented the ActiveRecord API.
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 1.6.1 (21 May 2025)
6
+
7
+ * Corrected some RuboCop glitches ([#15](https://github.com/hausgold/pricehubble/pull/15))
8
+ * Upgraded the rubocop dependencies ([#16](https://github.com/hausgold/pricehubble/pull/16))
9
+
5
10
  ### 1.6.0 (30 January 2025)
6
11
 
7
12
  * Added all versions up to Ruby 3.4 to the CI matrix ([#14](https://github.com/hausgold/pricehubble/pull/14))
data/Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
1
  FROM hausgold/ruby:2.7
2
- MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
2
+ LABEL org.opencontainers.image.authors="containers@hausgold.de"
3
3
 
4
4
  # Update system gem
5
5
  RUN gem update --system '3.4.22'
data/Gemfile CHANGED
@@ -18,9 +18,9 @@ gem 'guard-rspec', '~> 4.7'
18
18
  gem 'rake', '~> 13.0'
19
19
  gem 'redcarpet', '~> 3.5'
20
20
  gem 'rspec', '~> 3.12'
21
- gem 'rubocop', '~> 1.28'
22
- gem 'rubocop-rails', '~> 2.14'
23
- gem 'rubocop-rspec', '~> 2.10'
21
+ gem 'rubocop'
22
+ gem 'rubocop-rails'
23
+ gem 'rubocop-rspec'
24
24
  gem 'simplecov', '>= 0.22'
25
25
  gem 'terminal-table', '~> 3.0'
26
26
  gem 'timecop', '>= 0.9.6'
@@ -1,68 +1,7 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg
3
- xmlns:dc="http://purl.org/dc/elements/1.1/"
4
- xmlns:cc="http://creativecommons.org/ns#"
5
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
- xmlns:svg="http://www.w3.org/2000/svg"
7
- xmlns="http://www.w3.org/2000/svg"
8
- version="1.1"
9
- id="Ebene_1"
10
- x="0px"
11
- y="0px"
12
- viewBox="0 0 800 200"
13
- xml:space="preserve"
14
- width="800"
15
- height="200"><metadata
16
- id="metadata33"><rdf:RDF><cc:Work
17
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
18
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
19
- id="defs31" />
20
- <style
21
- type="text/css"
22
- id="style2">
23
- .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#E73E11;}
24
- .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#0371B9;}
25
- .st2{fill:#132E48;}
26
- .st3{font-family:'OpenSans-Bold';}
27
- .st4{font-size:29.5168px;}
28
- .st5{fill-rule:evenodd;clip-rule:evenodd;fill:none;}
29
- .st6{opacity:0.5;fill:#132E48;}
30
- .st7{font-family:'OpenSans';}
31
- .st8{font-size:12px;}
32
- </style>
33
- <g
34
- transform="translate(0,1.53584)"
35
- id="g828"><g
36
- transform="translate(35.93985,35.66416)"
37
- id="g8">
38
- <path
39
- style="clip-rule:evenodd;fill:#e73e11;fill-rule:evenodd"
40
- id="path4"
41
- d="m -0.1,124.4 c 0,0 33.7,-123.2 66.7,-123.2 12.8,0 26.9,21.9 38.8,47.2 -23.6,27.9 -66.6,59.7 -94,76 -7.1,0 -11.5,0 -11.5,0 z"
42
- class="st0" />
43
- <path
44
- style="clip-rule:evenodd;fill:#0371b9;fill-rule:evenodd"
45
- id="path6"
46
- d="m 88.1,101.8 c 13.5,-10.4 18.4,-16.2 27.1,-25.4 10,25.7 16.7,48 16.7,48 0,0 -41.4,0 -78,0 14.6,-7.9 18.7,-10.7 34.2,-22.6 z"
47
- class="st1" />
48
- </g><text
49
- y="106.40316"
50
- x="192.43155"
51
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:29.51733398px;font-family:'Open Sans', sans-serif;-inkscape-font-specification:'OpenSans-Bold, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#132e48"
52
- id="text10"
53
- class="st2 st3 st4">PriceHubble</text>
54
- <rect
55
- style="clip-rule:evenodd;fill:none;fill-rule:evenodd"
56
- id="rect12"
57
- height="24"
58
- width="314.5"
59
- class="st5"
60
- y="118.06416"
61
- x="194.23985" /><text
62
- y="127.22146"
63
- x="194.21715"
64
- style="font-size:12px;font-family:'Open Sans', sans-serif;opacity:0.5;fill:#132e48;-inkscape-font-specification:'Open Sans, sans-serif, Normal';font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;"
65
- id="text14"
66
- class="st6 st7 st8">Ruby client for the PriceHubble REST API</text>
67
- </g>
68
- </svg>
1
+ <svg id="hg-readme-banner-v2" viewBox="0 0 800 200" width="800" height="200" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="a" x1="112.46" y1="309.13" x2="314.5" y2="309.13" gradientUnits="userSpaceOnUse" gradientTransform="translate(-33.985 -122.816)"><stop offset="0" stop-color="#1992f4" /><stop offset="1" stop-color="#2b8af6" /></linearGradient></defs><style>.st3{font-family:&apos;OpenSans-Bold&apos;}.st4{font-size:29.5168px}.st5{fill-rule:evenodd;clip-rule:evenodd;fill:none}.st7{font-family:&apos;OpenSans&apos;}.st8{font-size:12px}@media (prefers-color-scheme:dark){text{fill:#f0f6fc!important}}</style>
2
+ <text y="107.939" x="192.432" style="font-family:'Open Sans', sans-serif;-inkscape-font-specification:'OpenSans-Bold, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" class="st3 st4" font-weight="700" font-size="29.517" font-family="'Open Sans',sans-serif" fill="#3f3e4b"
3
+ >PriceHubble</text>
4
+ <path class="st5" clip-rule="evenodd" fill="none" fill-rule="evenodd" d="M194.24 119.6h314.5v24h-314.5z"/>
5
+ <text y="128.757" x="194.217" style="font-family:'Open Sans', sans-serif;-inkscape-font-specification:'Open Sans, sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" class="st7 st8" font-weight="400" font-size="12" font-family="'Open Sans',sans-serif" opacity=".75" fill="#3f3e4b"
6
+ >Ruby client for the PriceHubble REST API</text>
7
+ <g transform="translate(33.985 122.816)"><path d="M129.427 32.4q-7-20.71-14.09-41.44c-.33-1-.52-1.18-1.34-.25-3.1 3.48-6.25 6.92-9.49 10.26a180.23 180.23 0 0 1-18.54 16.15 193.7 193.7 0 0 1-21.95 15.43c-2.53 1.47-5.08 2.91-7.62 4.36l.11.27h73.05c1 .1 1.4-.13 1-1.22-.4-1.09-.73-2.38-1.13-3.56z" fill="url(#a)" /><path d="M89.077-63.87c-3.57-5.58-7.42-10.95-12.62-15.17-3.93-3.19-8.28-5-13.42-3.32a23 23 0 0 0-8.76 5.6 66.77 66.77 0 0 0-10.34 13.09c-8 12.68-14.06 26.28-19.28 40.25-4.6 12.33-8.82 24.8-12.95 37.29-2.45 7.41-4.39 15-6.61 22.49-.26.88 0 1 .79 1h7.4c1.23 0 2.44.14 3.6-.68 9.17-6.45 18.51-12.67 27.55-19.31a396.21 396.21 0 0 0 37.36-31.3 245.79 245.79 0 0 0 20.74-22 1.6 1.6 0 0 0 .26-2 224.45 224.45 0 0 0-13.72-25.94z" fill="#f2686d" /></g></svg>
@@ -10,9 +10,9 @@ gem "guard-rspec", "~> 4.7"
10
10
  gem "rake", "~> 13.0"
11
11
  gem "redcarpet", "~> 3.5"
12
12
  gem "rspec", "~> 3.12"
13
- gem "rubocop", "~> 1.28"
14
- gem "rubocop-rails", "~> 2.14"
15
- gem "rubocop-rspec", "~> 2.10"
13
+ gem "rubocop"
14
+ gem "rubocop-rails"
15
+ gem "rubocop-rspec"
16
16
  gem "simplecov", ">= 0.22"
17
17
  gem "terminal-table", "~> 3.0"
18
18
  gem "timecop", ">= 0.9.6"
@@ -10,9 +10,9 @@ gem "guard-rspec", "~> 4.7"
10
10
  gem "rake", "~> 13.0"
11
11
  gem "redcarpet", "~> 3.5"
12
12
  gem "rspec", "~> 3.12"
13
- gem "rubocop", "~> 1.28"
14
- gem "rubocop-rails", "~> 2.14"
15
- gem "rubocop-rspec", "~> 2.10"
13
+ gem "rubocop"
14
+ gem "rubocop-rails"
15
+ gem "rubocop-rspec"
16
16
  gem "simplecov", ">= 0.22"
17
17
  gem "terminal-table", "~> 3.0"
18
18
  gem "timecop", ">= 0.9.6"
@@ -24,7 +24,7 @@ module PriceHubble
24
24
  #
25
25
  # @param con [Faraday::Connection] the connection object
26
26
  #
27
- # rubocop:disable Metrics/MethodLength because of the middleware list
27
+ # rubocop:disable Metrics/MethodLength -- because of the middleware list
28
28
  def configure(con)
29
29
  con.use :instrumentation
30
30
 
@@ -11,8 +11,8 @@ module PriceHubble
11
11
  # @return [PriceHubble::Dossier, nil] the PriceHubble dossier,
12
12
  # or +nil+ on error
13
13
  #
14
- # rubocop:disable Metrics/MethodLength because thats the bare minimum
15
- # handling is quite complex
14
+ # rubocop:disable Metrics/MethodLength -- because thats the bare minimum
15
+ # handling is quite complex
16
16
  def create_dossier(entity, **args)
17
17
  res = connection.post do |req|
18
18
  req.path = '/api/v1/dossiers'
@@ -36,9 +36,9 @@ module PriceHubble
36
36
  # @param locale [String] the user frontend locale
37
37
  # @param args [Hash{Symbol => Mixed}] additional arguments
38
38
  #
39
- # rubocop:disable Metrics/MethodLength because thats the bare minimum
40
- # rubocop:disable Metrics/AbcSize because the decission
41
- # handling is quite complex
39
+ # rubocop:disable Metrics/MethodLength -- because thats the bare minimum
40
+ # rubocop:disable Metrics/AbcSize -- because the decission handling is
41
+ # quite complex
42
42
  def share_dossier(entity, ttl:, locale:, **args)
43
43
  res = connection.post do |req|
44
44
  req.path = '/api/v1/dossiers/links'
@@ -65,8 +65,8 @@ module PriceHubble
65
65
  # @param entity [PriceHubble::Dossier] the entity to delete
66
66
  # @param args [Hash{Symbol => Mixed}] additional arguments
67
67
  #
68
- # rubocop:disable Metrics/MethodLength because thats the bare minimumbecause the decission
69
- # handling is quite complex
68
+ # rubocop:disable Metrics/MethodLength -- because thats the bare
69
+ # minimumbecause the decission handling is quite complex
70
70
  def delete_dossier(entity, **args)
71
71
  res = connection.delete do |req|
72
72
  req.path = "/api/v1/dossiers/#{entity.id}"
@@ -5,7 +5,8 @@ module PriceHubble
5
5
  module Utils
6
6
  # Some helpers to work with responses in a general way.
7
7
  #
8
- # rubocop:disable Metrics/BlockLength because of ActiveSupport::Concern
8
+ # rubocop:disable Metrics/BlockLength -- because of
9
+ # ActiveSupport::Concern
9
10
  module Response
10
11
  extend ActiveSupport::Concern
11
12
 
@@ -11,8 +11,8 @@ module PriceHubble
11
11
  # @return [Array<PriceHubble::Valuation>, nil] the valuation results,
12
12
  # or +nil+ on error
13
13
  #
14
- # rubocop:disable Metrics/MethodLength because of the request handling
15
- # rubocop:disable Metrics/AbcSize dito
14
+ # rubocop:disable Metrics/MethodLength -- because of the request handling
15
+ # rubocop:disable Metrics/AbcSize -- ditto
16
16
  def property_value(request, **args)
17
17
  data = request.attributes(sanitize: true)
18
18
  res = connection.post do |req|
@@ -42,9 +42,9 @@ module PriceHubble
42
42
  # @param request [PriceHubble::ValuationRequest] the original request
43
43
  # @return [Proc] the valuation mapping code
44
44
  #
45
- # rubocop:disable Metrics/MethodLength because of the request
46
- # to response mapping
47
- # rubocop:disable Metrics/AbcSize dito
45
+ # rubocop:disable Metrics/MethodLength -- because of the request to
46
+ # response mapping
47
+ # rubocop:disable Metrics/AbcSize -- ditto
48
48
  def assign_valuations(data, request)
49
49
  lambda do
50
50
  # valuations[i][j] contains the valuation for property i on date j
@@ -3,7 +3,7 @@
3
3
  module PriceHubble
4
4
  # The top-level configuration handling.
5
5
  #
6
- # rubocop:disable Style/ClassVars because we split module code
6
+ # rubocop:disable Style/ClassVars -- because we split module code
7
7
  module ConfigurationHandling
8
8
  extend ActiveSupport::Concern
9
9
 
@@ -33,8 +33,8 @@ class Hash
33
33
  # @param object [Mixed] the object to compact
34
34
  # @return [Mixed] the compacted object
35
35
  #
36
- # rubocop:disable Metrics/MethodLength because of the extra empty
37
- # hash compaction logic
36
+ # rubocop:disable Metrics/MethodLength -- because of the extra empty hash
37
+ # compaction logic
38
38
  def deep_compact_in_object(object)
39
39
  case object
40
40
  when Hash
@@ -38,8 +38,8 @@ module PriceHubble
38
38
  # @return [Array<RecursiveOpenStruct, Hash{Symbol => Mixed}>] the
39
39
  # left over data
40
40
  #
41
- # rubocop:disable Metrics/AbcSize because of the complex logic
42
- # rubocop:disable Metrics/MethodLength because of the complex logic
41
+ # rubocop:disable Metrics/AbcSize -- because of the complex logic
42
+ # rubocop:disable Metrics/MethodLength -- because of the complex logic
43
43
  def map_has_one_association(attribute, opts, struct, hash)
44
44
  # Early exit when the source key is missing on the given data
45
45
  key = opts[:from]
@@ -77,12 +77,12 @@ module PriceHubble
77
77
  # @return [Array<RecursiveOpenStruct, Hash{Symbol => Mixed}>] the
78
78
  # left over data
79
79
  #
80
- # rubocop:disable Metrics/AbcSize because of the complex logic
81
- # rubocop:disable Metrics/CyclomaticComplexity because of the
80
+ # rubocop:disable Metrics/AbcSize -- because of the complex logic
81
+ # rubocop:disable Metrics/CyclomaticComplexity -- because of the
82
82
  # complex logic
83
- # rubocop:disable Metrics/PerceivedComplexity because of the
84
- # complex logic
85
- # rubocop:disable Metrics/MethodLength because of the complex logic
83
+ # rubocop:disable Metrics/PerceivedComplexity -- because of the complex
84
+ # logic
85
+ # rubocop:disable Metrics/MethodLength -- because of the complex logic
86
86
  def map_has_many_association(attribute, opts, struct, hash)
87
87
  # Early exit when the source key is missing on the given data
88
88
  key = opts[:from]
@@ -120,8 +120,8 @@ module PriceHubble
120
120
  # rubocop:enable Metrics/MethodLength
121
121
  end
122
122
 
123
- # rubocop:disable Naming/PredicateName because we follow
124
- # known naming conventions
123
+ # rubocop:disable Naming/PredicateName -- because we follow known naming
124
+ # conventions
125
125
  class_methods do
126
126
  # Initialize the associations structures on an inherited class.
127
127
  #
@@ -14,8 +14,8 @@ module PriceHubble
14
14
  # @param values [Array<String, Symbol>] the allowed values
15
15
  # @param _args [Hash{Symbol => Mixed}] additional options
16
16
  #
17
- # rubocop:disable Metrics/MethodLength because of the inline
18
- # meta method definitions
17
+ # rubocop:disable Metrics/MethodLength -- because of the inline meta
18
+ # method definitions
19
19
  def typed_attr_enum(name, values:, **_args)
20
20
  values = values.map(&:to_sym)
21
21
  const_values = "ATTR_#{name.to_s.upcase}"
@@ -25,8 +25,8 @@ module PriceHubble
25
25
  # @param sanitize [Boolean] whenever to sanitize the data for transport
26
26
  # @return [Hash{String => Mixed}] the attribute data
27
27
  #
28
- # rubocop:disable Metrics/MethodLength because of the
29
- # key/value sanitization handling
28
+ # rubocop:disable Metrics/MethodLength -- because of the key/value
29
+ # sanitization handling
30
30
  def attributes(sanitize: false)
31
31
  attribute_names.each_with_object({}) do |key, memo|
32
32
  reader = key
@@ -74,7 +74,8 @@ module PriceHubble
74
74
  # @param sanitize [Boolean] whenever to sanitize the data for transport
75
75
  # @return [Mixed] the attribute(s) data
76
76
  #
77
- # rubocop:disable Metrics/MethodLength because thats the pure minimum
77
+ # rubocop:disable Metrics/MethodLength -- because thats the pure
78
+ # minimum
78
79
  def resolve_attributes(obj, sanitize: false)
79
80
  if obj.respond_to? :attributes
80
81
  obj = if obj.method(:attributes).arity == 1
@@ -3,7 +3,7 @@
3
3
  module PriceHubble
4
4
  # Handles all the identity retrival high-level logic.
5
5
  #
6
- # rubocop:disable Style/ClassVars because we split module code
6
+ # rubocop:disable Style/ClassVars -- because we split module code
7
7
  module Identity
8
8
  extend ActiveSupport::Concern
9
9
 
@@ -15,7 +15,7 @@ module PriceHubble
15
15
  # @raise [NoMethodError] when a source method is not defined
16
16
  # @raise [ArgumentError] when a source method does not accept arguments
17
17
  #
18
- # rubocop:disable Metrics/MethodLength because the method template
18
+ # rubocop:disable Metrics/MethodLength -- because the method template
19
19
  # is better inlined
20
20
  def bangers(*methods)
21
21
  methods.each do |meth|
@@ -3,7 +3,7 @@
3
3
  # The gem version details.
4
4
  module PriceHubble
5
5
  # The version of the +price-hubble+ gem
6
- VERSION = '1.6.0'
6
+ VERSION = '1.6.1'
7
7
 
8
8
  class << self
9
9
  # Returns the version of gem as a string.
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.6.0
4
+ version: 1.6.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-30 00:00:00.000000000 Z
11
+ date: 2025-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel