darksky-api 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +15 -0
- data/Gemfile.lock +1 -1
- data/README.md +6 -0
- data/lib/darksky-api.rb +1 -1
- data/lib/darksky-api/config.rb +0 -5
- data/lib/darksky-api/day.rb +4 -4
- data/lib/darksky-api/version.rb +1 -1
- 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: 0b952ba2c60ccffc08b64f49dbd36cbd8765016968d8ee968e987f62d9a6543f
|
4
|
+
data.tar.gz: d80c7f00ae7b0602ad427ab63bf14e9c91b5497985a452909f15666c2fdff787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad00f92203c54446a78d69e08e4c29266f6c93abbda6f81008202f005baa7493b5d47ab9e06d5b21bf1170fec3421a8d2823cfdf2315d1b542c1d8c4bab84807
|
7
|
+
data.tar.gz: 00e34b2fd991989aadeb5d4c8d7eae376cbfdfefea5f580c4318c6cab5401eedaf75c6e2eba89c68112ece821132014a92adc7ebf2014b974a44f8a9f94ddc11
|
data/.travis.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
# latest patch version of supported ruby versions
|
4
|
+
#- 2.5.0 # currently broken on Travis's end
|
5
|
+
- 2.4.3
|
6
|
+
- 2.3.6
|
7
|
+
|
8
|
+
deploy:
|
9
|
+
provider: rubygems
|
10
|
+
api_key:
|
11
|
+
secure: d9IKla8xZTqO9vk44w0wQGahjWE8RrNLAi3ZQpKhxsciJr88aSVO0aDdlCP2lL94vWhJlpJAD5SP8KeVx9HqE8+0TMvfzv00Z9NP8VyD8rZnS6tdlRvxHsCeqQsK/cA32YgTqpdtl91YZVRuGkAyW4404QUDZx2trRs35UkxfUbincVGRfVf73QKOSxI3y56aLUgbn+9YqXR6QKmUhidqYs7nxDQikJ2Qap4/BdzJQzUM5iLvVbtvtCbPgUltkHE5PFy+Q/pDGHG0VHjw88vTYSpMFm0jqF8dMo1Kubov8RGKmCIBXfN+dyOu3TiWYeqNWvB0NyYPQsn5JDhQOmhaX5sLrVOvHCA/8D+IAf0TZhbF6Mr6WhIRE3AG27If5wIxHOzv3g/JmhLLselwWQYMB0Ct8S9RFJpfYTI77ipWEtedwq87ZktOqupAMRBV347xFQRHhPoYaageq122j2QbwCc8MNB1KWcUBwemWHUtRVJHPh5Fhk1k3Dul4QnnRNZ3TYlb9nco4/dKmQ8SVahhmYDpJ7pWgNjM7c2LN/ChEDjN79zCExSnlLCwfrprawDVsL46NIvadR/rwslCPLAKaJ58HfM1T8g3UjU7hSIQ3P30yv+r6vh8EXzFLsxrdRlpflUnhk4PfNQaHyM1BClzOHMch16oqvmBB8UbcRl1wY=
|
12
|
+
gem: darksky-api
|
13
|
+
on:
|
14
|
+
tags: true
|
15
|
+
repo: jhpratt/darksky-api
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# DarkSky
|
2
2
|
|
3
|
+
[![Gem version](https://img.shields.io/gem/v/darksky-api.svg)](https://rubygems.org/gems/darksky-api)
|
4
|
+
[![Build sttatus](https://api.travis-ci.org/jhpratt/darksky-api.svg?branch=master)](https://travis-ci.org/jhpratt/darksky-api)
|
5
|
+
[![Documentation](https://img.shields.io/badge/docs-rubydoc-blue.svg)](http://www.rubydoc.info/gems/darksky-api)
|
6
|
+
[![Downloads](https://img.shields.io/gem/dt/darksky-api.svg)](https://rubygems.org/gems/darksky-api)
|
7
|
+
[![License](https://img.shields.io/github/license/jhpratt/darksky-api.svg)](https://github.com/jhpratt/darksky-api/blob/master/LICENSE.txt)
|
8
|
+
|
3
9
|
Disclaimer: This gem has no affiliation with DarkSky. It is an independent way to interact with its API.
|
4
10
|
|
5
11
|
## Installation
|
data/lib/darksky-api.rb
CHANGED
data/lib/darksky-api/config.rb
CHANGED
@@ -3,21 +3,16 @@ module DarkSky
|
|
3
3
|
#
|
4
4
|
# keyword arguments:
|
5
5
|
# - **`key`** [required] ─ API key from [DarkSky](https://darksky.net/dev/account)
|
6
|
-
# - **`warnings`** [optional] ─ whether or not warnings are printed (default `true`)
|
7
6
|
#
|
8
7
|
# @since 0.1.0
|
9
8
|
# @return [void]
|
10
9
|
def self.config(opts)
|
11
10
|
defaults = {
|
12
|
-
units: :si
|
13
11
|
}
|
14
12
|
opts = defaults.merge opts
|
15
13
|
|
16
14
|
# required parameters
|
17
15
|
@@key = opts.fetch(:key)
|
18
|
-
|
19
|
-
# optional parameters
|
20
|
-
@@units = opts[:units]
|
21
16
|
end
|
22
17
|
|
23
18
|
# @example
|
data/lib/darksky-api/day.rb
CHANGED
@@ -172,9 +172,9 @@ module DarkSky
|
|
172
172
|
# location = DarkSky::Location.new [45, -90]
|
173
173
|
# location.today.apparent_temperature_high_time #=> time of high apparent temperature
|
174
174
|
# @since 0.1.3
|
175
|
-
# @return [
|
175
|
+
# @return [Time] time of high apparent temperature
|
176
176
|
def apparent_temperature_high_time
|
177
|
-
data[:apparentTemperatureHighTime]
|
177
|
+
Time.at data[:apparentTemperatureHighTime]
|
178
178
|
end
|
179
179
|
alias high_apparent_temperature_time apparent_temperature_high_time
|
180
180
|
alias apparent_high_temperature_time apparent_temperature_high_time
|
@@ -189,9 +189,9 @@ module DarkSky
|
|
189
189
|
# location = DarkSky::Location.new [45, -90]
|
190
190
|
# location.today.apparent_temperature_low_time #=> time of low apparent temperature
|
191
191
|
# @since 0.1.3
|
192
|
-
# @return [
|
192
|
+
# @return [Time] time of low apparent temperature
|
193
193
|
def apparent_temperature_low_time
|
194
|
-
data[:apparentTemperatureLowTime]
|
194
|
+
Time.at data[:apparentTemperatureLowTime]
|
195
195
|
end
|
196
196
|
alias low_apparent_temperature_time apparent_temperature_low_time
|
197
197
|
alias apparent_low_temperature_time apparent_temperature_low_time
|
data/lib/darksky-api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: darksky-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Pratt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -117,6 +117,7 @@ extra_rdoc_files: []
|
|
117
117
|
files:
|
118
118
|
- ".gitignore"
|
119
119
|
- ".rubocop.yml"
|
120
|
+
- ".travis.yml"
|
120
121
|
- ".yardopts"
|
121
122
|
- Gemfile
|
122
123
|
- Gemfile.lock
|