oura 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +8 -0
- data/README.md +8 -2
- data/lib/oura/apis/activity.rb +1 -1
- data/lib/oura/apis/readiness.rb +1 -1
- data/lib/oura/apis/sleep_period.rb +1 -1
- data/lib/oura/apis/user_information.rb +1 -1
- data/lib/oura/utils/api.rb +20 -16
- data/lib/oura/version.rb +1 -1
- data/renovate.json +44 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 783edce22b066d3dcb80e10b2810f3ca03a0aefaae930cf277e61fcfa0b9fc5b
|
4
|
+
data.tar.gz: 5f5d102515b93be77bcfcfd42b1d1dee0cb6ac2d60c3638dba2f5af171e5bd0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 953110bf72173af479109806ba5902f38430f30754eb4e375bb11d944fa9f8d2dba0d7f89bfa9f096fd963972d3152077e07829b4a35f8e3f424b619e591fdba
|
7
|
+
data.tar.gz: 6518c4193289f469ad8da714bf3c67118ef7dadf8bdfd033b9127fe31aa18e33e35be34502b1fc4459a1b96ec0524fe84f00022bf7cbe096cfc0d8c25aa6583f
|
data/.circleci/config.yml
CHANGED
@@ -5,7 +5,7 @@ defaults: &defaults
|
|
5
5
|
executors:
|
6
6
|
default_container:
|
7
7
|
docker:
|
8
|
-
- image: circleci/ruby:2.
|
8
|
+
- image: circleci/ruby:2.6.3-node-browsers
|
9
9
|
commands:
|
10
10
|
restore-and-save-cache:
|
11
11
|
steps:
|
@@ -53,8 +53,7 @@ jobs:
|
|
53
53
|
- run:
|
54
54
|
name: Upload coverage
|
55
55
|
when: on_success
|
56
|
-
command:
|
57
|
-
bash <(curl -fs https://codecov.io/bash) -t ${CODECOV_TOKEN}
|
56
|
+
command: bash <(curl -fs https://codecov.io/bash) -t ${CODECOV_TOKEN}
|
58
57
|
- store_test_results:
|
59
58
|
path: ${CIRCLE_ARTIFACTS}
|
60
59
|
- store_artifacts:
|
@@ -70,7 +69,6 @@ jobs:
|
|
70
69
|
- run:
|
71
70
|
name: Run danger
|
72
71
|
command: |
|
73
|
-
bundle --path vendor/bundle --quiet
|
74
72
|
bundle exec danger --fail-on-errors=true
|
75
73
|
workflows:
|
76
74
|
integration:
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,17 @@
|
|
1
1
|
Oura
|
2
2
|
====
|
3
3
|
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/oura.svg)][rubygem]
|
5
|
+
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]
|
4
6
|
[![CircleCI](https://circleci.com/gh/paveg/oura.svg?style=svg&circle-token=510e032854535d58837e088b89650cc931ae12be)][circleci]
|
5
|
-
[![
|
7
|
+
[![Codecov](https://codecov.io/gh/paveg/oura/branch/master/graph/badge.svg)][codecov]
|
8
|
+
[![Renovate](https://badges.renovateapi.com/github/paveg/oura)][renovate]
|
6
9
|
|
7
10
|
[circleci]: https://circleci.com/gh/paveg/oura
|
8
11
|
[codecov]: https://codecov.io/gh/paveg/oura
|
12
|
+
[license]: https://github.com/paveg/oura/blob/master/LICENSE
|
13
|
+
[renovate]: https://github.com/renovatebot/renovate
|
14
|
+
[rubygem]: https://badge.fury.io/rb/oura
|
9
15
|
|
10
16
|
## Installation
|
11
17
|
|
@@ -43,7 +49,7 @@ client.userinfo
|
|
43
49
|
|:---:|:---:|
|
44
50
|
| `OURA_CLIENT_ID` | client id |
|
45
51
|
| `OURA_CLEINT_SECRET` | client secret |
|
46
|
-
| `AUTHORIZE_HEADER_CODE` |
|
52
|
+
| `AUTHORIZE_HEADER_CODE` | authorize header code |
|
47
53
|
| `OURA_CALLBACK_URI` | callback uri |
|
48
54
|
|
49
55
|
|
data/lib/oura/apis/activity.rb
CHANGED
data/lib/oura/apis/readiness.rb
CHANGED
data/lib/oura/utils/api.rb
CHANGED
@@ -1,25 +1,29 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Oura
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
module Utils
|
5
|
+
# ::Oura::Utils::Api is utility api module.
|
6
|
+
module Api
|
7
|
+
private
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
# @param [<String>] date
|
10
|
+
# @param [<Date>] date
|
11
|
+
# @return [String] date string
|
12
|
+
def transform_date(date)
|
13
|
+
return Date.parse(date).strftime('%Y-%m-%d') if date.is_a?(String)
|
14
|
+
return date.strftime('%Y-%m-%d') if date.is_a?(Date)
|
14
15
|
|
15
|
-
|
16
|
-
|
16
|
+
raise ArgumentError, 'invalid date'
|
17
|
+
end
|
18
|
+
|
19
|
+
# @param [String] path
|
20
|
+
# @param [Hash] params
|
21
|
+
# @return [OAuth2::Response]
|
22
|
+
def get(path, params = {})
|
23
|
+
raise StandardError, 'Not found access_token' if @access_token.nil?
|
17
24
|
|
18
|
-
|
19
|
-
|
20
|
-
# @return [OAuth2::Response]
|
21
|
-
def get(path, params = {})
|
22
|
-
@access_token.get(path, params)
|
25
|
+
@access_token.get(path, params)
|
26
|
+
end
|
23
27
|
end
|
24
28
|
end
|
25
29
|
end
|
data/lib/oura/version.rb
CHANGED
data/renovate.json
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"extends": [
|
3
|
+
"config:base"
|
4
|
+
],
|
5
|
+
"labels": [
|
6
|
+
"renovate"
|
7
|
+
],
|
8
|
+
"assignees": [
|
9
|
+
"paveg"
|
10
|
+
],
|
11
|
+
"docker": {
|
12
|
+
"enabled": false
|
13
|
+
},
|
14
|
+
"separateMultipleMajor": true,
|
15
|
+
"major": {
|
16
|
+
"automerge": false,
|
17
|
+
"labels": [
|
18
|
+
"major",
|
19
|
+
"renovate"
|
20
|
+
]
|
21
|
+
},
|
22
|
+
"minor": {
|
23
|
+
"groupName": "all minor dependencies",
|
24
|
+
"automerge": true,
|
25
|
+
"labels": [
|
26
|
+
"minor",
|
27
|
+
"renovate"
|
28
|
+
]
|
29
|
+
},
|
30
|
+
"patch": {
|
31
|
+
"groupName": "all patch dependencies",
|
32
|
+
"automerge": true,
|
33
|
+
"labels": [
|
34
|
+
"patch",
|
35
|
+
"renovate"
|
36
|
+
]
|
37
|
+
},
|
38
|
+
"pin": {
|
39
|
+
"automerge": true
|
40
|
+
},
|
41
|
+
"lockFileMaintenance": {
|
42
|
+
"automerge": true
|
43
|
+
}
|
44
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oura
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryota Ikezawa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
@@ -284,6 +284,7 @@ files:
|
|
284
284
|
- lib/oura/utils/api.rb
|
285
285
|
- lib/oura/version.rb
|
286
286
|
- oura.gemspec
|
287
|
+
- renovate.json
|
287
288
|
homepage: https://github.com/paveg/oura
|
288
289
|
licenses:
|
289
290
|
- MIT
|