winds-up-client 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/winds-up-client.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fda203d632bbd33c3c959f2faad26222963c2b4329f561cf2f93aaace36c8501
|
4
|
+
data.tar.gz: 1e082915dddc5defa78efb70bf41c8369a3a3174c05adf10f2f9b9592b0061ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca31d4a4719b86e9b0e6c0a7b5706ff7fc2aacd04ecff24d7a36f2f44e31692d6a4d6f2d35ff0c30110e9c10cadd10f8e9fc510578e51773a57795147c54a68e
|
7
|
+
data.tar.gz: 8a27e4795e573c8194be047fa5a45ffd4b7029f37e280bfc0256f9a40df17ccd4f3e8802ca39e0902d7ee08c511e87f92583ee2811e77cbc68b04f7727115c7a
|
data/lib/winds-up-client.rb
CHANGED
@@ -136,7 +136,7 @@ class WindsUpClient
|
|
136
136
|
if @options[:short]
|
137
137
|
result += "#{spot[:title]}: #{to_arrows(spot[:wind])}\n"
|
138
138
|
elsif @options[:ultrashort]
|
139
|
-
result += "#{spot[:title][0]}
|
139
|
+
result += "#{spot[:title][0]}#{to_arrows(spot[:wind]).sub(" nds", "").sub(" ", "")}"
|
140
140
|
else
|
141
141
|
rows = spot_row spot
|
142
142
|
if i % 2 == 1
|
@@ -153,7 +153,7 @@ class WindsUpClient
|
|
153
153
|
|
154
154
|
def favorites_spots_text_with_cache
|
155
155
|
path = "#{ENV['HOME']}/.local/share/winds-up-client.cache"
|
156
|
-
if Time.now - File.mtime(path) > 60
|
156
|
+
if not File.exists?(path) or Time.now - File.mtime(path) > 60
|
157
157
|
File.write(path, favorites_spots_text)
|
158
158
|
end
|
159
159
|
File.read(path)
|