renstar 0.4.5 → 0.4.6
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 +4 -4
- data/.github/workflows/ci.yml +27 -0
- data/.ruby-version +1 -1
- data/README.md +19 -0
- data/Rakefile +10 -2
- data/lib/renstar/thermostat.rb +2 -2
- data/lib/renstar/version.rb +1 -1
- data/renstar.gemspec +1 -0
- data/script/test-supported-rubies +52 -0
- metadata +19 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d565afcb49d0a987fb6c54e0026fd2eb96f795ebf846ead087cc9c1afbab913e
|
|
4
|
+
data.tar.gz: fa3a09141ed51a0c586b899d9a6b7aad61d59c5618af55acaf44cf685341edcd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c39898c02620535be19828bbf95b797136df8f8993cdfd9e61d4da50aed1b5ee78e9365f4887a8a055137c087cc8692b5fc408f1a926ef32f840939a50d3fdad
|
|
7
|
+
data.tar.gz: 79513ae66be4d099d3d04ff254496e4755f3be8c547de9a46c68f5117099313bf443bf548fea646a36d47b7ef6f6fd16007fd573e3d8b849c717ac5d9fa57dcf
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
ruby:
|
|
14
|
+
- '3.3'
|
|
15
|
+
- '3.4'
|
|
16
|
+
- '4.0'
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v5
|
|
20
|
+
|
|
21
|
+
- uses: ruby/setup-ruby@v1
|
|
22
|
+
with:
|
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
|
24
|
+
bundler-cache: true
|
|
25
|
+
|
|
26
|
+
- name: Run test suite
|
|
27
|
+
run: bundle exec rake test
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.
|
|
1
|
+
3.4.10
|
data/README.md
CHANGED
|
@@ -145,6 +145,25 @@ thermo.away
|
|
|
145
145
|
|
|
146
146
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
147
147
|
|
|
148
|
+
## Testing
|
|
149
|
+
|
|
150
|
+
Run the full test suite locally with:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
bundle exec rake test
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
If you want to run the suite across the currently maintained MRI branches that
|
|
157
|
+
this project targets, use:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
script/test-supported-rubies
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
That script looks for installed `rbenv` versions matching the maintained MRI
|
|
164
|
+
branches as of July 22, 2026: `3.3`, `3.4`, and `4.0`. CI runs the same matrix
|
|
165
|
+
automatically on every push and pull request.
|
|
166
|
+
|
|
148
167
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
149
168
|
|
|
150
169
|
## Contributing
|
data/Rakefile
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require '
|
|
4
|
-
|
|
3
|
+
require 'rake/testtask'
|
|
4
|
+
|
|
5
|
+
Rake::TestTask.new(:test) do |test|
|
|
6
|
+
test.libs << 'test'
|
|
7
|
+
test.pattern = 'test/**/*_test.rb'
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
require 'bundler/gem_tasks' if (ARGV & %w[build install release]).any?
|
|
11
|
+
|
|
12
|
+
task default: :test
|
data/lib/renstar/thermostat.rb
CHANGED
data/lib/renstar/version.rb
CHANGED
data/renstar.gemspec
CHANGED
|
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
|
|
|
30
30
|
|
|
31
31
|
spec.add_runtime_dependency 'json'
|
|
32
32
|
spec.add_runtime_dependency 'ssdp', '~> 1.2.0'
|
|
33
|
+
spec.add_development_dependency 'minitest', '~> 5.25'
|
|
33
34
|
|
|
34
35
|
# Uncomment to register a new dependency of your gem
|
|
35
36
|
# spec.add_dependency "example-gem", "~> 1.0"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
5
|
+
rbenv_bin="${RBENV_BIN:-$HOME/.rbenv/bin/rbenv}"
|
|
6
|
+
supported_branches=(3.3 3.4 4.0)
|
|
7
|
+
|
|
8
|
+
if [[ ! -x "$rbenv_bin" ]]; then
|
|
9
|
+
echo "rbenv was not found at $rbenv_bin" >&2
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
export PATH="$(dirname "$rbenv_bin"):$HOME/.rbenv/shims:$PATH"
|
|
14
|
+
|
|
15
|
+
mapfile -t installed_versions < <("$rbenv_bin" versions --bare)
|
|
16
|
+
|
|
17
|
+
resolve_version() {
|
|
18
|
+
local branch="$1"
|
|
19
|
+
local version=""
|
|
20
|
+
|
|
21
|
+
for candidate in "${installed_versions[@]}"; do
|
|
22
|
+
if [[ "$candidate" == "$branch"* ]]; then
|
|
23
|
+
version="$candidate"
|
|
24
|
+
fi
|
|
25
|
+
done
|
|
26
|
+
|
|
27
|
+
if [[ -n "$version" ]]; then
|
|
28
|
+
printf '%s\n' "$version"
|
|
29
|
+
return 0
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
return 1
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
status=0
|
|
36
|
+
|
|
37
|
+
cd "$repo_root"
|
|
38
|
+
|
|
39
|
+
for branch in "${supported_branches[@]}"; do
|
|
40
|
+
if version="$(resolve_version "$branch")"; then
|
|
41
|
+
echo "==> Running tests on Ruby $version"
|
|
42
|
+
if ! RBENV_VERSION="$version" "$rbenv_bin" exec ruby -Itest \
|
|
43
|
+
-e 'Dir.glob("test/**/*_test.rb").sort.each { |file| require File.expand_path(file) }'; then
|
|
44
|
+
status=1
|
|
45
|
+
fi
|
|
46
|
+
else
|
|
47
|
+
echo "Missing rbenv Ruby for supported branch $branch" >&2
|
|
48
|
+
status=1
|
|
49
|
+
fi
|
|
50
|
+
done
|
|
51
|
+
|
|
52
|
+
exit "$status"
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: renstar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Rodrigues
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: json
|
|
@@ -38,6 +37,20 @@ dependencies:
|
|
|
38
37
|
- - "~>"
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
39
|
version: 1.2.0
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: minitest
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '5.25'
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '5.25'
|
|
41
54
|
description: Control Venstar thermostats with Ruby via their local API.
|
|
42
55
|
email:
|
|
43
56
|
- mikebrodrigues@gmail.com
|
|
@@ -48,6 +61,7 @@ executables:
|
|
|
48
61
|
extensions: []
|
|
49
62
|
extra_rdoc_files: []
|
|
50
63
|
files:
|
|
64
|
+
- ".github/workflows/ci.yml"
|
|
51
65
|
- ".gitignore"
|
|
52
66
|
- ".ruby-version"
|
|
53
67
|
- Gemfile
|
|
@@ -72,13 +86,13 @@ files:
|
|
|
72
86
|
- lib/renstar/thermostat.rb
|
|
73
87
|
- lib/renstar/version.rb
|
|
74
88
|
- renstar.gemspec
|
|
89
|
+
- script/test-supported-rubies
|
|
75
90
|
homepage: https://github.com/mikerodrigues/renstar
|
|
76
91
|
licenses: []
|
|
77
92
|
metadata:
|
|
78
93
|
allowed_push_host: https://rubygems.org
|
|
79
94
|
homepage_uri: https://github.com/mikerodrigues/renstar
|
|
80
95
|
source_code_uri: https://github.com/mikerodrigues/renstar
|
|
81
|
-
post_install_message:
|
|
82
96
|
rdoc_options: []
|
|
83
97
|
require_paths:
|
|
84
98
|
- lib
|
|
@@ -93,8 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
93
107
|
- !ruby/object:Gem::Version
|
|
94
108
|
version: '0'
|
|
95
109
|
requirements: []
|
|
96
|
-
rubygems_version: 3.
|
|
97
|
-
signing_key:
|
|
110
|
+
rubygems_version: 3.6.9
|
|
98
111
|
specification_version: 4
|
|
99
112
|
summary: Control Venstar thermostats.
|
|
100
113
|
test_files: []
|