lib/mullvadrb/servers.rb in mullvadrb-0.0.2 vs lib/mullvadrb/servers.rb in mullvadrb-0.0.3
- old
+ new
@@ -4,11 +4,11 @@
SERVERS_FILE = File.expand_path('~/.local/share/mullvadrb/servers.dump').freeze
def update
`mullvad relay update`
data = `mullvad relay list`
- country, city, info, flag, value = nil
+ country, city, info, flag = nil
# Each line is either a country, a city or a server
servers = data.split("\n").compact.reject(&:empty?).map do |s|
if s.start_with?("\t\t")
info = s.gsub("\t\t", '')
@@ -84,11 +84,11 @@
end
end
def emoji_from_code(code)
code.upcase
- .codepoints
- .map { |c| (c + 127397).chr('utf-8') }.join
+ .codepoints
+ .map { |c| (c + 127_397).chr('utf-8') }.join
end
def load_servers
servers = File.expand_path(SERVERS_FILE)
if File.file?(servers)