pricehubble 1.6.1 → 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: 9e4560c6511f4825274bd9f0c8f0d992afbba0146124ef0bd3190a245cb9b034
4
- data.tar.gz: 809942c34cc2b1bb219f91d0dae42b56454d34df87ed04684693c2dda40bab28
3
+ metadata.gz: e12e3ce1637a743dce1c0db1b9a0c13c3faaa19eefb4c0369118367a99997e1c
4
+ data.tar.gz: c1009963ea544928d0092ff4caa3ff54d95c2e09bdc267b230828d6f695f490e
5
5
  SHA512:
6
- metadata.gz: 3f2cc01cce2b6dd5966eb73a656d1c4dc914259a5c1b147bfbe2c6fb22408863382b89f2a18fa6f8392ec26355587b928aecfae5a1503eece017d2a673f60ea1
7
- data.tar.gz: d3b0f23dbff8ca220ca69f1c54aa091b6839f53129d4b0afa06c71188e5723730fe30137a76ee4b85a3ec087c2956fa7f5dacb56e0ac741bada2040f4b1470f1
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
@@ -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/**/*
@@ -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,11 @@
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
+
5
10
  ### 1.6.1 (21 May 2025)
6
11
 
7
12
  * Corrected some RuboCop glitches ([#15](https://github.com/hausgold/pricehubble/pull/15))
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,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'
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
@@ -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: .
@@ -3,8 +3,8 @@
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"
@@ -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: "../"
@@ -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 known naming
124
- # 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
@@ -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.1'
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.1
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-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: 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: []