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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e476e340003d8dbeddffadbac3a5b832ec2de83e3b74fb188c4caf8bd9e69332
4
- data.tar.gz: 8817fa2177338c740cedbf4089eefc47e768bb59192467bb090aa9a67b2de978
3
+ metadata.gz: 05a134ba1ecc9bfd663073a79e370fb1fc8051464fe14c3be7627b7d9e0d9548
4
+ data.tar.gz: 742fd0b18c6c12006ebcea83b6c86c3a974b8c250b2f7e697bebf83d2b5694b0
5
5
  SHA512:
6
- metadata.gz: 0142d337b7ec7dda644e3803dd74f401aa7f1d8df818fc242dac7ff0e3be09e34a3d16b2f043102661cf0d1b736d0ba57c74d504e15fb590933796ffc87fceaa
7
- data.tar.gz: 6eaa1019d4d085d66e3802555ca1333d94dcac28a1eb1bf7cbd1b5f88875a14c807da8c1f9981615123ab60b2adce6fff2af376f77d31582ed4034c690ad7a00
6
+ metadata.gz: d818c360ae912aab451d70c0b5131457192996b0ccd706a164f7220b8a8895f2397d8dd6788b98f229fa4b9e7236cfe2f85451291d5cc4e9eb21a4e0ef05995a
7
+ data.tar.gz: eea2d0b6a9453f8cc34533681c533be4b704168eac3d3a7bca37f3fd5897f846903066f0972902a4e5a537b9d47279d2a7b13bac037e20f7f6464ea958e8bcbe
@@ -2,7 +2,10 @@ name: Ruby Gem
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ teste-ci ]
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
@@ -11,3 +11,12 @@ Style/StringLiteralsInInterpolation:
11
11
 
12
12
  Layout/LineLength:
13
13
  Max: 120
14
+
15
+ Style/FrozenStringLiteralComment:
16
+ Enabled: false
17
+
18
+ Style/Documentation:
19
+ Enabled: false
20
+
21
+ Metrics/BlockLength:
22
+ Enabled: false
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tropical (0.1.9)
4
+ tropical (0.2.0)
5
5
  activesupport (~> 6.1.2.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Tropical
2
2
 
3
+ ![Ruby Gem](https://github.com/ValterAndrei/tropical/workflows/Ruby%20Gem/badge.svg)
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.1.8'
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
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tropical
4
- VERSION = "0.1.9"
4
+ VERSION = "0.2.0"
5
5
  end
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.1.9
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-16 00:00:00.000000000 Z
11
+ date: 2021-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport