Skip to content

Commit

Permalink
Merge branch 'release/0.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ledermann committed Jan 13, 2025
2 parents f674581 + bb55bce commit 539787c
Show file tree
Hide file tree
Showing 12 changed files with 323 additions and 810 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require:
- rubocop-graphql

AllCops:
TargetRubyVersion: 3.3
TargetRubyVersion: 3.4
Exclude:
- Gemfile
- 'vendor/**/*'
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.6
3.4.1
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.3.6-alpine AS builder
FROM ruby:3.4.1-alpine AS builder
RUN apk add --no-cache build-base

WORKDIR /tibber-collector
Expand All @@ -8,7 +8,7 @@ RUN bundle config --local frozen 1 && \
bundle install -j4 --retry 3 && \
bundle clean --force

FROM ruby:3.3.6-alpine
FROM ruby:3.4.1-alpine
LABEL maintainer="[email protected]"

# Add tzdata to get correct timezone
Expand Down
51 changes: 27 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (8.0.0)
activesupport (8.0.1)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -19,32 +19,33 @@ GEM
ast (2.4.2)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.8)
bigdecimal (3.1.9)
climate_control (1.2.0)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
connection_pool (2.5.0)
crack (1.0.0)
bigdecimal
rexml
csv (3.3.0)
csv (3.3.2)
docile (1.4.1)
dotenv (3.1.4)
dotenv (3.1.7)
drb (2.2.1)
fiber-storage (1.0.0)
graphql (2.4.2)
graphql (2.4.8)
base64
fiber-storage
graphql-client (0.23.0)
graphql-client (0.25.0)
activesupport (>= 3.0)
graphql (>= 1.13.0)
hashdiff (1.1.1)
hashdiff (1.1.2)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
influxdb-client (3.1.0)
json (2.8.1)
influxdb-client (3.2.0)
csv
json (2.9.1)
language_server-protocol (3.17.0.3)
logger (1.6.1)
minitest (5.25.1)
logger (1.6.5)
minitest (5.25.4)
minitest-silence (0.2.4)
minitest (~> 5.12)
parallel (1.26.3)
Expand All @@ -55,32 +56,32 @@ GEM
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.2)
rexml (3.3.9)
rubocop (1.68.0)
regexp_parser (2.10.0)
rexml (3.4.0)
rubocop (1.70.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.34.1)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
rubocop-graphql (1.5.4)
rubocop (>= 1.50, < 2)
rubocop-minitest (0.36.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-performance (1.22.1)
rubocop-performance (1.23.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
securerandom (0.3.1)
securerandom (0.4.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -89,8 +90,10 @@ GEM
simplecov_json_formatter (0.1.4)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.6.0)
uri (1.0.1)
unicode-display_width (3.1.3)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.2)
vcr (6.3.1)
base64
webmock (3.24.0)
Expand Down Expand Up @@ -121,4 +124,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
2.5.23
2.6.2
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023-2024 Georg Ledermann <[email protected]>
Copyright (c) 2023-2025 Georg Ledermann <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ It's recommended to add `tibber-collector` and `senec-charger` to your [SOLECTRU

## License

Copyright (c) 2023-2024 Georg Ledermann, released under the MIT License
Copyright (c) 2023-2025 Georg Ledermann, released under the MIT License

Sponsored by [EP: Bölsche Frikom GmbH](https://www.ep.de/boelsche)
4 changes: 3 additions & 1 deletion app/config.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
require_relative 'string'

Config =
Struct.new(
:tibber_token,
Expand Down Expand Up @@ -53,7 +55,7 @@ def self.influx_credentials_from_env
influx_token: ENV.fetch('INFLUX_TOKEN'),
influx_org: ENV.fetch('INFLUX_ORG'),
influx_bucket: ENV.fetch('INFLUX_BUCKET'),
influx_measurement: ENV.fetch('INFLUX_MEASUREMENT', 'Prices'),
influx_measurement: ENV.fetch('INFLUX_MEASUREMENT', '').presence || 'Prices',
}
end

Expand Down
2 changes: 1 addition & 1 deletion app/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"Version #{ENV.fetch('VERSION', '<unknown>')}, " \
"built at #{ENV.fetch('BUILDTIME', '<unknown>')}"
puts 'https://github.com/solectrus/tibber-collector'
puts 'Copyright (c) 2023-2024 Georg Ledermann, released under the MIT License'
puts 'Copyright (c) 2023-2025 Georg Ledermann, released under the MIT License'
puts "\n"

config = Config.from_env
Expand Down
5 changes: 5 additions & 0 deletions app/string.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class String
def presence
strip.empty? ? nil : self
end
end
Loading

0 comments on commit 539787c

Please sign in to comment.