Skip to content

Commit 1a09aba

Browse files
committed
Merge branch 'release/0.8.0'
2 parents 513f4e4 + ee69f80 commit 1a09aba

16 files changed

Lines changed: 33 additions & 18 deletions

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ INFLUX_SCHEMA=https
1010
INFLUX_PORT=443
1111
INFLUX_TOKEN=my-super-secret-write-token
1212
INFLUX_ORG=solectrus
13+
14+
# Customize InfluxDB storage
1315
INFLUX_BUCKET=my-solectrus-bucket
16+
INFLUX_MEASUREMENT=SENEC

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ INFLUX_PORT=8086
99
INFLUX_TOKEN=my-token
1010
INFLUX_ORG=my-org
1111
INFLUX_BUCKET=my-bucket
12+
INFLUX_MEASUREMENT=my-pv-measurement

.github/workflows/automerge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
steps:
1313
- name: Dependabot metadata
1414
id: metadata
15-
uses: dependabot/fetch-metadata@v1.4.0
15+
uses: dependabot/fetch-metadata@v1.6.0
1616
with:
1717
github-token: '${{ secrets.PAT }}'
1818

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.env
2+
.env.development.local

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ WORKDIR /senec-collector
2929
COPY --from=Builder /usr/local/bundle/ /usr/local/bundle/
3030
COPY . /senec-collector/
3131

32-
ENTRYPOINT bundle exec src/main.rb
32+
ENTRYPOINT bundle exec app/main.rb

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ gem 'senec'
1313
gem 'oj'
1414

1515
group :development, :test do
16-
# minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking (https://github.com/seattlerb/minitest)
16+
# minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking (https://github.com/minitest/minitest)
1717
gem 'minitest'
1818

1919
# Rake is a Make-like program implemented in Ruby (https://github.com/ruby/rake)
@@ -31,7 +31,7 @@ group :development, :test do
3131
# Automatic performance checking tool for Ruby code. (https://github.com/rubocop/rubocop-performance)
3232
gem 'rubocop-performance'
3333

34-
# Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. (https://relishapp.com/vcr/vcr/docs)
34+
# Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. (https://benoittgt.github.io/vcr)
3535
gem 'vcr'
3636

3737
# Library for stubbing HTTP requests in Ruby. (https://github.com/bblimke/webmock)

Gemfile.lock

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,37 @@ GEM
1313
multi_xml (>= 0.5.2)
1414
influxdb-client (2.9.0)
1515
json (2.6.3)
16+
language_server-protocol (3.17.0.3)
1617
mini_mime (1.1.2)
17-
minitest (5.18.0)
18+
minitest (5.18.1)
1819
multi_xml (0.6.0)
19-
oj (3.14.3)
20+
oj (3.15.0)
2021
parallel (1.23.0)
21-
parser (3.2.2.1)
22+
parser (3.2.2.3)
2223
ast (~> 2.4.1)
24+
racc
2325
public_suffix (5.0.1)
26+
racc (1.7.1)
2427
rainbow (3.1.1)
2528
rake (13.0.6)
26-
regexp_parser (2.8.0)
29+
regexp_parser (2.8.1)
2730
rexml (3.2.5)
28-
rubocop (1.50.2)
31+
rubocop (1.54.1)
2932
json (~> 2.3)
33+
language_server-protocol (>= 3.17.0)
3034
parallel (~> 1.10)
31-
parser (>= 3.2.0.0)
35+
parser (>= 3.2.2.3)
3236
rainbow (>= 2.2.2, < 4.0)
3337
regexp_parser (>= 1.8, < 3.0)
3438
rexml (>= 3.2.5, < 4.0)
3539
rubocop-ast (>= 1.28.0, < 2.0)
3640
ruby-progressbar (~> 1.7)
3741
unicode-display_width (>= 2.4.0, < 3.0)
38-
rubocop-ast (1.28.1)
42+
rubocop-ast (1.29.0)
3943
parser (>= 3.2.1.0)
40-
rubocop-minitest (0.30.0)
44+
rubocop-minitest (0.31.0)
4145
rubocop (>= 1.39, < 2.0)
42-
rubocop-performance (1.17.1)
46+
rubocop-performance (1.18.0)
4347
rubocop (>= 1.7.0, < 2.0)
4448
rubocop-ast (>= 0.4.0)
4549
rubocop-rake (0.6.0)
@@ -48,7 +52,7 @@ GEM
4852
senec (0.7.2)
4953
httparty
5054
unicode-display_width (2.4.2)
51-
vcr (6.1.0)
55+
vcr (6.2.0)
5256
webmock (3.18.1)
5357
addressable (>= 2.8.0)
5458
crack (>= 0.3.2)
@@ -72,4 +76,4 @@ DEPENDENCIES
7276
webmock
7377

7478
BUNDLED WITH
75-
2.4.12
79+
2.4.15

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require 'dotenv'
55
Dotenv.load('.env', '.env.test')
66

77
Rake::TestTask.new :test do |t|
8-
t.libs << 'test' << 'src'
8+
t.libs << 'test' << 'app'
99
t.test_files = FileList['test/**/*_test.rb']
1010
t.verbose = true
1111
end

src/config.rb renamed to app/config.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:influx_token,
99
:influx_org,
1010
:influx_bucket,
11+
:influx_measurement,
1112
keyword_init: true,
1213
) do
1314
def initialize(*options)
@@ -62,6 +63,7 @@ def self.from_env(options = {})
6263
influx_token: ENV.fetch('INFLUX_TOKEN'),
6364
influx_org: ENV.fetch('INFLUX_ORG'),
6465
influx_bucket: ENV.fetch('INFLUX_BUCKET'),
66+
influx_measurement: ENV.fetch('INFLUX_MEASUREMENT', 'SENEC'),
6567
}.merge(options),
6668
)
6769
end
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def point(record)
2828
end
2929

3030
def influx_measurement
31-
'SENEC'
31+
config.influx_measurement
3232
end
3333

3434
def influx_client

0 commit comments

Comments
 (0)