immoscout 1.9.1 → 2.1.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: 0c661228218b39f685c3696e53e5b560bdfc68ad3d130b383164cbf29d4dd97d
4
- data.tar.gz: cd0f31117ab04fc7097609a89a35abc8305ffbaa1aa9c5ec23185815a6213ec9
3
+ metadata.gz: e7df9feb0754bbf3962e1eaf15042858af96b068e7ea75001d043cffbb9fd16a
4
+ data.tar.gz: d67beb5020f876f3da93d84905dea17a72a3bc162a5d7d35a560025e0ee182dc
5
5
  SHA512:
6
- metadata.gz: 2eecf8b99dcc5389f90fbcfba6df2e89142545f7e5fda16c0b2bbb99f78d79555132143c4e44b1b0ebcb4cd5f05fdae2a71258af3179a9b1ce264fc6e77d4166
7
- data.tar.gz: 25a8e39da9ff73fb3daea654c7ce8f6621bda1f007dd581e30292be3bb3646a6316c42a911823b14e81a1447feb1bc904bd52ba8b062795c7fb59b2bbef9ac2e
6
+ metadata.gz: 27de4448b1ebfa37731a6285324c4458be5ed09e1f93df7c7418911043abb57d98c72680c8a6f5767f61d01b2ce4ac80291c044423a96c6d21eacda053b814af
7
+ data.tar.gz: db5bb3ddaae29f3462bf073585009f954040ee0e61af8a1a1642a932798cbfa88747e9312e57f1378f3c54c24f87b0bed2f336425c0baebc85701167d09112b1
@@ -16,16 +16,16 @@ jobs:
16
16
  docs:
17
17
  name: Release the gem
18
18
  runs-on: ubuntu-22.04
19
- timeout-minutes: 5
19
+ timeout-minutes: 10
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', '8.1']
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
@@ -12,8 +12,8 @@ AllCops:
12
12
  NewCops: enable
13
13
  SuggestExtensions: false
14
14
  DisplayCopNames: true
15
- TargetRubyVersion: 2.7
16
- TargetRailsVersion: 6.1
15
+ TargetRubyVersion: 3.2
16
+ TargetRailsVersion: 7.1
17
17
  Exclude:
18
18
  - bin/**/*
19
19
  - vendor/**/*
data/Appraisals CHANGED
@@ -1,9 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'rails-6.1' do
4
- gem 'activesupport', '~> 6.1.0'
5
- end
6
-
7
3
  appraise 'rails-7.1' do
8
4
  gem 'activesupport', '~> 7.1.0'
9
5
  end
