pricehubble 1.6.0 → 2.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fdab94d0db6b8d52953fec4af77bc72a063eb384a08f8d0f9c94a2cbc495887a
4
- data.tar.gz: 2e3e154a4a4fcbc49cbc1f17b3b738f2c808ff200a82377884eef7463499b9ec
3
+ metadata.gz: e12e3ce1637a743dce1c0db1b9a0c13c3faaa19eefb4c0369118367a99997e1c
4
+ data.tar.gz: c1009963ea544928d0092ff4caa3ff54d95c2e09bdc267b230828d6f695f490e
5
5
  SHA512:
6
- metadata.gz: de8cce6ca9891a70b60afdc7621c848c1d9cdce76a895276f5986df113cc5c0c5a4edd0ddabcc150f4ca1ff8e8d8f74947da5fa89008a8a84dcb67c8bb08e765
7
- data.tar.gz: eb755dc661fa163d417f6be206561e9accf27a435e15fbbec128d30e26aa8c8fb475ae86a86d0fcb0425ff50047f2dcb1b6acc9ef2d4afdffea0934e98490fe5
6
+ metadata.gz: b825555adae6693476690e54b0dc6294658b7cd6131e7f693590e00cadae7ac2762cc5efe5278613d64633ef3c1a76d2b4d0a5b5088a11752624d62f0da78e9f
7
+ data.tar.gz: '0718a3de09245165dba6672ba13135dcc720dfde401b96eaaf5cd000bf5033600143c30464ec86933c4f50e7db20cfaa00defef91fbe1664fba7741c514ce6c5'
@@ -20,12 +20,12 @@ jobs:
20
20
  steps:
21
21
  - uses: actions/checkout@v4
22
22
 
23
- - name: Install Ruby 2.7
23
+ - name: Install Ruby 3.2
24
24
  uses: ruby/setup-ruby@v1
25
25
  with:
26
- ruby-version: 2.7
26
+ ruby-version: 3.2
27
27
  bundler-cache: true
28
- rubygems: '3.4.22'
28
+ rubygems: '3.6.9'
29
29
 
30
30
  - name: Prepare the virtual environment
31
31
  uses: hausgold/actions/ci@master
@@ -18,8 +18,8 @@ jobs:
18
18
  strategy:
19
19
  fail-fast: false
20
20
  matrix:
21
- ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
22
- rails: ['6.1', '7.1']
21
+ ruby: ['3.2', '3.3', '3.4']
22
+ rails: ['7.1', '7.2', '8.0']
23
23
  env:
24
24
  BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
25
25
  steps:
@@ -30,7 +30,7 @@ jobs:
30
30
  with:
31
31
  ruby-version: ${{ matrix.ruby }}
32
32
  bundler-cache: true
33
- rubygems: '3.4.22'
33
+ rubygems: '3.6.9'
34
34
 
35
35
  - name: Prepare the virtual environment
36
36
  uses: hausgold/actions/ci@master
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rspec
3
3
  - rubocop-rails
4
4
 
@@ -12,7 +12,7 @@ AllCops:
12
12
  NewCops: enable
13
13
  SuggestExtensions: false
14
14
  DisplayCopNames: true
15
- TargetRubyVersion: 2.7
15
+ TargetRubyVersion: 3.2
16
16
  TargetRailsVersion: 6.1
17
17
  Exclude:
18
18
  - bin/**/*
@@ -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.
@@ -94,3 +94,9 @@ Rails/ReflectionClassName:
94
94
  # So just disabling it for now.
95
95
  Style/DocumentDynamicEvalDefinition:
96
96
  Enabled: false
97
+
98
+ # For our examples it's fine to use +pp+ and +puts+,
99
+ # as they are living examples.
100
+ Rails/Output:
101
+ Exclude:
102
+ - doc/examples/**/*
data/Appraisals CHANGED
@@ -1,11 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'rails-6.1' do
4
- gem 'activemodel', '~> 6.1.0'
5
- gem 'activesupport', '~> 6.1.0'
6
- end
7
-
8
3
  appraise 'rails-7.1' do
9
4
  gem 'activemodel', '~> 7.1.0'
10
5
  gem 'activesupport', '~> 7.1.0'
