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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47bedf01bb151ab47ab4edb99123d8afb0d04b3d20a95da2ff41dbb64a9b12bc
4
- data.tar.gz: f96f67e5757e25a3097a2d5ec7ea822ac378ac98fa32d35e473f86e992c29b16
3
+ metadata.gz: 0b952ba2c60ccffc08b64f49dbd36cbd8765016968d8ee968e987f62d9a6543f
4
+ data.tar.gz: d80c7f00ae7b0602ad427ab63bf14e9c91b5497985a452909f15666c2fdff787
5
5
  SHA512:
6
- metadata.gz: 07565c56edc103de2e6509d111570d6e59d392f4e31d7b57450294b70f315d59e84bb81a948968583227d466e21023c763a9f19035e2e530bab93a5ebe5587d2
7
- data.tar.gz: 37590cb2c6596df3f3aedb78b9af7bbdbf498c1905beea639b9e8d31a21c3f0d6ec5770d7b6d9a34d4a82df47d21e7694e645f8cbda6810e957a5fed8a5d4779
6
+ metadata.gz: ad00f92203c54446a78d69e08e4c29266f6c93abbda6f81008202f005baa7493b5d47ab9e06d5b21bf1170fec3421a8d2823cfdf2315d1b542c1d8c4bab84807
7
+ data.tar.gz: 00e34b2fd991989aadeb5d4c8d7eae376cbfdfefea5f580c4318c6cab5401eedaf75c6e2eba89c68112ece821132014a92adc7ebf2014b974a44f8a9f94ddc11
@@ -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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- darksky-api (0.1.5)
4
+ darksky-api (0.1.6)
5
5
  json (~> 2.1)
6
6
  rest-client (~> 2.0)
7
7
 
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
@@ -6,6 +6,6 @@ require 'darksky-api/current'
6
6
  require 'darksky-api/day'
7
7
 
8
8
  # @author Jacob Pratt <the.z.cuber@gmail.com>
9
- # @version 0.1.5
9
+ # @version 0.1.6
10
10
  module DarkSky
11
11
  end
@@ -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
@@ -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 [Numeric] time of high apparent temperature
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 [Numeric] time of low apparent temperature
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
@@ -1,4 +1,4 @@
1
1
  module DarkSky
2
2
  # version of this library (follows SemVer for versions >= 1.0.0)
3
- VERSION = '0.1.5'.freeze
3
+ VERSION = '0.1.6'.freeze
4
4
  end
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.5
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-12 00:00:00.000000000 Z
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