lib/wikipedia/configuration.rb in wikipedia-client-1.15.0 vs lib/wikipedia/configuration.rb in wikipedia-client-1.16.0
- old
+ new
@@ -2,11 +2,12 @@
class Configuration
DEFAULT = {
protocol: 'https',
domain: 'en.wikipedia.org',
path: 'w/api.php',
- user_agent: 'wikipedia-client/1.7 (https://github.com/kenpratt/wikipedia-client)'
+ user_agent: 'wikipedia-client/1.7 (https://github.com/kenpratt/wikipedia-client)',
+ headers: {}
}.freeze
def initialize(configuration = DEFAULT)
DEFAULT.merge(configuration).each { |args| send(*args) }
end
@@ -23,8 +24,8 @@
instance_variable_set("@#{directive}", args.first)
end
end
end
- directives :protocol, :domain, :path, :user_agent
+ directives :protocol, :domain, :path, :user_agent, :headers
end
end