11
6
  end
7
+
8
+ appraise 'rails-7.2' do
9
+ gem 'activemodel', '~> 7.2.0'
10
+ gem 'activesupport', '~> 7.2.0'
11
+ end
12
+
13
+ appraise 'rails-8.0' do
14
+ gem 'activemodel', '~> 8.0.0'
15
+ gem 'activesupport', '~> 8.0.0'
16
+ end
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 2.0.0 (28 June 2025)
6
+
7
+ * Corrected some RuboCop glitches ([#17](https://github.com/hausgold/pricehubble/pull/17))
8
+ * Drop Ruby 2 and end of life Rails (<7.1) ([#18](https://github.com/hausgold/pricehubble/pull/18))
9
+
10
+ ### 1.6.1 (21 May 2025)
11
+
12
+ * Corrected some RuboCop glitches ([#15](https://github.com/hausgold/pricehubble/pull/15))
13
+ * Upgraded the rubocop dependencies ([#16](https://github.com/hausgold/pricehubble/pull/16))
14
+
5
15
  ### 1.6.0 (30 January 2025)
6
16
 
7
17
  * Added all versions up to Ruby 3.4 to the CI matrix ([#14](https://github.com/hausgold/pricehubble/pull/14))
data/Dockerfile CHANGED
@@ -1,8 +1,8 @@
1
- FROM hausgold/ruby:2.7
2
- MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
1
+ FROM hausgold/ruby:3.2
2
+ LABEL org.opencontainers.image.authors="containers@hausgold.de"
3
3
 
4
4
  # Update system gem
5
- RUN gem update --system '3.4.22'
5
+ RUN gem update --system '3.6.9'
6
6
 
7
7
  # Install system packages and the latest bundler
8
8
  RUN apt-get update -yqqq && \
@@ -11,7 +11,7 @@ RUN apt-get update -yqqq && \
11
11
  ca-certificates \
12
12
  bash-completion inotify-tools && \
13
13
  echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
14
- gem install bundler -v '~> 2.4.22' --no-document --no-prerelease
14
+ gem install bundler -v '~> 2.6.9' --no-document --no-prerelease
15
15
 
16
16
  # Add new web user
17
17
  RUN mkdir /app && \
data/Gemfile CHANGED
@@ -9,8 +9,8 @@ gemspec
9
9
 
10
10
  # Development dependencies
11
11
  gem 'appraisal', '~> 2.4'
12
- gem 'bundler', '~> 2.3'
13
- gem 'countless', '~> 1.1'
12
+ gem 'bundler', '~> 2.6'
13
+ gem 'countless', '~> 2.0'
14
14
  # TODO: Remove the upper lock when
15
15
  # https://github.com/thoughtbot/factory_bot/issues/1614 is solved.
16
16
  gem 'factory_bot', '~> 6.2', '< 6.4.5'
@@ -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'
data/Makefile CHANGED
@@ -117,7 +117,7 @@ test-style: \
117
117
  test-style-ruby:
118
118
  # Run the static code analyzer (rubocop)
119
119
  @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a \
120
- || ($(TEST) $$($(RUBY_VERSION)) != '2.7' && true))
120
+ || ($(TEST) $$($(RUBY_VERSION)) != '3.2' && true))
121
121
 
122
122
  clean:
123
123
  # Clean the dependencies
@@ -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>
@@ -20,6 +20,7 @@ if ENV['PRICEHUBBLE_PASSWORD'].blank?
20
20
  puts '> [ERR] Environment variable `PRICEHUBBLE_PASSWORD` is missing.'
21
21
  end
22
22
 
23
+ # rubocop:disable Rails/Exit -- because we're not in a Rails application here
23
24
  if errors
24
25
  puts
25
26
  puts '> Usage:'
@@ -28,3 +29,4 @@ if errors
28
29
  puts "> $ #{$PROGRAM_NAME} #{ARGV.join(' ')}"
29
30
  exit
30
31
  end
32
+ # rubocop:enable Rails/Exit
data/docker-compose.yml CHANGED
@@ -1,4 +1,3 @@
1
- version: "3"
2
1
  services:
3
2
  test:
4
3
  build: .
@@ -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"
@@ -3,16 +3,16 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal", "~> 2.4"
6
- gem "bundler", "~> 2.3"
7
- gem "countless", "~> 1.1"
6
+ gem "bundler", "~> 2.6"
7
+ gem "countless", "~> 2.0"
8
8
  gem "factory_bot", "~> 6.2", "< 6.4.5"
9
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"
@@ -0,0 +1,26 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal", "~> 2.4"
6
+ gem "bundler", "~> 2.6"
7
+ gem "countless", "~> 2.0"
8
+ gem "factory_bot", "~> 6.2", "< 6.4.5"
9
+ gem "guard-rspec", "~> 4.7"
10
+ gem "rake", "~> 13.0"
11
+ gem "redcarpet", "~> 3.5"
12
+ gem "rspec", "~> 3.12"
13
+ gem "rubocop"
14
+ gem "rubocop-rails"
15
+ gem "rubocop-rspec"
16
+ gem "simplecov", ">= 0.22"
17
+ gem "terminal-table", "~> 3.0"
18
+ gem "timecop", ">= 0.9.6"
19
+ gem "vcr", "~> 6.0"
20
+ gem "webmock", "~> 3.18"
21
+ gem "yard", ">= 0.9.28"
22
+ gem "yard-activesupport-concern", ">= 0.0.1"
23
+ gem "activemodel", "~> 7.2.0"
24
+ gem "activesupport", "~> 7.2.0"
25
+
26
+ gemspec path: "../"
@@ -0,0 +1,26 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "appraisal", "~> 2.4"
6
+ gem "bundler", "~> 2.6"
7
+ gem "countless", "~> 2.0"
8
+ gem "factory_bot", "~> 6.2", "< 6.4.5"
9
+ gem "guard-rspec", "~> 4.7"
10
+ gem "rake", "~> 13.0"
11
+ gem "redcarpet", "~> 3.5"
12
+ gem "rspec", "~> 3.12"
13
+ gem "rubocop"
14
+ gem "rubocop-rails"
15
+ gem "rubocop-rspec"
16
+ gem "simplecov", ">= 0.22"
17
+ gem "terminal-table", "~> 3.0"
18
+ gem "timecop", ">= 0.9.6"
19
+ gem "vcr", "~> 6.0"
20
+ gem "webmock", "~> 3.18"
21
+ gem "yard", ">= 0.9.28"
22
+ gem "yard-activesupport-concern", ">= 0.0.1"
23
+ gem "activemodel", "~> 8.0.0"
24
+ gem "activesupport", "~> 8.0.0"
25
+
26
+ gemspec path: "../"
@@ -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,6 @@ 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
125
123
  class_methods do
126
124
  # Initialize the associations structures on an inherited class.
127
125
  #
@@ -141,6 +139,9 @@ module PriceHubble
141
139
  #
142
140
  # @param entity [String, Symbol] the attribute/entity name
143
141
  # @param args [Hash{Symbol => Mixed}] additional options
142
+ #
143
+ # rubocop:disable Naming/PredicatePrefix -- because we mimic the
144
+ # ActiveRecord API here
144
145
  def has_one(entity, **args)
145
146
  # Sanitize options
146
147
  entity = entity.to_sym
@@ -160,6 +161,7 @@ module PriceHubble
160
161
  # Add the entity to the tracked attributes if it should be persisted
161
162
  tracked_attr entity if opts[:persist]
162
163
  end
164
+ # rubocop:enable Naming/PredicatePrefix
163
165
 
164
166
  # Define a simple +has_many+ association.
165
167
  #
@@ -173,6 +175,9 @@ module PriceHubble
173
175
  #
174
176
  # @param entity [String, Symbol] the attribute/entity name
175
177
  # @param args [Hash{Symbol => Mixed}] additional options
178
+ #
179
+ # rubocop:disable Naming/PredicatePrefix -- because we mimic the
180
+ # ActiveRecord API here
176
181
  def has_many(entity, **args)
177
182
  # Sanitize options
178
183
  entity = entity.to_sym
@@ -192,8 +197,8 @@ module PriceHubble
192
197
  # Add the entity to the tracked attributes if it should be persisted
193
198
  tracked_attr entity if opts[:persist]
194
199
  end
200
+ # rubocop:enable Naming/PredicatePrefix
195
201
  end
196
- # rubocop:enable Naming/PredicateName
197
202
  end
198
203
  end
199
204
  end
@@ -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 = '2.0.0'
7
7
 
8
8
  class << self
9
9
  # Returns the version of gem as a string.
data/lib/price_hubble.rb CHANGED
@@ -43,10 +43,10 @@ module PriceHubble
43
43
  require 'price_hubble/railtie' if defined? Rails
44
44
 
45
45
  # Load all core extension of the gem
46
- Dir[root_path.join('core_ext/**/*.rb')].sort.each { |path| require path }
46
+ Dir[root_path.join('core_ext/**/*.rb')].each { |path| require path }
47
47
 
48
48
  # Load all initializers of the gem
49
- Dir[root_path.join('initializers/**/*.rb')].sort.each { |path| require path }
49
+ Dir[root_path.join('initializers/**/*.rb')].each { |path| require path }
50
50
 
51
51
  # Include top-level features
52
52
  include PriceHubble::ConfigurationHandling
data/pricehubble.gemspec CHANGED
@@ -31,10 +31,10 @@ Gem::Specification.new do |spec|
31
31
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
32
  spec.require_paths = ['lib']
33
33
 
34
- spec.required_ruby_version = '>= 2.7'
34
+ spec.required_ruby_version = '>= 3.2'
35
35
 
36
- spec.add_dependency 'activemodel', '>= 6.1'
37
- spec.add_dependency 'activesupport', '>= 6.1'
36
+ spec.add_dependency 'activemodel', '>= 7.1'
37
+ spec.add_dependency 'activesupport', '>= 7.1'
38
38
  spec.add_dependency 'faraday', '~> 1.0'
39
39
  spec.add_dependency 'faraday_middleware', '~> 1.0'
40
40
  spec.add_dependency 'mutex_m', '~> 0.3.0'
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pricehubble
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-01-30 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activemodel
@@ -16,28 +15,28 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: '6.1'
18
+ version: '7.1'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - ">="
25
24
  - !ruby/object:Gem::Version
26
- version: '6.1'
25
+ version: '7.1'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: activesupport
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
- version: '6.1'
32
+ version: '7.1'
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - ">="
39
38
  - !ruby/object:Gem::Version
40
- version: '6.1'
39
+ version: '7.1'
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: faraday
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -150,6 +149,8 @@ files:
150
149
  - docker-compose.yml
151
150
  - gemfiles/rails_6.1.gemfile
152
151
  - gemfiles/rails_7.1.gemfile
152
+ - gemfiles/rails_7.2.gemfile
153
+ - gemfiles/rails_8.0.gemfile
153
154
  - lib/price_hubble.rb
154
155
  - lib/price_hubble/base_entity.rb
155
156
  - lib/price_hubble/client.rb
@@ -199,7 +200,6 @@ files:
199
200
  - lib/pricehubble
200
201
  - lib/pricehubble.rb
201
202
  - pricehubble.gemspec
202
- homepage:
203
203
  licenses:
204
204
  - MIT
205
205
  metadata:
@@ -208,7 +208,6 @@ metadata:
208
208
  changelog_uri: https://github.com/hausgold/pricehubble/blob/master/CHANGELOG.md
209
209
  bug_tracker_uri: https://github.com/hausgold/pricehubble/issues
210
210
  documentation_uri: https://www.rubydoc.info/gems/pricehubble
211
- post_install_message:
212
211
  rdoc_options: []
213
212
  require_paths:
214
213
  - lib
@@ -216,15 +215,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
216
215
  requirements:
217
216
  - - ">="
218
217
  - !ruby/object:Gem::Version
219
- version: '2.7'
218
+ version: '3.2'
220
219
  required_rubygems_version: !ruby/object:Gem::Requirement
221
220
  requirements:
222
221
  - - ">="
223
222
  - !ruby/object:Gem::Version
224
223
  version: '0'
225
224
  requirements: []
226
- rubygems_version: 3.4.22
227
- signing_key:
225
+ rubygems_version: 3.6.9
228
226
  specification_version: 4
229
227
  summary: Ruby client for the PriceHubble REST API
230
228
  test_files: []