nature_remo 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/docker-publish.yml +84 -0
- data/.github/workflows/ruby.yml +33 -0
- data/Dockerfile +12 -0
- data/Gemfile.lock +27 -25
- data/README.md +5 -1
- data/lib/nature_remo/version.rb +1 -1
- data/nature_remo.gemspec +7 -7
- metadata +24 -22
- data/.travis.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a60356bea96fa09e00aa147db2e9f91b0fcec96771ddd5e07bcf1c3fa231968
|
4
|
+
data.tar.gz: 23c7d98e040a99e0c2f8a7fa6fbb6d336148d0e324e59749f7b69fc2199cd62f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbeb54be18aaa83484c83545af83abe97315780cca804696179fcc18be67c4055de6041490a34f2a1e2824dbfb4b5add3e563e8aee4ffd7ef17212cec15c9abb
|
7
|
+
data.tar.gz: dea3a7bd2cdba7d6f757de5b62df9734e9ef7b93f04f477635eb1d29cbac43fc455e37e5a53661d202c7658a0f39eee3d34ffa2953b8d6235dd2bfa8f143bf1c
|
@@ -0,0 +1,84 @@
|
|
1
|
+
name: Docker
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
tags: [ 'v*.*.*' ]
|
7
|
+
pull_request:
|
8
|
+
branches: [ master ]
|
9
|
+
|
10
|
+
env:
|
11
|
+
REGISTRY: ghcr.io
|
12
|
+
# github.repository as <account>/<repo>
|
13
|
+
IMAGE_NAME: ${{ github.repository }}
|
14
|
+
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
build:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
permissions:
|
21
|
+
contents: read
|
22
|
+
packages: write
|
23
|
+
# This is used to complete the identity challenge
|
24
|
+
# with sigstore/fulcio when running outside of PRs.
|
25
|
+
id-token: write
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- name: Checkout repository
|
29
|
+
uses: actions/checkout@v3
|
30
|
+
|
31
|
+
# Install the cosign tool except on PR
|
32
|
+
# https://github.com/sigstore/cosign-installer
|
33
|
+
- name: Install cosign
|
34
|
+
if: github.event_name != 'pull_request'
|
35
|
+
uses: sigstore/cosign-installer@d6a3abf1bdea83574e28d40543793018b6035605
|
36
|
+
with:
|
37
|
+
cosign-release: 'v1.7.1'
|
38
|
+
|
39
|
+
|
40
|
+
# Workaround: https://github.com/docker/build-push-action/issues/461
|
41
|
+
- name: Setup Docker buildx
|
42
|
+
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
|
43
|
+
|
44
|
+
# Login against a Docker registry except on PR
|
45
|
+
# https://github.com/docker/login-action
|
46
|
+
- name: Log into registry ${{ env.REGISTRY }}
|
47
|
+
if: github.event_name != 'pull_request'
|
48
|
+
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
|
49
|
+
with:
|
50
|
+
registry: ${{ env.REGISTRY }}
|
51
|
+
username: ${{ github.actor }}
|
52
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
53
|
+
|
54
|
+
# Extract metadata (tags, labels) for Docker
|
55
|
+
# https://github.com/docker/metadata-action
|
56
|
+
- name: Extract Docker metadata
|
57
|
+
id: meta
|
58
|
+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
59
|
+
with:
|
60
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
61
|
+
|
62
|
+
# Build and push Docker image with Buildx (don't push on PR)
|
63
|
+
# https://github.com/docker/build-push-action
|
64
|
+
- name: Build and push Docker image
|
65
|
+
id: build-and-push
|
66
|
+
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
|
67
|
+
with:
|
68
|
+
context: .
|
69
|
+
push: ${{ github.event_name != 'pull_request' }}
|
70
|
+
tags: ${{ steps.meta.outputs.tags }}
|
71
|
+
labels: ${{ steps.meta.outputs.labels }}
|
72
|
+
|
73
|
+
# Sign the resulting Docker image digest except on PRs.
|
74
|
+
# This will only write to the public Rekor transparency log when the Docker
|
75
|
+
# repository is public to avoid leaking data. If you would like to publish
|
76
|
+
# transparency data even for private images, pass --force to cosign below.
|
77
|
+
# https://github.com/sigstore/cosign
|
78
|
+
- name: Sign the published Docker image
|
79
|
+
if: ${{ github.event_name != 'pull_request' }}
|
80
|
+
env:
|
81
|
+
COSIGN_EXPERIMENTAL: "true"
|
82
|
+
# This step uses the identity token to provision an ephemeral certificate
|
83
|
+
# against the sigstore community Fulcio instance.
|
84
|
+
run: cosign sign ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on: [push, pull_request]
|
11
|
+
|
12
|
+
jobs:
|
13
|
+
test:
|
14
|
+
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
strategy:
|
17
|
+
matrix:
|
18
|
+
ruby-version: ['3.1.2']
|
19
|
+
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v2
|
22
|
+
- name: Set up Ruby
|
23
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
24
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
25
|
+
# uses: ruby/setup-ruby@v1
|
26
|
+
uses: ruby/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: ${{ matrix.ruby-version }}
|
29
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
30
|
+
- name: Run tests
|
31
|
+
env:
|
32
|
+
NATURE_TOKEN: ${{ secrets.NATURE_TOKEN }}
|
33
|
+
run: bundle exec rake
|
data/Dockerfile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
FROM ruby:3.1.2
|
2
|
+
LABEL mainteiner="taisuke_ichimura@icloud.com"
|
3
|
+
|
4
|
+
WORKDIR /app
|
5
|
+
COPY ./ /app/
|
6
|
+
|
7
|
+
RUN gem update --system && \
|
8
|
+
gem install bundler -v 2.3.14 && \
|
9
|
+
bundle _2.3.14_ install && \
|
10
|
+
bundle _2.3.14_ exec rake install:local
|
11
|
+
|
12
|
+
ENTRYPOINT ["natureremo"]
|
data/Gemfile.lock
CHANGED
@@ -1,31 +1,33 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nature_remo (0.
|
5
|
-
faraday (~>
|
6
|
-
launchy (~> 2.
|
7
|
-
thor (~>
|
4
|
+
nature_remo (0.6.0)
|
5
|
+
faraday (~> 2.3.0)
|
6
|
+
launchy (~> 2.5.0)
|
7
|
+
thor (~> 1.2.1)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
addressable (2.
|
12
|
+
addressable (2.8.0)
|
13
13
|
public_suffix (>= 2.0.2, < 5.0)
|
14
|
-
crack (0.4.
|
15
|
-
|
16
|
-
faraday (
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
14
|
+
crack (0.4.5)
|
15
|
+
rexml
|
16
|
+
faraday (2.3.0)
|
17
|
+
faraday-net_http (~> 2.0)
|
18
|
+
ruby2_keywords (>= 0.0.4)
|
19
|
+
faraday-net_http (2.0.3)
|
20
|
+
hashdiff (1.0.1)
|
21
|
+
launchy (2.5.0)
|
22
|
+
addressable (~> 2.7)
|
23
|
+
minitest (5.15.0)
|
24
|
+
public_suffix (4.0.7)
|
25
|
+
rake (13.0.6)
|
26
|
+
rexml (3.2.5)
|
27
|
+
ruby2_keywords (0.0.5)
|
28
|
+
thor (1.2.1)
|
29
|
+
webmock (3.14.0)
|
30
|
+
addressable (>= 2.8.0)
|
29
31
|
crack (>= 0.3.2)
|
30
32
|
hashdiff (>= 0.4.0, < 2.0.0)
|
31
33
|
|
@@ -33,11 +35,11 @@ PLATFORMS
|
|
33
35
|
ruby
|
34
36
|
|
35
37
|
DEPENDENCIES
|
36
|
-
bundler (~> 2.
|
37
|
-
minitest (~> 5.
|
38
|
+
bundler (~> 2.3.14)
|
39
|
+
minitest (~> 5.15.0)
|
38
40
|
nature_remo!
|
39
|
-
rake (~> 13.0.
|
40
|
-
webmock (~> 3.
|
41
|
+
rake (~> 13.0.6)
|
42
|
+
webmock (~> 3.14.0)
|
41
43
|
|
42
44
|
BUNDLED WITH
|
43
|
-
2.
|
45
|
+
2.3.14
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# NatureRemo
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![Ruby](https://github.com/ichi-t/nature_remo/actions/workflows/ruby.yml/badge.svg?branch=master)](https://github.com/ichi-t/nature_remo/actions/workflows/ruby.yml)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/nature_remo.svg)](https://badge.fury.io/rb/nature_remo)
|
5
5
|
|
6
6
|
Nature Remo API client
|
@@ -60,6 +60,10 @@ client.send_signal(<signal id>, interval: 500, times: 10)
|
|
60
60
|
natureremo temp # Get temperature and humidity
|
61
61
|
natureremo illu # Get illumination
|
62
62
|
|
63
|
+
### CLI with Docker
|
64
|
+
|
65
|
+
docker run --rm -e NATURE_TOKEN='<nature_token>' taisukeichimura/natureremo --help
|
66
|
+
|
63
67
|
### Example
|
64
68
|
|
65
69
|
#### Control appliance
|
data/lib/nature_remo/version.rb
CHANGED
data/nature_remo.gemspec
CHANGED
@@ -29,11 +29,11 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ['lib']
|
31
31
|
|
32
|
-
spec.add_development_dependency 'bundler', '~> 2.
|
33
|
-
spec.add_development_dependency 'minitest', '~> 5.
|
34
|
-
spec.add_development_dependency 'rake', '~> 13.0.
|
35
|
-
spec.add_development_dependency 'webmock', '~> 3.
|
36
|
-
spec.add_runtime_dependency 'faraday', '~>
|
37
|
-
spec.add_runtime_dependency 'launchy', '~> 2.
|
38
|
-
spec.add_runtime_dependency 'thor', '~>
|
32
|
+
spec.add_development_dependency 'bundler', '~> 2.3.14'
|
33
|
+
spec.add_development_dependency 'minitest', '~> 5.15.0'
|
34
|
+
spec.add_development_dependency 'rake', '~> 13.0.6'
|
35
|
+
spec.add_development_dependency 'webmock', '~> 3.14.0'
|
36
|
+
spec.add_runtime_dependency 'faraday', '~> 2.3.0'
|
37
|
+
spec.add_runtime_dependency 'launchy', '~> 2.5.0'
|
38
|
+
spec.add_runtime_dependency 'thor', '~> 1.2.1'
|
39
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nature_remo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ichi-t
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,99 +16,99 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.3.14
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.3.14
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 5.
|
33
|
+
version: 5.15.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 5.
|
40
|
+
version: 5.15.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 13.0.
|
47
|
+
version: 13.0.6
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 13.0.
|
54
|
+
version: 13.0.6
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: webmock
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 3.
|
61
|
+
version: 3.14.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 3.
|
68
|
+
version: 3.14.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: faraday
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 2.3.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 2.3.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: launchy
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 2.
|
89
|
+
version: 2.5.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 2.
|
96
|
+
version: 2.5.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: thor
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 1.2.1
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
111
|
-
description:
|
110
|
+
version: 1.2.1
|
111
|
+
description:
|
112
112
|
email:
|
113
113
|
- taisuke_ichimura@icloud.com
|
114
114
|
executables:
|
@@ -117,10 +117,12 @@ extensions: []
|
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
119
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
120
|
+
- ".github/workflows/docker-publish.yml"
|
121
|
+
- ".github/workflows/ruby.yml"
|
120
122
|
- ".gitignore"
|
121
|
-
- ".travis.yml"
|
122
123
|
- CHANGELOG.md
|
123
124
|
- CODE_OF_CONDUCT.md
|
125
|
+
- Dockerfile
|
124
126
|
- Gemfile
|
125
127
|
- Gemfile.lock
|
126
128
|
- LICENSE.txt
|
@@ -136,7 +138,7 @@ homepage: https://github.com/ichi-t/nature_remo
|
|
136
138
|
licenses:
|
137
139
|
- MIT
|
138
140
|
metadata: {}
|
139
|
-
post_install_message:
|
141
|
+
post_install_message:
|
140
142
|
rdoc_options: []
|
141
143
|
require_paths:
|
142
144
|
- lib
|
@@ -151,8 +153,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
153
|
- !ruby/object:Gem::Version
|
152
154
|
version: '0'
|
153
155
|
requirements: []
|
154
|
-
rubygems_version: 3.
|
155
|
-
signing_key:
|
156
|
+
rubygems_version: 3.3.7
|
157
|
+
signing_key:
|
156
158
|
specification_version: 4
|
157
159
|
summary: Nature Remo API client written by Ruby
|
158
160
|
test_files: []
|