mars_weather 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/mars_weather.rb +13 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: d647e3d801f297f3e0deb391c932fe410e038a77
|
|
4
|
+
data.tar.gz: 7fba888b03afb1b4434f2615a4d59297cbf7fad2
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: c2f0da7b95c17b7d9c2ccb164b9176ba65f98b5ded966f6fec8a93a84369c47d0427477d2dc0c66e1183368024a9b1eab15dbf4b92654c603916b3087d585ea2
|
|
7
|
+
data.tar.gz: 181974f1a67dd047e3b34821158cf208460ddb4a7d103f185fbac227b3561ef1a605d9fdb59079af4868a2f1d920b3661eecc195624513d697944afc75fa1ee9
|
data/lib/mars_weather.rb
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require 'faraday'
|
|
2
|
+
require 'multi_json'
|
|
3
|
+
|
|
4
|
+
class MarsWeather
|
|
5
|
+
URL = 'http://marsweather.ingenology.com/v1/latest/'
|
|
6
|
+
|
|
7
|
+
def self.latest
|
|
8
|
+
response = Faraday.get(URL)
|
|
9
|
+
return unless response
|
|
10
|
+
data = MultiJson.load(response.body, symbolize_keys: true)
|
|
11
|
+
data[:report] if data
|
|
12
|
+
end
|
|
13
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: mars_weather
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Andrey Kolbasov
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2016-01-15 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: The weather on Mars
|
|
14
|
+
email: andrey@kolbasov.com
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- lib/mars_weather.rb
|
|
20
|
+
homepage: http://rubygems.org/gems/mars_weather
|
|
21
|
+
licenses:
|
|
22
|
+
- MIT
|
|
23
|
+
metadata: {}
|
|
24
|
+
post_install_message:
|
|
25
|
+
rdoc_options: []
|
|
26
|
+
require_paths:
|
|
27
|
+
- lib
|
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - ">="
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
requirements: []
|
|
39
|
+
rubyforge_project:
|
|
40
|
+
rubygems_version: 2.4.5.1
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: Mars
|
|
44
|
+
test_files: []
|