lib/gravaty/application.rb in gravaty-9.0.1 vs lib/gravaty/application.rb in gravaty-10.0.0
- old
+ new
@@ -1,8 +1,8 @@
#--
# gravaty
-# Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Marco Bresciani
+# Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
#
# This file is part of gravaty.
#
# gravaty is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -33,12 +33,11 @@
# This class is a simple API to retrieve an URL with specified options
# from Gravatar site. It can be used to read data for avatars,
# profiles or for XML-RPC APi calls. The only needed parameter to
# create a Gravaty object is the reference +email+ address.
# Author:: {Marco Bresciani}[mailto:marcobresciani_1974@libero.it]
- # Copyright:: Copyright © 2013, 2014, 2015, 2016, 2017, 2018,
- # 2019 Marco Bresciani
+ # Copyright:: Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Marco Bresciani
# License:: GNU General Public License version 3
class Gravaty
include Comparable
# Provides the MD5 signature (of the small caps version) of the
@@ -177,11 +176,11 @@
build_uri(secure, false) + digest +
@parser.parse('format', format) + build_query_string(array)
end
- # See profile method. This banged version saves the resulting strin
+ # See profile method. This banged version saves the resulting string
# as internal state.
def profile!(args = {})
@gravaty = profile(args)
end
@@ -334,10 +333,10 @@
# Builds the query string with the array of parameters.
def build_query_string(params_array = [])
parameters = nil
unless params_array.nil?
- parameters = params_array.reject {|p| p.nil? or p.empty?}
+ parameters = params_array.reject { |p| p.nil? or p.empty? }
.join('&')
end
return ('?' + parameters) unless parameters.nil? or parameters
.empty?