6
+
7
+ appraise 'rails-7.2' do
8
+ gem 'activesupport', '~> 7.2.0'
9
+ end
10
+
11
+ appraise 'rails-8.0' do
12
+ gem 'activesupport', '~> 8.0.0'
13
+ end
14
+
15
+ appraise 'rails-8.1' do
16
+ gem 'activesupport', '~> 8.1.0'
17
+ end
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 2.1.0 (23 October 2025)
6
+
7
+ * Dropped Reek ([#23](https://github.com/hausgold/immoscout/pull/23))
8
+ * Added support for Rails 8.1 ([#24](https://github.com/hausgold/immoscout/pull/24))
9
+ * Switched from `ActiveSupport::Configurable` to a custom implementation based
10
+ on `ActiveSupport::OrderedOptions` ([#25](https://github.com/hausgold/immoscout/pull/25))
11
+
12
+ ### 2.0.0 (28 June 2025)
13
+
14
+ * Corrected some RuboCop glitches ([#21](https://github.com/hausgold/immoscout/pull/21))
15
+ * Drop Ruby 2 and end of life Rails (<7.1) ([#22](https://github.com/hausgold/immoscout/pull/22))
16
+
5
17
  ### 1.9.1 (21 May 2025)
6
18
 
7
19
  * Corrected some RuboCop glitches ([#18](https://github.com/hausgold/immoscout/pull/18))
data/Dockerfile CHANGED
@@ -1,8 +1,8 @@
1
- FROM hausgold/ruby:2.7
1
+ FROM hausgold/ruby:3.2
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,11 +9,11 @@ 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.2'
14
14
  gem 'factory_bot', '~> 6.2'
15
15
  gem 'guard-rspec', '~> 4.7'
16
- gem 'railties', '>= 6.1'
16
+ gem 'railties', '>= 7.1'
17
17
  gem 'rake', '~> 13.0'
18
18
  gem 'redcarpet', '~> 3.5'
19
19
  gem 'rspec', '~> 3.12'
data/docker-compose.yml CHANGED
@@ -1,4 +1,3 @@
1
- version: "3"
2
1
  services:
3
2
  test:
4
3
  build: .
@@ -3,11 +3,11 @@
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.2"
8
8
  gem "factory_bot", "~> 6.2"
9
9
  gem "guard-rspec", "~> 4.7"
10
- gem "railties", ">= 6.1"
10
+ gem "railties", ">= 7.1"
11
11
  gem "rake", "~> 13.0"
12
12
  gem "redcarpet", "~> 3.5"
13
13
  gem "rspec", "~> 3.12"
@@ -0,0 +1,27 @@
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.2"
8
+ gem "factory_bot", "~> 6.2"
9
+ gem "guard-rspec", "~> 4.7"
10
+ gem "railties", ">= 7.1"
11
+ gem "rake", "~> 13.0"
12
+ gem "redcarpet", "~> 3.5"
13
+ gem "rspec", "~> 3.12"
14
+ gem "rspec-json_expectations", "~> 2.2"
15
+ gem "rubocop"
16
+ gem "rubocop-rails"
17
+ gem "rubocop-rspec"
18
+ gem "simplecov", ">= 0.22"
19
+ gem "terminal-table", "~> 3.0"
20
+ gem "timecop", ">= 0.9.6"
21
+ gem "vcr", "~> 6.0"
22
+ gem "webmock", "~> 3.18"
23
+ gem "yard", ">= 0.9.28"
24
+ gem "yard-activesupport-concern", ">= 0.0.1"
25
+ gem "activesupport", "~> 7.2.0"
26
+
27
+ gemspec path: "../"
@@ -0,0 +1,27 @@
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.2"
8
+ gem "factory_bot", "~> 6.2"
9
+ gem "guard-rspec", "~> 4.7"
10
+ gem "railties", ">= 7.1"
11
+ gem "rake", "~> 13.0"
12
+ gem "redcarpet", "~> 3.5"
13
+ gem "rspec", "~> 3.12"
14
+ gem "rspec-json_expectations", "~> 2.2"
15
+ gem "rubocop"
16
+ gem "rubocop-rails"
17
+ gem "rubocop-rspec"
18
+ gem "simplecov", ">= 0.22"
19
+ gem "terminal-table", "~> 3.0"
20
+ gem "timecop", ">= 0.9.6"
21
+ gem "vcr", "~> 6.0"
22
+ gem "webmock", "~> 3.18"
23
+ gem "yard", ">= 0.9.28"
24
+ gem "yard-activesupport-concern", ">= 0.0.1"
25
+ gem "activesupport", "~> 8.0.0"
26
+
27
+ gemspec path: "../"
@@ -0,0 +1,27 @@
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.2"
8
+ gem "factory_bot", "~> 6.2"
9
+ gem "guard-rspec", "~> 4.7"
10
+ gem "railties", ">= 7.1"
11
+ gem "rake", "~> 13.0"
12
+ gem "redcarpet", "~> 3.5"
13
+ gem "rspec", "~> 3.12"
14
+ gem "rspec-json_expectations", "~> 2.2"
15
+ gem "rubocop"
16
+ gem "rubocop-rails"
17
+ gem "rubocop-rspec"
18
+ gem "simplecov", ">= 0.22"
19
+ gem "terminal-table", "~> 3.0"
20
+ gem "timecop", ">= 0.9.6"
21
+ gem "vcr", "~> 6.0"
22
+ gem "webmock", "~> 3.18"
23
+ gem "yard", ">= 0.9.28"
24
+ gem "yard-activesupport-concern", ">= 0.0.1"
25
+ gem "activesupport", "~> 8.1.0"
26
+
27
+ gemspec path: "../"
data/immoscout.gemspec CHANGED
@@ -30,9 +30,9 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
31
  spec.require_paths = ['lib']
32
32
 
33
- spec.required_ruby_version = '>= 2.7'
33
+ spec.required_ruby_version = '>= 3.2'
34
34
 
35
- spec.add_dependency 'activesupport', '>= 6.1'
35
+ spec.add_dependency 'activesupport', '>= 7.1'
36
36
  spec.add_dependency 'faraday', '~> 1.10'
37
37
  spec.add_dependency 'faraday_middleware', '~> 1.2'
38
38
  spec.add_dependency 'simple_oauth', '>= 0.3'
@@ -2,8 +2,46 @@
2
2
 
3
3
  module Immoscout
4
4
  # The configuration object of the +immoscout+ gem.
5
- class Configuration
6
- include ActiveSupport::Configurable
5
+ class Configuration < ActiveSupport::OrderedOptions
6
+ # Track our configurations settings (+Symbol+ keys) and their defaults as
7
+ # lazy-loaded +Proc+'s values
8
+ class_attribute :defaults,
9
+ instance_reader: true,
10
+ instance_writer: false,
11
+ instance_predicate: false,
12
+ default: {}
13
+
14
+ # Create a new +Configuration+ instance with all settings populated with
15
+ # their respective defaults.
16
+ #
17
+ # @param args [Hash{Symbol => Mixed}] additional settings which
18
+ # overwrite the defaults
19
+ # @return [Configuration] the new configuration instance
20
+ def initialize(**args)
21
+ super()
22
+ defaults.each { |key, default| self[key] = instance_exec(&default) }
23
+ merge!(**args)
24
+ end
25
+
26
+ # A simple DSL method to define new configuration accessors/settings with
27
+ # their defaults. The defaults can be retrieved with
28
+ # +Configuration.defaults+ or +Configuration.new.defaults+.
29
+ #
30
+ # @param name [Symbol, String] the name of the configuration
31
+ # accessor/setting
32
+ # @param default [Mixed, nil] a non-lazy-loaded static value, serving as a
33
+ # default value for the setting
34
+ # @param block [Proc] when given, the default value will be lazy-loaded
35
+ # (result of the Proc)
36
+ def self.config_accessor(name, default = nil, &block)
37
+ # Save the given configuration accessor default value
38
+ defaults[name.to_sym] = block || -> { default }
39
+
40
+ # Compile reader/writer methods so we don't have to go through
41
+ # +ActiveSupport::OrderedOptions#method_missing+.
42
+ define_method(name) { self[name] }
43
+ define_method("#{name}=") { |value| self[name] = value }
44
+ end
7
45
 
8
46
  config_accessor(:consumer_key) { ENV.fetch('IMMOSCOUT_CONSUMER_KEY', nil) }
9
47
  config_accessor(:consumer_secret) do
@@ -13,9 +13,7 @@ module Immoscout
13
13
  {}
14
14
  end
15
15
 
16
- # :reek:ControlParameter - standard stuff, reek!
17
- # :reek:TooManyStatements
18
- def method_missing(method_name, *arguments, &block)
16
+ def method_missing(method_name, *arguments, &)
19
17
  if method_name =~ /build_(\w+)/
20
18
  match = Regexp.last_match(1).intern
21
19
  properties = self.class.properties
@@ -32,7 +30,6 @@ module Immoscout
32
30
  self.class.properties.keys.sort
33
31
  end
34
32
 
35
- # :reek:BooleanParameter - standard stuff, reek!
36
33
  def respond_to_missing?(method_name, include_private = false)
37
34
  method_name.to_s.start_with?('build_') || super
38
35
  end
@@ -3,7 +3,7 @@
3
3
  # The gem version details.
4
4
  module Immoscout
5
5
  # The version of the +immoscout+ gem
6
- VERSION = '1.9.1'
6
+ VERSION = '2.1.0'
7
7
 
8
8
  class << self
9
9
  # Returns the version of gem as a string.
data/lib/immoscout.rb CHANGED
@@ -2,8 +2,10 @@
2
2
 
3
3
  require 'zeitwerk'
4
4
  require 'logger'
5
+ require 'active_support'
5
6
  require 'active_support/concern'
6
- require 'active_support/configurable'
7
+ require 'active_support/ordered_options'
8
+ require 'active_support/core_ext/class/attribute'
7
9
  require 'active_support/core_ext/hash'
8
10
  require 'active_support/core_ext/module'
9
11
  require 'singleton'
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immoscout
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcus Geissler
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2025-05-21 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: activesupport
@@ -16,14 +15,14 @@ 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: faraday
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +79,6 @@ dependencies:
80
79
  - - "~>"
81
80
  - !ruby/object:Gem::Version
82
81
  version: '2.6'
83
- description:
84
82
  email:
85
83
  - marcus3006@gmail.com
86
84
  executables: []
@@ -116,6 +114,9 @@ files:
116
114
  - docker-compose.yml
117
115
  - gemfiles/rails_6.1.gemfile
118
116
  - gemfiles/rails_7.1.gemfile
117
+ - gemfiles/rails_7.2.gemfile
118
+ - gemfiles/rails_8.0.gemfile
119
+ - gemfiles/rails_8.1.gemfile
119
120
  - immoscout.gemspec
120
121
  - lib/immoscout.rb
121
122
  - lib/immoscout/api/client.rb
@@ -154,7 +155,6 @@ files:
154
155
  - lib/immoscout/models/picture.rb
155
156
  - lib/immoscout/models/publish.rb
156
157
  - lib/immoscout/version.rb
157
- homepage:
158
158
  licenses:
159
159
  - MIT
160
160
  metadata:
@@ -163,7 +163,6 @@ metadata:
163
163
  changelog_uri: https://github.com/hausgold/immoscout/blob/master/CHANGELOG.md
164
164
  bug_tracker_uri: https://github.com/hausgold/immoscout/issues
165
165
  documentation_uri: https://www.rubydoc.info/gems/immoscout
166
- post_install_message:
167
166
  rdoc_options: []
168
167
  require_paths:
169
168
  - lib
@@ -171,15 +170,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
170
  requirements:
172
171
  - - ">="
173
172
  - !ruby/object:Gem::Version
174
- version: '2.7'
173
+ version: '3.2'
175
174
  required_rubygems_version: !ruby/object:Gem::Requirement
176
175
  requirements:
177
176
  - - ">="
178
177
  - !ruby/object:Gem::Version
179
178
  version: '0'
180
179
  requirements: []
181
- rubygems_version: 3.4.22
182
- signing_key:
180
+ rubygems_version: 3.6.9
183
181
  specification_version: 4
184
182
  summary: Ruby client for the Immobilienscout24 REST API
185
183
  test_files: []