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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc0cb134fcdedad75e27f75a7329befdd0c5a4755e6b5c565691231ecb60b2ba
4
- data.tar.gz: 63b6ff856e32217808920bd8ab5d73e63074f732499206d25ba16dfeaa261b18
3
+ metadata.gz: 783edce22b066d3dcb80e10b2810f3ca03a0aefaae930cf277e61fcfa0b9fc5b
4
+ data.tar.gz: 5f5d102515b93be77bcfcfd42b1d1dee0cb6ac2d60c3638dba2f5af171e5bd0c
5
5
  SHA512:
6
- metadata.gz: 167ee71201bfbb1b11718d7eb59b115800e63aeb1c5a83203f7bab75013884267c3b8ff4c32d421e307c5182b64bea334831b52882f6ee7e1a757848011bc3d0
7
- data.tar.gz: e25478db494ffbb831cd2628d172c0cfd9f73f47894a299fafca2c0769d8e13dea41dbf3d062ba0e3c2e2300406c3147214971a53b07cc90f33132146b2970e4
6
+ metadata.gz: 953110bf72173af479109806ba5902f38430f30754eb4e375bb11d944fa9f8d2dba0d7f89bfa9f096fd963972d3152077e07829b4a35f8e3f424b619e591fdba
7
+ data.tar.gz: 6518c4193289f469ad8da714bf3c67118ef7dadf8bdfd033b9127fe31aa18e33e35be34502b1fc4459a1b96ec0524fe84f00022bf7cbe096cfc0d8c25aa6583f
@@ -5,7 +5,7 @@ defaults: &defaults
5
5
  executors:
6
6
  default_container:
7
7
  docker:
8
- - image: circleci/ruby:2.5.3-node-browsers
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:
@@ -28,3 +28,6 @@ Style/DoubleNegation:
28
28
 
29
29
  RSpec/NamedSubject:
30
30
  Enabled: false
31
+
32
+ RSpec/MessageChain:
33
+ Enabled: false
@@ -1,6 +1,14 @@
1
1
  Change Log
2
2
  ==========
3
3
 
4
+ ## v0.1.5
5
+
6
+ - Add RSpecs
7
+ - Apis
8
+ - Model
9
+ - Utils
10
+ - Update README.md
11
+
4
12
  ## v0.1.4
5
13
 
6
14
  - Add scores and score_resting_hrs
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
- [![codecov](https://codecov.io/gh/paveg/oura/branch/master/graph/badge.svg)][codecov]
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` | authrize header code |
52
+ | `AUTHORIZE_HEADER_CODE` | authorize header code |
47
53
  | `OURA_CALLBACK_URI` | callback uri |
48
54
 
49
55
 
@@ -6,7 +6,7 @@ module Oura
6
6
  module Apis
7
7
  # Activity summary contains daily activity summary values and detailed activity levels.
8
8
  module Activity
9
- include ::Oura::Api
9
+ include ::Oura::Utils::Api
10
10
 
11
11
  REQUEST_PATH = '/v1/activity'
12
12
 
@@ -21,7 +21,7 @@ module Oura
21
21
  # }
22
22
  # }
23
23
  module Readiness
24
- include ::Oura::Api
24
+ include ::Oura::Utils::Api
25
25
 
26
26
  REQUEST_PATH = '/v1/readiness'
27
27
 
@@ -6,7 +6,7 @@ module Oura
6
6
  module Apis
7
7
  # SleepPeriod is a nearly continuous, longish period of time spent lying down in bed.
8
8
  module SleepPeriod
9
- include ::Oura::Api
9
+ include ::Oura::Utils::Api
10
10
 
11
11
  REQUEST_PATH = '/v1/sleep'
12
12
 
@@ -6,7 +6,7 @@ module Oura
6
6
  module Apis
7
7
  # UserInformation is user information.
8
8
  module UserInformation
9
- include ::Oura::Api
9
+ include ::Oura::Utils::Api
10
10
 
11
11
  REQUEST_PATH = '/v1/userinfo'
12
12
  # @example response body
@@ -1,25 +1,29 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Oura
4
- # ::Oura::Api is utility api module.
5
- module Api
6
- private
4
+ module Utils
5
+ # ::Oura::Utils::Api is utility api module.
6
+ module Api
7
+ private
7
8
 
8
- # @param [<String>] date
9
- # @param [<Date>] date
10
- # @return [String] date string
11
- def transform_date(date)
12
- return Date.parse(date).strftime('%Y-%m-%d') if date.is_a?(String)
13
- return date.strftime('%Y-%m-%d') if date.is_a?(Date)
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
- raise ArgumentError, 'invalid date'
16
- end
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
- # @param [String] path
19
- # @param [Hash] params
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Oura
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
@@ -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
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-03-10 00:00:00.000000000 Z
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