stekker_zaptec 1.2.0 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +22 -0
- data/.rubocop.yml +202 -238
- data/Gemfile +1 -0
- data/Gemfile.lock +80 -72
- data/README.md +12 -0
- data/bin/release +28 -0
- data/data/constants.json +165 -16
- data/lib/stekker_zaptec.rb +0 -1
- data/lib/zaptec/client.rb +8 -6
- data/lib/zaptec/constants.rb +7 -0
- data/lib/zaptec/credentials.rb +1 -1
- data/lib/zaptec/errors.rb +1 -1
- data/lib/zaptec/meter_reading.rb +36 -0
- data/lib/zaptec/state.rb +4 -2
- data/lib/zaptec/version.rb +1 -1
- data/zaptec.gemspec +0 -1
- metadata +4 -16
data/Gemfile.lock
CHANGED
@@ -1,112 +1,118 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
stekker_zaptec (1.
|
4
|
+
stekker_zaptec (1.2.2)
|
5
5
|
activemodel
|
6
6
|
activesupport
|
7
7
|
faraday
|
8
|
-
faraday_middleware
|
9
8
|
|
10
9
|
GEM
|
11
10
|
remote: https://rubygems.org/
|
12
11
|
specs:
|
13
|
-
activemodel (7.
|
14
|
-
activesupport (= 7.
|
15
|
-
activesupport (7.
|
12
|
+
activemodel (7.1.3.2)
|
13
|
+
activesupport (= 7.1.3.2)
|
14
|
+
activesupport (7.1.3.2)
|
15
|
+
base64
|
16
|
+
bigdecimal
|
16
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
+
connection_pool (>= 2.2.5)
|
19
|
+
drb
|
17
20
|
i18n (>= 1.6, < 2)
|
18
21
|
minitest (>= 5.1)
|
22
|
+
mutex_m
|
19
23
|
tzinfo (~> 2.0)
|
20
|
-
addressable (2.8.
|
24
|
+
addressable (2.8.6)
|
21
25
|
public_suffix (>= 2.0.2, < 6.0)
|
22
26
|
ast (2.4.2)
|
23
|
-
|
24
|
-
|
27
|
+
base64 (0.2.0)
|
28
|
+
bigdecimal (3.1.7)
|
29
|
+
byebug (11.1.3)
|
30
|
+
concurrent-ruby (1.2.3)
|
31
|
+
connection_pool (2.4.1)
|
32
|
+
crack (1.0.0)
|
33
|
+
bigdecimal
|
25
34
|
rexml
|
26
|
-
diff-lcs (1.5.
|
27
|
-
|
28
|
-
|
29
|
-
faraday-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
faraday-net_http_persistent (~> 1.0)
|
35
|
-
faraday-patron (~> 1.0)
|
36
|
-
faraday-rack (~> 1.0)
|
37
|
-
faraday-retry (~> 1.0)
|
38
|
-
ruby2_keywords (>= 0.0.4)
|
39
|
-
faraday-em_http (1.0.0)
|
40
|
-
faraday-em_synchrony (1.0.0)
|
41
|
-
faraday-excon (1.1.0)
|
42
|
-
faraday-httpclient (1.0.1)
|
43
|
-
faraday-multipart (1.0.4)
|
44
|
-
multipart-post (~> 2)
|
45
|
-
faraday-net_http (1.0.1)
|
46
|
-
faraday-net_http_persistent (1.2.0)
|
47
|
-
faraday-patron (1.0.0)
|
48
|
-
faraday-rack (1.0.0)
|
49
|
-
faraday-retry (1.0.3)
|
50
|
-
faraday_middleware (1.2.0)
|
51
|
-
faraday (~> 1.0)
|
35
|
+
diff-lcs (1.5.1)
|
36
|
+
drb (2.2.1)
|
37
|
+
faraday (2.12.0)
|
38
|
+
faraday-net_http (>= 2.0, < 3.4)
|
39
|
+
json
|
40
|
+
logger
|
41
|
+
faraday-net_http (3.3.0)
|
42
|
+
net-http
|
52
43
|
gem-release (2.2.2)
|
53
|
-
hashdiff (1.0
|
54
|
-
i18n (1.
|
44
|
+
hashdiff (1.1.0)
|
45
|
+
i18n (1.14.4)
|
55
46
|
concurrent-ruby (~> 1.0)
|
56
|
-
json (2.
|
57
|
-
jwt (2.
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
47
|
+
json (2.7.1)
|
48
|
+
jwt (2.8.1)
|
49
|
+
base64
|
50
|
+
language_server-protocol (3.17.0.3)
|
51
|
+
logger (1.6.1)
|
52
|
+
minitest (5.22.3)
|
53
|
+
mutex_m (0.2.0)
|
54
|
+
net-http (0.4.1)
|
55
|
+
uri
|
56
|
+
parallel (1.24.0)
|
57
|
+
parser (3.3.0.5)
|
62
58
|
ast (~> 2.4.1)
|
63
|
-
|
64
|
-
|
59
|
+
racc
|
60
|
+
public_suffix (5.0.5)
|
61
|
+
racc (1.7.3)
|
62
|
+
rack (3.0.10)
|
65
63
|
rainbow (3.1.1)
|
66
|
-
rake (13.0
|
67
|
-
regexp_parser (2.
|
68
|
-
rexml (3.
|
69
|
-
rspec (3.
|
70
|
-
rspec-core (~> 3.
|
71
|
-
rspec-expectations (~> 3.
|
72
|
-
rspec-mocks (~> 3.
|
73
|
-
rspec-core (3.
|
74
|
-
rspec-support (~> 3.
|
75
|
-
rspec-expectations (3.
|
64
|
+
rake (13.2.0)
|
65
|
+
regexp_parser (2.9.0)
|
66
|
+
rexml (3.3.9)
|
67
|
+
rspec (3.13.0)
|
68
|
+
rspec-core (~> 3.13.0)
|
69
|
+
rspec-expectations (~> 3.13.0)
|
70
|
+
rspec-mocks (~> 3.13.0)
|
71
|
+
rspec-core (3.13.0)
|
72
|
+
rspec-support (~> 3.13.0)
|
73
|
+
rspec-expectations (3.13.0)
|
76
74
|
diff-lcs (>= 1.2.0, < 2.0)
|
77
|
-
rspec-support (~> 3.
|
78
|
-
rspec-mocks (3.
|
75
|
+
rspec-support (~> 3.13.0)
|
76
|
+
rspec-mocks (3.13.0)
|
79
77
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
|
-
rspec-support (~> 3.
|
81
|
-
rspec-support (3.
|
82
|
-
rubocop (1.
|
78
|
+
rspec-support (~> 3.13.0)
|
79
|
+
rspec-support (3.13.1)
|
80
|
+
rubocop (1.62.1)
|
83
81
|
json (~> 2.3)
|
82
|
+
language_server-protocol (>= 3.17.0)
|
84
83
|
parallel (~> 1.10)
|
85
|
-
parser (>= 3.
|
84
|
+
parser (>= 3.3.0.2)
|
86
85
|
rainbow (>= 2.2.2, < 4.0)
|
87
86
|
regexp_parser (>= 1.8, < 3.0)
|
88
87
|
rexml (>= 3.2.5, < 4.0)
|
89
|
-
rubocop-ast (>= 1.
|
88
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
90
89
|
ruby-progressbar (~> 1.7)
|
91
90
|
unicode-display_width (>= 2.4.0, < 3.0)
|
92
|
-
rubocop-ast (1.
|
93
|
-
parser (>= 3.
|
94
|
-
rubocop-capybara (2.
|
91
|
+
rubocop-ast (1.31.2)
|
92
|
+
parser (>= 3.3.0.4)
|
93
|
+
rubocop-capybara (2.20.0)
|
95
94
|
rubocop (~> 1.41)
|
96
|
-
rubocop-
|
95
|
+
rubocop-factory_bot (2.25.1)
|
96
|
+
rubocop (~> 1.41)
|
97
|
+
rubocop-rails (2.24.1)
|
97
98
|
activesupport (>= 4.2.0)
|
98
99
|
rack (>= 1.1)
|
99
100
|
rubocop (>= 1.33.0, < 2.0)
|
100
|
-
|
101
|
-
|
101
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
102
|
+
rubocop-rspec (2.28.0)
|
103
|
+
rubocop (~> 1.40)
|
102
104
|
rubocop-capybara (~> 2.17)
|
103
|
-
|
104
|
-
|
105
|
-
|
105
|
+
rubocop-factory_bot (~> 2.22)
|
106
|
+
rubocop-rspec_rails (~> 2.28)
|
107
|
+
rubocop-rspec_rails (2.28.2)
|
108
|
+
rubocop (~> 1.40)
|
109
|
+
ruby-progressbar (1.13.0)
|
110
|
+
timecop (0.9.8)
|
106
111
|
tzinfo (2.0.6)
|
107
112
|
concurrent-ruby (~> 1.0)
|
108
|
-
unicode-display_width (2.
|
109
|
-
|
113
|
+
unicode-display_width (2.5.0)
|
114
|
+
uri (0.13.1)
|
115
|
+
webmock (3.23.0)
|
110
116
|
addressable (>= 2.8.0)
|
111
117
|
crack (>= 0.3.2)
|
112
118
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -115,10 +121,12 @@ PLATFORMS
|
|
115
121
|
arm64-darwin-20
|
116
122
|
arm64-darwin-21
|
117
123
|
arm64-darwin-22
|
124
|
+
arm64-darwin-23
|
118
125
|
x86_64-darwin-21
|
119
126
|
x86_64-linux
|
120
127
|
|
121
128
|
DEPENDENCIES
|
129
|
+
byebug
|
122
130
|
gem-release (~> 2.2)
|
123
131
|
jwt (~> 2.6)
|
124
132
|
rake (~> 13.0)
|
data/README.md
CHANGED
@@ -63,3 +63,15 @@ client.state(id, device_type_apollo).online?
|
|
63
63
|
## Contributing
|
64
64
|
|
65
65
|
Bug reports and pull requests are welcome on GitHub at https://github.com/stekker/zaptec.
|
66
|
+
|
67
|
+
## Publishing
|
68
|
+
|
69
|
+
```bash
|
70
|
+
# - bumps the gem version to the next major, minor or patch version.
|
71
|
+
# - creates commit for the version bump
|
72
|
+
# - tags the commit
|
73
|
+
# - pushes the commit and tag
|
74
|
+
# - publishes the gem to Rubygems
|
75
|
+
bin/release [major|minor|patch]
|
76
|
+
# See also https://github.com/svenfuchs/gem-release#gem-bump
|
77
|
+
```
|
data/bin/release
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
set -euo pipefail
|
3
|
+
IFS=$'\n\t'
|
4
|
+
set -vx
|
5
|
+
|
6
|
+
# Read major/minor/patch argument
|
7
|
+
version="$1"
|
8
|
+
|
9
|
+
# Do a pretend version bump to determine what the new version should be
|
10
|
+
bumped_version=$(gem bump --version "$version" --pretend --no-commit | awk '{ print $4 }' | tr -d '[:space:]')
|
11
|
+
|
12
|
+
# Use ruby to get the root level directory name
|
13
|
+
gem_name=$(ruby -e "puts File.basename(Dir.pwd)")
|
14
|
+
|
15
|
+
# Update version file
|
16
|
+
gem bump --version "$bumped_version" --no-commit
|
17
|
+
|
18
|
+
# Run bundle install to ensure gem version in Gemfile is updated
|
19
|
+
bundle install
|
20
|
+
|
21
|
+
# Stage Gemfile.lock and the version file
|
22
|
+
git add Gemfile.lock "lib/$gem_name/version.rb"
|
23
|
+
|
24
|
+
# Finally create the bump commit
|
25
|
+
git commit -m "Bump $gem_name to $bumped_version"
|
26
|
+
|
27
|
+
# Create a tag, push the commit and tag, and release to Rubygems
|
28
|
+
gem bump --version "$bumped_version" --no-commit --tag --push --release
|