tropical 0.1.9 → 0.2.0
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 +4 -4
- data/.github/workflows/ci.yml +13 -1
- data/.rubocop.yml +9 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -8
- data/lib/tropical.rb +1 -5
- data/lib/tropical/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 05a134ba1ecc9bfd663073a79e370fb1fc8051464fe14c3be7627b7d9e0d9548
|
|
4
|
+
data.tar.gz: 742fd0b18c6c12006ebcea83b6c86c3a974b8c250b2f7e697bebf83d2b5694b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d818c360ae912aab451d70c0b5131457192996b0ccd706a164f7220b8a8895f2397d8dd6788b98f229fa4b9e7236cfe2f85451291d5cc4e9eb21a4e0ef05995a
|
|
7
|
+
data.tar.gz: eea2d0b6a9453f8cc34533681c533be4b704168eac3d3a7bca37f3fd5897f846903066f0972902a4e5a537b9d47279d2a7b13bac037e20f7f6464ea958e8bcbe
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -2,7 +2,10 @@ name: Ruby Gem
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths-ignore:
|
|
8
|
+
- README.md
|
|
6
9
|
|
|
7
10
|
jobs:
|
|
8
11
|
build:
|
|
@@ -16,6 +19,15 @@ jobs:
|
|
|
16
19
|
with:
|
|
17
20
|
ruby-version: 2.6.x
|
|
18
21
|
|
|
22
|
+
- name: Run the default task
|
|
23
|
+
run: |
|
|
24
|
+
gem install bundler -v 2.2.9
|
|
25
|
+
bundle install
|
|
26
|
+
bundle exec rake
|
|
27
|
+
|
|
28
|
+
- name: Test
|
|
29
|
+
run: bundle exec rspec
|
|
30
|
+
|
|
19
31
|
- name: Publish to GPR
|
|
20
32
|
run: |
|
|
21
33
|
mkdir -p $HOME/.gem
|
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Tropical
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+
|
|
3
5
|
Gem to search weather forecast for 5 days:
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
@@ -7,7 +9,7 @@ Gem to search weather forecast for 5 days:
|
|
|
7
9
|
Add this line to your application's Gemfile:
|
|
8
10
|
|
|
9
11
|
```ruby
|
|
10
|
-
gem 'tropical', '~> 0.
|
|
12
|
+
gem 'tropical', '~> 0.2.0'
|
|
11
13
|
```
|
|
12
14
|
|
|
13
15
|
And then execute:
|
|
@@ -53,13 +55,6 @@ tropical.country
|
|
|
53
55
|
# => "BR"
|
|
54
56
|
```
|
|
55
57
|
|
|
56
|
-
- Timezone
|
|
57
|
-
```ruby
|
|
58
|
-
tropical.timezone
|
|
59
|
-
|
|
60
|
-
# => -3
|
|
61
|
-
```
|
|
62
|
-
|
|
63
58
|
- Current date
|
|
64
59
|
```ruby
|
|
65
60
|
tropical.current_date
|
data/lib/tropical.rb
CHANGED
|
@@ -30,10 +30,6 @@ module Tropical
|
|
|
30
30
|
data["city"]["population"]
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def timezone
|
|
34
|
-
Time.at(data["city"]["timezone"]).zone.to_i
|
|
35
|
-
end
|
|
36
|
-
|
|
37
33
|
def coord
|
|
38
34
|
data["city"]["coord"].transform_keys(&:to_sym)
|
|
39
35
|
end
|
|
@@ -121,7 +117,7 @@ module Tropical
|
|
|
121
117
|
def list
|
|
122
118
|
data["list"].map do |list_item|
|
|
123
119
|
{
|
|
124
|
-
dt: Time.at(list_item["dt"]),
|
|
120
|
+
dt: Time.at(list_item["dt"]).utc,
|
|
125
121
|
temp: list_item["main"]["temp"],
|
|
126
122
|
description: list_item["weather"].first["description"]
|
|
127
123
|
}
|
data/lib/tropical/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tropical
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Valter
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-02-
|
|
11
|
+
date: 2021-02-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|