Skip to content

Commit

Permalink
Merge branch 'release/0.4.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
ledermann committed Apr 26, 2024
2 parents 5e27db3 + 96872a8 commit 5cc0d17
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 38 deletions.
13 changes: 9 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.dockerignore
.DS_Store
.env
.env.*
.git
.github
.gitignore
.env.*
.env
test
Rakefile
.rubocop.yml
.ruby-lsp
coverage
Dockerfile
Rakefile
test
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1.6.0
uses: dependabot/fetch-metadata@v2.1.0
with:
github-token: '${{ secrets.PAT }}'

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
provenance: false
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require:
- rubocop-performance

AllCops:
TargetRubyVersion: 3.2
TargetRubyVersion: 3.3
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.2.3
3.3.1
7 changes: 0 additions & 7 deletions .vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.2.3-alpine AS Builder
FROM ruby:3.3.1-alpine AS Builder
RUN apk add --no-cache build-base

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

FROM ruby:3.2.3-alpine
FROM ruby:3.3.1-alpine
LABEL maintainer="[email protected]"

# Decrease memory usage
Expand Down
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ gem 'dotenv'
# Ruby library for InfluxDB 2. (https://github.com/influxdata/influxdb-client-ruby)
gem 'influxdb-client'

# CSV Reading and Writing (https://github.com/ruby/csv)
gem 'csv'

# Support for encoding and decoding binary data using a Base64 representation. (https://github.com/ruby/base64)
gem 'base64'

group :development, :test do
# minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking (https://github.com/minitest/minitest)
gem 'minitest'
Expand Down
42 changes: 24 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,51 @@ GEM
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.7)
climate_control (1.2.0)
crack (0.4.5)
crack (1.0.0)
bigdecimal
rexml
csv (3.3.0)
docile (1.4.0)
dotenv (2.8.1)
dotenv (3.1.0)
hashdiff (1.1.0)
influxdb-client (3.0.0)
json (2.7.1)
influxdb-client (3.1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
minitest (5.21.2)
minitest (5.22.3)
minitest-silence (0.2.4)
minitest (~> 5.12)
parallel (1.24.0)
parser (3.3.0.5)
ast (~> 2.4.1)
racc
public_suffix (5.0.4)
public_suffix (5.0.5)
racc (1.7.3)
rainbow (3.1.1)
rake (13.1.0)
rake (13.2.1)
regexp_parser (2.9.0)
rexml (3.2.6)
rubocop (1.60.2)
rubocop (1.63.3)
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 (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-minitest (0.34.5)
rubocop (>= 1.39, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-performance (1.20.2)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-minitest (0.35.0)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-performance (1.21.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
Expand All @@ -56,7 +60,7 @@ GEM
simplecov_json_formatter (0.1.4)
unicode-display_width (2.5.0)
vcr (6.2.0)
webmock (3.19.1)
webmock (3.23.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
Expand All @@ -65,7 +69,9 @@ PLATFORMS
ruby

DEPENDENCIES
base64
climate_control
csv
dotenv
influxdb-client
minitest
Expand All @@ -80,4 +86,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
2.5.5
2.5.9
18 changes: 14 additions & 4 deletions app/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,22 @@ def self.all_forecast_settings_from_env(defaults)
def self.from_env(index, defaults)
{
latitude: ENV.fetch("FORECAST_#{index}_LATITUDE", defaults[:latitude]),
longitude: ENV.fetch("FORECAST_#{index}_LONGITUDE", defaults[:longitude]),
declination: ENV.fetch("FORECAST_#{index}_DECLINATION", defaults[:declination]),
longitude:
ENV.fetch("FORECAST_#{index}_LONGITUDE", defaults[:longitude]),
declination:
ENV.fetch("FORECAST_#{index}_DECLINATION", defaults[:declination]),
azimuth: ENV.fetch("FORECAST_#{index}_AZIMUTH", defaults[:azimuth]),
kwp: ENV.fetch("FORECAST_#{index}_KWP", defaults[:kwp]),
damping_morning: ENV.fetch("FORECAST_#{index}_DAMPING_MORNING", defaults[:damping_morning]),
damping_evening: ENV.fetch("FORECAST_#{index}_DAMPING_EVENING", defaults[:damping_evening]),
damping_morning:
ENV.fetch(
"FORECAST_#{index}_DAMPING_MORNING",
defaults[:damping_morning],
),
damping_evening:
ENV.fetch(
"FORECAST_#{index}_DAMPING_EVENING",
defaults[:damping_evening],
),
}
end
end

0 comments on commit 5cc0d17

Please sign in to comment.