From 6e0ddcb26d49a466a741e2b731a5b084a20a3d8b Mon Sep 17 00:00:00 2001 From: IanAtLooker Date: Thu, 17 May 2018 10:55:19 -0700 Subject: [PATCH 01/13] added option to verify ssl without specifying ca file --- lib/openid/fetchers.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/openid/fetchers.rb b/lib/openid/fetchers.rb index c4cce125..9da95d26 100644 --- a/lib/openid/fetchers.rb +++ b/lib/openid/fetchers.rb @@ -115,7 +115,7 @@ class StandardFetcher REDIRECT_LIMIT = 5 TIMEOUT = ENV['RUBY_OPENID_FETCHER_TIMEOUT'] || 60 - attr_accessor :ca_file, :timeout + attr_accessor :ca_file, :timeout, :ssl_verify_peer # I can fetch through a HTTP proxy; arguments are as for Net::HTTP::Proxy. def initialize(proxy_addr = nil, proxy_port = nil, @@ -123,6 +123,7 @@ def initialize(proxy_addr = nil, proxy_port = nil, @ca_file = nil @proxy = Net::HTTP::Proxy(proxy_addr, proxy_port, proxy_user, proxy_pass) @timeout = TIMEOUT + @ssl_verify_peer = nil end def supports_ssl?(conn) @@ -160,6 +161,8 @@ def make_connection(uri) if @ca_file set_verified(conn, true) conn.ca_file = @ca_file + elsif @ssl_verify_peer + set_verified(conn, true) else Util.log("WARNING: making https request to #{uri} without verifying " + 'server certificate; no CA path was specified.') From a7ddf6e6c586ec1f4069466ce5f091bb19aa3bb2 Mon Sep 17 00:00:00 2001 From: Randy Ebersole Date: Wed, 27 May 2020 10:32:28 -0400 Subject: [PATCH 02/13] Issue #125 - Addressing missing server url in check_signature method --- lib/openid/consumer/idres.rb | 40 +++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/lib/openid/consumer/idres.rb b/lib/openid/consumer/idres.rb index 7b8f8b44..18c7acb5 100644 --- a/lib/openid/consumer/idres.rb +++ b/lib/openid/consumer/idres.rb @@ -1,8 +1,8 @@ -require 'openid/message' -require 'openid/protocolerror' -require 'openid/kvpost' -require 'openid/consumer/discovery' -require 'openid/urinorm' +require "openid/message" +require "openid/protocolerror" +require "openid/kvpost" +require "openid/consumer/discovery" +require "openid/urinorm" module OpenID class TypeURIMismatch < ProtocolError @@ -22,12 +22,7 @@ class Consumer # to thread a nonce through an OpenID 1 transaction. It will be # appended to the return_to URL. class << self - attr_writer :openid1_return_to_nonce_name - end - - # See openid1_return_to_nonce_name= documentation - class << self - attr_reader :openid1_return_to_nonce_name + attr_accessor :openid1_return_to_nonce_name end # Set the name of the query parameter that this library will use @@ -35,12 +30,7 @@ class << self # use when verifying discovered information). It will be appended # to the return_to URL. class << self - attr_writer :openid1_return_to_claimed_id_name - end - - # See openid1_return_to_claimed_id_name= - class << self - attr_reader :openid1_return_to_claimed_id_name + attr_accessor :openid1_return_to_claimed_id_name end # Handles an openid.mode=id_res response. This object is @@ -197,6 +187,21 @@ def verify_return_to_base(msg_return_to) # Raises ProtocolError if the signature is bad def check_signature + # ---------------------------------------------------------------------- + # The server url must be defined within the endpoint instance for the + # OpenID2 namespace in order for the signature check to complete + # successfully. + # + # This fix corrects issue #125 - Unable to complete OpenID login + # with ruby-openid 2.9.0/2.9.1 + # --------------------------------------------------------------------- + set_endpoint_flag = false + if @endpoint.nil? && openid_namespace == OPENID2_NS + @endpoint = OpenIDServiceEndpoint.new + @endpoint.server_url = fetch('op_endpoint') + set_endpoint_flag = true + end + assoc = if @store.nil? nil else @@ -215,6 +220,7 @@ def check_signature elsif !assoc.check_message_signature(@message) raise ProtocolError, "Bad signature in response from #{server_url}" end + @endpoint = nil if set_endpoint_flag # Clear endpoint if we defined it. end def check_auth From a3da5f48aad70fb1ecf71c4c978cdeea739dde44 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 02:14:42 -0600 Subject: [PATCH 03/13] =?UTF-8?q?=F0=9F=94=A5=20Remove=20Ruby=201.4=20setu?= =?UTF-8?q?p=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.rb | 1510 ------------------------------------------------------ 1 file changed, 1510 deletions(-) delete mode 100644 setup.rb diff --git a/setup.rb b/setup.rb deleted file mode 100644 index f20576be..00000000 --- a/setup.rb +++ /dev/null @@ -1,1510 +0,0 @@ -# -# setup.rb -# -# Copyright (c) 2000-2005 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# - -unless Enumerable.method_defined?(:map) # Ruby 1.4.6 - module Enumerable - alias map collect - end -end - -unless File.respond_to?(:read) # Ruby 1.6 - def File.read(fname) - open(fname) do |f| - return f.read - end - end -end - -unless Errno.const_defined?(:ENOTEMPTY) # Windows? - module Errno - class ENOTEMPTY - # We do not raise this exception, implementation is not needed. - end - end -end - -def File.binread(fname) - open(fname, 'rb') do |f| - return f.read - end -end - -# for corrupted Windows' stat(2) -def File.dir?(path) - File.directory?(path[-1, 1] == '/' ? path : path + '/') -end - -class ConfigTable - include Enumerable - - def initialize(rbconfig) - @rbconfig = rbconfig - @items = [] - @table = {} - # options - @install_prefix = nil - @config_opt = nil - @verbose = true - @no_harm = false - @libsrc_pattern = '*.rb' - end - - attr_accessor :install_prefix, :config_opt, :libsrc_pattern - - attr_writer :verbose, :no_harm - - def verbose? - @verbose - end - - def no_harm? - @no_harm - end - - def [](key) - lookup(key).resolve(self) - end - - def []=(key, val) - lookup(key).set val - end - - def names - @items.map { |i| i.name } - end - - def each(&block) - @items.each(&block) - end - - def key?(name) - @table.key?(name) - end - - def lookup(name) - @table[name] or setup_rb_error "no such config item: #{name}" - end - - def add(item) - @items.push item - @table[item.name] = item - end - - def remove(name) - item = lookup(name) - @items.delete_if { |i| i.name == name } - @table.delete_if { |name, i| i.name == name } - item - end - - def load_script(path, inst = nil) - return unless File.file?(path) - - MetaConfigEnvironment.new(self, inst).instance_eval File.read(path), path - end - - def savefile - '.config' - end - - def load_savefile - File.foreach(savefile) do |line| - k, v = *line.split(/=/, 2) - self[k] = v.strip - end - rescue Errno::ENOENT - setup_rb_error $!.message + "\n#{File.basename($0)} config first" - end - - def save - @items.each { |i| i.value } - File.open(savefile, 'w') do |f| - @items.each do |i| - f.printf "%s=%s\n", i.name, i.value if i.value? and i.value - end - end - end - - def load_standard_entries - standard_entries(@rbconfig).each do |ent| - add ent - end - end - - def standard_entries(rbconfig) - c = rbconfig - - rubypath = c['bindir'] + '/' + c['ruby_install_name'] - - major = c['MAJOR'].to_i - minor = c['MINOR'].to_i - teeny = c['TEENY'].to_i - version = "#{major}.#{minor}" - - # ruby ver. >= 1.4.4? - newpath_p = ((major >= 2) or - ((major == 1) and - ((minor >= 5) or - ((minor == 4) and (teeny >= 4))))) - - if c['rubylibdir'] - # V > 1.6.3 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = c['rubylibdir'] - librubyverarch = c['archdir'] - siteruby = c['sitedir'] - siterubyver = c['sitelibdir'] - siterubyverarch = c['sitearchdir'] - elsif newpath_p - # 1.4.4 <= V <= 1.6.3 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = "#{c['prefix']}/lib/ruby/#{version}" - librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}" - siteruby = c['sitedir'] - siterubyver = "$siteruby/#{version}" - siterubyverarch = "$siterubyver/#{c['arch']}" - else - # V < 1.4.4 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = "#{c['prefix']}/lib/ruby/#{version}" - librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}" - siteruby = "#{c['prefix']}/lib/ruby/#{version}/site_ruby" - siterubyver = siteruby - siterubyverarch = "$siterubyver/#{c['arch']}" - end - parameterize = lambda { |path| - path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix') - } - - makeprog = if arg = c['configure_args'].split.detect { |arg| /--with-make-prog=/ =~ arg } - arg.sub(/'/, '').split(/=/, 2)[1] - else - 'make' - end - - [ - ExecItem.new('installdirs', 'std/site/home', - 'std: install under libruby; site: install under site_ruby; home: install under $HOME')\ - do |val, table| - case val - when 'std' - table['rbdir'] = '$librubyver' - table['sodir'] = '$librubyverarch' - when 'site' - table['rbdir'] = '$siterubyver' - table['sodir'] = '$siterubyverarch' - when 'home' - setup_rb_error '$HOME was not set' unless ENV['HOME'] - table['prefix'] = ENV['HOME'] - table['rbdir'] = '$libdir/ruby' - table['sodir'] = '$libdir/ruby' - end - end, - PathItem.new('prefix', 'path', c['prefix'], - 'path prefix of target environment'), - PathItem.new('bindir', 'path', parameterize.call(c['bindir']), - 'the directory for commands'), - PathItem.new('libdir', 'path', parameterize.call(c['libdir']), - 'the directory for libraries'), - PathItem.new('datadir', 'path', parameterize.call(c['datadir']), - 'the directory for shared data'), - PathItem.new('mandir', 'path', parameterize.call(c['mandir']), - 'the directory for man pages'), - PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']), - 'the directory for system configuration files'), - PathItem.new('localstatedir', 'path', parameterize.call(c['localstatedir']), - 'the directory for local state data'), - PathItem.new('libruby', 'path', libruby, - 'the directory for ruby libraries'), - PathItem.new('librubyver', 'path', librubyver, - 'the directory for standard ruby libraries'), - PathItem.new('librubyverarch', 'path', librubyverarch, - 'the directory for standard ruby extensions'), - PathItem.new('siteruby', 'path', siteruby, - 'the directory for version-independent aux ruby libraries'), - PathItem.new('siterubyver', 'path', siterubyver, - 'the directory for aux ruby libraries'), - PathItem.new('siterubyverarch', 'path', siterubyverarch, - 'the directory for aux ruby binaries'), - PathItem.new('rbdir', 'path', '$siterubyver', - 'the directory for ruby scripts'), - PathItem.new('sodir', 'path', '$siterubyverarch', - 'the directory for ruby extentions'), - PathItem.new('rubypath', 'path', rubypath, - 'the path to set to #! line'), - ProgramItem.new('rubyprog', 'name', rubypath, - 'the ruby program using for installation'), - ProgramItem.new('makeprog', 'name', makeprog, - 'the make program to compile ruby extentions'), - SelectItem.new('shebang', 'all/ruby/never', 'ruby', - 'shebang line (#!) editing mode'), - BoolItem.new('without-ext', 'yes/no', 'no', - 'does not compile/install ruby extentions') - ] - end - private :standard_entries - - def load_multipackage_entries - multipackage_entries.each do |ent| - add ent - end - end - - def multipackage_entries - [ - PackageSelectionItem.new('with', 'name,name...', '', 'ALL', - 'package names that you want to install'), - PackageSelectionItem.new('without', 'name,name...', '', 'NONE', - 'package names that you do not want to install') - ] - end - private :multipackage_entries - - ALIASES = { - 'std-ruby' => 'librubyver', - 'stdruby' => 'librubyver', - 'rubylibdir' => 'librubyver', - 'archdir' => 'librubyverarch', - 'site-ruby-common' => 'siteruby', # For backward compatibility - 'site-ruby' => 'siterubyver', # For backward compatibility - 'bin-dir' => 'bindir', - 'bin-dir' => 'bindir', - 'rb-dir' => 'rbdir', - 'so-dir' => 'sodir', - 'data-dir' => 'datadir', - 'ruby-path' => 'rubypath', - 'ruby-prog' => 'rubyprog', - 'ruby' => 'rubyprog', - 'make-prog' => 'makeprog', - 'make' => 'makeprog' - } - - def fixup - ALIASES.each do |ali, name| - @table[ali] = @table[name] - end - @items.freeze - @table.freeze - @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/ - end - - def parse_opt(opt) - m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}" - m.to_a[1, 2] - end - - def dllext - @rbconfig['DLEXT'] - end - - def value_config?(name) - lookup(name).value? - end - - class Item - def initialize(name, template, default, desc) - @name = name.freeze - @template = template - @value = default - @default = default - @description = desc - end - - attr_reader :name, :description, :value - - attr_accessor :default - alias help_default default - - def help_opt - "--#{@name}=#{@template}" - end - - def value? - true - end - - def resolve(table) - @value.gsub(%r{\$([^/]+)}) { table[::Regexp.last_match(1)] } - end - - def set(val) - @value = check(val) - end - - private - - def check(val) - setup_rb_error "config: --#{name} requires argument" unless val - val - end - end - - class BoolItem < Item - def config_type - 'bool' - end - - def help_opt - "--#{@name}" - end - - private - - def check(val) - return 'yes' unless val - - unless /\A(y(es)?|n(o)?|t(rue)?|f(alse))\z/i =~ val - setup_rb_error "config: --#{@name} accepts only yes/no for argument" - end - /\Ay(es)?|\At(rue)/i =~ value ? 'yes' : 'no' - end - end - - class PathItem < Item - def config_type - 'path' - end - - private - - def check(path) - setup_rb_error "config: --#{@name} requires argument" unless path - path[0, 1] == '$' ? path : File.expand_path(path) - end - end - - class ProgramItem < Item - def config_type - 'program' - end - end - - class SelectItem < Item - def initialize(name, selection, default, desc) - super - @ok = selection.split('/') - end - - def config_type - 'select' - end - - private - - def check(val) - setup_rb_error "config: use --#{@name}=#{@template} (#{val})" unless @ok.include?(val.strip) - val.strip - end - end - - class ExecItem < Item - def initialize(name, selection, desc, &block) - super name, selection, nil, desc - @ok = selection.split('/') - @action = block - end - - def config_type - 'exec' - end - - def value? - false - end - - def resolve(_table) - setup_rb_error "$#{name} wrongly used as option value" - end - - undef set - - def evaluate(val, table) - v = val.strip.downcase - setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})" unless @ok.include?(v) - @action.call v, table - end - end - - class PackageSelectionItem < Item - def initialize(name, template, default, help_default, desc) - super name, template, default, desc - @help_default = help_default - end - - attr_reader :help_default - - def config_type - 'package' - end - - private - - def check(val) - setup_rb_error "config: no such package: #{val}" unless File.dir?("packages/#{val}") - val - end - end - - class MetaConfigEnvironment - def intiailize(config, installer) - @config = config - @installer = installer - end - - def config_names - @config.names - end - - def config?(name) - @config.key?(name) - end - - def bool_config?(name) - @config.lookup(name).config_type == 'bool' - end - - def path_config?(name) - @config.lookup(name).config_type == 'path' - end - - def value_config?(name) - @config.lookup(name).config_type != 'exec' - end - - def add_config(item) - @config.add item - end - - def add_bool_config(name, default, desc) - @config.add BoolItem.new(name, 'yes/no', default ? 'yes' : 'no', desc) - end - - def add_path_config(name, default, desc) - @config.add PathItem.new(name, 'path', default, desc) - end - - def set_config_default(name, default) - @config.lookup(name).default = default - end - - def remove_config(name) - @config.remove(name) - end - - # For only multipackage - def packages - unless @installer - raise '[setup.rb fatal] multi-package metaconfig API packages() called for single-package; contact application package vendor' - end - - @installer.packages - end - - # For only multipackage - def declare_packages(list) - unless @installer - raise '[setup.rb fatal] multi-package metaconfig API declare_packages() called for single-package; contact application package vendor' - end - - @installer.packages = list - end - end -end # class ConfigTable - -# This module requires: #verbose?, #no_harm? -module FileOperations - def mkdir_p(dirname, prefix = nil) - dirname = prefix + File.expand_path(dirname) if prefix - warn "mkdir -p #{dirname}" if verbose? - return if no_harm? - - # Does not check '/', it's too abnormal. - dirs = File.expand_path(dirname).split(%r{(?=/)}) - if /\A[a-z]:\z/i =~ dirs[0] - disk = dirs.shift - dirs[0] = disk + dirs[0] - end - dirs.each_index do |idx| - path = dirs[0..idx].join('') - Dir.mkdir path unless File.dir?(path) - end - end - - def rm_f(path) - warn "rm -f #{path}" if verbose? - return if no_harm? - - force_remove_file path - end - - def rm_rf(path) - warn "rm -rf #{path}" if verbose? - return if no_harm? - - remove_tree path - end - - def remove_tree(path) - if File.symlink?(path) - remove_file path - elsif File.dir?(path) - remove_tree0 path - else - force_remove_file path - end - end - - def remove_tree0(path) - Dir.foreach(path) do |ent| - next if ent == '.' - next if ent == '..' - - entpath = "#{path}/#{ent}" - if File.symlink?(entpath) - remove_file entpath - elsif File.dir?(entpath) - remove_tree0 entpath - else - force_remove_file entpath - end - end - begin - Dir.rmdir path - rescue Errno::ENOTEMPTY - # directory may not be empty - end - end - - def move_file(src, dest) - force_remove_file dest - begin - File.rename src, dest - rescue StandardError - File.open(dest, 'wb') do |f| - f.write File.binread(src) - end - File.chmod File.stat(src).mode, dest - File.unlink src - end - end - - def force_remove_file(path) - remove_file path - rescue StandardError - end - - def remove_file(path) - File.chmod 0o777, path - File.unlink path - end - - def install(from, dest, mode, prefix = nil) - warn "install #{from} #{dest}" if verbose? - return if no_harm? - - realdest = prefix ? prefix + File.expand_path(dest) : dest - realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest) - str = File.binread(from) - return unless diff?(str, realdest) - - verbose_off do - rm_f realdest if File.exist?(realdest) - end - File.open(realdest, 'wb') do |f| - f.write str - end - File.chmod mode, realdest - - File.open("#{objdir_root}/InstalledFiles", 'a') do |f| - if prefix - f.puts realdest.sub(prefix, '') - else - f.puts realdest - end - end - end - - def diff?(new_content, path) - return true unless File.exist?(path) - - new_content != File.binread(path) - end - - def command(*args) - warn args.join(' ') if verbose? - system(*args) or raise "system(#{args.map { |a| a.inspect }.join(' ')}) failed" - end - - def ruby(*args) - command config('rubyprog'), *args - end - - def make(task = nil) - command(*[config('makeprog'), task].compact) - end - - def extdir?(dir) - File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb") - end - - def files_of(dir) - Dir.open(dir) do |d| - return d.select { |ent| File.file?("#{dir}/#{ent}") } - end - end - - DIR_REJECT = %w[. .. CVS SCCS RCS CVS.adm .svn] - - def directories_of(dir) - Dir.open(dir) do |d| - return d.select { |ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT - end - end -end - -# This module requires: #srcdir_root, #objdir_root, #relpath -module HookScriptAPI - def get_config(key) - @config[key] - end - - alias config get_config - - # obsolete: use metaconfig to change configuration - def set_config(key, val) - @config[key] = val - end - - # - # srcdir/objdir (works only in the package directory) - # - - def curr_srcdir - "#{srcdir_root}/#{relpath}" - end - - def curr_objdir - "#{objdir_root}/#{relpath}" - end - - def srcfile(path) - "#{curr_srcdir}/#{path}" - end - - def srcexist?(path) - File.exist?(srcfile(path)) - end - - def srcdirectory?(path) - File.dir?(srcfile(path)) - end - - def srcfile?(path) - File.file?(srcfile(path)) - end - - def srcentries(path = '.') - Dir.open("#{curr_srcdir}/#{path}") do |d| - return d.to_a - %w[. ..] - end - end - - def srcfiles(path = '.') - srcentries(path).select do |fname| - File.file?(File.join(curr_srcdir, path, fname)) - end - end - - def srcdirectories(path = '.') - srcentries(path).select do |fname| - File.dir?(File.join(curr_srcdir, path, fname)) - end - end -end - -class ToplevelInstaller - Version = '3.4.0' - Copyright = 'Copyright (c) 2000-2005 Minero Aoki' - - TASKS = [ - ['all', 'do config, setup, then install'], - ['config', 'saves your configurations'], - ['show', 'shows current configuration'], - ['setup', 'compiles ruby extentions and others'], - ['install', 'installs files'], - ['test', 'run all tests in test/'], - ['clean', "does `make clean' for each extention"], - ['distclean', "does `make distclean' for each extention"] - ] - - def self.invoke - config = ConfigTable.new(load_rbconfig) - config.load_standard_entries - config.load_multipackage_entries if multipackage? - config.fixup - klass = (multipackage? ? ToplevelInstallerMulti : ToplevelInstaller) - klass.new(File.dirname($0), config).invoke - end - - def self.multipackage? - File.dir?(File.dirname($0) + '/packages') - end - - def self.load_rbconfig - if arg = ARGV.detect { |arg| /\A--rbconfig=/ =~ arg } - ARGV.delete(arg) - load File.expand_path(arg.split(/=/, 2)[1]) - $".push 'rbconfig.rb' - else - require 'rbconfig' - end - ::Config::CONFIG - end - - def initialize(ardir_root, config) - @ardir = File.expand_path(ardir_root) - @config = config - # cache - @valid_task_re = nil - end - - def config(key) - @config[key] - end - - def inspect - "#<#{self.class} #{__id__}>" - end - - def invoke - run_metaconfigs - case task = parsearg_global - when nil, 'all' - parsearg_config - init_installers - exec_config - exec_setup - exec_install - else - case task - when 'config', 'test' - - when 'clean', 'distclean' - @config.load_savefile if File.exist?(@config.savefile) - else - @config.load_savefile - end - __send__ "parsearg_#{task}" - init_installers - __send__ "exec_#{task}" - end - end - - def run_metaconfigs - @config.load_script "#{@ardir}/metaconfig" - end - - def init_installers - @installer = Installer.new(@config, @ardir, File.expand_path('.')) - end - - # - # Hook Script API bases - # - - def srcdir_root - @ardir - end - - def objdir_root - '.' - end - - def relpath - '.' - end - - # - # Option Parsing - # - - def parsearg_global - while arg = ARGV.shift - case arg - when /\A\w+\z/ - setup_rb_error "invalid task: #{arg}" unless valid_task?(arg) - return arg - when '-q', '--quiet' - @config.verbose = false - when '--verbose' - @config.verbose = true - when '--help' - print_usage $stdout - exit 0 - when '--version' - puts "#{File.basename($0)} version #{Version}" - exit 0 - when '--copyright' - puts Copyright - exit 0 - else - setup_rb_error "unknown global option '#{arg}'" - end - end - nil - end - - def valid_task?(t) - valid_task_re =~ t - end - - def valid_task_re - @valid_task_re ||= /\A(?:#{TASKS.map { |task, _desc| task }.join('|')})\z/ - end - - def parsearg_no_options - return if ARGV.empty? - - setup_rb_error "#{task}: unknown options: #{ARGV.join(' ')}" - end - - alias parsearg_show parsearg_no_options - alias parsearg_setup parsearg_no_options - alias parsearg_test parsearg_no_options - alias parsearg_clean parsearg_no_options - alias parsearg_distclean parsearg_no_options - - def parsearg_config - evalopt = [] - set = [] - @config.config_opt = [] - while i = ARGV.shift - if /\A--?\z/ =~ i - @config.config_opt = ARGV.dup - break - end - name, value = *@config.parse_opt(i) - if @config.value_config?(name) - @config[name] = value - else - evalopt.push [name, value] - end - set.push name - end - evalopt.each do |name, value| - @config.lookup(name).evaluate value, @config - end - # Check if configuration is valid - set.each do |n| - @config[n] if @config.value_config?(n) - end - end - - def parsearg_install - @config.no_harm = false - @config.install_prefix = '' - while a = ARGV.shift - case a - when '--no-harm' - @config.no_harm = true - when /\A--prefix=/ - path = a.split(/=/, 2)[1] - path = File.expand_path(path) unless path[0, 1] == '/' - @config.install_prefix = path - else - setup_rb_error "install: unknown option #{a}" - end - end - end - - def print_usage(out) - out.puts 'Typical Installation Procedure:' - out.puts " $ ruby #{File.basename $0} config" - out.puts " $ ruby #{File.basename $0} setup" - out.puts " # ruby #{File.basename $0} install (may require root privilege)" - out.puts - out.puts 'Detailed Usage:' - out.puts " ruby #{File.basename $0} " - out.puts " ruby #{File.basename $0} [] []" - - fmt = " %-24s %s\n" - out.puts - out.puts 'Global options:' - out.printf fmt, '-q,--quiet', 'suppress message outputs' - out.printf fmt, ' --verbose', 'output messages verbosely' - out.printf fmt, ' --help', 'print this message' - out.printf fmt, ' --version', 'print version and quit' - out.printf fmt, ' --copyright', 'print copyright and quit' - out.puts - out.puts 'Tasks:' - TASKS.each do |name, desc| - out.printf fmt, name, desc - end - - fmt = " %-24s %s [%s]\n" - out.puts - out.puts 'Options for CONFIG or ALL:' - @config.each do |item| - out.printf fmt, item.help_opt, item.description, item.help_default - end - out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load', "running ruby's" - out.puts - out.puts 'Options for INSTALL:' - out.printf fmt, '--no-harm', 'only display what to do if given', 'off' - out.printf fmt, '--prefix=path', 'install path prefix', '' - out.puts - end - - # - # Task Handlers - # - - def exec_config - @installer.exec_config - @config.save # must be final - end - - def exec_setup - @installer.exec_setup - end - - def exec_install - @installer.exec_install - end - - def exec_test - @installer.exec_test - end - - def exec_show - @config.each do |i| - printf "%-20s %s\n", i.name, i.value if i.value? - end - end - - def exec_clean - @installer.exec_clean - end - - def exec_distclean - @installer.exec_distclean - end -end # class ToplevelInstaller - -class ToplevelInstallerMulti < ToplevelInstaller - include FileOperations - - def initialize(ardir_root, config) - super - @packages = directories_of("#{@ardir}/packages") - raise 'no package exists' if @packages.empty? - - @root_installer = Installer.new(@config, @ardir, File.expand_path('.')) - end - - def run_metaconfigs - @config.load_script "#{@ardir}/metaconfig", self - @packages.each do |name| - @config.load_script "#{@ardir}/packages/#{name}/metaconfig" - end - end - - attr_reader :packages - - def packages=(list) - raise 'package list is empty' if list.empty? - - list.each do |name| - raise "directory packages/#{name} does not exist"\ - unless File.dir?("#{@ardir}/packages/#{name}") - end - @packages = list - end - - def init_installers - @installers = {} - @packages.each do |pack| - @installers[pack] = Installer.new(@config, - "#{@ardir}/packages/#{pack}", - "packages/#{pack}") - end - with = extract_selection(config('with')) - without = extract_selection(config('without')) - @selected = @installers.keys.select do |name| - (with.empty? or with.include?(name)) \ - and !without.include?(name) - end - end - - def extract_selection(list) - a = list.split(/,/) - a.each do |name| - setup_rb_error "no such package: #{name}" unless @installers.key?(name) - end - a - end - - def print_usage(f) - super - f.puts 'Inluded packages:' - f.puts ' ' + @packages.sort.join(' ') - f.puts - end - - # - # Task Handlers - # - - def exec_config - run_hook 'pre-config' - each_selected_installers { |inst| inst.exec_config } - run_hook 'post-config' - @config.save # must be final - end - - def exec_setup - run_hook 'pre-setup' - each_selected_installers { |inst| inst.exec_setup } - run_hook 'post-setup' - end - - def exec_install - run_hook 'pre-install' - each_selected_installers { |inst| inst.exec_install } - run_hook 'post-install' - end - - def exec_test - run_hook 'pre-test' - each_selected_installers { |inst| inst.exec_test } - run_hook 'post-test' - end - - def exec_clean - rm_f @config.savefile - run_hook 'pre-clean' - each_selected_installers { |inst| inst.exec_clean } - run_hook 'post-clean' - end - - def exec_distclean - rm_f @config.savefile - run_hook 'pre-distclean' - each_selected_installers { |inst| inst.exec_distclean } - run_hook 'post-distclean' - end - - # - # lib - # - - def each_selected_installers - Dir.mkdir 'packages' unless File.dir?('packages') - @selected.each do |pack| - warn "Processing the package `#{pack}' ..." if verbose? - Dir.mkdir "packages/#{pack}" unless File.dir?("packages/#{pack}") - Dir.chdir "packages/#{pack}" - yield @installers[pack] - Dir.chdir '../..' - end - end - - def run_hook(id) - @root_installer.run_hook id - end - - # module FileOperations requires this - def verbose? - @config.verbose? - end - - # module FileOperations requires this - def no_harm? - @config.no_harm? - end -end # class ToplevelInstallerMulti - -class Installer - FILETYPES = %w[bin lib ext data conf man] - - include FileOperations - include HookScriptAPI - - def initialize(config, srcroot, objroot) - @config = config - @srcdir = File.expand_path(srcroot) - @objdir = File.expand_path(objroot) - @currdir = '.' - end - - def inspect - "#<#{self.class} #{File.basename(@srcdir)}>" - end - - # - # Hook Script API base methods - # - - def srcdir_root - @srcdir - end - - def objdir_root - @objdir - end - - def relpath - @currdir - end - - # - # Config Access - # - - # module FileOperations requires this - def verbose? - @config.verbose? - end - - # module FileOperations requires this - def no_harm? - @config.no_harm? - end - - def verbose_off - save = @config.verbose? - @config.verbose = false - yield - ensure - @config.verbose = save - end - - # - # TASK config - # - - def exec_config - exec_task_traverse 'config' - end - - def config_dir_bin(rel); end - - def config_dir_lib(rel); end - - def config_dir_man(rel); end - - def config_dir_ext(_rel) - extconf if extdir?(curr_srcdir) - end - - def extconf - ruby "#{curr_srcdir}/extconf.rb", *@config.config_opt - end - - def config_dir_data(rel); end - - def config_dir_conf(rel); end - - # - # TASK setup - # - - def exec_setup - exec_task_traverse 'setup' - end - - def setup_dir_bin(_rel) - files_of(curr_srcdir).each do |fname| - adjust_shebang "#{curr_srcdir}/#{fname}" - end - end - - def adjust_shebang(path) - return if no_harm? - - tmpfile = File.basename(path) + '.tmp' - begin - File.open(path, 'rb') do |r| - first = r.gets - return unless File.basename(first.sub(/\A\#!/, '').split[0].to_s) == 'ruby' - - warn "adjusting shebang: #{File.basename(path)}" if verbose? - File.open(tmpfile, 'wb') do |w| - w.print first.sub(/\A\#!\s*\S+/, '#! ' + config('rubypath')) - w.write r.read - end - end - move_file tmpfile, File.basename(path) - ensure - File.unlink tmpfile if File.exist?(tmpfile) - end - end - - def setup_dir_lib(rel); end - - def setup_dir_man(rel); end - - def setup_dir_ext(_rel) - make if extdir?(curr_srcdir) - end - - def setup_dir_data(rel); end - - def setup_dir_conf(rel); end - - # - # TASK install - # - - def exec_install - rm_f 'InstalledFiles' - exec_task_traverse 'install' - end - - def install_dir_bin(rel) - install_files targetfiles, "#{config('bindir')}/#{rel}", 0o755 - end - - def install_dir_lib(rel) - install_files rubyscripts, "#{config('rbdir')}/#{rel}", 0o644 - end - - def install_dir_ext(rel) - return unless extdir?(curr_srcdir) - - install_files rubyextentions('.'), - "#{config('sodir')}/#{File.dirname(rel)}", - 0o555 - end - - def install_dir_data(rel) - install_files targetfiles, "#{config('datadir')}/#{rel}", 0o644 - end - - def install_dir_conf(rel) - # FIXME: should not remove current config files - # (rename previous file to .old/.org) - install_files targetfiles, "#{config('sysconfdir')}/#{rel}", 0o644 - end - - def install_dir_man(rel) - install_files targetfiles, "#{config('mandir')}/#{rel}", 0o644 - end - - def install_files(list, dest, mode) - mkdir_p dest, @config.install_prefix - list.each do |fname| - install fname, dest, mode, @config.install_prefix - end - end - - def rubyscripts - glob_select(@config.libsrc_pattern, targetfiles) - end - - def rubyextentions(_dir) - ents = glob_select("*.#{@config.dllext}", targetfiles) - setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first" if ents.empty? - ents - end - - def targetfiles - mapdir(existfiles - hookfiles) - end - - def mapdir(ents) - ents.map do |ent| - if File.exist?(ent) - then ent # objdir - else - "#{curr_srcdir}/#{ent}" # srcdir - end - end - end - - # picked up many entries from cvs-1.11.1/src/ignore.c - JUNK_FILES = %w[ - core RCSLOG tags TAGS .make.state - .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb - *~ *.old *.bak *.BAK *.orig *.rej _$* *$ - - *.org *.in .* - ] - - def existfiles - glob_reject(JUNK_FILES, (files_of(curr_srcdir) | files_of('.'))) - end - - def hookfiles - %w[pre-%s post-%s pre-%s.rb post-%s.rb].map do |fmt| - %w[config setup install clean].map { |t| format(fmt, t) } - end.flatten - end - - def glob_select(pat, ents) - re = globs2re([pat]) - ents.select { |ent| re =~ ent } - end - - def glob_reject(pats, ents) - re = globs2re(pats) - ents.reject { |ent| re =~ ent } - end - - GLOB2REGEX = { - '.' => '\.', - '$' => '\$', - '#' => '\#', - '*' => '.*' - } - - def globs2re(pats) - /\A(?:#{ - pats.map { |pat| pat.gsub(/[.$\#*]/) { |ch| GLOB2REGEX[ch] } }.join('|') - })\z/ - end - - # - # TASK test - # - - TESTDIR = 'test' - - def exec_test - unless File.directory?('test') - warn 'no test in this package' if verbose? - return - end - warn 'Running tests...' if verbose? - Dir.glob './test/**/test_*.rb', &method(:require) - end - - # - # TASK clean - # - - def exec_clean - exec_task_traverse 'clean' - rm_f @config.savefile - rm_f 'InstalledFiles' - end - - def clean_dir_bin(rel); end - - def clean_dir_lib(rel); end - - def clean_dir_ext(_rel) - return unless extdir?(curr_srcdir) - - make 'clean' if File.file?('Makefile') - end - - def clean_dir_data(rel); end - - def clean_dir_conf(rel); end - - # - # TASK distclean - # - - def exec_distclean - exec_task_traverse 'distclean' - rm_f @config.savefile - rm_f 'InstalledFiles' - end - - def distclean_dir_bin(rel); end - - def distclean_dir_lib(rel); end - - def distclean_dir_ext(_rel) - return unless extdir?(curr_srcdir) - - make 'distclean' if File.file?('Makefile') - end - - def distclean_dir_data(rel); end - - def distclean_dir_conf(rel); end - - # - # lib - # - - def exec_task_traverse(task) - run_hook "pre-#{task}" - FILETYPES.each do |type| - if config('without-ext') == 'yes' and type == 'ext' - warn 'skipping ext/* by user option' if verbose? - next - end - traverse task, type, "#{task}_dir_#{type}" - end - run_hook "post-#{task}" - end - - def traverse(task, rel, mid) - dive_into(rel) do - run_hook "pre-#{task}" - __send__ mid, rel.sub(%r{\A.*?(?:/|\z)}, '') - directories_of(curr_srcdir).each do |d| - traverse task, "#{rel}/#{d}", mid - end - run_hook "post-#{task}" - end - end - - def dive_into(rel) - return unless File.dir?("#{@srcdir}/#{rel}") - - dir = File.basename(rel) - Dir.mkdir dir unless File.dir?(dir) - prevdir = Dir.pwd - Dir.chdir dir - warn '---> ' + rel if verbose? - @currdir = rel - yield - Dir.chdir prevdir - warn '<--- ' + rel if verbose? - @currdir = File.dirname(rel) - end - - def run_hook(id) - path = ["#{curr_srcdir}/#{id}", - "#{curr_srcdir}/#{id}.rb"].detect { |cand| File.file?(cand) } - return unless path - - begin - instance_eval File.read(path), path, 1 - rescue StandardError - raise if $DEBUG - - setup_rb_error "hook #{path} failed:\n" + $!.message - end - end -end # class Installer - -class SetupError < StandardError; end - -def setup_rb_error(msg) - raise SetupError, msg -end - -if $0 == __FILE__ - begin - ToplevelInstaller.invoke - rescue SetupError - raise if $DEBUG - - warn $!.message - warn "Try 'ruby #{$0} --help' for detailed usage." - exit 1 - end -end From 3ad9d7616175b9396deb5c1cf9fcd66e91e06b74 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 02:15:41 -0600 Subject: [PATCH 04/13] =?UTF-8?q?=F0=9F=9A=A8=20More=20linting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .rubocop_gradual.lock | 2957 ++--------------- Rakefile | 18 +- admin/mkassoc | 10 +- .../XXX_add_open_id_store_to_db.rb | 26 +- .../XXX_upgrade_open_id_store.rb | 26 +- examples/active_record_openid_store/init.rb | 6 +- .../lib/association.rb | 6 +- .../active_record_openid_store/lib/nonce.rb | 2 +- .../lib/openid_ar_store.rb | 36 +- .../test/store_test.rb | 63 +- examples/discover | 20 +- examples/rails_openid/Gemfile | 18 +- examples/rails_openid/Rakefile | 2 +- .../app/controllers/consumer_controller.rb | 74 +- .../app/controllers/login_controller.rb | 18 +- .../app/controllers/server_controller.rb | 68 +- .../rails_openid/app/helpers/server_helper.rb | 2 +- examples/rails_openid/config.ru | 2 +- examples/rails_openid/config/application.rb | 8 +- examples/rails_openid/config/boot.rb | 6 +- examples/rails_openid/config/environment.rb | 2 +- .../config/environments/development.rb | 2 +- .../config/environments/production.rb | 2 +- .../rails_openid/config/environments/test.rb | 4 +- .../config/initializers/rails_root.rb | 2 +- .../config/initializers/secret_token.rb | 2 +- .../config/initializers/session_store.rb | 2 +- examples/rails_openid/config/routes.rb | 14 +- examples/rails_openid/public/dispatch.fcgi | 4 +- examples/rails_openid/public/dispatch.rb | 6 +- examples/rails_openid/script/rails | 6 +- .../test/functional/login_controller_test.rb | 10 +- .../test/functional/server_controller_test.rb | 10 +- .../test/performance/browsing_test.rb | 6 +- examples/rails_openid/test/test_helper.rb | 6 +- gemfiles/vanilla.gemfile | 4 +- lib/hmac/hmac.rb | 18 +- lib/hmac/sha1.rb | 4 +- lib/hmac/sha2.rb | 4 +- lib/openid.rb | 6 +- lib/openid/consumer.rb | 80 +- lib/openid/consumer/associationmanager.rb | 187 +- lib/openid/consumer/checkid_request.rb | 54 +- lib/openid/consumer/discovery.rb | 111 +- lib/openid/consumer/discovery_manager.rb | 22 +- lib/openid/consumer/html_parse.rb | 43 +- lib/openid/consumer/idres.rb | 162 +- lib/openid/consumer/session.rb | 2 +- lib/openid/cryptutil.rb | 28 +- lib/openid/dh.rb | 12 +- lib/openid/extension.rb | 2 +- lib/openid/extensions/ax.rb | 123 +- lib/openid/extensions/oauth.rb | 28 +- lib/openid/extensions/pape.rb | 64 +- lib/openid/extensions/sreg.rb | 68 +- lib/openid/extensions/ui.rb | 20 +- lib/openid/fetchers.rb | 81 +- lib/openid/kvform.rb | 12 +- lib/openid/kvpost.rb | 17 +- lib/openid/protocolerror.rb | 2 +- lib/openid/store/filesystem.rb | 78 +- lib/openid/store/interface.rb | 2 +- lib/openid/store/memcache.rb | 31 +- lib/openid/store/memory.rb | 9 +- lib/openid/store/nonce.rb | 20 +- lib/openid/trustroot.rb | 388 ++- lib/openid/urinorm.rb | 38 +- lib/openid/version.rb | 2 +- lib/openid/yadis/accept.rb | 54 +- lib/openid/yadis/constants.rb | 12 +- lib/openid/yadis/discovery.rb | 30 +- lib/openid/yadis/filters.rb | 12 +- lib/openid/yadis/htmltokenizer.rb | 64 +- lib/openid/yadis/parsehtml.rb | 31 +- lib/openid/yadis/services.rb | 13 +- lib/openid/yadis/xrds.rb | 63 +- lib/openid/yadis/xri.rb | 36 +- lib/openid/yadis/xrires.rb | 38 +- lib/ruby-openid.rb | 2 +- test/testutil.rb | 25 +- test/util.rb | 11 +- 81 files changed, 1731 insertions(+), 3828 deletions(-) diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock index 290363b7..80fdb515 100644 --- a/.rubocop_gradual.lock +++ b/.rubocop_gradual.lock @@ -1,457 +1,52 @@ { - "Rakefile:2793549681": [ - [2, 9, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2774402722], - [4, 9, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 886525804], - [6, 6, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1056464297], - [7, 20, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039374547], - [8, 13, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91810818], - [9, 13, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039374547], - [10, 27, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1649292142], - [15, 11, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1919486743], - [19, 10, 31, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3457666992] - ], - "admin/mkassoc:1081746274": [ - [3, 9, 36, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2222937256], - [4, 9, 21, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2754036930], - [8, 10, 45, "Performance/RegexpMatch: Use `match?` instead of `=~` when `MatchData` is not used.", 72987428], - [14, 8, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340920], - [17, 8, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340392] - ], "bin/bundle:4028066867": [ [64, 5, 20, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2485198147] ], - "examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb:734915733": [ - [3, 3, 577, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1097702499], - [4, 5, 48, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4130037486], - [4, 18, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2661305942], - [5, 7, 43, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3465894827], - [5, 16, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 764267412], - [6, 7, 39, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2645330640], - [6, 16, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 310091503], - [7, 7, 39, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 792606614], - [7, 16, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3505321043], - [8, 7, 40, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3649651508], - [8, 16, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 983225976], - [9, 7, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 947806906], - [9, 16, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 614585910], - [10, 7, 43, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2553717392], - [10, 16, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2380346415], - [13, 5, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3839491198], - [13, 18, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3456002118], - [14, 7, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 915931249], - [15, 7, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 98432029], - [16, 7, 36, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1173515338], - [20, 3, 89, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 239984272], - [21, 5, 33, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1025769182], - [21, 16, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2661305942], - [22, 5, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2460131022], - [22, 16, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3456002118] - ], - "examples/active_record_openid_store/XXX_upgrade_open_id_store.rb:1355034522": [ - [4, 3, 286, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3578418894], - [5, 5, 29, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 71959601], - [5, 16, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3623016377], - [6, 5, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2460131022], - [6, 16, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3456002118], - [7, 5, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3839491198], - [7, 18, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3456002118], - [8, 7, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 915931249], - [9, 7, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 98432029], - [10, 7, 36, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1173515338], - [14, 3, 311, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1202366324], - [15, 5, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2460131022], - [15, 16, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3456002118], - [16, 5, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3839491198], - [16, 18, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3456002118], - [17, 7, 25, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 978662435], - [17, 16, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1273852972], - [18, 7, 28, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3849319577], - [18, 16, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1144547333], - [21, 5, 44, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2216586593], - [21, 18, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3623016377], - [22, 7, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2826775964], - [22, 16, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3080356019], - [23, 7, 25, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 840034779], - [23, 16, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1594103918] - ], - "examples/active_record_openid_store/init.rb:2555575082": [ - [3, 11, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3893002469], - [7, 9, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3058584636], - [8, 9, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2159066224] - ], - "examples/active_record_openid_store/lib/association.rb:81044197": [ - [1, 9, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4191648330], - [2, 9, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039807664], - [5, 18, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2661305942] - ], - "examples/active_record_openid_store/lib/nonce.rb:2734965079": [ - [2, 18, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3456002118] - ], - "examples/active_record_openid_store/lib/openid_ar_store.rb:671407042": [ - [1, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1155121084], - [2, 9, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1273852972], - [3, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2055340646], - [9, 25, 22, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 398238559], - [10, 25, 20, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 653022716], - [11, 25, 20, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 9026684], - [12, 25, 25, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 344256287], - [13, 25, 24, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1645641596], - [14, 25, 28, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1909070332], - [19, 5, 11, "Layout/IndentationWidth: Use 2 (not 11) spaces for indentation.", 3128322693], - [20, 14, 4, "Layout/ElseAlignment: Align `else` with `assocs`.", 2087423834], - [22, 14, 3, "Layout/EndAlignment: `end` at 22, 13 is not aligned with `assocs = if` at 18, 4.", 193405706], - [25, 14, 12, "Performance/ReverseEach: Use `reverse_each` instead of `reverse.each`.", 157836516], - [27, 9, 34, "Style/InvertibleUnlessCondition: Prefer `if a.expires_in.nonzero?` over `unless a.expires_in.zero?`.", 520282744], - [37, 29, 31, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2437216309], - [50, 23, 32, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3634498586], - [55, 29, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2280192003] - ], - "examples/active_record_openid_store/test/store_test.rb:2342592106": [ - [1, 37, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3040302562], - [2, 9, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4196518618], - [3, 13, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039374547], - [4, 60, 35, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1174533131], - [8, 21, 64, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3671555844], - [25, 29, 6, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 1585570767], - [25, 37, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2158746291], - [25, 45, 17, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3475663134], - [25, 64, 8, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 308967862], - [26, 29, 11, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 389098948], - [26, 29, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 389098948], - [43, 5, 31, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 4157441164], - [47, 18, 32, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4020453642], - [65, 46, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338589], - [68, 32, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338589], - [139, 43, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340532], - [140, 43, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340532], - [141, 43, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340375], - [142, 43, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340470], - [145, 5, 51, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 1311833160], - [145, 30, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 913889614], - [148, 59, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [151, 5, 35, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 3919615708], - [155, 18, 32, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4020453642], - [156, 18, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [178, 5, 59, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 3941805004], - [178, 52, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1980376218], - [180, 5, 59, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 3941806095], - [180, 52, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1980376313], - [182, 5, 62, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 2198473742], - [182, 52, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3391383544], - [186, 5, 53, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 2500046652], - [190, 5, 73, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 2563588008], - [190, 52, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2166337150], - [192, 5, 73, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 4238004139], - [192, 52, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3301162013], - [194, 5, 77, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 3622967051], - [194, 5, 77, "Minitest/RefuteFalse: Prefer using `refute(@store.use_nonce(server_url, ts, salt), 'recent_nonce after cleanup')`.", 3622967051], - [194, 53, 28, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4135549020] - ], - "examples/discover:1665001044": [ - [2, 9, 27, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3427008040], - [3, 9, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2951987467], + "examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb:2140874196": [ + [3, 3, 588, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3366985859], + [20, 3, 91, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1106341699] + ], + "examples/active_record_openid_store/XXX_upgrade_open_id_store.rb:2372122043": [ + [4, 3, 292, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1058644071], + [14, 3, 318, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2173803993] + ], + "examples/active_record_openid_store/lib/openid_ar_store.rb:2988318911": [ + [29, 9, 34, "Style/InvertibleUnlessCondition: Prefer `if a.expires_in.nonzero?` over `unless a.expires_in.zero?`.", 520282744] + ], + "examples/active_record_openid_store/test/store_test.rb:4072391564": [ + [209, 5, 77, "Minitest/RefuteFalse: Prefer using `refute(@store.use_nonce(server_url, ts, salt), \"recent_nonce after cleanup\")`.", 3891537003] + ], + "examples/discover:4237828920": [ [7, 1, 6, "Style/GlobalVars: Do not introduce global variables.", 3073907349], - [7, 11, 31, "Layout/FirstArrayElementLineBreak: Add a line break before the first element of a multi-line array.", 4135741642], - [7, 24, 2, "Layout/ExtraSpacing: Unnecessary spacing detected.", 5858821], - [7, 27, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3769697387], - [8, 11, 31, "Layout/ArrayAlignment: Use one level of indentation for elements following the first line of a multi-line array.", 37053962], - [8, 22, 4, "Layout/ExtraSpacing: Unnecessary spacing detected.", 2085287685], - [8, 27, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3839479045], - [9, 11, 31, "Layout/ArrayAlignment: Use one level of indentation for elements following the first line of a multi-line array.", 3553412330], - [9, 11, 31, "Style/TrailingCommaInArrayLiteral: Put a comma after the last item of a multiline array.", 3553412330], - [9, 27, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 809450178], - [14, 10, 27, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3546160837], - [17, 10, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2425075971], - [22, 7, 6, "Style/GlobalVars: Do not introduce global variables.", 3073907349], - [26, 12, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4213499674], - [27, 7, 79, "Style/For: Prefer `each` over `for`.", 2403441437], - [36, 8, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340920] - ], - "examples/rails_openid/Gemfile:4162108669": [ - [1, 8, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 448921280], - [3, 5, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1437747136], - [3, 14, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3170618502], - [8, 5, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4239006400], - [10, 5, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3028309981], - [15, 7, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1699918049], - [15, 23, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3701814133], - [16, 7, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3093007423], - [16, 20, 2, "Layout/ExtraSpacing: Unnecessary spacing detected.", 5858821], - [16, 23, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3701814071], - [21, 7, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1574639498], - [21, 19, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3581454100], - [24, 5, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3820846349], - [41, 5, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4174453037], - [41, 29, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3058584636] - ], - "examples/rails_openid/Rakefile:4123297806": [ - [5, 26, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 405106042] - ], - "examples/rails_openid/app/controllers/consumer_controller.rb:3199742153": [ - [1, 9, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1702461967], - [3, 9, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3058584636], - [4, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2456996725], - [5, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2457518418], - [6, 9, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3740769632], - [19, 25, 28, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3326623288], - [20, 9, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3610921313], - [20, 29, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1316181179], - [26, 7, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3610921313], - [26, 27, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1316181179], - [36, 29, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 262424560], - [36, 43, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338684], - [43, 29, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 256187543], - [43, 43, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338684], - [45, 27, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 328758303], - [45, 43, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338589], - [46, 17, 44, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3197559562], - [46, 33, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 770858572], - [47, 13, 50, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1386902029], - [47, 29, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1316181179], - [50, 7, 69, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3307021142], - [52, 7, 96, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1782987469], - [52, 78, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside { detected.", 177541], - [52, 79, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085194088], - [52, 87, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3139932341], - [52, 100, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside } detected.", 177541], - [58, 35, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 770858572], - [60, 34, 37, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 368077676], - [65, 7, 18, "Layout/IndentationWidth: Use 2 (not 18) spaces for indentation.", 2915888645], - [65, 72, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [66, 42, 29, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 934954122], - [66, 43, 1, "Layout/LineContinuationLeadingSpace: Move leading spaces to the end of previous line.", 177541], - [67, 23, 4, "Layout/ElseAlignment: Align `else` with `flash[:error]`.", 2087423834], - [69, 23, 3, "Layout/EndAlignment: `end` at 69, 22 is not aligned with `flash[:error] = if` at 64, 6.", 193405706], - [71, 72, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [72, 26, 13, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 432424200], - [72, 26, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 432424200], - [72, 27, 1, "Layout/LineContinuationLeadingSpace: Move leading spaces to the end of previous line.", 177541], - [75, 24, 40, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 678173919], - [77, 27, 26, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 659639648], - [79, 27, 33, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2897122240], - [88, 24, 58, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1430087669], - [89, 28, 69, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4033694170], - [90, 9, 18, "Layout/IndentationWidth: Use 2 (not 18) spaces for indentation.", 2915888645], - [90, 27, 32, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2653597755], - [91, 25, 4, "Layout/ElseAlignment: Align `else` with `pape_message`.", 2087423834], - [92, 27, 38, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2224386926], - [93, 25, 3, "Layout/EndAlignment: `end` at 93, 24 is not aligned with `pape_message << if` at 89, 8.", 193405706], - [99, 23, 41, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3989114503], - [101, 23, 31, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3857750781], - [103, 5, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3610921313], - [103, 25, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1316181179], - [110, 43, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085182115], - [110, 54, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 398560409] - ], - "examples/rails_openid/app/controllers/login_controller.rb:1977093716": [ - [4, 9, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3058584636], - [7, 10, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3488474240], - [10, 25, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1195619942], - [14, 22, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3274948509], - [14, 51, 20, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 304204806], - [14, 63, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3488474240], - [15, 51, 18, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 4244333790], - [15, 59, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4153819994], - [16, 51, 16, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 96327556], - [34, 5, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3610921313], - [34, 25, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1316181179], - [41, 5, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3610921313], - [41, 25, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1316181179] - ], - "examples/rails_openid/app/controllers/server_controller.rb:538341200": [ - [1, 9, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1702461967], - [3, 9, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3058584636], - [4, 9, 27, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3427008040], - [5, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2456996725], - [6, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2457518418], - [7, 9, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3740769632], - [19, 7, 32, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2105828355], - [25, 7, 49, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1385699146], - [25, 20, 36, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 986670823], - [59, 22, 23, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3512843920], - [59, 38, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1316181179], - [74, 44, 44, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3992767694], - [80, 5, 50, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3019960204], - [80, 22, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1429539717], - [80, 47, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3488474240], - [85, 26, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3164581826], - [90, 8, 50, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 1319698872], + [24, 7, 6, "Style/GlobalVars: Do not introduce global variables.", 3073907349], + [29, 7, 79, "Style/For: Prefer `each` over `for`.", 2403441437] + ], + "examples/rails_openid/app/controllers/server_controller.rb:310545084": [ + [90, 8, 50, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 1173516760], [90, 15, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [90, 35, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1990526015], - [96, 36, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3046900628], - [96, 73, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3915219543], - [100, 41, 23, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3512843920], - [100, 57, 7, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1316181179], - [107, 22, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3274948509], - [108, 5, 26, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1508359634], - [115, 7, 16, "Style/TrailingCommaInArrayLiteral: Put a comma after the last item of a multiline array.", 4018542702], - [123, 7, 27, "Style/TrailingCommaInArrayLiteral: Put a comma after the last item of a multiline array.", 2066949602], - [134, 7, 29, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1697201987], [141, 23, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [141, 41, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [146, 17, 48, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 547006035], - [146, 66, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [147, 17, 37, "Layout/MultilineOperationIndentation: Use 2 (not 6) spaces for indenting an expression in an assignment spanning multiple lines.", 1517841545], - [147, 17, 37, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1517841545], - [169, 20, 41, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2721560093], - [169, 36, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1316181179], - [170, 43, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085182115], - [170, 54, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 989269838], - [188, 16, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [202, 40, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 3488474240], - [208, 5, 56, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2852683596], - [208, 39, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1990526015], - [221, 7, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3926355501], - [222, 7, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1875033617], - [222, 21, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 516688894], - [223, 7, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1168115721], - [223, 7, 30, "Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.", 571416037], - [223, 18, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 556082122], - [245, 7, 43, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 427506154], - [248, 7, 44, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2081834702], - [248, 40, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3294717144], - [251, 7, 43, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 427508332] - ], - "examples/rails_openid/app/helpers/server_helper.rb:3313097524": [ - [3, 5, 54, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1229068545], - [3, 25, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3046900628] - ], - "examples/rails_openid/config.ru:3997924571": [ - [3, 9, 2, "Style/RedundantConstantBase: Remove redundant `::`.", 5859653], - [3, 28, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1592781621] - ], - "examples/rails_openid/config/application.rb:1759216590": [ - [1, 26, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3018670611], - [3, 9, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4052701038], - [37, 23, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1764750583], + [146, 66, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550] + ], + "examples/rails_openid/config/application.rb:37951854": [ [50, 15, 9, "Naming/InclusiveLanguage: Consider replacing 'whitelist' with 'allowlist' or 'permit'.", 469122336], [51, 33, 9, "Naming/InclusiveLanguage: Consider replacing 'whitelist' with 'allowlist' or 'permit'.", 469122336], [52, 65, 9, "Naming/InclusiveLanguage: Consider replacing 'whitelist' with 'allowlist' or 'permit'.", 469122336], [52, 78, 9, "Naming/InclusiveLanguage: Consider replacing 'blacklist' with 'denylist' or 'block'.", 3660646720], - [54, 26, 9, "Naming/InclusiveLanguage: Consider replacing 'whitelist' with 'allowlist' or 'permit'.", 469122336], - [60, 29, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94452202] - ], - "examples/rails_openid/config/boot.rb:3494763414": [ - [1, 9, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3893002469], - [4, 5, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 571350823], - [4, 44, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1075108611], - [6, 9, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1248052779], - [6, 44, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 571350823] - ], - "examples/rails_openid/config/environment.rb:1618598201": [ - [2, 26, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2788635423] - ], - "examples/rails_openid/config/environments/development.rb:2208087211": [ - [13, 37, 6, "Layout/ExtraSpacing: Unnecessary spacing detected.", 3135555589] - ], - "examples/rails_openid/config/environments/production.rb:1079409931": [ - [8, 37, 6, "Layout/ExtraSpacing: Unnecessary spacing detected.", 3135555589] - ], - "examples/rails_openid/config/environments/test.rb:2656600651": [ - [12, 33, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2746002346], - [18, 37, 6, "Layout/ExtraSpacing: Unnecessary spacing detected.", 3135555589] - ], - "examples/rails_openid/config/initializers/rails_root.rb:368272739": [ - [1, 1, 2, "Style/RedundantConstantBase: Remove redundant `::`.", 5859653] - ], - "examples/rails_openid/config/initializers/secret_token.rb:809294578": [ - [7, 48, 130, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2913002960] - ], - "examples/rails_openid/config/initializers/session_store.rb:3039477780": [ - [3, 1, 89, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3081952341], - [3, 67, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 997240952] - ], - "examples/rails_openid/config/routes.rb:3491850805": [ - [2, 20, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1195619942], - [3, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3902216850], - [3, 36, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3488474240], - [3, 54, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4153819994], - [4, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1814963255], - [4, 39, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3488474240], - [4, 57, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3081138200], - [5, 9, 21, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3399879109], - [5, 44, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3488474240], - [5, 62, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3071043510], - [9, 9, 26, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3888645235], - [9, 45, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3040069193], - [12, 9, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2872956560], - [69, 9, 39, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 670537414] - ], - "examples/rails_openid/public/dispatch.fcgi:2968153546": [ - [23, 34, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2480398037], - [24, 9, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 365592137] - ], - "examples/rails_openid/public/dispatch.rb:4169000974": [ - [5, 34, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2480398037], - [9, 9, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2429785346], - [11, 23, 12, "Performance/ReverseEach: Use `reverse_each` instead of `reverse.each`.", 157836516] - ], - "examples/rails_openid/script/rails:311767589": [ - [4, 29, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2954865013], - [5, 26, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2838700537], - [6, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3305626523] - ], - "examples/rails_openid/test/functional/login_controller_test.rb:488768860": [ - [1, 34, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1939554730], - [2, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1857158437], + [54, 26, 9, "Naming/InclusiveLanguage: Consider replacing 'whitelist' with 'allowlist' or 'permit'.", 469122336] + ], + "examples/rails_openid/test/functional/login_controller_test.rb:2273895539": [ [8, 8, 3, "Layout/EndAlignment: `end` at 8, 7 is not aligned with `class` at 5, 0.", 193405706], - [13, 13, 3, "Layout/ExtraSpacing: Unnecessary spacing detected.", 193341061], - [14, 14, 2, "Layout/ExtraSpacing: Unnecessary spacing detected.", 5858821], - [19, 5, 11, "Minitest/UselessAssertion: Useless assertion detected.", 3190231601], - [19, 5, 11, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3190231601] - ], - "examples/rails_openid/test/functional/server_controller_test.rb:79069372": [ - [1, 34, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1939554730], - [2, 9, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4042317955], + [19, 5, 12, "Minitest/UselessAssertion: Useless assertion detected.", 2511510896] + ], + "examples/rails_openid/test/functional/server_controller_test.rb:667175155": [ [8, 8, 3, "Layout/EndAlignment: `end` at 8, 7 is not aligned with `class` at 5, 0.", 193405706], - [13, 13, 3, "Layout/ExtraSpacing: Unnecessary spacing detected.", 193341061], - [14, 14, 2, "Layout/ExtraSpacing: Unnecessary spacing detected.", 5858821], - [19, 5, 11, "Minitest/UselessAssertion: Useless assertion detected.", 3190231601], - [19, 5, 11, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3190231601] - ], - "examples/rails_openid/test/performance/browsing_test.rb:844810685": [ - [1, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2037186570], - [2, 9, 29, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1417555152], - [10, 5, 7, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2790896092], - [10, 9, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330] - ], - "examples/rails_openid/test/test_helper.rb:1351592444": [ - [1, 5, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 994064770], - [1, 20, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039374547], - [2, 26, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2282653114], - [3, 9, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2642860055] - ], - "gemfiles/vanilla.gemfile:3655380785": [ - [3, 8, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 448921280], - [9, 15, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94110058] - ], - "lib/hmac/hmac.rb:2461487484": [ - [21, 23, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [22, 23, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [31, 13, 61, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1780366037], + [19, 5, 12, "Minitest/UselessAssertion: Useless assertion detected.", 2511510896] + ], + "lib/hmac/hmac.rb:2320987708": [ [42, 7, 102, "Style/For: Prefer `each` over `for`.", 141019575], - [53, 32, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340858], - [54, 32, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340858], - [55, 30, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [56, 30, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [73, 5, 5, "Style/Alias: Use `alias_method` instead of `alias`.", 169933683], - [84, 5, 5, "Style/Alias: Use `alias_method` instead of `alias`.", 169933683], [89, 5, 130, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2366241697], [97, 5, 136, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 822383092] ], - "lib/hmac/sha1.rb:1265625862": [ - [1, 9, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 698911498], - [2, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1564102729] - ], - "lib/hmac/sha2.rb:3448671720": [ - [1, 9, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 698911498], - [2, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1564102762] - ], - "lib/openid.rb:4222399549": [ - [18, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3690201737], - [19, 9, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3337961901], - [20, 9, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1480177078] - ], "lib/openid/association.rb:3104865684": [ [7, 3, 221, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1899862968], [26, 5, 751, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3266308441], @@ -462,854 +57,173 @@ [190, 5, 263, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 263588636], [219, 7, 99, "Style/For: Prefer `each` over `for`.", 781032692] ], - "lib/openid/consumer.rb:16799660": [ - [1, 9, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1493934251], - [2, 9, 33, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 246787047], - [3, 9, 36, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2222937256], - [4, 9, 27, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2748495602], - [5, 9, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4161438236], - [6, 9, 35, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 54321348], - [7, 9, 27, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3427008040], - [8, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2920398136], - [9, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1906546608], - [10, 9, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3682152042], - [196, 29, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3900563010], - [227, 36, 39, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2024717836], - [227, 36, 110, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2442999481], - [227, 75, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [228, 36, 34, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 297961990], - [228, 72, 3, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 193419246], - [285, 41, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118], - [285, 49, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3644585460], - [287, 23, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3963495571], - [312, 19, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2989869788], - [316, 19, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2989869788], - [320, 28, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2989869788], - [340, 30, 6, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2771281978], - [340, 38, 18, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2906765223], - [341, 30, 26, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1105194116], - [341, 58, 10, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 478984755], - [349, 41, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118], - [349, 49, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3707812743], - [350, 27, 23, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 4021950972], - [351, 27, 30, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 942270268], - [359, 42, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1182861117], - [360, 44, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3782363013], - [361, 46, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1645991854], - [363, 27, 23, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 4021950972], - [364, 27, 5, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 165548477], - [364, 34, 7, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3716925445], - [364, 43, 9, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 798169870], - [370, 47, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2858095960], - [376, 48, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2858095960], - [385, 29, 14, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2862574081], - [385, 45, 7, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1236122734], - [386, 29, 19, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1494598494] - ], - "lib/openid/consumer/associationmanager.rb:64903966": [ - [1, 9, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3847734175], - [2, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655], - [3, 9, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1524986166], - [4, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3933002043], - [5, 9, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 395966781], - [6, 9, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4191648330], - [13, 36, 12, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3182699763], - [13, 50, 20, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2073210945], - [14, 21, 9, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2643630003], - [25, 17, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside { detected.", 177541], - [25, 18, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1302701622], - [25, 77, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside } detected.", 177541], - [27, 16, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 742512847], - [28, 16, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4057239290], - [37, 47, 9, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 983435646], - [37, 58, 18, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2061968077], - [37, 58, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2061968077], - [38, 47, 10, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 431100592], - [39, 53, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1001558037], - [42, 24, 19, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2128550779], - [43, 24, 16, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 4000433325], - [43, 42, 11, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 354680469], - [50, 23, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4235576623], - [50, 23, 9, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 4235576623], - [52, 30, 13, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 4104210786], - [52, 31, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 389098948], - [59, 23, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4043085327], - [59, 23, 11, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 4043085327], - [61, 30, 15, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 2724636354], - [61, 31, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2821943524], - [70, 23, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 809518918], - [70, 23, 15, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 809518918], - [71, 30, 25, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 3501034513], - [78, 49, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1359404130], - [86, 7, 415, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2528873537], - [88, 14, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 809518918], - [90, 14, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4235576623], - [92, 14, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4043085327], - [95, 32, 36, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2992907656], - [95, 68, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [96, 32, 25, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1756177313], - [101, 22, 16, "Layout/ParameterAlignment: Use one level of indentation for parameters following the first line of a multi-line method definition.", 3355952069], - [109, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [132, 35, 3, "Lint/UselessAssignment: Useless assignment to variable - `why`.", 193429443], - [134, 24, 50, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 2396748906], - [141, 20, 60, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1969914410], - [141, 20, 60, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1969914410], - [151, 39, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3832253317], - [151, 58, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [152, 12, 31, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 3512279041], - [153, 20, 51, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 377204125], - [153, 71, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [154, 20, 44, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 485722392], - [155, 11, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [161, 64, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [162, 18, 28, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 755607094], - [165, 62, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2380346415], - [166, 64, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 434188188], - [168, 28, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [169, 71, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [170, 20, 52, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1218829677], - [170, 20, 52, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1218829677], - [173, 20, 52, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3871633811], - [173, 72, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [174, 20, 56, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 3197511017], - [195, 20, 46, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4104438515], - [195, 66, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [196, 20, 22, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 3162646123], - [199, 78, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [200, 20, 6, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 3211374341], - [211, 11, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118], - [211, 21, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3996287345], - [212, 11, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2380346415], - [212, 11, 26, "Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.", 1919477926], - [215, 14, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085193496], - [220, 12, 51, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 3368354881], - [220, 48, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 809518918], - [221, 16, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 434188188], - [240, 58, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 434188188], - [248, 28, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 809518918], - [249, 66, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [250, 20, 16, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1129564704], - [250, 20, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1129564704], - [256, 31, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [257, 26, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 809518918], - [263, 7, 3, "Lint/IneffectiveAccessModifier: `protected` (on line 146) does not make singleton methods protected. Use `protected` inside a `class << self` block instead.", 193404514], - [263, 7, 312, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4293339091], - [265, 53, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1853815741], - [266, 83, 27, "Performance/RegexpMatch: Use `match?` instead of `=~` when `MatchData` is not used.", 1775799068], - [277, 45, 9, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 983435646], - [277, 56, 12, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2380346415], - [277, 56, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2380346415], - [278, 45, 10, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 431100592], - [279, 47, 9, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 983435646], - [279, 58, 14, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1473517757], - [279, 58, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1473517757], - [280, 47, 10, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 431100592], - [285, 9, 17, "Layout/IndentationWidth: Use 2 (not 17) spaces for indentation.", 2300919173], - [286, 24, 4, "Layout/ElseAlignment: Align `else` with `session_type`.", 2087423834], - [287, 49, 10, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2385542796], - [287, 61, 14, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 434188188], - [287, 61, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 434188188], - [288, 49, 10, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 431100592], - [289, 24, 3, "Layout/EndAlignment: `end` at 289, 23 is not aligned with `session_type = if` at 284, 8.", 193405706], - [293, 40, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [293, 60, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 809518918], - [304, 34, 34, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1437281911], - [304, 68, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [305, 34, 43, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 2689799403], - [305, 77, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [312, 32, 37, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2399794975], - [312, 69, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [313, 32, 38, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 368502171], - [313, 70, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [323, 32, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2737759946], - [323, 57, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [324, 32, 38, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 368502171], - [324, 70, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [328, 37, 10, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 4014237853], - [328, 49, 12, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 4223563293], - [328, 63, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2158746291], - [329, 37, 10, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 874512463] - ], - "lib/openid/consumer/checkid_request.rb:1462436096": [ - [1, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2920398136], - [2, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655], - [39, 32, 36, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1583341909], - [39, 68, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [40, 33, 27, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 2885968457], - [40, 33, 27, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2885968457], - [79, 70, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [80, 33, 21, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 270427808], - [82, 72, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [83, 33, 10, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 2811205159], - [83, 33, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2811205159], - [85, 78, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [86, 33, 32, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 2634935182], - [86, 33, 32, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2634935182], - [91, 28, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3232603392], - [91, 50, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3155239158], - [92, 36, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118], - [94, 42, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 137463464], - [94, 57, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1442212370], - [97, 36, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 322569067], - [112, 38, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1948187571], - [114, 39, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 794246204], - [118, 38, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1473517757], - [121, 27, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 436922608], - [124, 73, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [125, 18, 18, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 2861807504], - [149, 23, 20, "Layout/ParameterAlignment: Use one level of indentation for parameters following the first line of a multi-line method definition.", 86594967], - [158, 23, 20, "Layout/ParameterAlignment: Use one level of indentation for parameters following the first line of a multi-line method definition.", 86594967], - [159, 43, 5, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 194523634], - [160, 43, 9, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1228896939], - [161, 43, 9, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 4004308532], - [162, 43, 14, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2584027489] - ], - "lib/openid/consumer/discovery.rb:185566619": [ - [3, 9, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92337995], - [4, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655], - [5, 9, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2951987467], - [6, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2013616931], - [7, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2920398136], - [8, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1906546608], - [9, 9, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 53893767], - [10, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2995095577], - [11, 9, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 380634196], - [12, 9, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 916562793], - [13, 9, 28, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 812078005], - [14, 9, 21, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2871107037], - [17, 19, 29, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2133742372], - [18, 25, 41, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1731169625], - [19, 21, 41, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1249287630], - [20, 21, 30, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 494420947], - [21, 21, 30, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 494421042], - [35, 7, 15, "Style/TrailingCommaInArrayLiteral: Put a comma after the last item of a multiline array.", 3931244506], + "lib/openid/consumer/associationmanager.rb:3564454072": [ + [58, 23, 9, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 3603878063], + [60, 30, 13, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 2132475618], + [67, 23, 11, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 3318046031], + [69, 30, 15, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 2986356738], + [78, 23, 15, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 1745937094], + [79, 30, 25, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 3501034513], + [94, 7, 397, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3776746945], + [140, 35, 3, "Lint/UselessAssignment: Useless assignment to variable - `why`.", 193429443], + [159, 58, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], + [176, 28, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], + [271, 7, 3, "Lint/IneffectiveAccessModifier: `protected` (on line 154) does not make singleton methods protected. Use `protected` inside a `class << self` block instead.", 193404514], + [271, 7, 317, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 396086752], + [310, 40, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] + ], + "lib/openid/consumer/discovery.rb:2910483503": [ [82, 50, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [83, 10, 35, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 324742179], - [120, 51, 15, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2736082105], - [121, 51, 10, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2272531167], - [128, 25, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [136, 32, 61, "Performance/FlatMap: Use `flat_map` instead of `map...flatten`.", 760117748], - [143, 5, 223, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2614195864], - [153, 5, 738, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1527998342], - [163, 27, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [163, 50, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [169, 11, 24, "Style/TrailingCommaInArguments: Put a comma after the last parameter of a multiline method call.", 4138595764], - [178, 5, 863, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4018794406], - [185, 27, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1333860129], - [185, 47, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1421172607], - [186, 9, 53, "Style/TrailingCommaInArrayLiteral: Put a comma after the last item of a multiline array.", 984139143], - [186, 27, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 952285399], - [186, 44, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 333762157], - [208, 5, 265, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 373672457], - [217, 5, 532, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3316063732], - [226, 7, 9, "Layout/IndentationWidth: Use 2 (not 9) spaces for indentation.", 3994155397], - [226, 23, 11, "Performance/StringIdentifierArgument: Use `:from_xrds` instead of `'from_xrds'`.", 237794897], - [226, 23, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 237794897], - [227, 14, 4, "Layout/ElseAlignment: Align `else` with `meth`.", 2087423834], - [228, 23, 11, "Performance/StringIdentifierArgument: Use `:from_html` instead of `'from_html'`.", 220325553], - [228, 23, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 220325553], - [229, 14, 3, "Layout/EndAlignment: `end` at 229, 13 is not aligned with `meth = if` at 225, 6.", 193405706], - [231, 17, 31, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 26138215], - [232, 17, 30, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3449287990], - [235, 5, 381, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2059921948], - [248, 14, 34, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2805694759], - [248, 14, 102, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3627285386], - [248, 49, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [249, 22, 44, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1127491977], - [250, 14, 10, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 874138713], - [250, 26, 11, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 4189021428], - [250, 39, 11, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2485497820], - [251, 14, 9, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2474818138], - [251, 25, 13, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1951871869], - [251, 40, 11, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1487200955], - [255, 3, 1822, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3218903155], - [272, 43, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [273, 8, 34, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 3174666560], - [275, 37, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3058584636], - [276, 24, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 769811929], - [281, 37, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92236619], - [282, 24, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1017562001], - [293, 20, 51, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1363767349], - [303, 3, 152, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 837487512], - [310, 3, 361, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 376189395], - [323, 3, 573, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 900947344], - [338, 3, 713, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3445101566], - [361, 3, 652, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2608187650], - [372, 39, 15, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 669407501], - [373, 39, 39, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2382182910], - [382, 3, 1462, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4102428152], - [428, 3, 982, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1160687725], - [435, 41, 33, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3337159803], - [443, 16, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2550112513], - [443, 43, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085273599], - [458, 3, 474, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3768303582], - [460, 26, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94247383], - [460, 32, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [460, 54, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94247569], - [462, 69, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [463, 9, 38, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1801377088], - [463, 49, 9, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3952783510], - [474, 3, 677, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2399137430], - [476, 11, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2243046439], - [476, 40, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94548671], - [484, 28, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [496, 3, 170, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 343927248] - ], - "lib/openid/consumer/discovery_manager.rb:3719214426": [ - [36, 11, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 804762737], - [37, 11, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1492599511], - [38, 11, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2202791179], - [39, 11, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3648352012], - [39, 11, 24, "Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.", 1439570498], - [47, 7, 416, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 775251457], - [50, 26, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2202791179], - [51, 74, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3648352012], - [53, 25, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 804762737], - [53, 48, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1492599511], - [54, 35, 10, "Performance/StringIdentifierArgument: Use `:@current` instead of `'@current'`.", 1568415500], - [54, 35, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1568415500], - [66, 53, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3024670477], - [114, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [128, 9, 40, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2620721662] - ], - "lib/openid/consumer/html_parse.rb:3832194346": [ - [1, 9, 28, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 634180536], - [22, 3, 114, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1956273507], - [23, 12, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3325330116], - [23, 21, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339971], - [23, 31, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3094424448], - [23, 39, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340825], - [23, 49, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3094036075], - [23, 57, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340763], - [23, 67, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2959556167], - [26, 3, 118, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3427068683], - [28, 10, 1, "Layout/ExtraSpacing: Unnecessary spacing detected.", 177541], - [34, 3, 1703, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1576226162], - [36, 40, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [39, 32, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 326052951], - [39, 41, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1308083146], - [39, 96, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [40, 23, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [45, 32, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 326052951], - [45, 41, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3877449556], - [45, 95, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [46, 23, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], + [130, 25, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [145, 5, 223, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2614195864], + [155, 5, 739, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1527998342], + [165, 27, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [165, 50, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [180, 5, 864, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4018794406], + [210, 5, 265, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 373672457], + [219, 5, 511, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3316063732], + [239, 5, 381, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2059921948], + [253, 44, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [265, 3, 1823, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3218903155], + [282, 43, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], + [313, 3, 152, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 837487512], + [320, 3, 361, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 376189395], + [333, 3, 573, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 900947344], + [348, 3, 713, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3445101566], + [371, 3, 633, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2608187650], + [394, 3, 1462, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4102428152], + [440, 3, 982, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3475188269], + [470, 3, 486, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 85870846], + [472, 32, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [487, 3, 677, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 631869078], + [497, 28, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [509, 3, 170, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 343927248] + ], + "lib/openid/consumer/discovery_manager.rb:1465637735": [ + [47, 7, 415, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2381252915] + ], + "lib/openid/consumer/html_parse.rb:2168762247": [ + [22, 3, 114, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1658766339], + [26, 3, 117, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1535590347], + [34, 3, 1737, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1968005682], [59, 16, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560], - [59, 32, 6, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3025445581], - [59, 32, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3025445581], - [59, 40, 7, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3896501570], - [59, 40, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3896501570], - [59, 49, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3029763365], - [59, 49, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3029763365], - [59, 57, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3018684341], - [59, 57, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3018684341], - [59, 65, 7, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3903542778], - [59, 65, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3903542778], - [60, 32, 6, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3026048248], - [60, 32, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3026048248], - [60, 40, 7, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3897327799], - [60, 40, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3897327799], - [63, 26, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3896501570], - [63, 35, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3018684341], - [63, 43, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3903542778], - [63, 52, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3897327799], - [66, 42, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3026048248], - [69, 27, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3025445581], - [79, 40, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3026048248], - [81, 64, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3029763365], - [84, 5, 16, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 2127134117], - [89, 3, 254, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1800542362], - [101, 3, 212, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2707051651], - [105, 27, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92035358], - [109, 3, 361, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2025146561], - [124, 3, 348, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2788268418], - [130, 5, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [130, 28, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [133, 11, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3025988988] - ], - "lib/openid/consumer/idres.rb:4244772821": [ - [1, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2920398136], - [2, 9, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 395966781], - [3, 9, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1524986166], - [4, 9, 27, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3427008040], - [5, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2013616931], - [18, 37, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1377421297], - [18, 37, 10, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 1377421297], - [19, 42, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 414939563], - [19, 42, 20, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 414939563], - [25, 7, 41, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 3551885003], - [38, 7, 46, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 1060533723], - [63, 31, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2149044978], - [81, 9, 43, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 3459188814], - [94, 35, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3666757975], - [95, 32, 30, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1363294098], - [97, 48, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340297], - [113, 44, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 245860230], - [115, 26, 54, "Layout/MultilineOperationIndentation: Use 2 (not 15) spaces for indenting an expression in an assignment spanning multiple lines.", 2166414118], - [117, 44, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1948187571], - [120, 55, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [121, 31, 39, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 3993100286], - [138, 59, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 322569067], - [140, 33, 30, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 419474237], - [162, 64, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [163, 35, 36, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 3035481342], - [163, 71, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [169, 18, 40, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1926304207], - [175, 34, 43, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2149656968], - [175, 77, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [176, 35, 34, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1682708439], - [178, 11, 30, "Style/InvertibleUnlessCondition: Prefer `if rt_val == bare_val` over `unless rt_val != bare_val`.", 780811326], - [180, 64, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [181, 33, 37, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 4268890387], - [181, 70, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [201, 9, 10, "Layout/IndentationWidth: Use 2 (not 10) spaces for indentation.", 2958109189], - [202, 17, 4, "Layout/ElseAlignment: Align `else` with `assoc`.", 2087423834], - [203, 60, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1473517757], - [204, 17, 3, "Layout/EndAlignment: `end` at 204, 16 is not aligned with `assoc = if` at 200, 8.", 193405706], - [225, 76, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [226, 32, 23, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 24014699], - [235, 51, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3666757975], - [235, 79, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340297], - [243, 39, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118], - [243, 47, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 45746588], - [251, 48, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1807068342], - [251, 60, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 967974776], - [253, 57, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 329410673], - [263, 9, 32, "Style/InvertibleUnlessCondition: Prefer `if is_valid == 'true'` over `unless is_valid != 'true'`.", 3463344452], - [263, 35, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039078867], - [265, 71, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [266, 31, 42, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 2195962727], - [277, 24, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [279, 48, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1679224880], - [282, 32, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1865380876], - [285, 30, 29, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2228831613], - [293, 9, 72, "Style/InvertibleUnlessCondition: Prefer `if @store.nil? || @store.use_nonce(server_url, time, extra)` over `unless !@store.nil? && !@store.use_nonce(server_url, time, extra)`.", 2752413603], - [295, 30, 38, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3407293298], - [295, 68, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [296, 30, 18, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 3964513585], - [315, 37, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 794246204], - [316, 35, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1948187571], - [317, 37, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 245860230], - [320, 32, 37, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3638734137], - [320, 69, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [321, 33, 19, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 789517483], - [321, 33, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 789517483], - [323, 32, 39, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 489820086], - [323, 71, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [324, 33, 17, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 2749623588], - [324, 33, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2749623588], - [336, 20, 40, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2391770610], - [342, 22, 43, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 689390617], - [342, 65, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [343, 22, 27, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 30803478], - [344, 22, 41, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3576329453], - [349, 9, 57, "Style/InvertibleUnlessCondition: Prefer `if @endpoint.claimed_id == to_match.claimed_id` over `unless @endpoint.claimed_id != to_match.claimed_id`.", 3332715157], - [361, 34, 43, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3429882387], - [361, 77, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [362, 35, 44, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1043719975], - [362, 35, 44, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1043719975], - [362, 79, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [363, 35, 41, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3598230640], - [363, 76, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [364, 35, 44, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1793389965], - [364, 79, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [365, 35, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3341948396], - [373, 35, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1948187571], - [388, 22, 56, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3261276623], - [390, 22, 41, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3576329453], - [412, 32, 33, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2299532018], - [412, 65, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [413, 33, 15, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1055658553], - [422, 9, 466, "Style/For: Prefer `each` over `for`.", 255677739], - [423, 11, 419, "Style/For: Prefer `each` over `for`.", 730259390], - [439, 20, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2821006290], - [443, 30, 35, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1804032806], - [443, 65, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [444, 31, 27, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 2976111178], - [450, 9, 143, "Style/For: Prefer `each` over `for`.", 3303244153], - [470, 34, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1865380876], - [474, 32, 39, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1493035381], - [474, 71, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [475, 33, 23, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1012300656], - [475, 33, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1012300656], - [475, 56, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [476, 64, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [481, 32, 30, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3738802926], - [481, 62, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [482, 33, 32, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 2867922559], - [482, 65, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [494, 19, 50, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1497511346], - [494, 19, 239, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1407987139], - [494, 69, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [495, 19, 53, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 16589726], - [495, 72, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [496, 73, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [500, 32, 32, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 23577805], - [500, 64, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [501, 33, 30, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1371391256], - [501, 63, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657] + [91, 5, 16, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 2127134117], + [96, 3, 254, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1800542362], + [108, 3, 212, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2707051651], + [116, 3, 361, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2025146561], + [131, 3, 344, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2788268418], + [137, 24, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240] + ], + "lib/openid/consumer/idres.rb:3400213326": [ + [18, 37, 10, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 1542326609], + [19, 42, 20, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 422307083], + [25, 7, 43, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 2792138045], + [33, 7, 48, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 1095443565], + [71, 9, 43, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 3459188814], + [168, 11, 30, "Style/InvertibleUnlessCondition: Prefer `if rt_val == bare_val` over `unless rt_val != bare_val`.", 780811326], + [269, 9, 32, "Style/InvertibleUnlessCondition: Prefer `if is_valid == \"true\"` over `unless is_valid != \"true\"`.", 3049525668], + [299, 9, 72, "Style/InvertibleUnlessCondition: Prefer `if @store.nil? || @store.use_nonce(server_url, time, extra)` over `unless !@store.nil? && !@store.use_nonce(server_url, time, extra)`.", 2752413603], + [355, 9, 57, "Style/InvertibleUnlessCondition: Prefer `if @endpoint.claimed_id == to_match.claimed_id` over `unless @endpoint.claimed_id != to_match.claimed_id`.", 3332715157], + [428, 9, 466, "Style/For: Prefer `each` over `for`.", 255677739], + [429, 11, 419, "Style/For: Prefer `each` over `for`.", 730259390], + [456, 9, 143, "Style/For: Prefer `each` over `for`.", 3303244153] ], "lib/openid/consumer/responses.rb:553064480": [ [31, 9, 38, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 710955324], [48, 9, 46, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 4279840451] ], - "lib/openid/consumer/session.rb:1120055937": [ - [29, 21, 50, "Performance/FlatMap: Use `flat_map` instead of `map...flatten`.", 2891182408] - ], - "lib/openid/cryptutil.rb:3218515747": [ - [1, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655], - [2, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1564102729], - [3, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1564102762], - [5, 11, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2148273213], - [9, 13, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 493142244], - [10, 13, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 493142087], - [13, 13, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 718606630], - [14, 13, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 718606597], + "lib/openid/cryptutil.rb:4280304387": [ [29, 5, 68, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 33433268], [34, 5, 59, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2498740062], [38, 5, 171, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 216141853], - [41, 48, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3001831342], [44, 5, 63, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1057833566], [48, 5, 177, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3411150301], - [51, 48, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 524201038], - [57, 5, 214, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1117887805], - [58, 11, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], + [57, 5, 214, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 125842397], [70, 5, 154, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2301666000], - [73, 15, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340437], - [74, 19, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085145293], [78, 5, 217, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 897599771], - [82, 16, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085157825], [90, 5, 80, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 936504201], [95, 5, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1329530532], [99, 5, 186, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3562629295] ], - "lib/openid/dh.rb:162355747": [ - [1, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655], - [2, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3933002043], + "lib/openid/dh.rb:2182923746": [ [20, 5, 84, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 464948698], [52, 5, 3, "Lint/IneffectiveAccessModifier: `private` (on line 45) does not make singleton methods private. Use `private_class_method` or `private` inside a `class << self` block instead.", 193404514], - [52, 5, 453, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2364973817], + [52, 5, 435, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4063524761], [54, 62, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [55, 30, 43, "Layout/MultilineOperationIndentation: Use 2 (not 21) spaces for indenting an expression spanning multiple lines.", 3655353865], - [58, 10, 29, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2153121443], - [59, 70, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085144268], - [63, 19, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], [70, 5, 3, "Lint/IneffectiveAccessModifier: `private` (on line 45) does not make singleton methods private. Use `private_class_method` or `private` inside a `class << self` block instead.", 193404514], [70, 5, 249, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1671549284] ], - "lib/openid/extension.rb:2931551022": [ - [1, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2920398136] - ], - "lib/openid/extensions/ax.rb:460223884": [ - [3, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2850088810], - [4, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3577044961], - [5, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2920398136], - [9, 24, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 72681354], - [13, 5, 179, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1058960602], - [14, 21, 20, "Performance/RedundantMatch: Use `=~` in places where the `MatchData` returned by `#match` will not be used.", 3795418109], - [14, 21, 20, "Performance/RegexpMatch: Use `match?` instead of `match` when `MatchData` is not used.", 3795418109], - [16, 63, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [17, 21, 18, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 270710046], - [17, 21, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 270710046], - [28, 16, 30, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1826014241], - [31, 50, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085186044], - [37, 21, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085186044], - [47, 41, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118], + "lib/openid/extensions/ax.rb:2542129588": [ + [13, 5, 169, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 642402764], [48, 9, 34, "Style/InvertibleUnlessCondition: Prefer `if actual_mode == @mode` over `unless actual_mode != @mode`.", 3596772208], - [54, 10, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside { detected.", 177541], - [54, 11, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118], - [54, 26, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside } detected.", 177541], - [104, 5, 342, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4093177575], - [107, 26, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340297], - [122, 14, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 10234167], - [152, 11, 9, "Layout/IndentationWidth: Use 2 (not 9) spaces for indentation.", 3994155397], - [153, 18, 4, "Layout/ElseAlignment: Align `else` with `name`.", 2087423834], - [155, 18, 3, "Layout/EndAlignment: `end` at 155, 17 is not aligned with `name = if` at 151, 10.", 193405706], - [165, 17, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2815981804], - [165, 45, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340297], - [166, 17, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4289251244], - [166, 53, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340297], - [185, 7, 808, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3671465444], - [188, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [188, 37, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [188, 48, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118], - [194, 35, 9, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 983435646], - [194, 46, 7, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1442212370], - [194, 46, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1442212370], - [195, 35, 39, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3310022405], - [195, 62, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 322569067], - [196, 25, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [214, 21, 1, "Layout/ExtraSpacing: Unnecessary spacing detected.", 177541], - [215, 31, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1511391955], - [221, 23, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 269067912], - [235, 53, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2815981804], - [239, 57, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4289251244], - [243, 18, 30, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3010610473], - [245, 19, 97, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1846473514], - [248, 31, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4053342112], - [273, 9, 7, "Style/SuperArguments: Call `super` without arguments and parentheses when the signature is identical.", 1918335173], - [301, 19, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1511391955], - [303, 21, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 269067912], - [327, 21, 1, "Layout/ExtraSpacing: Unnecessary spacing detected.", 177541], - [328, 31, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1511391955], - [338, 29, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 269067912], - [341, 29, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1065821536], - [343, 44, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1065821536], - [402, 17, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2879878949], - [421, 20, 24, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 987258332], - [437, 52, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [451, 19, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1511391955], - [452, 19, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 269067912], - [452, 38, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340437], - [454, 23, 30, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 1808039685], - [455, 17, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4053342112], - [462, 31, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4053342112], - [467, 7, 413, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3474868742], - [470, 9, 12, "Layout/IndentationWidth: Use 2 (not 12) spaces for indentation.", 155433733], - [471, 19, 4, "Layout/ElseAlignment: Align `else` with `ax_args`.", 2087423834], - [473, 19, 3, "Layout/EndAlignment: `end` at 473, 18 is not aligned with `ax_args = if` at 469, 8.", 193405706], - [486, 14, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2289977748], - [496, 7, 259, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4000433818], - [499, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [499, 38, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [499, 49, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118], - [517, 22, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 128040026], - [518, 22, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2231038713], - [523, 22, 46, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1925511496], - [523, 82, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [526, 9, 10, "Layout/IndentationWidth: Use 2 (not 10) spaces for indentation.", 2958109189], - [527, 17, 4, "Layout/ElseAlignment: Align `else` with `@mode`.", 2087423834], - [529, 17, 3, "Layout/EndAlignment: `end` at 529, 16 is not aligned with `@mode = if` at 525, 8.", 193405706], - [533, 7, 185, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2202480771], - [535, 22, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1182861117], - [535, 52, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1182861117], - [544, 17, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1182861117], - [544, 58, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] - ], - "lib/openid/extensions/oauth.rb:4188595383": [ - [5, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2850088810], - [9, 14, 46, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3007888442], - [16, 21, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1246672322], - [24, 17, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 279448603], - [25, 17, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1401044911], - [32, 7, 216, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2413522248], - [35, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [44, 26, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 279448603], - [45, 23, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1401044911], - [55, 21, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1246672322], - [62, 7, 235, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2080666142], - [64, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [76, 31, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1044601616], - [77, 23, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1401044911], - [82, 17, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1044601616], - [83, 17, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1401044911] - ], - "lib/openid/extensions/pape.rb:941715807": [ - [5, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2850088810], - [9, 14, 45, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2108437785], - [11, 7, 71, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3681686524], - [13, 7, 62, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3959903684], - [15, 7, 68, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1412882747], - [23, 21, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034771041], - [33, 19, 43, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2940713374], - [40, 11, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3932791566], - [40, 11, 63, "Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.", 1264816171], - [40, 70, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339909], - [42, 17, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1656633178], - [49, 7, 213, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2414389803], - [52, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [62, 29, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3932791566], - [63, 9, 121, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 1662354873], - [64, 30, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339909], - [69, 33, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1656633178], + [104, 5, 342, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4174404327], + [185, 7, 819, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3760098988], + [188, 33, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], + [199, 25, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], + [440, 52, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [457, 23, 30, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 1808039685], + [470, 7, 373, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1666094598], + [499, 7, 255, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3997324945], + [502, 34, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], + [526, 82, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [536, 7, 185, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2393057382], + [547, 58, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] + ], + "lib/openid/extensions/oauth.rb:2413341623": [ + [32, 7, 212, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1662714184], + [62, 7, 231, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3920296437] + ], + "lib/openid/extensions/pape.rb:41826098": [ + [49, 7, 209, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1353872427], + [63, 9, 121, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 1451264569], [70, 26, 41, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 986556649], - [77, 49, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3924764720], - [87, 21, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034771041], - [101, 7, 232, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2080666142], - [103, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [115, 29, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1680956532], - [116, 45, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339909], + [101, 7, 228, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3920296437], [116, 66, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [116, 86, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3032063535], - [118, 31, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3918600891], - [121, 38, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340437], [128, 25, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], [128, 45, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [135, 30, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2476990567], - [139, 12, 31, "Performance/RegexpMatch: Use `match?` instead of `=~` when `MatchData` is not used.", 2973786234], - [142, 32, 37, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2467135494], - [148, 17, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1680956532], - [149, 9, 29, "Layout/IndentationWidth: Use 2 (not 29) spaces for indentation.", 4209615749], - [149, 38, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3032063535], - [150, 36, 4, "Layout/ElseAlignment: Align `else` with `ns_args['auth_policies']`.", 2087423834], - [151, 58, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339909], - [152, 36, 3, "Layout/EndAlignment: `end` at 152, 35 is not aligned with `ns_args['auth_policies'] = if` at 148, 8.", 193405706], - [154, 18, 31, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4257387903], - [154, 25, 7, "Performance/RangeInclude: Use `Range#cover?` instead of `Range#member?`.", 1205904490], - [158, 19, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3918600891], - [162, 32, 37, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2467135494], - [162, 77, 28, "Performance/RegexpMatch: Use `match?` instead of `=~` when `MatchData` is not used.", 3955942864], - [164, 19, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2476990567] - ], - "lib/openid/extensions/sreg.rb:334344688": [ - [1, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2850088810], - [2, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655], - [3, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2920398136], - [8, 7, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1875033617], - [8, 21, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2196907409], - [9, 7, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3926355501], - [9, 21, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3069562381], - [10, 7, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91538572], - [10, 16, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 98399837], - [11, 7, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1168115721], - [11, 18, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2073838738], - [12, 7, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 595520346], - [12, 19, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 345049786], - [13, 7, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 152993488], - [13, 21, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3524310685], - [14, 7, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 289239021], - [14, 20, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2345971085], - [15, 7, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 746505975], - [15, 21, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4194158807], - [16, 7, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3905143278], - [16, 7, 25, "Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.", 1107266950], - [16, 21, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4031222958], - [19, 18, 28, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3482333731], - [20, 18, 39, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3121512103], - [24, 52, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3035579718], - [31, 17, 29, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3162063551], - [52, 42, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3035579718], - [83, 21, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3035579718], - [98, 7, 415, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2730285120], - [104, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [125, 31, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2815981804], + [154, 25, 7, "Performance/RangeInclude: Use `Range#cover?` instead of `Range#member?`.", 1205904490] + ], + "lib/openid/extensions/sreg.rb:514822493": [ + [98, 7, 411, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2730285120], [126, 36, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [127, 32, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340297], - [134, 31, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1456237387], [135, 36, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [136, 32, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340297], - [142, 28, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 771425937], - [169, 32, 39, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 776268046], - [169, 75, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 802847699], - [171, 21, 28, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4109061975], - [173, 14, 28, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2902827824], - [176, 13, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 141845254], [189, 67, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [190, 36, 28, "Layout/MultilineOperationIndentation: Use 2 (not 27) spaces for indenting a condition in an `unless` statement spanning multiple lines.", 1454824539], - [201, 14, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2815981804], - [201, 43, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340297], - [202, 14, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1456237387], - [202, 43, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340297], - [203, 14, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 771425937], - [220, 21, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3035579718], [227, 7, 201, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2920278435], - [237, 7, 446, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 850652346], - [241, 11, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172] - ], - "lib/openid/extensions/ui.rb:2959852943": [ - [4, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2850088810], - [8, 14, 43, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2152454945], - [14, 21, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085207193], - [23, 17, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3030033825], - [24, 17, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3033241998], - [25, 17, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118], - [32, 7, 207, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3227081811], - [35, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [43, 22, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3030033825], - [44, 22, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3033241998], - [45, 22, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3037566118] - ], - "lib/openid/fetchers.rb:665209309": [ - [1, 9, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 679062125], - [2, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655], - [3, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3690201737], - [6, 11, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 934211966], - [8, 20, 51, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 330809641], + [237, 7, 442, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 850652346] + ], + "lib/openid/extensions/ui.rb:317587684": [ + [32, 7, 203, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1254387091] + ], + "lib/openid/fetchers.rb:2417716268": [ [8, 72, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [9, 20, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2594958896], - [10, 11, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 679062125], - [21, 28, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 407869191], - [26, 62, 6, "Style/RedundantRegexpArgument: Use string `\"\\\\*\"` as argument instead of regexp `/\\\\\\*/`.", 3305913427], - [26, 70, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 557456888], - [27, 28, 25, "Performance/RegexpMatch: Use `match?` instead of `=~` when `MatchData` is not used.", 4160157766], - [36, 21, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085147624], - [37, 45, 6, "Style/RedundantRegexpArgument: Use string `\"\\\\*\"` as argument instead of regexp `/\\\\\\*/`.", 3305913427], - [37, 53, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 557456888], - [38, 28, 25, "Performance/RegexpMatch: Use `match?` instead of `=~` when `MatchData` is not used.", 4160157766], - [42, 37, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1006256633], [53, 5, 157, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 586528253], [60, 5, 78, "Style/MissingRespondToMissing: When using `method_missing`, define `respond_to_missing?`.", 944250440], - [65, 40, 7, "Performance/StringIdentifierArgument: Use `:@body` instead of `'@body'`.", 3857852341], - [65, 40, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3857852341], - [71, 40, 7, "Performance/StringIdentifierArgument: Use `:@read` instead of `'@read'`.", 3876333271], - [71, 40, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3876333271], - [86, 3, 173, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3393125662], - [87, 18, 48, "Layout/ParameterAlignment: Use one level of indentation for parameters following the first line of a multi-line method definition.", 997846376], + [86, 3, 160, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 407779678], [91, 3, 88, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 834352859], [92, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], [92, 39, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], [94, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], [97, 3, 55, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 702922609], [98, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], - [103, 3, 288, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4125263876], - [104, 24, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1318580622], + [103, 3, 284, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2543934372], [108, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], - [108, 36, 14, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2160310550], - [108, 52, 14, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2159466735], - [109, 36, 14, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2159303911], - [109, 52, 18, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3094046633], - [116, 19, 29, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2592099727], - [122, 20, 16, "Layout/ParameterAlignment: Use one level of indentation for parameters following the first line of a multi-line method definition.", 3363870545], - [141, 7, 21, "Layout/IndentationWidth: Use 2 (not 21) spaces for indentation.", 3973078917], - [142, 26, 4, "Layout/ElseAlignment: Align `else` with `conn.verify_mode`.", 2087423834], - [144, 26, 3, "Layout/EndAlignment: `end` at 144, 25 is not aligned with `conn.verify_mode = if` at 140, 6.", 193405706], - [151, 22, 50, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 892760043], - [151, 22, 50, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 892760043], - [152, 22, 10, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3315070089], - [155, 24, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1074813806], - [164, 81, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [165, 20, 47, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3506740841], - [180, 15, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 860394976], - [186, 22, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [190, 37, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2895478287], - [196, 71, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [201, 21, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1450505561], - [201, 41, 35, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1436832301], - [213, 7, 80, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 3610119133], - [221, 13, 58, "Style/TrailingCommaInArguments: Put a comma after the last parameter of a multiline method call.", 216718555], - [221, 58, 10, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 3294717144], - [225, 26, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3294717144], - [243, 29, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560], - [243, 52, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 266497343] - ], - "lib/openid/kvform.rb:4138952503": [ + [173, 81, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [205, 71, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [222, 7, 80, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 3610119133], + [252, 29, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560] + ], + "lib/openid/kvform.rb:3999429111": [ [2, 23, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], [6, 5, 1352, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4285174228], - [29, 107, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340639], - [42, 22, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340639], - [45, 18, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], [48, 5, 1472, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2664258689], - [65, 18, 27, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 840924278], - [76, 31, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [78, 27, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340639], [104, 5, 62, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 440967781], [108, 5, 80, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2800167629] ], - "lib/openid/kvpost.rb:2836741614": [ - [1, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2920398136], - [2, 9, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2951987467], - [17, 5, 242, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1326314621], - [18, 32, 9, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 983435646], - [18, 43, 7, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1182861117], - [18, 43, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1182861117], - [19, 32, 29, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1058754967], - [19, 32, 29, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1058754967], - [20, 43, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1835655055], - [32, 5, 407, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2633894042], - [42, 70, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [43, 9, 18, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 3996805664], - [51, 3, 302, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2138086473], - [54, 5, 93, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 2065347935] + "lib/openid/kvpost.rb:112489384": [ + [17, 5, 244, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2027637612], + [35, 5, 410, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2633894042], + [54, 3, 302, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2138086473], + [57, 5, 93, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 2065347935] ], "lib/openid/message.rb:103394192": [ [67, 36, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], @@ -1332,9 +246,6 @@ [514, 7, 6, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 3498751916], [519, 7, 5, "Style/InfiniteLoop: Use `Kernel#loop` for infinite loops.", 191284826] ], - "lib/openid/protocolerror.rb:1786077515": [ - [1, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655] - ], "lib/openid/server.rb:615617098": [ [83, 7, 1000, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1001267496], [98, 30, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], @@ -1388,471 +299,49 @@ [1518, 29, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], [1524, 27, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378] ], - "lib/openid/store/filesystem.rb:4219162133": [ - [1, 9, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2304965300], - [2, 9, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1702461967], - [3, 9, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3470819279], - [5, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655], - [6, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2055340646], - [7, 9, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4191648330], + "lib/openid/store/filesystem.rb:1238143139": [ [12, 7, 18, "Naming/VariableName: Use snake_case for variable names.", 2080787395], - [12, 28, 66, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4004737191], - [12, 101, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [16, 43, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3382444895], - [17, 49, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3759258831], - [18, 42, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039401801], - [29, 86, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94548671], - [31, 40, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94548671], - [32, 45, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [35, 9, 16, "Layout/IndentationWidth: Use 2 (not 16) spaces for indentation.", 720477445], - [36, 23, 4, "Layout/ElseAlignment: Align `else` with `handle_hash`.", 2087423834], - [37, 25, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [38, 23, 3, "Layout/EndAlignment: `end` at 38, 22 is not aligned with `handle_hash = if` at 34, 8.", 193405706], - [39, 64, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340392], - [81, 52, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340111], - [90, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [96, 42, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338263], - [110, 11, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [134, 23, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [135, 42, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94548671], - [137, 19, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [138, 18, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [140, 15, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4109305420], - [142, 45, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [146, 27, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2030884720], - [167, 65, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340111], - [170, 29, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338263], - [195, 44, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340111], - [200, 34, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [201, 35, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340392], - [215, 26, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92110924], - [221, 13, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [227, 15, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 614818917], - [236, 11, 15, "Performance/StringReplacement: Use `tr!` instead of `gsub!`.", 2554757118], - [236, 17, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340206], - [236, 22, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193337626], - [237, 11, 15, "Performance/StringReplacement: Use `tr!` instead of `gsub!`.", 4095748107], - [237, 17, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [237, 22, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [238, 11, 14, "Performance/StringReplacement: Use `delete!` instead of `gsub!`.", 3654193431], - [238, 17, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340920], - [238, 22, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789] - ], - "lib/openid/store/interface.rb:3334483540": [ - [1, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655] - ], - "lib/openid/store/memcache.rb:883087020": [ - [1, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655], - [2, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2055340646], - [3, 9, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3682152042], - [4, 9, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039807664], - [11, 49, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2581133716], - [61, 34, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193337131], - [61, 53, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338713], - [61, 64, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338713], - [62, 47, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [63, 43, 19, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4042310284], - [69, 28, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193336772], - [70, 16, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338713], - [74, 7, 23, "Style/SingleLineMethods: Avoid single-line method definitions.", 128304659], - [76, 7, 16, "Style/SingleLineMethods: Avoid single-line method definitions.", 3679187158], - [78, 7, 29, "Style/SingleLineMethods: Avoid single-line method definitions.", 787492483], - [84, 44, 19, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4042310284] - ], - "lib/openid/store/memory.rb:979248015": [ - [1, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2055340646], - [17, 51, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside { detected.", 177541], - [17, 83, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside } detected.", 177541], - [22, 9, 5, "Lint/UselessAssignment: Useless assignment to variable - `assoc`. Did you mean `assocs`?", 170529416], - [26, 25, 37, "Performance/CompareWithBlock: Use `sort_by(&:issued)` instead of `sort { |a, b| a.issued <=> b.issued }`.", 656767338], - [40, 52, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789] - ], - "lib/openid/store/nonce.rb:959609319": [ - [1, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3933002043], - [2, 9, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3020570481], - [3, 9, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039807664], - [8, 16, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2507889197], - [9, 20, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4126522891], + [134, 23, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] + ], + "lib/openid/store/nonce.rb:503623655": [ [10, 5, 12, "Naming/VariableName: Use snake_case for variable names.", 2011612633], - [10, 20, 64, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 418873156], [17, 5, 33, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 946500752], [18, 7, 5, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 214151279], [21, 5, 55, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2221980689], [22, 7, 5, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 214151279], [26, 5, 341, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3565164022], [39, 5, 480, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3166460613], - [58, 5, 264, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2698479003], - [61, 7, 6, "Layout/IndentationWidth: Use 2 (not 6) spaces for indentation.", 3135555589], - [62, 11, 4, "Layout/ElseAlignment: Align `else` with `t`.", 2087423834], - [64, 11, 3, "Layout/EndAlignment: `end` at 64, 10 is not aligned with `t = if` at 60, 6.", 193405706] - ], - "lib/openid/trustroot.rb:881014105": [ - [1, 9, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92337995], - [2, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2013616931], + [58, 5, 248, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3471362715] + ], + "lib/openid/trustroot.rb:2994376521": [ [5, 39, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], [13, 65, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [19, 25, 1120, "Metrics/CollectionLiteralLength: Avoid hard coding large quantities of data in code. Prefer reading the data from an external source.", 2864642788], - [20, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860896], - [20, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860897], - [20, 16, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2087549180], - [20, 21, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860898], - [20, 24, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860899], - [20, 27, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860909], - [20, 30, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860904], - [20, 33, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860905], - [20, 36, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860906], - [20, 39, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860907], - [20, 42, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860917], - [20, 45, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860918], - [20, 48, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2087568679], - [20, 53, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860919], - [20, 56, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2087576927], - [20, 61, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860912], - [21, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860915], - [21, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860924], - [21, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860926], - [21, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861062], - [21, 22, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861061], - [21, 25, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861059], - [21, 28, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861058], - [21, 31, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861057], - [21, 34, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861056], - [21, 37, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861071], - [21, 40, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861070], - [21, 43, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193415412], - [21, 47, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861069], - [21, 50, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861066], - [21, 53, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861065], - [21, 56, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861064], - [21, 59, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861077], - [21, 62, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861076], - [21, 65, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861075], - [22, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861072], - [22, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861086], - [22, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861085], - [22, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861095], - [22, 22, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193416115], - [22, 26, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861093], - [22, 29, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861090], - [22, 32, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861088], - [22, 35, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861089], - [22, 38, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861102], - [22, 41, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861103], - [22, 44, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861101], - [22, 47, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861098], - [22, 50, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861099], - [22, 53, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861096], - [22, 56, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861097], - [22, 59, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193416292], - [22, 63, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2087770454], - [23, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861107], - [23, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861104], - [23, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861118], - [23, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861119], - [23, 22, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861116], - [23, 25, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860740], - [23, 28, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860747], - [23, 31, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860746], - [23, 34, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860748], - [23, 37, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860750], - [23, 40, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860763], - [23, 43, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860771], - [23, 46, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193405521], - [23, 50, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860773], - [23, 53, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860775], - [23, 56, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860786], - [23, 59, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860787], - [23, 62, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860788], - [23, 65, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860789], - [24, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860937], - [24, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860936], - [24, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860942], - [24, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860940], - [24, 22, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860945], - [24, 25, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860963], - [24, 28, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860960], - [24, 31, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860966], - [24, 34, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860967], - [24, 37, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860964], - [24, 40, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860965], - [24, 43, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860970], - [24, 46, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860971], - [24, 49, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860974], - [24, 52, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860975], - [24, 55, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860972], - [24, 58, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193412219], - [24, 62, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860978], - [24, 65, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860979], - [25, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860977], - [25, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860982], - [25, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860983], - [25, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860981], - [25, 22, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860987], - [25, 25, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861126], - [25, 28, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861120], - [25, 31, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861123], - [25, 34, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861151], - [25, 37, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861145], - [25, 40, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861144], - [25, 43, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861160], - [25, 46, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861161], - [25, 49, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861152], - [25, 52, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861153], - [25, 55, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861154], - [25, 58, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2087826411], - [25, 63, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193418006], - [26, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861181], - [26, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861182], - [26, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861183], - [26, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861176], - [26, 22, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861322], - [26, 25, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861314], - [26, 28, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861312], - [26, 31, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2088000401], - [26, 36, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861343], - [26, 39, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861355], - [26, 42, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861353], - [26, 45, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861350], - [26, 48, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861351], - [26, 51, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861347], - [26, 54, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861344], - [26, 57, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861374], - [26, 60, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861372], - [26, 63, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861369], - [27, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861364], - [27, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861000], - [27, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861003], - [27, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861002], - [27, 22, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860992], - [27, 25, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5860994], - [27, 28, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861019], - [27, 31, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861018], - [27, 34, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861021], - [27, 37, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861020], - [27, 40, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861023], - [27, 43, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861008], - [27, 46, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861033], - [27, 49, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861035], - [27, 52, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861036], - [27, 55, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861037], - [27, 58, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861039], - [27, 61, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861024], - [27, 64, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193413805], - [28, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861028], - [28, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861029], - [28, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861030], - [28, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861031], - [28, 22, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2087698668], - [28, 27, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861048], - [28, 30, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861049], - [28, 33, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861050], - [28, 36, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861051], - [28, 39, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861052], - [28, 42, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861053], - [28, 45, 6, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 1486950451], - [28, 52, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861054], - [28, 55, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861055], - [28, 58, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861040], - [28, 61, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861041], - [28, 64, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861042], - [29, 10, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2087876002], - [29, 15, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861192], - [29, 18, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861198], - [29, 21, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193419642], - [29, 25, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861197], - [29, 28, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861196], - [29, 31, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861186], - [29, 34, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861191], - [29, 37, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861188], - [29, 40, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861211], - [29, 43, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861209], - [29, 46, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861214], - [29, 49, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861201], - [29, 52, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861223], - [29, 55, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193420831], - [29, 59, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861396], - [29, 62, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861392], - [29, 65, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861395], - [30, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861405], - [30, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861406], - [30, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861401], - [30, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861400], - [30, 22, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861403], - [30, 25, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861383], - [30, 28, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193425544], - [30, 32, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861382], - [30, 35, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861377], - [30, 38, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861378], - [30, 41, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861388], - [30, 44, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861429], - [30, 47, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861586], - [30, 50, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861592], - [30, 53, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861572], - [30, 56, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861570], - [30, 59, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861568], - [30, 62, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861623], - [30, 65, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861620], - [31, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861618], - [31, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861619], - [31, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861617], - [31, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861630], - [31, 22, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861631], - [31, 25, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861628], - [31, 28, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861629], - [31, 31, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861626], - [31, 34, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861627], - [31, 37, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861624], - [31, 40, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861625], - [31, 43, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861604], - [31, 46, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861602], - [31, 49, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861603], - [31, 52, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861600], - [31, 55, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861615], - [31, 58, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861612], - [31, 61, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861266], - [31, 64, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861269], - [32, 11, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861271], - [32, 14, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861270], - [32, 17, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861273], - [32, 20, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861275], - [32, 23, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861274], - [32, 26, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861277], - [32, 29, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861276], - [32, 32, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861279], - [32, 35, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861278], - [32, 38, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861249], - [32, 41, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861251], - [32, 44, 6, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 1720061981], - [32, 51, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861253], - [32, 54, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861255], - [32, 57, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861254], - [32, 60, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861259], - [32, 63, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861297], - [33, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861307], - [33, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861283], - [33, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861289], - [33, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861290], - [33, 22, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861458], - [33, 25, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861456], - [33, 28, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861462], - [33, 31, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861460], - [33, 34, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861466], - [33, 37, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861469], - [33, 40, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861446], - [33, 43, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861492], - [33, 46, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861473], - [33, 49, 11, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 661945988], - [34, 25, 16, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 504767231], - [34, 42, 14, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 1704504236], - [35, 19, 11, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 4242353991], - [35, 31, 18, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 153616670], - [36, 26, 12, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2941599748], - [36, 39, 12, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2668491249], - [36, 52, 10, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2602151602], - [36, 63, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861689], - [37, 10, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861673], - [37, 13, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861854], - [37, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861842], - [37, 19, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5861832], - [46, 29, 44, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3484016338], - [59, 5, 131, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3228933781], - [67, 5, 751, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1710960170], - [75, 31, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [78, 12, 22, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 3836799498], - [78, 35, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [81, 12, 36, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 200772756], - [93, 5, 429, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1374864212], - [117, 5, 826, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 92446907], - [117, 53, 5, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 235583841], - [119, 22, 25, "Performance/StringIdentifierArgument: Use `:get_allowed_return_urls` instead of `'get_allowed_return_urls'`.", 874029638], - [119, 22, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 874029638], - [121, 28, 32, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 867927444], - [121, 86, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [138, 65, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [148, 7, 232, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1348770474], - [151, 31, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [152, 33, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [154, 14, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340858], - [156, 14, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339942], - [161, 7, 527, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3105728993], - [171, 11, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [174, 38, 11, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2644306263], - [175, 38, 12, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1362124624], - [176, 38, 15, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1773074458], - [178, 10, 19, "Layout/FirstArrayElementLineBreak: Add a line break before the first element of a multi-line array.", 2831996527], - [178, 27, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [178, 31, 17, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 202211162], - [178, 46, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [179, 10, 17, "Layout/ArrayAlignment: Use one level of indentation for elements following the first line of a multi-line array.", 962241635], - [179, 25, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [179, 29, 10, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 3484498728], - [179, 29, 10, "Style/TrailingCommaInArrayLiteral: Put a comma after the last item of a multiline array.", 3484498728], - [179, 37, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [182, 7, 840, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1111616375], - [187, 38, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4179240059], - [188, 25, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085256097], - [188, 31, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [191, 22, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [192, 36, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340639], - [193, 18, 26, "Style/TernaryParentheses: Use parentheses for ternary expressions with complex conditions.", 2823557365], - [193, 27, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3026032253], - [194, 45, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [194, 55, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [198, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [201, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [201, 34, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [204, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [204, 28, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [204, 44, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339942], - [206, 9, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [211, 7, 172, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1035216957], - [220, 7, 120, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2760771742], - [239, 22, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039950300], - [240, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [240, 63, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340639], - [240, 83, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [254, 33, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1018961288], - [256, 34, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [266, 44, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [274, 42, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [292, 40, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340111], - [296, 25, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [296, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [297, 15, 28, "Layout/MultilineOperationIndentation: Use 4 (not 6) spaces for indenting a condition in a `elsif` statement spanning multiple lines.", 293532131], - [297, 31, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [297, 44, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [298, 15, 15, "Layout/MultilineOperationIndentation: Use 4 (not 6) spaces for indenting a condition in a `elsif` statement spanning multiple lines.", 614050840], - [312, 37, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340858], - [313, 11, 12, "Layout/IndentationWidth: Use 2 (not 12) spaces for indentation.", 155433733], - [313, 23, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339971], - [314, 21, 4, "Layout/ElseAlignment: Align `else` with `allowed`.", 2087423834], - [315, 23, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085280725], - [316, 21, 3, "Layout/EndAlignment: `end` at 316, 20 is not aligned with `allowed = if` at 312, 10.", 193405706] - ], - "lib/openid/urinorm.rb:1109248654": [ - [1, 9, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92337995], - [7, 5, 757, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1251035241], - [10, 38, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 907637041], - [13, 38, 26, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 403837407], - [15, 38, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1356343460], - [17, 38, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1356343460], - [22, 18, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], + [19, 25, 2692, "Metrics/CollectionLiteralLength: Avoid hard coding large quantities of data in code. Prefer reading the data from an external source.", 3538197388], + [321, 5, 131, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3228933781], + [329, 5, 755, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1710960170], + [337, 31, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [340, 36, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [355, 5, 429, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1374864212], + [379, 5, 825, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4119393793], + [379, 53, 5, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 235583841], + [383, 86, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], + [400, 65, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [410, 7, 232, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1348763082], + [423, 7, 532, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3105728993], + [450, 7, 826, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2732688631], + [459, 22, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [472, 24, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [479, 7, 172, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1035216957], + [488, 7, 120, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2760771742], + [508, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [542, 42, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [564, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [565, 42, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] + ], + "lib/openid/urinorm.rb:520228142": [ + [7, 5, 757, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3673026505], [34, 5, 58, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1308491834], - [38, 5, 901, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1082193363], - [42, 29, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94110058], - [44, 32, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085260164], - [46, 32, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94215563], - [48, 23, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085263396], - [49, 18, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [50, 32, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3109116421], - [53, 23, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94215658], - [54, 18, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [56, 16, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085260197], - [56, 22, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [57, 18, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [60, 35, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [61, 26, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [68, 28, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789] + [38, 5, 901, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3744415155] ], "lib/openid/util.rb:1309152219": [ [7, 26, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], @@ -1869,1028 +358,78 @@ [94, 5, 355, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2566402067], [115, 5, 88, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 778275783] ], - "lib/openid/version.rb:172215805": [ - [2, 13, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3885394300] - ], - "lib/openid/yadis/accept.rb:3796527798": [ - [6, 5, 673, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1005755367], - [10, 16, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94452202], + "lib/openid/yadis/accept.rb:4034517750": [ + [6, 5, 633, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2033724114], [15, 79, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [17, 23, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3612323881], - [26, 27, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94452202], - [27, 9, 12, "Layout/IndentationWidth: Use 2 (not 12) spaces for indentation.", 155433733], - [28, 19, 4, "Layout/ElseAlignment: Align `else` with `chunks`.", 2087423834], - [29, 28, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2379971602], - [30, 19, 3, "Layout/EndAlignment: `end` at 30, 18 is not aligned with `chunks << if` at 26, 8.", 193405706], - [33, 19, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085262697], [36, 5, 968, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1809754118], - [43, 28, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340297], - [46, 29, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340734], - [49, 24, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [54, 33, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [58, 28, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340920], - [59, 30, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340920], - [60, 32, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338420], - [75, 5, 1585, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3200748744], + [75, 5, 1519, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2839065030], [87, 38, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [89, 7, 12, "Layout/IndentationWidth: Use 2 (not 12) spaces for indentation.", 155433733], - [90, 17, 4, "Layout/ElseAlignment: Align `else` with `default`.", 2087423834], - [92, 17, 3, "Layout/EndAlignment: `end` at 92, 16 is not aligned with `default = if` at 87, 6.", 193405706], - [97, 20, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340111], - [100, 22, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340111], - [110, 33, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [112, 9, 6, "Layout/IndentationWidth: Use 2 (not 6) spaces for indentation.", 3135555589], - [113, 13, 4, "Layout/ElseAlignment: Align `else` with `q`.", 2087423834], - [115, 13, 3, "Layout/EndAlignment: `end` at 115, 12 is not aligned with `q = if` at 111, 8.", 193405706], [127, 5, 511, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 874198912] ], - "lib/openid/yadis/constants.rb:902908108": [ - [1, 9, 21, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 43233146], - [5, 25, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3274948509], - [6, 26, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1990526015], - [11, 8, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 785086186], - [12, 8, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 372628359], - [13, 7, 25, "Style/TrailingCommaInArguments: Put a comma after the last parameter of a multiline method call.", 2119769783] - ], - "lib/openid/yadis/discovery.rb:2199614362": [ - [1, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2569813655], - [2, 9, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2951987467], - [3, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2743300663], - [4, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1996466898], - [70, 5, 1535, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3246323220], - [73, 40, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside { detected.", 177541], - [73, 41, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1562230085], - [73, 72, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside } detected.", 177541], + "lib/openid/yadis/discovery.rb:1805682394": [ + [70, 5, 1560, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1496355252], [74, 7, 102, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 3710982363], - [77, 23, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94247383], [77, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [77, 46, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94247569], - [79, 70, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [80, 11, 55, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1128263547], - [80, 68, 4, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2088302577], - [89, 34, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1203671929], - [93, 26, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [99, 25, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94247383], - [99, 31, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [99, 48, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94247569], - [101, 67, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [102, 91, 4, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2088302577], - [108, 36, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1203671929], - [122, 5, 906, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3059427424], - [125, 27, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1203671929], - [129, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [129, 59, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [130, 10, 60, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 2715920954], - [130, 29, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340734], - [140, 20, 9, "Naming/InclusiveLanguage: Consider replacing 'whitelist' with 'allowlist' or 'permit'.", 469122336], - [140, 35, 9, "Naming/InclusiveLanguage: Consider replacing 'blacklist' with 'denylist' or 'block'.", 3660646720] - ], - "lib/openid/yadis/filters.rb:2626927831": [ + [94, 26, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [100, 31, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [102, 67, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [124, 5, 907, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1380267694], + [131, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [131, 59, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [142, 20, 9, "Naming/InclusiveLanguage: Consider replacing 'whitelist' with 'allowlist' or 'permit'.", 469122336], + [142, 35, 9, "Naming/InclusiveLanguage: Consider replacing 'blacklist' with 'denylist' or 'block'.", 3660646720] + ], + "lib/openid/yadis/filters.rb:3219868769": [ [41, 7, 73, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2334760220], - [136, 7, 71, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3846490198], - [136, 7, 71, "Style/TrailingCommaInArguments: Put a comma after the last parameter of a multiline method call.", 3846490198], [143, 5, 253, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 178241044], - [157, 5, 1247, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2569421294], - [158, 84, 6, "Performance/StringIdentifierArgument: Use `:each` instead of `'each'`.", 3028709770], - [158, 84, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3028709770], - [166, 36, 23, "Performance/StringIdentifierArgument: Use `:get_service_endpoints` instead of `'get_service_endpoints'`.", 1099711038], - [166, 36, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1099711038], - [169, 39, 29, "Performance/StringIdentifierArgument: Use `:from_basic_service_endpoint` instead of `'from_basic_service_endpoint'`.", 1551624392], - [169, 39, 29, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1551624392], - [172, 46, 29, "Performance/StringIdentifierArgument: Use `:from_basic_service_endpoint` instead of `'from_basic_service_endpoint'`.", 1551624392], - [172, 46, 29, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1551624392], - [173, 39, 6, "Performance/StringIdentifierArgument: Use `:call` instead of `'call'`.", 3017009927], - [173, 39, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3017009927] - ], - "lib/openid/yadis/htmltokenizer.rb:727650592": [ + [157, 5, 1242, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4135749621] + ], + "lib/openid/yadis/htmltokenizer.rb:676400695": [ [50, 3, 36, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2915883728], - [69, 5, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [71, 8, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340825], - [73, 10, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 93876292], - [75, 31, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94282683], - [82, 31, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340763], - [90, 30, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340825], [121, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [122, 10, 63, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 3993109313], - [122, 35, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [133, 10, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340825], - [135, 9, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [141, 17, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], + [122, 36, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], [144, 37, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [146, 32, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339909], - [146, 40, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [158, 43, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339909], [162, 28, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], - [181, 5, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [185, 29, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339909], - [206, 5, 11, "Style/SuperArguments: Call `super` without arguments and parentheses when the signature is identical.", 1279960888], - [208, 31, 56, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3200292774], - [219, 5, 11, "Style/SuperArguments: Call `super` without arguments and parentheses when the signature is identical.", 1279960888], - [220, 8, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340825], [220, 23, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [220, 26, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340763], - [221, 33, 56, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3200292774], - [230, 8, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [233, 19, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [260, 13, 8, "Layout/IndentationWidth: Use 2 (not 8) spaces for indentation.", 121035013], - [261, 19, 5, "Layout/ElseAlignment: Align `elsif` with `val`.", 165509744], - [261, 46, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [261, 49, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085177534], - [263, 19, 4, "Layout/ElseAlignment: Align `else` with `val`.", 2087423834], - [265, 19, 3, "Layout/EndAlignment: `end` at 265, 18 is not aligned with `val = if` at 259, 12.", 193405706], - [282, 12, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91918406], - [283, 26, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91647932], - [283, 50, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91647932], - [284, 12, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3732771833], - [285, 26, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91647932], - [285, 50, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91647932], - [288, 5, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789] - ], - "lib/openid/yadis/parsehtml.rb:2435886207": [ - [1, 9, 28, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 634180536], - [2, 9, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91426760], - [6, 5, 1184, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2583187193], + [261, 40, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240] + ], + "lib/openid/yadis/parsehtml.rb:2074847161": [ + [6, 5, 1225, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3998069435], [13, 18, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560], - [13, 34, 6, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3025445581], - [13, 34, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3025445581], - [13, 42, 7, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3896501570], - [13, 42, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3896501570], - [13, 51, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3038082424], - [13, 51, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3038082424], - [13, 59, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3018684341], - [13, 59, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3018684341], - [13, 67, 7, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3903542778], - [13, 67, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3903542778], - [14, 34, 6, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3026048248], - [14, 34, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3026048248], - [14, 42, 8, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3253849258], - [14, 42, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3253849258], - [17, 11, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [17, 26, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3896501570], - [17, 35, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3018684341], - [17, 43, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3903542778], - [19, 29, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3025445581], - [19, 56, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [24, 29, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3253849258], - [24, 58, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [25, 27, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4008454117], - [28, 11, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [28, 40, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3026048248], - [30, 38, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3038082424], - [30, 45, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [30, 71, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3484828462], - [32, 14, 31, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 1997956661], - [32, 35, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3782231308], - [33, 50, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3782231308] - ], - "lib/openid/yadis/services.rb:1434186558": [ - [1, 9, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 916562793], - [2, 9, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1906546608], - [3, 9, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 53893767], - [7, 5, 719, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 909444346], - [17, 40, 21, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3188732146], - [18, 40, 20, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 808345795], - [18, 62, 3, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 193411163], - [26, 5, 453, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 100913079] - ], - "lib/openid/yadis/xrds.rb:3502384701": [ - [1, 9, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2413211883], - [2, 9, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2206965434], - [3, 9, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4025230449], - [5, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2995095577], - [9, 18, 21, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 308764201], - [10, 15, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3243062565], - [13, 7, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3043806936], - [14, 7, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92236619], - [14, 7, 19, "Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.", 198401798], - [24, 5, 1505, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 973105365], - [36, 41, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 21417637], - [46, 37, 6, "Performance/StringIdentifierArgument: Use `:name` instead of `'name'`.", 3032265122], - [46, 37, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3032265122], - [48, 42, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2887863650], - [54, 7, 10, "Style/ReturnNil: Use `return` instead of `return nil`.", 1900003172], - [61, 54, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340004], - [63, 44, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2887863650], - [66, 38, 25, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 4182789614], - [66, 38, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4182789614], - [66, 65, 13, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1969631860], - [67, 38, 6, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1898500505], - [75, 36, 30, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 729603208], - [84, 5, 400, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2176692576], - [86, 29, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2383194659], - [91, 31, 44, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4015944537], - [96, 29, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2383194659], - [100, 5, 229, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3284163917], - [101, 7, 10, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 517067060], - [108, 5, 173, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 706989265], - [111, 27, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3006973656], - [115, 5, 263, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4119939356], - [116, 25, 14, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 535875337], - [117, 25, 28, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1862751848], - [117, 25, 28, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1862751848], - [118, 25, 15, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3664293015], - [121, 27, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1031125964], - [125, 5, 127, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1135967129], - [127, 24, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3784266648], - [130, 5, 131, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2325223047], - [138, 5, 338, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4077987403], - [140, 22, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91008555], - [142, 23, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 283114958], - [149, 5, 156, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 397670671], - [151, 21, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2582233879], - [151, 59, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2582233879] - ], - "lib/openid/yadis/xri.rb:750587094": [ - [1, 9, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2951987467], - [8, 26, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340004], - [8, 31, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340920], - [8, 36, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193336805], - [8, 41, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340206], - [8, 46, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340033], - [8, 51, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340173], - [10, 7, 271, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2782130302], + [37, 45, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] + ], + "lib/openid/yadis/services.rb:1899673016": [ + [7, 5, 721, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 909444346], + [29, 5, 453, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 100913079] + ], + "lib/openid/yadis/xrds.rb:2136682986": [ + [24, 5, 1512, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 973105365], + [87, 5, 400, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2072624544], + [103, 5, 229, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3284163917], + [104, 7, 10, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 517067060], + [111, 5, 173, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 706989265], + [118, 5, 248, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 298522264], + [130, 5, 127, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1135967129], + [135, 5, 131, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2325223047], + [143, 5, 338, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3784280011], + [154, 5, 156, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3288548303] + ], + "lib/openid/yadis/xri.rb:3360501225": [ + [10, 7, 274, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4070584190], [11, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [12, 12, 21, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 807609306], - [12, 34, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [13, 12, 87, "Layout/MultilineOperationIndentation: Use 4 (not 3) spaces for indenting a condition in an `if` statement spanning multiple lines.", 739852162], - [13, 30, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3794133634], - [13, 41, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [24, 7, 147, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 305119605], - [26, 23, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3277843292], - [26, 40, 20, "Performance/RedundantMatch: Use `=~` in places where the `MatchData` returned by `#match` will not be used.", 713822284], - [26, 40, 20, "Performance/RegexpMatch: Use `match?` instead of `match` when `MatchData` is not used.", 713822284], - [26, 50, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3794133634], - [32, 7, 287, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 477612230], - [35, 19, 3, "Style/RedundantRegexpArgument: Use string `\"%\"` as argument instead of regexp `/%/`.", 193348832], - [35, 24, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94025095], + [12, 35, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [13, 42, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], + [24, 7, 148, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 92768266], + [32, 7, 287, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1897019910], [47, 7, 76, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2929197802], [52, 7, 157, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1946667856], - [58, 7, 227, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 649186306], - [59, 40, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340004], - [66, 7, 435, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3686715349], - [67, 39, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3277843292], - [68, 31, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [69, 39, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340173], - [70, 9, 9, "Layout/IndentationWidth: Use 2 (not 9) spaces for indentation.", 3994155397], - [70, 48, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340268], - [71, 16, 5, "Layout/ElseAlignment: Align `elsif` with `root`.", 165509744], - [73, 16, 4, "Layout/ElseAlignment: Align `else` with `root`.", 2087423834], - [75, 16, 3, "Layout/EndAlignment: `end` at 75, 15 is not aligned with `root = if` at 69, 8.", 193405706], - [80, 7, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2087973483], - [81, 15, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3277843292], - [81, 43, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3277843292] - ], - "lib/openid/yadis/xrires.rb:2128153021": [ - [1, 9, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91426760], - [2, 9, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2995095577], - [3, 9, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 53893767], - [4, 9, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2951987467], - [12, 25, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 295561528], - [17, 25, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [17, 36, 22, "Performance/RedundantMatch: Use `=~` in places where the `MatchData` returned by `#match` will not be used.", 2937463082], - [17, 36, 22, "Performance/RegexpMatch: Use `match?` instead of `match` when `MatchData` is not used.", 2937463082], - [17, 53, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085263598], - [26, 19, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside { detected.", 177541], - [26, 20, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 460732345], - [26, 32, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1990526015], - [26, 54, 1, "Layout/SpaceInsideHashLiteralBraces: Space inside } detected.", 177541], - [28, 18, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 460732159], - [31, 18, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 460732345], - [31, 31, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 477917816], - [49, 11, 11, "Naming/VariableName: Use snake_case for variable names.", 1131396834], - [51, 12, 11, "Naming/VariableName: Use snake_case for variable names.", 1131396834], + [58, 7, 227, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2924958530], + [66, 7, 393, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 808077734], + [80, 7, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 73560939] + ], + "lib/openid/yadis/xrires.rb:761589890": [ [59, 7, 170, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 430146384], - [62, 35, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340920], - [64, 16, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339971], - [67, 7, 380, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3699337347], - [72, 84, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340858], - [74, 34, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340858], - [75, 9, 8, "Layout/IndentationWidth: Use 2 (not 8) spaces for indentation.", 121035013], - [75, 17, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339971], - [76, 15, 4, "Layout/ElseAlignment: Align `else` with `sep`.", 2087423834], - [77, 17, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340858], - [78, 15, 3, "Layout/EndAlignment: `end` at 78, 14 is not aligned with `sep = if` at 74, 8.", 193405706] - ], - "lib/ruby-openid.rb:3010806139": [ - [1, 9, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3058584636] - ], - "setup.rb:1023388634": [ - [13, 5, 5, "Style/Alias: Use `alias_method` instead of `alias`.", 169933683], - [19, 5, 4, "Security/Open: The use of `Kernel#open` is a serious security risk.", 2087926481], - [34, 3, 4, "Security/Open: The use of `Kernel#open` is a serious security risk.", 2087926481], - [34, 15, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085197365], - [41, 19, 38, "Style/TernaryParentheses: Use parentheses for ternary expressions with complex conditions.", 1033489889], - [41, 34, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [41, 54, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [56, 23, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3101244657], - [76, 5, 19, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3810613190], - [92, 21, 45, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1517383745], - [96, 5, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3229145574], - [110, 5, 73, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2547818485], - [114, 5, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3588584513], - [119, 26, 3, "Style/RedundantRegexpArgument: Use string `\"=\"` as argument instead of regexp `/=/`.", 193349112], - [123, 5, 65, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2377746729], - [128, 25, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193338482], - [130, 9, 35, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1792105273], - [130, 57, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [137, 7, 7, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 78553435], - [144, 18, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1307896607], - [144, 30, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [144, 38, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1171993823], - [146, 15, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 30577054], - [147, 15, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 21512210], - [148, 15, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 302478374], - [157, 10, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1785749249], - [159, 7, 43, "Style/IdenticalConditionalBranches: Move `libruby = \"#{c['prefix']}/lib/ruby\"` out of the conditional.", 2215780936], - [159, 14, 8, "Layout/ExtraSpacing: Unnecessary spacing detected.", 121035013], - [159, 30, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1551502453], - [160, 17, 5, "Layout/ExtraSpacing: Unnecessary spacing detected.", 95016837], - [160, 27, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1785749249], - [161, 21, 1, "Layout/ExtraSpacing: Unnecessary spacing detected.", 177541], - [161, 27, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1643505218], - [162, 15, 7, "Layout/ExtraSpacing: Unnecessary spacing detected.", 394119301], - [162, 27, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4234663473], - [163, 18, 4, "Layout/ExtraSpacing: Unnecessary spacing detected.", 2085287685], - [163, 27, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 687744342], - [164, 27, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 688156649], - [167, 7, 43, "Style/IdenticalConditionalBranches: Move `libruby = \"#{c['prefix']}/lib/ruby\"` out of the conditional.", 2215780936], - [167, 14, 8, "Layout/ExtraSpacing: Unnecessary spacing detected.", 121035013], - [167, 30, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1551502453], - [168, 17, 5, "Layout/ExtraSpacing: Unnecessary spacing detected.", 95016837], - [168, 30, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1551502453], - [169, 21, 1, "Layout/ExtraSpacing: Unnecessary spacing detected.", 177541], - [169, 30, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1551502453], - [169, 65, 6, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 3024581309], - [170, 15, 7, "Layout/ExtraSpacing: Unnecessary spacing detected.", 394119301], - [170, 27, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4234663473], - [171, 18, 4, "Layout/ExtraSpacing: Unnecessary spacing detected.", 2085287685], - [172, 43, 6, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 3024581309], - [175, 7, 43, "Style/IdenticalConditionalBranches: Move `libruby = \"#{c['prefix']}/lib/ruby\"` out of the conditional.", 2215780936], - [175, 14, 8, "Layout/ExtraSpacing: Unnecessary spacing detected.", 121035013], - [175, 30, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1551502453], - [176, 17, 5, "Layout/ExtraSpacing: Unnecessary spacing detected.", 95016837], - [176, 30, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1551502453], - [177, 21, 1, "Layout/ExtraSpacing: Unnecessary spacing detected.", 177541], - [177, 30, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1551502453], - [177, 65, 6, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 3024581309], - [178, 15, 7, "Layout/ExtraSpacing: Unnecessary spacing detected.", 394119301], - [178, 30, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1551502453], - [179, 18, 4, "Layout/ExtraSpacing: Unnecessary spacing detected.", 2085287685], - [180, 43, 6, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 3024581309], - [183, 36, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1551502453], - [183, 50, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1548672017], - [186, 23, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560], - [186, 27, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1690550869], - [187, 5, 13, "Layout/IndentationWidth: Use 2 (not 13) spaces for indentation.", 834345861], - [187, 26, 3, "Style/RedundantRegexpArgument: Use string `\"'\"` as argument instead of regexp `/'/`.", 193348770], - [187, 31, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [187, 41, 3, "Style/RedundantRegexpArgument: Use string `\"=\"` as argument instead of regexp `/=/`.", 193349112], - [188, 16, 4, "Layout/ElseAlignment: Align `else` with `makeprog`.", 2087423834], - [189, 18, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3038188071], - [190, 16, 3, "Layout/EndAlignment: `end` at 190, 15 is not aligned with `makeprog = if` at 186, 4.", 193405706], - [193, 20, 13, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2446033704], - [193, 20, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2446033704], - [193, 35, 15, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3176853474], - [193, 35, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3176853474], - [194, 20, 86, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2113793577], - [194, 20, 86, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2113793577], - [194, 107, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [194, 107, 2, "Style/RedundantLineContinuation: Redundant line continuation.", 5862675], - [197, 18, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91984998], - [198, 21, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1445673674], - [198, 32, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1951367035], - [199, 21, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1414682918], - [199, 32, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 36641443], - [200, 18, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3036246382], - [201, 21, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1445673674], - [201, 32, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3474772823], - [202, 21, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1414682918], - [202, 32, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3901508239], - [203, 18, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3025230314], - [204, 15, 34, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3441816019], - [204, 30, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2009331388], - [204, 61, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2988464618], - [205, 21, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1551502453], - [205, 37, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2988464618], - [206, 21, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1445673674], - [206, 32, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 875506794], - [207, 21, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1414682918], - [207, 32, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 875506794], - [210, 20, 8, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 1551502453], - [210, 20, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1551502453], - [210, 30, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [210, 30, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [210, 38, 11, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 4148693648], - [210, 40, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1551502453], - [211, 20, 35, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 917498357], - [211, 20, 35, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 917498357], - [212, 20, 8, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 1307896607], - [212, 20, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1307896607], - [212, 30, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [212, 30, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [212, 38, 30, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 209624456], - [212, 58, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1307896607], - [213, 20, 28, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3501475194], - [213, 20, 28, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3501475194], - [214, 20, 8, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 872653981], - [214, 20, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 872653981], - [214, 30, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [214, 30, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [214, 38, 30, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1191026698], - [214, 58, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 872653981], - [215, 20, 29, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 123497335], - [215, 20, 29, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 123497335], - [216, 20, 9, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3526085130], - [216, 20, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3526085130], - [216, 31, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [216, 31, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [216, 39, 31, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1119322173], - [216, 59, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3526085130], - [217, 20, 31, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 541418743], - [217, 20, 31, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 541418743], - [218, 20, 8, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 1458684760], - [218, 20, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1458684760], - [218, 30, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [218, 30, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [218, 38, 30, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1311152079], - [218, 58, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1458684760], - [219, 20, 29, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 269167916], - [219, 20, 29, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 269167916], - [220, 20, 12, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 507415527], - [220, 20, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 507415527], - [220, 34, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [220, 34, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [220, 42, 34, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 1044358256], - [220, 62, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 507415527], - [221, 20, 46, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1989644878], - [221, 20, 46, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1989644878], - [222, 20, 15, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 727638752], - [222, 20, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 727638752], - [222, 37, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [222, 37, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [222, 45, 37, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3352126743], - [222, 65, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 727638752], - [223, 20, 36, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3496158084], - [223, 20, 36, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3496158084], - [224, 20, 9, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3057438366], - [224, 20, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3057438366], - [224, 31, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [224, 31, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [224, 39, 7, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3909639934], - [225, 20, 34, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 701625835], - [225, 20, 34, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 701625835], - [226, 20, 12, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 1310986591], - [226, 20, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1310986591], - [226, 34, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [226, 34, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [226, 42, 10, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3760131391], - [227, 20, 43, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2352288944], - [227, 20, 43, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2352288944], - [228, 20, 16, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 4120070791], - [228, 20, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4120070791], - [228, 38, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [228, 38, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [228, 46, 14, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3347440871], - [229, 20, 44, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3081707299], - [229, 20, 44, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3081707299], - [230, 20, 10, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2325976818], - [230, 20, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2325976818], - [230, 32, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [230, 32, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [230, 40, 8, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3569060466], - [231, 20, 58, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1524062742], - [231, 20, 58, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1524062742], - [232, 20, 13, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 4267631347], - [232, 20, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4267631347], - [232, 35, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [232, 35, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [232, 43, 11, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 717624627], - [233, 20, 38, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3024222343], - [233, 20, 38, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3024222343], - [234, 20, 17, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 62094379], - [234, 20, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 62094379], - [234, 39, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [234, 39, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [234, 47, 15, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2643969771], - [235, 20, 37, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 107468023], - [235, 20, 37, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 107468023], - [236, 20, 7, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 1445673674], - [236, 20, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1445673674], - [236, 29, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [236, 29, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [236, 37, 14, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3474772823], - [236, 37, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3474772823], - [237, 20, 32, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2000238734], - [237, 20, 32, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2000238734], - [238, 20, 7, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 1414682918], - [238, 20, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1414682918], - [238, 29, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [238, 29, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [238, 37, 18, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3901508239], - [238, 37, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3901508239], - [239, 20, 35, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 1966158335], - [239, 20, 35, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1966158335], - [240, 20, 10, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3877471316], - [240, 20, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3877471316], - [240, 32, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3034775496], - [240, 32, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [240, 40, 8, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3314995604], - [241, 20, 28, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3417445759], - [241, 20, 28, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3417445759], - [242, 23, 10, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3878127123], - [242, 23, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3878127123], - [242, 35, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3032265122], - [242, 35, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3032265122], - [242, 43, 8, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3314995604], - [243, 23, 41, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2293639221], - [243, 23, 41, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2293639221], - [244, 23, 10, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3053329101], - [244, 23, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3053329101], - [244, 35, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3032265122], - [244, 35, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3032265122], - [244, 43, 8, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 349201645], - [245, 23, 45, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 4180423793], - [245, 23, 45, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4180423793], - [246, 22, 9, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3694809809], - [246, 22, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3694809809], - [246, 33, 16, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 471387538], - [246, 33, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 471387538], - [246, 51, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 3036588153], - [246, 51, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3036588153], - [247, 22, 32, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 4135617539], - [247, 22, 32, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4135617539], - [248, 20, 13, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 477302125], - [248, 20, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 477302125], - [248, 35, 8, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 4223913156], - [248, 35, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4223913156], - [248, 45, 4, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2085192580], - [248, 45, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085192580], - [249, 20, 42, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 2814751267], - [249, 20, 42, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2814751267], - [249, 20, 43, "Style/TrailingCommaInArrayLiteral: Put a comma after the last item of a multiline array.", 2692478634], - [256, 7, 7, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 78553435], - [262, 32, 6, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 3040981127], - [262, 32, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3040981127], - [262, 40, 14, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 703880647], - [262, 40, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 703880647], - [262, 56, 2, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 5858789], - [262, 56, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [262, 60, 5, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 90326020], - [262, 60, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 90326020], - [263, 32, 40, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3184414199], - [263, 32, 40, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3184414199], - [264, 32, 9, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 2593518601], - [264, 32, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2593518601], - [264, 43, 14, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 703880647], - [264, 43, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 703880647], - [264, 59, 2, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 5858789], - [264, 59, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [264, 63, 6, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2995304175], - [264, 63, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2995304175], - [265, 32, 47, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3930053737], - [265, 32, 47, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3930053737], - [265, 32, 48, "Style/TrailingCommaInArrayLiteral: Put a comma after the last item of a multiline array.", 842754464], - [271, 5, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3693569623], - [271, 19, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1310986591], - [272, 5, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3303962618], - [272, 18, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1310986591], - [273, 5, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1785749249], - [273, 21, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1310986591], - [274, 5, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1643505218], - [274, 18, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4120070791], - [275, 5, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3906518815], - [275, 27, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2325976818], - [276, 5, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 858660959], - [276, 20, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4267631347], - [277, 5, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 301956690], - [277, 18, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1307896607], - [278, 5, 9, "Lint/DuplicateHashKey: Duplicated key in hash literal.", 301956690], - [278, 5, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 301956690], - [278, 18, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1307896607], - [279, 5, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 399135655], - [279, 17, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1445673674], - [280, 5, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3805114955], - [280, 17, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1414682918], - [281, 5, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 485317863], - [281, 19, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3526085130], - [282, 5, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1870221977], - [282, 20, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3877471316], - [283, 5, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1870820574], - [283, 20, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3878127123], - [284, 5, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3036588153], - [284, 15, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3878127123], - [285, 5, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3759210944], - [285, 20, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3053329101], - [286, 5, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3038188071], - [286, 5, 20, "Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.", 2812513964], - [286, 15, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3053329101], - [295, 44, 3, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 193338713], - [299, 35, 46, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3425105503], - [304, 15, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3979659268], - [323, 5, 5, "Style/Alias: Use `alias_method` instead of `alias`.", 169933683], - [344, 7, 52, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 866105429], - [351, 7, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3018670347], - [361, 14, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92501706], - [363, 14, 44, "Performance/RegexpMatch: Use `match?` instead of `=~` when `MatchData` is not used.", 665339080], - [364, 9, 68, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 523561238], - [366, 7, 29, "Performance/RegexpMatch: Use `match?` instead of `=~` when `MatchData` is not used.", 2522905054], - [366, 7, 44, "Style/TernaryParentheses: Use parentheses for ternary expressions with complex conditions.", 1991149237], - [366, 39, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92501706], - [366, 47, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085192580], - [372, 7, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [378, 7, 53, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2615934229], - [379, 7, 49, "Style/TernaryParentheses: Use parentheses for ternary expressions with complex conditions.", 1961964063], - [379, 21, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340033], - [385, 7, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4191461457], - [392, 29, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [396, 7, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3505102189], - [402, 7, 61, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3655685420], - [409, 7, 32, "Style/SuperWithArgsParentheses: Use parentheses for `super` with arguments.", 3341264437], - [410, 29, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [415, 7, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3029533854], - [423, 7, 54, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3436685383], - [430, 7, 68, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2669760910], - [431, 7, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3006330163], - [437, 7, 35, "Style/SuperWithArgsParentheses: Use parentheses for `super` with arguments.", 2555334469], - [444, 7, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3501008127], - [450, 7, 48, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1924333448], - [470, 43, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3018670347], - [474, 43, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [478, 43, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3029533854], - [482, 7, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 85907733], - [486, 7, 70, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2481990227], - [486, 38, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4223913156], - [486, 58, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92501706], - [486, 66, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085192580], - [490, 7, 53, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2866971479], - [490, 38, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3034775496], - [504, 15, 120, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3267797847], - [513, 15, 128, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 469536112], - [525, 5, 26, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 410447990], - [530, 8, 24, "Performance/RegexpMatch: Use `match?` instead of `=~` when `MatchData` is not used.", 2915234756], - [535, 32, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [536, 7, 14, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 744382528], - [541, 5, 20, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2742604467], - [544, 5, 22, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3767037237], - [548, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1157305697], - [551, 5, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1459338775], - [556, 7, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1589197111], - [558, 7, 17, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 387576167], - [560, 7, 22, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3767037237], - [566, 22, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [567, 22, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085260197], - [571, 9, 19, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3235484104], - [573, 9, 20, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3882126232], - [575, 9, 25, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1243459210], - [579, 7, 14, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3002185017], - [586, 5, 22, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3767750430], - [588, 7, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2248600565], - [590, 23, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085200688], - [591, 9, 25, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1919443788], - [593, 7, 36, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2651720926], - [594, 7, 15, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 77424020], - [599, 5, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1589197111], - [604, 5, 22, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4152096649], - [605, 5, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2555221883], - [609, 5, 30, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3172191710], - [618, 7, 13, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1346643999], - [620, 25, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085200688], - [621, 7, 11, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 584666693], - [623, 5, 25, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1095391443], - [625, 48, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193337892], - [627, 37, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [641, 5, 19, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1213319813], - [641, 20, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339909], - [642, 70, 3, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 193339909], - [646, 5, 33, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2663536190], - [646, 20, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3878127123], - [650, 22, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3053329101], - [678, 3, 5, "Style/Alias: Use `alias_method` instead of `alias`.", 169933683], - [713, 25, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [719, 23, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [725, 29, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [733, 3, 7, "Naming/ConstantName: Use SCREAMING_SNAKE_CASE for constants.", 747123679], - [733, 10, 2, "Layout/ExtraSpacing: Unnecessary spacing detected.", 5858821], - [733, 15, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4000527666], - [734, 3, 9, "Naming/ConstantName: Use SCREAMING_SNAKE_CASE for constants.", 3550994816], - [734, 15, 37, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2147898356], - [737, 6, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91647140], - [737, 12, 5, "Layout/ExtraSpacing: Unnecessary spacing detected.", 95016837], - [737, 18, 32, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 892894677], - [738, 6, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 244412271], - [738, 15, 2, "Layout/ExtraSpacing: Unnecessary spacing detected.", 5858821], - [738, 18, 27, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 838401029], - [739, 6, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3036219654], - [739, 13, 4, "Layout/ExtraSpacing: Unnecessary spacing detected.", 2085287685], - [739, 18, 29, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4131192844], - [740, 6, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1406874978], - [740, 14, 3, "Layout/ExtraSpacing: Unnecessary spacing detected.", 193341061], - [740, 18, 37, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2033827210], - [741, 6, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3821883108], - [741, 16, 1, "Layout/ExtraSpacing: Unnecessary spacing detected.", 177541], - [741, 18, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3370386466], - [742, 6, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039374547], - [742, 13, 4, "Layout/ExtraSpacing: Unnecessary spacing detected.", 2085287685], - [742, 18, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3130228534], - [743, 6, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 789667264], - [743, 14, 3, "Layout/ExtraSpacing: Unnecessary spacing detected.", 193341061], - [744, 5, 57, "Style/TrailingCommaInArrayLiteral: Put a comma after the last item of a multiline array.", 3539951389], - [744, 6, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 151228458], - [747, 3, 289, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1157637016], - [756, 3, 74, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2207359901], - [757, 34, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 384936547], - [760, 3, 250, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3092851240], - [761, 12, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560], - [761, 34, 22, "Performance/StartWith: Use `String#start_with?` instead of a regex match anchored to the beginning of the string.", 684889064], - [763, 7, 43, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 624544067], - [763, 39, 3, "Style/RedundantRegexpArgument: Use string `\"=\"` as argument instead of regexp `/=/`.", 193349112], - [764, 7, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2852339319], - [764, 15, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3928309633], - [766, 15, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1754213311], - [789, 15, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91647140], - [797, 12, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 244412271], - [797, 22, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039374547], - [799, 12, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 789667264], - [799, 21, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 151228458], - [804, 7, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 862979311], - [804, 16, 18, "Performance/StringIdentifierArgument: Use `:\"parsearg_#{task}\"` instead of `\"parsearg_#{task}\"`.", 3052874771], - [806, 7, 23, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2833512469], - [806, 16, 14, "Performance/StringIdentifierArgument: Use `:\"exec_#{task}\"` instead of `\"exec_#{task}\"`.", 1494709161], - [811, 5, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2708343814], - [815, 66, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [827, 5, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [831, 5, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [839, 15, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560], - [842, 9, 37, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3925533], - [844, 12, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085264217], - [844, 18, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3072035449], - [846, 12, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1158569535], - [848, 12, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3859573492], - [849, 9, 19, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3459220807], - [850, 9, 6, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1180004245], - [851, 12, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1169301599], - [853, 9, 6, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1180004245], - [854, 12, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2207210144], - [856, 9, 6, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1180004245], - [858, 9, 47, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4174008571], - [869, 70, 3, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 193338713], - [875, 5, 60, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2785239536], - [875, 59, 3, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 193339909], - [878, 3, 5, "Style/Alias: Use `alias_method` instead of `alias`.", 169933683], - [878, 22, 6, "Layout/ExtraSpacing: Unnecessary spacing detected.", 3135555589], - [879, 3, 5, "Style/Alias: Use `alias_method` instead of `alias`.", 169933683], - [879, 23, 5, "Layout/ExtraSpacing: Unnecessary spacing detected.", 95016837], - [880, 3, 5, "Style/Alias: Use `alias_method` instead of `alias`.", 169933683], - [880, 22, 6, "Layout/ExtraSpacing: Unnecessary spacing detected.", 3135555589], - [881, 3, 5, "Style/Alias: Use `alias_method` instead of `alias`.", 169933683], - [881, 23, 5, "Layout/ExtraSpacing: Unnecessary spacing detected.", 95016837], - [882, 3, 5, "Style/Alias: Use `alias_method` instead of `alias`.", 169933683], - [882, 27, 1, "Layout/ExtraSpacing: Unnecessary spacing detected.", 177541], - [888, 13, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560], - [889, 10, 14, "Performance/RegexpMatch: Use `match?` instead of `=~` when `MatchData` is not used.", 1575866315], - [897, 9, 26, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 624986630], - [899, 7, 13, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3222504368], - [902, 7, 44, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 346314877], - [912, 30, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [913, 13, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560], - [915, 12, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3597850463], - [918, 24, 3, "Style/RedundantRegexpArgument: Use string `\"=\"` as argument instead of regexp `/=/`.", 193349112], - [919, 60, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340330], - [922, 9, 45, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1746159422], - [928, 14, 33, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2858517364], - [929, 26, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1761978731], - [930, 26, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1761978731], - [931, 26, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1761978731], - [933, 14, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3778090186], - [934, 24, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1761978731], - [935, 24, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1761978731], - [939, 14, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4194074276], - [940, 5, 58, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3077402039], - [940, 21, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 72198057], - [940, 34, 2, "Layout/ExtraSpacing: Unnecessary spacing detected.", 5858821], - [940, 37, 26, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3210209203], - [941, 5, 59, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1720545183], - [941, 21, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1098570143], - [941, 37, 27, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 924793517], - [942, 5, 52, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 406015040], - [942, 21, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 295670548], - [942, 33, 3, "Layout/ExtraSpacing: Unnecessary spacing detected.", 193341061], - [942, 37, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1181196121], - [943, 5, 56, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 507147374], - [943, 21, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1118493759], - [943, 37, 24, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2629465340], - [944, 5, 60, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 870856334], - [944, 21, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 417241344], - [944, 39, 26, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1800231267], - [946, 14, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2963420481], - [948, 7, 26, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3392487035], - [953, 14, 28, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3732723458], - [955, 7, 66, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2151223324], - [957, 5, 74, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3049774973], - [957, 21, 17, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1220290671], - [957, 40, 21, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2322821756], - [959, 14, 22, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 250058357], - [960, 5, 70, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2481768540], - [960, 21, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3597850463], - [960, 34, 34, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2371691469], - [960, 70, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91856554], - [961, 5, 58, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2756683357], - [961, 21, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2275095909], - [961, 38, 21, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 201983353], - [961, 61, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [988, 7, 36, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1593566115], - [1007, 11, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1421498110], - [1009, 71, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [1013, 5, 48, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1448170422], - [1015, 7, 59, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 15249805], - [1022, 11, 23, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1993332146], - [1025, 56, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [1034, 41, 7, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 651502127], - [1035, 41, 28, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 762710393], - [1036, 41, 18, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 381245439], - [1038, 9, 3, "Layout/ExtraSpacing: Unnecessary spacing detected.", 193341061], - [1038, 40, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3040981127], - [1039, 40, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2593518601], - [1047, 20, 3, "Performance/RedundantSplitRegexpArgument: Use string as argument instead of regexp.", 193348489], - [1047, 20, 3, "Style/RedundantRegexpArgument: Use string `\",\"` as argument instead of regexp `/,/`.", 193348489], - [1049, 7, 41, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3012728676], - [1056, 12, 19, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 29299821], - [1057, 12, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085249637], - [1057, 39, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339909], - [1066, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 852258928], - [1066, 14, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2239004549], - [1068, 5, 22, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4114562831], - [1068, 14, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2163180890], - [1073, 5, 20, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3311497437], - [1073, 14, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3312707720], - [1075, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1914603842], - [1075, 14, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3597989175], - [1079, 5, 22, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3644464987], - [1079, 14, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1401090574], - [1081, 5, 23, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1249902532], - [1081, 14, 14, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2528185777], - [1085, 5, 19, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2179485324], - [1085, 14, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3743131897], - [1087, 5, 20, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1892605427], - [1087, 14, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2443720294], - [1091, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1399440064], - [1092, 5, 20, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3928983935], - [1092, 14, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2676525802], - [1094, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1297396256], - [1094, 14, 12, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 4224971221], - [1098, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1399440064], - [1099, 5, 24, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4288380437], - [1099, 14, 15, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2425109056], - [1101, 5, 25, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 221857034], - [1101, 14, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2857600895], - [1109, 5, 20, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3299441124], - [1109, 15, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3864115756], - [1109, 43, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3864115756], - [1111, 7, 43, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2222436242], - [1112, 7, 28, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1276380855], - [1113, 7, 28, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 306767418], - [1115, 7, 17, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1775010191], - [1115, 17, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3701599146], - [1120, 5, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1117817532], - [1144, 16, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [1194, 5, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4005193577], - [1194, 24, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 244412271], - [1197, 3, 28, "Style/SingleLineMethods: Avoid single-line method definitions.", 3718985244], - [1199, 3, 28, "Style/SingleLineMethods: Avoid single-line method definitions.", 185630], - [1201, 3, 28, "Style/SingleLineMethods: Avoid single-line method definitions.", 142072027], - [1208, 5, 53, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2236464008], - [1211, 3, 29, "Style/SingleLineMethods: Avoid single-line method definitions.", 2195792169], - [1213, 3, 29, "Style/SingleLineMethods: Avoid single-line method definitions.", 255901533], - [1220, 5, 26, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1265420196], - [1220, 24, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1406874978], - [1225, 7, 40, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 107921929], - [1232, 37, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3104178722], - [1234, 23, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085197365], - [1236, 9, 6, "Lint/NonLocalExitFromIterator: Non-local exit from iterator, without return value. `next`, `break`, `Array#find`, `Array#any?`, etc. is preferred.", 2123913871], - [1236, 56, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [1236, 78, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3036588153], - [1238, 9, 48, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2555929647], - [1239, 28, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085200688], - [1240, 11, 60, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 290949185], - [1240, 44, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 93791783], - [1240, 59, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3877471316], - [1241, 11, 14, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1477675439], - [1244, 7, 38, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2614564728], - [1246, 7, 19, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 211073657], - [1250, 3, 27, "Style/SingleLineMethods: Avoid single-line method definitions.", 3590025587], - [1252, 3, 27, "Style/SingleLineMethods: Avoid single-line method definitions.", 2861718582], - [1258, 3, 28, "Style/SingleLineMethods: Avoid single-line method definitions.", 3725429924], - [1260, 3, 28, "Style/SingleLineMethods: Avoid single-line method definitions.", 756127504], - [1267, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3646792246], - [1267, 10, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2739602672], - [1268, 5, 28, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1639867938], - [1268, 24, 9, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3821883108], - [1272, 5, 62, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 461366471], - [1272, 42, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1307896607], - [1276, 5, 61, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 38656375], - [1276, 42, 7, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1445673674], - [1282, 5, 119, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 306146493], - [1282, 34, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [1283, 19, 41, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3363415336], - [1283, 29, 7, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1414682918], - [1284, 19, 5, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 116531407], - [1288, 5, 63, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2811630899], - [1288, 42, 9, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 3526085130], - [1294, 5, 66, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3137091486], - [1294, 42, 12, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 507415527], - [1298, 5, 62, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4148030913], - [1298, 42, 8, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 1458684760], - [1302, 5, 36, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 90451], - [1304, 7, 49, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3623462406], - [1314, 5, 67, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1826891555], - [1334, 10, 6, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 3263606339], - [1334, 17, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2087952548], - [1334, 22, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2089271460], - [1334, 27, 11, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 3371217936], - [1335, 18, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5858924], - [1335, 21, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193347554], - [1335, 25, 8, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 3412027555], - [1335, 34, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5858947], - [1335, 37, 6, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 3296728833], - [1335, 44, 5, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 106316928], - [1336, 8, 5, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 106316934], - [1336, 14, 5, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 106303273], - [1336, 20, 5, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 106343497], - [1336, 26, 6, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 3508490898], - [1336, 33, 5, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 106320828], - [1336, 39, 3, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 193468660], - [1336, 43, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5859147], - [1338, 11, 4, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 2085630054], - [1338, 16, 2, "Layout/MultilineArrayLineBreaks: Each item in a multi-line array must start on a separate line.", 5859009], - [1342, 63, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [1362, 5, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340235], - [1363, 5, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340033], - [1364, 5, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193339942], - [1365, 5, 3, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 193340111], - [1365, 5, 11, "Style/TrailingCommaInHashLiteral: Put a comma after the last item of a multiline hash.", 3808987112], - [1365, 12, 4, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2085260321], - [1370, 75, 3, "Style/StringLiteralsInInterpolation: Prefer double-quoted strings inside interpolations.", 193338713], - [1378, 13, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039374547], - [1381, 28, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3039374547], - [1382, 7, 30, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3061077347], - [1382, 12, 25, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2747753289], - [1385, 5, 23, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 392517155], - [1385, 10, 18, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1031725513], - [1386, 5, 49, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2538697179], - [1386, 14, 21, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2349486063], - [1394, 5, 26, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 647942022], - [1394, 24, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 789667264], - [1395, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1399440064], - [1396, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3646792246], - [1396, 10, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2739602672], - [1399, 3, 27, "Style/SingleLineMethods: Avoid single-line method definitions.", 423957459], - [1401, 3, 27, "Style/SingleLineMethods: Avoid single-line method definitions.", 2826294225], - [1406, 5, 12, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2167649090], - [1406, 10, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 789667264], - [1406, 32, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1191561601], - [1409, 3, 28, "Style/SingleLineMethods: Avoid single-line method definitions.", 4089338630], - [1411, 3, 28, "Style/SingleLineMethods: Avoid single-line method definitions.", 1532303474], - [1418, 5, 30, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1315037292], - [1418, 24, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 151228458], - [1419, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1399440064], - [1420, 5, 21, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3646792246], - [1420, 10, 16, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2739602672], - [1423, 3, 31, "Style/SingleLineMethods: Avoid single-line method definitions.", 399819577], - [1425, 3, 31, "Style/SingleLineMethods: Avoid single-line method definitions.", 3635848507], - [1430, 5, 16, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1213441064], - [1430, 10, 11, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 151228458], - [1430, 36, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1191561601], - [1433, 3, 32, "Style/SingleLineMethods: Avoid single-line method definitions.", 1698690028], - [1435, 3, 32, "Style/SingleLineMethods: Avoid single-line method definitions.", 4291526744], - [1442, 5, 22, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1940450706], - [1444, 17, 13, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 477302125], - [1444, 35, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92501706], - [1444, 41, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [1444, 53, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 91803692], - [1445, 9, 36, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4058626395], - [1445, 14, 31, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 788664625], - [1448, 7, 42, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 4201956362], - [1450, 5, 23, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 447872813], - [1455, 7, 22, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1940450706], - [1456, 7, 44, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 48473263], - [1456, 48, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [1458, 9, 33, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 766441064], - [1460, 7, 23, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 447872813], - [1468, 5, 13, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2625545522], - [1470, 5, 13, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3991096799], - [1471, 5, 18, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2390661708], - [1471, 10, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3889059286], - [1474, 5, 17, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 157536142], - [1475, 5, 18, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1617885870], - [1475, 10, 7, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 107581620], - [1480, 13, 22, "Layout/FirstArrayElementLineBreak: Add a line break before the first element of a multi-line array.", 4291533779], - [1481, 13, 25, "Layout/ArrayAlignment: Use one level of indentation for elements following the first line of a multi-line array.", 1164194509], - [1481, 13, 25, "Style/TrailingCommaInArrayLiteral: Put a comma after the last item of a multiline array.", 1164194509], - [1485, 7, 38, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 424683079], - [1489, 7, 52, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 244878913], - [1506, 5, 15, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2516515855], - [1507, 5, 50, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1373098124], - [1508, 5, 6, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 1180004244] + [67, 7, 356, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3699337347] ], "test/test_accept.rb:753975107": [ [31, 29, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240] @@ -3170,29 +709,7 @@ [128, 46, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], [214, 9, 23, "Minitest/RefuteFalse: Prefer using `refute(result.is_xrds)`.", 462657144] ], - "test/testutil.rb:1111535143": [ - [1, 9, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1702461967], - [13, 34, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3020570357], - [59, 62, 1, "Layout/LineContinuationSpacing: Use one space in front of backslash.", 177657], - [60, 17, 22, "Layout/LineEndStringConcatenationIndentation: Indent the first part of a string concatenated with backslash.", 1974406040], - [61, 7, 50, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 2614495702], - [79, 12, 27, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 918973603], - [81, 11, 57, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 3543959136], - [110, 13, 20, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 3501475749], - [115, 29, 8, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 1681053474], - [121, 30, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 92008088], - [126, 5, 261, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1432079004], - [126, 44, 2, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 5858789], - [127, 36, 5, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 94452107], - [127, 56, 6, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 2995304175], - [129, 7, 33, "Style/MethodCallWithArgsParentheses: Use parentheses for method calls with arguments.", 2119277184] - ], - "test/util.rb:3165676623": [ - [2, 9, 10, "Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.", 209039958], - [17, 7, 95, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 2974703373], - [17, 20, 14, "Layout/FirstMethodArgumentLineBreak: Add a line break before the first argument of a multi-line method argument list.", 233633100], - [17, 36, 16, "Layout/MultilineMethodArgumentLineBreaks: Each argument in a multi-line method call must start on a separate line.", 2278917617], - [18, 20, 28, "Layout/ArgumentAlignment: Use one level of indentation for arguments following the first line of a multi-line method call.", 3665097354], - [36, 7, 41, "Minitest/EmptyLineBeforeAssertionMethods: Add empty line before assertion.", 2639977785] + "test/testutil.rb:745136652": [ + [127, 5, 262, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1720821532] ] } diff --git a/Rakefile b/Rakefile index 090b39a5..489d028a 100755 --- a/Rakefile +++ b/Rakefile @@ -1,22 +1,22 @@ #!/usr/bin/env rake -require 'bundler/gem_tasks' +require "bundler/gem_tasks" -require 'rake/testtask' +require "rake/testtask" -desc 'Run tests' -Rake::TestTask.new('test') do |t| - t.libs << 'lib' - t.libs << 'test' - t.test_files = FileList['test/**/test_*.rb'] +desc "Run tests" +Rake::TestTask.new("test") do |t| + t.libs << "lib" + t.libs << "test" + t.test_files = FileList["test/**/test_*.rb"] t.verbose = false end begin - require 'rubocop/lts' + require "rubocop/lts" Rubocop::Lts.install_tasks rescue LoadError task(:rubocop_gradual) do - warn('RuboCop (Gradual) is disabled') + warn("RuboCop (Gradual) is disabled") end end diff --git a/admin/mkassoc b/admin/mkassoc index 71b6fed6..6a700824 100755 --- a/admin/mkassoc +++ b/admin/mkassoc @@ -1,18 +1,18 @@ #!/usr/bin/env ruby -require 'openid/consumer/associationmanager' -require 'openid/store/memory' +require "openid/consumer/associationmanager" +require "openid/store/memory" store = OpenID::Store::Memory.new ARGV.each do |server_url| - unless URI::DEFAULT_PARSER.make_regexp =~ server_url + unless URI::DEFAULT_PARSER.make_regexp&.match?(server_url) puts "`#{server_url}` will be skipped for invalid URI format." next end mgr = OpenID::Consumer::AssociationManager.new(store, server_url) - puts '=' * 50 + puts "=" * 50 puts "Server: #{server_url}" puts mgr.get_association.serialize - puts '-' * 50 + puts "-" * 50 end diff --git a/examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb b/examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb index 72fb1502..a3dbe774 100644 --- a/examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb +++ b/examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb @@ -1,24 +1,24 @@ # Use this migration to create the tables for the ActiveRecord store class AddOpenIdStoreToDb < ActiveRecord::Migration def self.up - create_table 'open_id_associations', force: true do |t| - t.column 'server_url', :string, null: false - t.column 'handle', :string, null: false - t.column 'secret', :binary, null: false - t.column 'issued', :integer, null: false - t.column 'lifetime', :integer, null: false - t.column 'assoc_type', :string, null: false + create_table("open_id_associations", force: true) do |t| + t.column("server_url", :string, null: false) + t.column("handle", :string, null: false) + t.column("secret", :binary, null: false) + t.column("issued", :integer, null: false) + t.column("lifetime", :integer, null: false) + t.column("assoc_type", :string, null: false) end - create_table 'open_id_nonces', force: true do |t| - t.column :server_url, :string, null: false - t.column :timestamp, :integer, null: false - t.column :salt, :string, null: false + create_table("open_id_nonces", force: true) do |t| + t.column(:server_url, :string, null: false) + t.column(:timestamp, :integer, null: false) + t.column(:salt, :string, null: false) end end def self.down - drop_table 'open_id_associations' - drop_table 'open_id_nonces' + drop_table("open_id_associations") + drop_table("open_id_nonces") end end diff --git a/examples/active_record_openid_store/XXX_upgrade_open_id_store.rb b/examples/active_record_openid_store/XXX_upgrade_open_id_store.rb index ef24195f..78f7ba8d 100644 --- a/examples/active_record_openid_store/XXX_upgrade_open_id_store.rb +++ b/examples/active_record_openid_store/XXX_upgrade_open_id_store.rb @@ -2,25 +2,25 @@ # to the new 2.0 schema. class UpgradeOpenIdStore < ActiveRecord::Migration def self.up - drop_table 'open_id_settings' - drop_table 'open_id_nonces' - create_table 'open_id_nonces', force: true do |t| - t.column :server_url, :string, null: false - t.column :timestamp, :integer, null: false - t.column :salt, :string, null: false + drop_table("open_id_settings") + drop_table("open_id_nonces") + create_table("open_id_nonces", force: true) do |t| + t.column(:server_url, :string, null: false) + t.column(:timestamp, :integer, null: false) + t.column(:salt, :string, null: false) end end def self.down - drop_table 'open_id_nonces' - create_table 'open_id_nonces', force: true do |t| - t.column 'nonce', :string - t.column 'created', :integer + drop_table("open_id_nonces") + create_table("open_id_nonces", force: true) do |t| + t.column("nonce", :string) + t.column("created", :integer) end - create_table 'open_id_settings', force: true do |t| - t.column 'setting', :string - t.column 'value', :binary + create_table("open_id_settings", force: true) do |t| + t.column("setting", :string) + t.column("value", :binary) end end end diff --git a/examples/active_record_openid_store/init.rb b/examples/active_record_openid_store/init.rb index b625179e..2bf4956d 100644 --- a/examples/active_record_openid_store/init.rb +++ b/examples/active_record_openid_store/init.rb @@ -1,8 +1,8 @@ # might using the ruby-openid gem begin - require 'rubygems' + require "rubygems" rescue LoadError nil end -require 'openid' -require 'openid_ar_store' +require "openid" +require "openid_ar_store" diff --git a/examples/active_record_openid_store/lib/association.rb b/examples/active_record_openid_store/lib/association.rb index e432a178..9861588e 100644 --- a/examples/active_record_openid_store/lib/association.rb +++ b/examples/active_record_openid_store/lib/association.rb @@ -1,8 +1,8 @@ -require 'openid/association' -require 'time' +require "openid/association" +require "time" class Association < ActiveRecord::Base - set_table_name 'open_id_associations' + set_table_name "open_id_associations" def from_record OpenID::Association.new(handle, secret, Time.at(issued), lifetime, assoc_type) end diff --git a/examples/active_record_openid_store/lib/nonce.rb b/examples/active_record_openid_store/lib/nonce.rb index fcf51530..099df2e9 100644 --- a/examples/active_record_openid_store/lib/nonce.rb +++ b/examples/active_record_openid_store/lib/nonce.rb @@ -1,3 +1,3 @@ class Nonce < ActiveRecord::Base - set_table_name 'open_id_nonces' + set_table_name "open_id_nonces" end diff --git a/examples/active_record_openid_store/lib/openid_ar_store.rb b/examples/active_record_openid_store/lib/openid_ar_store.rb index a6bf6c61..ccbaa090 100644 --- a/examples/active_record_openid_store/lib/openid_ar_store.rb +++ b/examples/active_record_openid_store/lib/openid_ar_store.rb @@ -1,28 +1,30 @@ -require 'association' -require 'nonce' -require 'openid/store/interface' +require "association" +require "nonce" +require "openid/store/interface" # not in OpenID module to avoid namespace conflict class ActiveRecordStore < OpenID::Store::Interface def store_association(server_url, assoc) remove_association(server_url, assoc.handle) - Association.create!(server_url: server_url, - handle: assoc.handle, - secret: assoc.secret, - issued: assoc.issued.to_i, - lifetime: assoc.lifetime, - assoc_type: assoc.assoc_type) + Association.create!( + server_url: server_url, + handle: assoc.handle, + secret: assoc.secret, + issued: assoc.issued.to_i, + lifetime: assoc.lifetime, + assoc_type: assoc.assoc_type, + ) end def get_association(server_url, handle = nil) assocs = if handle.blank? - Association.find_all_by_server_url(server_url) - else - Association.find_all_by_server_url_and_handle(server_url, handle) - end + Association.find_all_by_server_url(server_url) + else + Association.find_all_by_server_url_and_handle(server_url, handle) + end if assocs.any? - assocs.reverse.each do |assoc| + assocs.reverse_each do |assoc| a = assoc.from_record return a unless a.expires_in.zero? @@ -34,7 +36,7 @@ def get_association(server_url, handle = nil) end def remove_association(server_url, handle) - Association.delete_all(['server_url = ? AND handle = ?', server_url, handle]) > 0 + Association.delete_all(["server_url = ? AND handle = ?", server_url, handle]) > 0 end def use_nonce(server_url, timestamp, salt) @@ -47,11 +49,11 @@ def use_nonce(server_url, timestamp, salt) def cleanup_nonces now = Time.now.to_i - Nonce.delete_all(['timestamp > ? OR timestamp < ?', now + OpenID::Nonce.skew, now - OpenID::Nonce.skew]) + Nonce.delete_all(["timestamp > ? OR timestamp < ?", now + OpenID::Nonce.skew, now - OpenID::Nonce.skew]) end def cleanup_associations now = Time.now.to_i - Association.delete_all(['issued + lifetime < ?', now]) + Association.delete_all(["issued + lifetime < ?", now]) end end diff --git a/examples/active_record_openid_store/test/store_test.rb b/examples/active_record_openid_store/test/store_test.rb index 38563d51..f70a4a20 100644 --- a/examples/active_record_openid_store/test/store_test.rb +++ b/examples/active_record_openid_store/test/store_test.rb @@ -1,11 +1,11 @@ -$:.unshift(File.dirname(__FILE__) + '/../lib') -require 'test/unit' -RAILS_ENV = 'test' -require File.expand_path(File.join(File.dirname(__FILE__), '../../../../config/environment.rb')) +$:.unshift(File.dirname(__FILE__) + "/../lib") +require "test/unit" +RAILS_ENV = "test" +require File.expand_path(File.join(File.dirname(__FILE__), "../../../../config/environment.rb")) module StoreTestCase @@allowed_handle = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~' - @@allowed_nonce = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' + @@allowed_nonce = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" def _gen_nonce OpenID::CryptUtil.random_string(8, @@allowed_nonce) @@ -22,8 +22,13 @@ def _gen_secret(n, chars = nil) def _gen_assoc(issued, lifetime = 600) secret = _gen_secret(20) handle = _gen_handle(128) - OpenID::Association.new(handle, secret, Time.now + issued, lifetime, - 'HMAC-SHA1') + OpenID::Association.new( + handle, + secret, + Time.now + issued, + lifetime, + "HMAC-SHA1", + ) end def _check_retrieve(url, handle = nil, expected = nil) @@ -40,11 +45,12 @@ def _check_retrieve(url, handle = nil, expected = nil) def _check_remove(url, handle, expected) present = @store.remove_association(url, handle) + assert_equal(expected, present) end def test_store - server_url = 'http://www.myopenid.com/openid' + server_url = "http://www.myopenid.com/openid" assoc = _gen_assoc(0) # Make sure that a missing association returns no result @@ -62,10 +68,10 @@ def test_store _check_retrieve(server_url, nil, assoc) # Removing an association that does not exist returns not present - _check_remove(server_url, assoc.handle + 'x', false) + _check_remove(server_url, assoc.handle + "x", false) # Removing an association that does not exist returns not present - _check_remove(server_url + 'x', assoc.handle, false) + _check_remove(server_url + "x", assoc.handle, false) # Removing an association that is present returns present _check_remove(server_url, assoc.handle, true) @@ -136,24 +142,26 @@ def test_store assoc_expired_2 = _gen_assoc(-7200, 3600) @store.cleanup_associations - @store.store_association(server_url + '1', assoc_valid_1) - @store.store_association(server_url + '1', assoc_expired_1) - @store.store_association(server_url + '2', assoc_expired_2) - @store.store_association(server_url + '3', assoc_valid_2) + @store.store_association(server_url + "1", assoc_valid_1) + @store.store_association(server_url + "1", assoc_expired_1) + @store.store_association(server_url + "2", assoc_expired_2) + @store.store_association(server_url + "3", assoc_valid_2) cleaned = @store.cleanup_associations - assert_equal(2, cleaned, 'cleaned up associations') + + assert_equal(2, cleaned, "cleaned up associations") end - def _check_use_nonce(nonce, expected, server_url, msg = '') + def _check_use_nonce(nonce, expected, server_url, msg = "") stamp, salt = OpenID::Nonce.split_nonce(nonce) actual = @store.use_nonce(server_url, stamp, salt) + assert_equal(expected, actual, msg) end def test_nonce - server_url = 'http://www.myopenid.com/openid' - [server_url, ''].each do |url| + server_url = "http://www.myopenid.com/openid" + [server_url, ""].each do |url| nonce1 = OpenID::Nonce.mk_nonce _check_use_nonce(nonce1, true, url, "#{url}: nonce allowed by default") @@ -175,23 +183,30 @@ def test_nonce @store.cleanup_nonces OpenID::Nonce.skew = 1_000_000 ts, salt = OpenID::Nonce.split_nonce(old_nonce1) - assert(@store.use_nonce(server_url, ts, salt), 'oldnonce1') + + assert(@store.use_nonce(server_url, ts, salt), "oldnonce1") ts, salt = OpenID::Nonce.split_nonce(old_nonce2) - assert(@store.use_nonce(server_url, ts, salt), 'oldnonce2') + + assert(@store.use_nonce(server_url, ts, salt), "oldnonce2") ts, salt = OpenID::Nonce.split_nonce(recent_nonce) - assert(@store.use_nonce(server_url, ts, salt), 'recent_nonce') + + assert(@store.use_nonce(server_url, ts, salt), "recent_nonce") OpenID::Nonce.skew = 1000 cleaned = @store.cleanup_nonces + assert_equal(2, cleaned, "Cleaned #{cleaned} nonces") OpenID::Nonce.skew = 100_000 ts, salt = OpenID::Nonce.split_nonce(old_nonce1) - assert(@store.use_nonce(server_url, ts, salt), 'oldnonce1 after cleanup') + + assert(@store.use_nonce(server_url, ts, salt), "oldnonce1 after cleanup") ts, salt = OpenID::Nonce.split_nonce(old_nonce2) - assert(@store.use_nonce(server_url, ts, salt), 'oldnonce2 after cleanup') + + assert(@store.use_nonce(server_url, ts, salt), "oldnonce2 after cleanup") ts, salt = OpenID::Nonce.split_nonce(recent_nonce) - assert(!@store.use_nonce(server_url, ts, salt), 'recent_nonce after cleanup') + + assert(!@store.use_nonce(server_url, ts, salt), "recent_nonce after cleanup") OpenID::Nonce.skew = orig_skew end diff --git a/examples/discover b/examples/discover index 60936b89..8849dc30 100755 --- a/examples/discover +++ b/examples/discover @@ -1,20 +1,22 @@ #!/usr/bin/env ruby -require 'openid/consumer/discovery' -require 'openid/fetchers' +require "openid/consumer/discovery" +require "openid/fetchers" OpenID.fetcher_use_env_http_proxy -$names = [[:server_url, 'Server URL '], - [:local_id, 'Local ID '], - [:canonical_id, 'Canonical ID']] +$names = [ + [:server_url, "Server URL "], + [:local_id, "Local ID "], + [:canonical_id, "Canonical ID"], +] def show_services(_user_input, normalized, services) puts " Claimed identifier: #{normalized}" if services.empty? - puts ' No OpenID services found' + puts " No OpenID services found" puts else - puts ' Discovered services:' + puts " Discovered services:" n = 0 services.each do |service| n += 1 @@ -23,7 +25,7 @@ def show_services(_user_input, normalized, services) val = service.send(meth) printf(" %s: %s\n", name, val) if val end - puts ' Type URIs:' + puts " Type URIs:" for type_uri in service.type_uris puts " * #{type_uri}" end @@ -33,7 +35,7 @@ def show_services(_user_input, normalized, services) end ARGV.each do |openid_identifier| - puts '=' * 50 + puts "=" * 50 puts "Running discovery on #{openid_identifier}" begin normalized_identifier, services = OpenID.discover(openid_identifier) diff --git a/examples/rails_openid/Gemfile b/examples/rails_openid/Gemfile index c44e0efe..04d34c21 100644 --- a/examples/rails_openid/Gemfile +++ b/examples/rails_openid/Gemfile @@ -1,27 +1,27 @@ -source 'https://rubygems.org' +source "https://rubygems.org" -gem 'rails', '3.2.13' +gem "rails", "3.2.13" # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' -gem 'sqlite3' +gem "sqlite3" -gem 'json' +gem "json" # Gems used only for assets and not required # in production environments by default. group :assets do - gem 'coffee-rails', '~> 3.2.1' - gem 'sass-rails', '~> 3.2.3' + gem "coffee-rails", "~> 3.2.1" + gem "sass-rails", "~> 3.2.3" # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby - gem 'uglifier', '>= 1.0.3' + gem "uglifier", ">= 1.0.3" end -gem 'jquery-rails' +gem "jquery-rails" # To use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' @@ -38,4 +38,4 @@ gem 'jquery-rails' # To use debugger # gem 'ruby-debug' -gem 'ruby-openid', require: 'openid' +gem "ruby-openid", require: "openid" diff --git a/examples/rails_openid/Rakefile b/examples/rails_openid/Rakefile index 1c4668a5..6ab19582 100755 --- a/examples/rails_openid/Rakefile +++ b/examples/rails_openid/Rakefile @@ -2,6 +2,6 @@ # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. -require File.expand_path('config/application', __dir__) +require File.expand_path("config/application", __dir__) RailsOpenid::Application.load_tasks diff --git a/examples/rails_openid/app/controllers/consumer_controller.rb b/examples/rails_openid/app/controllers/consumer_controller.rb index a6b1502b..d4607444 100644 --- a/examples/rails_openid/app/controllers/consumer_controller.rb +++ b/examples/rails_openid/app/controllers/consumer_controller.rb @@ -1,9 +1,9 @@ -require 'pathname' +require "pathname" -require 'openid' -require 'openid/extensions/sreg' -require 'openid/extensions/pape' -require 'openid/store/filesystem' +require "openid" +require "openid/extensions/sreg" +require "openid/extensions/pape" +require "openid/store/filesystem" class ConsumerController < ApplicationController layout nil @@ -16,14 +16,14 @@ def start begin identifier = params[:openid_identifier] if identifier.nil? - flash[:error] = 'Enter an OpenID identifier' - redirect_to action: 'index' + flash[:error] = "Enter an OpenID identifier" + redirect_to(action: "index") return end oidreq = consumer.begin(identifier) rescue OpenID::OpenIDError => e flash[:error] = "Discovery failed for #{identifier}: #{e}" - redirect_to action: 'index' + redirect_to(action: "index") return end if params[:use_sreg] @@ -33,50 +33,50 @@ def start # optional fields sregreq.request_fields(%w[dob fullname], false) oidreq.add_extension(sregreq) - oidreq.return_to_args['did_sreg'] = 'y' + oidreq.return_to_args["did_sreg"] = "y" end if params[:use_pape] papereq = OpenID::PAPE::Request.new papereq.add_policy_uri(OpenID::PAPE::AUTH_PHISHING_RESISTANT) papereq.max_auth_age = 2 * 60 * 60 oidreq.add_extension(papereq) - oidreq.return_to_args['did_pape'] = 'y' + oidreq.return_to_args["did_pape"] = "y" end - oidreq.return_to_args['force_post'] = 'x' * 2048 if params[:force_post] - return_to = url_for action: 'complete', only_path: false - realm = url_for action: 'index', id: nil, only_path: false + oidreq.return_to_args["force_post"] = "x" * 2048 if params[:force_post] + return_to = url_for(action: "complete", only_path: false) + realm = url_for(action: "index", id: nil, only_path: false) if oidreq.send_redirect?(realm, return_to, params[:immediate]) - redirect_to oidreq.redirect_url(realm, return_to, params[:immediate]) + redirect_to(oidreq.redirect_url(realm, return_to, params[:immediate])) else - render text: oidreq.html_markup(realm, return_to, params[:immediate], { 'id' => 'openid_form' }) + render(text: oidreq.html_markup(realm, return_to, params[:immediate], {"id" => "openid_form"})) end end def complete # FIXME: - url_for some action is not necessarily the current URL. - current_url = url_for(action: 'complete', only_path: false) + current_url = url_for(action: "complete", only_path: false) parameters = params.reject { |k, _v| request.path_parameters[k] } - parameters.reject! { |k, _v| %w[action controller].include? k.to_s } + parameters.reject! { |k, _v| %w[action controller].include?(k.to_s) } oidresp = consumer.complete(parameters, current_url) case oidresp.status when OpenID::Consumer::FAILURE flash[:error] = if oidresp.display_identifier - "Verification of #{oidresp.display_identifier}"\ - " failed: #{oidresp.message}" - else - "Verification failed: #{oidresp.message}" - end + "Verification of #{oidresp.display_identifier} " \ + "failed: #{oidresp.message}" + else + "Verification failed: #{oidresp.message}" + end when OpenID::Consumer::SUCCESS - flash[:success] = "Verification of #{oidresp.display_identifier}"\ - ' succeeded.' + flash[:success] = "Verification of #{oidresp.display_identifier} " \ + "succeeded." if params[:did_sreg] sreg_resp = OpenID::SReg::Response.from_success_response(oidresp) - sreg_message = 'Simple Registration data was requested' + sreg_message = "Simple Registration data was requested" if sreg_resp.empty? - sreg_message << ', but none was returned.' + sreg_message << ", but none was returned." else - sreg_message << '. The following data were sent:' + sreg_message << ". The following data were sent:" sreg_resp.data.each do |k, v| sreg_message << "
#{k}: #{v}" end @@ -85,29 +85,29 @@ def complete end if params[:did_pape] pape_resp = OpenID::PAPE::Response.from_success_response(oidresp) - pape_message = 'A phishing resistant authentication method was requested' - pape_message << if pape_resp.auth_policies.member? OpenID::PAPE::AUTH_PHISHING_RESISTANT - ', and the server reported one.' - else - ', but the server did not report one.' - end + pape_message = "A phishing resistant authentication method was requested" + pape_message << if pape_resp.auth_policies.member?(OpenID::PAPE::AUTH_PHISHING_RESISTANT) + ", and the server reported one." + else + ", but the server did not report one." + end pape_message << "
Authentication time: #{pape_resp.auth_time} seconds" if pape_resp.auth_time pape_message << "
NIST Auth Level: #{pape_resp.nist_auth_level}" if pape_resp.nist_auth_level flash[:pape_results] = pape_message end when OpenID::Consumer::SETUP_NEEDED - flash[:alert] = 'Immediate request failed - Setup Needed' + flash[:alert] = "Immediate request failed - Setup Needed" when OpenID::Consumer::CANCEL - flash[:alert] = 'OpenID transaction cancelled.' + flash[:alert] = "OpenID transaction cancelled." end - redirect_to action: 'index' + redirect_to(action: "index") end private def consumer if @consumer.nil? - dir = Pathname.new(RAILS_ROOT).join('db').join('cstore') + dir = Pathname.new(RAILS_ROOT).join("db").join("cstore") store = OpenID::Store::Filesystem.new(dir) @consumer = OpenID::Consumer.new(session, store) end diff --git a/examples/rails_openid/app/controllers/login_controller.rb b/examples/rails_openid/app/controllers/login_controller.rb index 71c2dd68..f3f8687b 100644 --- a/examples/rails_openid/app/controllers/login_controller.rb +++ b/examples/rails_openid/app/controllers/login_controller.rb @@ -1,19 +1,21 @@ # Controller for handling the login, logout process for "users" of our # little server. Users have no password. This is just an example. -require 'openid' +require "openid" class LoginController < ApplicationController - layout 'server' + layout "server" def base_url - url_for(controller: 'login', action: nil, only_path: false) + url_for(controller: "login", action: nil, only_path: false) end def index - response.headers['X-XRDS-Location'] = url_for(controller: 'server', - action: 'idp_xrds', - only_path: false) + response.headers["X-XRDS-Location"] = url_for( + controller: "server", + action: "idp_xrds", + only_path: false, + ) @base_url = base_url # just show the login page end @@ -31,13 +33,13 @@ def submit flash[:notice] = "Your OpenID URL is #{base_url}user/#{user}

Proceed to step 2 below." end - redirect_to action: 'index' + redirect_to(action: "index") end def logout # delete the username from the session hash session[:username] = nil session[:approvals] = nil - redirect_to action: 'index' + redirect_to(action: "index") end end diff --git a/examples/rails_openid/app/controllers/server_controller.rb b/examples/rails_openid/app/controllers/server_controller.rb index 0ef696fe..6f9b6f72 100644 --- a/examples/rails_openid/app/controllers/server_controller.rb +++ b/examples/rails_openid/app/controllers/server_controller.rb @@ -1,10 +1,10 @@ -require 'pathname' +require "pathname" -require 'openid' -require 'openid/consumer/discovery' -require 'openid/extensions/sreg' -require 'openid/extensions/pape' -require 'openid/store/filesystem' +require "openid" +require "openid/consumer/discovery" +require "openid/extensions/sreg" +require "openid/extensions/pape" +require "openid/store/filesystem" class ServerController < ApplicationController include ServerHelper @@ -16,13 +16,13 @@ def index oidreq = server.decode_request(params) rescue ProtocolError => e # invalid openid request, so just display a page with an error message - render text: e.to_s, status: 500 + render(text: e.to_s, status: 500) return end # no openid.mode was given unless oidreq - render text: 'This is an OpenID server endpoint.' + render(text: "This is an OpenID server endpoint.") return end @@ -56,7 +56,7 @@ def index add_pape(oidreq, oidresp) elsif oidreq.immediate - server_url = url_for action: 'index' + server_url = url_for(action: "index") oidresp = oidreq.answer(false, server_url) else @@ -71,48 +71,48 @@ def index render_response(oidresp) end - def show_decision_page(oidreq, message = 'Do you trust this site with your identity?') + def show_decision_page(oidreq, message = "Do you trust this site with your identity?") session[:last_oidreq] = oidreq @oidreq = oidreq flash[:notice] = message if message - render template: 'server/decide', layout: 'server' + render(template: "server/decide", layout: "server") end def user_page # Yadis content-negotiation: we want to return the xrds if asked for. - accept = request.env['HTTP_ACCEPT'] + accept = request.env["HTTP_ACCEPT"] # This is not technically correct, and should eventually be updated # to do real Accept header parsing and logic. Though I expect it will work # 99% of the time. - if accept and accept.include?('application/xrds+xml') + if accept and accept.include?("application/xrds+xml") user_xrds return end # content negotiation failed, so just render the user page - xrds_url = url_for(controller: 'user', action: params[:username]) + '/xrds' + xrds_url = url_for(controller: "user", action: params[:username]) + "/xrds" identity_page = <<~EOS - +

OpenID identity page for #{params[:username]}

EOS # Also add the Yadis location header, so that they don't have # to parse the html unless absolutely necessary. - response.headers['X-XRDS-Location'] = xrds_url - render text: identity_page + response.headers["X-XRDS-Location"] = xrds_url + render(text: identity_page) end def user_xrds types = [ OpenID::OPENID_2_0_TYPE, OpenID::OPENID_1_0_TYPE, - OpenID::SREG_URI + OpenID::SREG_URI, ] render_xrds(types) @@ -120,7 +120,7 @@ def user_xrds def idp_xrds types = [ - OpenID::OPENID_IDP_2_0_TYPE + OpenID::OPENID_IDP_2_0_TYPE, ] render_xrds(types) @@ -131,20 +131,20 @@ def decision session[:last_oidreq] = nil if params[:yes].nil? - redirect_to oidreq.cancel_url + redirect_to(oidreq.cancel_url) nil else id_to_send = params[:id_to_send] identity = oidreq.identity if oidreq.id_select - if id_to_send and id_to_send != '' + if id_to_send and id_to_send != "" session[:username] = id_to_send session[:approvals] = [] identity = url_for_user else - msg = 'You must enter a username to in order to send ' + - 'an identifier to the Relying Party.' + msg = "You must enter a username to in order to send " + + "an identifier to the Relying Party." show_decision_page(oidreq, msg) return end @@ -166,8 +166,8 @@ def decision def server if @server.nil? - server_url = url_for action: 'index', only_path: false - dir = Pathname.new(RAILS_ROOT).join('db').join('openid-store') + server_url = url_for(action: "index", only_path: false) + dir = Pathname.new(RAILS_ROOT).join("db").join("openid-store") store = OpenID::Store::Filesystem.new(dir) @server = Server.new(store, server_url) end @@ -185,7 +185,7 @@ def is_authorized(identity_url, trust_root) end def render_xrds(types) - type_str = '' + type_str = "" types.each do |uri| type_str += "#{uri}\n " @@ -199,13 +199,13 @@ def render_xrds(types) #{type_str} - #{url_for(controller: 'server', only_path: false)} + #{url_for(controller: "server", only_path: false)} EOS - render text: yadis, content_type: 'application/xrds+xml' + render(text: yadis, content_type: "application/xrds+xml") end def add_sreg(oidreq, oidresp) @@ -218,9 +218,9 @@ def add_sreg(oidreq, oidresp) # and the user should be asked for permission to release # it. sreg_data = { - 'nickname' => session[:username], - 'fullname' => 'Mayor McCheese', - 'email' => 'mayor@example.com' + "nickname" => session[:username], + "fullname" => "Mayor McCheese", + "email" => "mayor@example.com", } sregresp = OpenID::SReg::Response.extract_response(sregreq, sreg_data) @@ -242,13 +242,13 @@ def render_response(oidresp) case web_response.code when HTTP_OK - render text: web_response.body, status: 200 + render(text: web_response.body, status: 200) when HTTP_REDIRECT - redirect_to web_response.headers['location'] + redirect_to(web_response.headers["location"]) else - render text: web_response.body, status: 400 + render(text: web_response.body, status: 400) end end end diff --git a/examples/rails_openid/app/helpers/server_helper.rb b/examples/rails_openid/app/helpers/server_helper.rb index 128bb530..504d1a8e 100644 --- a/examples/rails_openid/app/helpers/server_helper.rb +++ b/examples/rails_openid/app/helpers/server_helper.rb @@ -1,5 +1,5 @@ module ServerHelper def url_for_user - url_for controller: 'user', action: session[:username] + url_for(controller: "user", action: session[:username]) end end diff --git a/examples/rails_openid/config.ru b/examples/rails_openid/config.ru index e548f229..8344b23a 100644 --- a/examples/rails_openid/config.ru +++ b/examples/rails_openid/config.ru @@ -1,4 +1,4 @@ # This file is used by Rack-based servers to start the application. -require ::File.expand_path('config/environment', __dir__) +require File.expand_path("config/environment", __dir__) run RailsOpenid::Application diff --git a/examples/rails_openid/config/application.rb b/examples/rails_openid/config/application.rb index a02a34fc..afcbb54b 100644 --- a/examples/rails_openid/config/application.rb +++ b/examples/rails_openid/config/application.rb @@ -1,6 +1,6 @@ -require File.expand_path('boot', __dir__) +require File.expand_path("boot", __dir__) -require 'rails/all' +require "rails/all" if defined?(Bundler) # If you precompile assets before deploying to production, use this line @@ -34,7 +34,7 @@ class Application < Rails::Application # config.i18n.default_locale = :de # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = 'utf-8' + config.encoding = "utf-8" # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] @@ -57,6 +57,6 @@ class Application < Rails::Application config.assets.enabled = true # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' + config.assets.version = "1.0" end end diff --git a/examples/rails_openid/config/boot.rb b/examples/rails_openid/config/boot.rb index 24efefdb..fe753491 100644 --- a/examples/rails_openid/config/boot.rb +++ b/examples/rails_openid/config/boot.rb @@ -1,6 +1,6 @@ -require 'rubygems' +require "rubygems" # Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) -require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) +require "bundler/setup" if File.exist?(ENV["BUNDLE_GEMFILE"]) diff --git a/examples/rails_openid/config/environment.rb b/examples/rails_openid/config/environment.rb index bdd82113..146c0e04 100644 --- a/examples/rails_openid/config/environment.rb +++ b/examples/rails_openid/config/environment.rb @@ -1,5 +1,5 @@ # Load the rails application -require File.expand_path('application', __dir__) +require File.expand_path("application", __dir__) # Initialize the rails application RailsOpenid::Application.initialize! diff --git a/examples/rails_openid/config/environments/development.rb b/examples/rails_openid/config/environments/development.rb index c5891dea..f4804186 100644 --- a/examples/rails_openid/config/environments/development.rb +++ b/examples/rails_openid/config/environments/development.rb @@ -10,7 +10,7 @@ config.whiny_nils = true # Show full error reports and disable caching - config.consider_all_requests_local = true + config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send diff --git a/examples/rails_openid/config/environments/production.rb b/examples/rails_openid/config/environments/production.rb index 6f9ec097..eeefb009 100644 --- a/examples/rails_openid/config/environments/production.rb +++ b/examples/rails_openid/config/environments/production.rb @@ -5,7 +5,7 @@ config.cache_classes = true # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false + config.consider_all_requests_local = false config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) diff --git a/examples/rails_openid/config/environments/test.rb b/examples/rails_openid/config/environments/test.rb index 94978a74..0c285f21 100644 --- a/examples/rails_openid/config/environments/test.rb +++ b/examples/rails_openid/config/environments/test.rb @@ -9,13 +9,13 @@ # Configure static asset server for tests with Cache-Control for performance config.serve_static_assets = true - config.static_cache_control = 'public, max-age=3600' + config.static_cache_control = "public, max-age=3600" # Log error messages when you accidentally call methods on nil config.whiny_nils = true # Show full error reports and disable caching - config.consider_all_requests_local = true + config.consider_all_requests_local = true config.action_controller.perform_caching = false # Raise exceptions instead of rendering exception templates diff --git a/examples/rails_openid/config/initializers/rails_root.rb b/examples/rails_openid/config/initializers/rails_root.rb index a30eec48..8e4026c2 100644 --- a/examples/rails_openid/config/initializers/rails_root.rb +++ b/examples/rails_openid/config/initializers/rails_root.rb @@ -1 +1 @@ -::RAILS_ROOT = Rails.root +RAILS_ROOT = Rails.root diff --git a/examples/rails_openid/config/initializers/secret_token.rb b/examples/rails_openid/config/initializers/secret_token.rb index 021db970..8129a505 100644 --- a/examples/rails_openid/config/initializers/secret_token.rb +++ b/examples/rails_openid/config/initializers/secret_token.rb @@ -4,4 +4,4 @@ # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. -RailsOpenid::Application.config.secret_token = '2314c4d00e3702d446505b8df2732c433379a0d61ac94c32a25f71612ab6df457bc9979eb32cae28ad6feacdd5a9ae7ac330934c5fb53877e02ce8e23ac0f494' +RailsOpenid::Application.config.secret_token = "2314c4d00e3702d446505b8df2732c433379a0d61ac94c32a25f71612ab6df457bc9979eb32cae28ad6feacdd5a9ae7ac330934c5fb53877e02ce8e23ac0f494" diff --git a/examples/rails_openid/config/initializers/session_store.rb b/examples/rails_openid/config/initializers/session_store.rb index 29b9c860..968d0f24 100644 --- a/examples/rails_openid/config/initializers/session_store.rb +++ b/examples/rails_openid/config/initializers/session_store.rb @@ -1,6 +1,6 @@ # Be sure to restart your server when you modify this file. -RailsOpenid::Application.config.session_store :cookie_store, key: '_rails_openid_session' +RailsOpenid::Application.config.session_store(:cookie_store, key: "_rails_openid_session") # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information diff --git a/examples/rails_openid/config/routes.rb b/examples/rails_openid/config/routes.rb index 7939fa73..2b9cdedd 100644 --- a/examples/rails_openid/config/routes.rb +++ b/examples/rails_openid/config/routes.rb @@ -1,15 +1,15 @@ RailsOpenid::Application.routes.draw do - root controller: 'login', action: :index - match 'server/xrds', controller: 'server', action: 'idp_xrds' - match 'user/:username', controller: 'server', action: 'user_page' - match 'user/:username/xrds', controller: 'server', action: 'user_xrds' + root controller: "login", action: :index + match "server/xrds", controller: "server", action: "idp_xrds" + match "user/:username", controller: "server", action: "user_page" + match "user/:username/xrds", controller: "server", action: "user_xrds" # Allow downloading Web Service WSDL as a file with an extension # instead of a file named 'wsdl' - match ':controller/service.wsdl', action: 'wsdl' + match ":controller/service.wsdl", action: "wsdl" # Install the default route as the lowest priority. - match ':controller/:action/:id' + match ":controller/:action/:id" # The priority is based upon order of creation: # first created -> highest priority. @@ -66,5 +66,5 @@ # This is a legacy wild controller route that's not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. - match ':controller(/:action(/:id))(.:format)' + match ":controller(/:action(/:id))(.:format)" end diff --git a/examples/rails_openid/public/dispatch.fcgi b/examples/rails_openid/public/dispatch.fcgi index 66bd9255..b812f03a 100755 --- a/examples/rails_openid/public/dispatch.fcgi +++ b/examples/rails_openid/public/dispatch.fcgi @@ -20,7 +20,7 @@ # # Custom log path, normal GC behavior. # RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log' # -require File.dirname(__FILE__) + '/../config/environment' -require 'fcgi_handler' +require File.dirname(__FILE__) + "./../config/environment" +require "fcgi_handler" RailsFCGIHandler.process! diff --git a/examples/rails_openid/public/dispatch.rb b/examples/rails_openid/public/dispatch.rb index 09fe7d34..1d3bad08 100755 --- a/examples/rails_openid/public/dispatch.rb +++ b/examples/rails_openid/public/dispatch.rb @@ -2,11 +2,11 @@ # !/usr/local/bin/ruby -require File.dirname(__FILE__) + '/../config/environment' unless defined?(RAILS_ROOT) +require File.dirname(__FILE__) + "./../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired -require 'dispatcher' +require "dispatcher" -ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) +ADDITIONAL_LOAD_PATHS.reverse_each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) Dispatcher.dispatch diff --git a/examples/rails_openid/script/rails b/examples/rails_openid/script/rails index 3c234a25..4cea4ea1 100755 --- a/examples/rails_openid/script/rails +++ b/examples/rails_openid/script/rails @@ -1,6 +1,6 @@ #!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. -APP_PATH = File.expand_path('../config/application', __dir__) -require File.expand_path('../config/boot', __dir__) -require 'rails/commands' +APP_PATH = File.expand_path("../config/application", __dir__) +require File.expand_path("../config/boot", __dir__) +require "rails/commands" diff --git a/examples/rails_openid/test/functional/login_controller_test.rb b/examples/rails_openid/test/functional/login_controller_test.rb index 750f1b0d..c2bf4fcb 100644 --- a/examples/rails_openid/test/functional/login_controller_test.rb +++ b/examples/rails_openid/test/functional/login_controller_test.rb @@ -1,5 +1,5 @@ -require File.dirname(__FILE__) + '/../test_helper' -require 'login_controller' +require File.dirname(__FILE__) + "./../test_helper" +require "login_controller" # Re-raise errors caught by the controller. class LoginController @@ -10,12 +10,12 @@ def rescue_action(e) class LoginControllerTest < Test::Unit::TestCase def setup @controller = LoginController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new end # Replace this with your real tests. def test_truth - assert true + assert(true) end end diff --git a/examples/rails_openid/test/functional/server_controller_test.rb b/examples/rails_openid/test/functional/server_controller_test.rb index a7ac95db..6906a311 100644 --- a/examples/rails_openid/test/functional/server_controller_test.rb +++ b/examples/rails_openid/test/functional/server_controller_test.rb @@ -1,5 +1,5 @@ -require File.dirname(__FILE__) + '/../test_helper' -require 'server_controller' +require File.dirname(__FILE__) + "./../test_helper" +require "server_controller" # Re-raise errors caught by the controller. class ServerController @@ -10,12 +10,12 @@ def rescue_action(e) class ServerControllerTest < Test::Unit::TestCase def setup @controller = ServerController.new - @request = ActionController::TestRequest.new - @response = ActionController::TestResponse.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new end # Replace this with your real tests. def test_truth - assert true + assert(true) end end diff --git a/examples/rails_openid/test/performance/browsing_test.rb b/examples/rails_openid/test/performance/browsing_test.rb index 3fea27b9..04704abf 100644 --- a/examples/rails_openid/test/performance/browsing_test.rb +++ b/examples/rails_openid/test/performance/browsing_test.rb @@ -1,5 +1,5 @@ -require 'test_helper' -require 'rails/performance_test_help' +require "test_helper" +require "rails/performance_test_help" class BrowsingTest < ActionDispatch::PerformanceTest # Refer to the documentation for all available options @@ -7,6 +7,6 @@ class BrowsingTest < ActionDispatch::PerformanceTest # :output => 'tmp/performance', :formats => [:flat] } def test_homepage - get '/' + get("/") end end diff --git a/examples/rails_openid/test/test_helper.rb b/examples/rails_openid/test/test_helper.rb index 5547de1b..c33663a8 100644 --- a/examples/rails_openid/test/test_helper.rb +++ b/examples/rails_openid/test/test_helper.rb @@ -1,6 +1,6 @@ -ENV['RAILS_ENV'] = 'test' -require File.expand_path('../config/environment', __dir__) -require 'rails/test_help' +ENV["RAILS_ENV"] = "test" +require File.expand_path("../config/environment", __dir__) +require "rails/test_help" class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. diff --git a/gemfiles/vanilla.gemfile b/gemfiles/vanilla.gemfile index 8a3731da..b45c4e83 100644 --- a/gemfiles/vanilla.gemfile +++ b/gemfiles/vanilla.gemfile @@ -1,9 +1,9 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } -source 'https://rubygems.org' +source "https://rubygems.org" # Root Gemfile is only for local development only. It is not loaded on CI. # On CI we only need the gemspecs' dependencies (including development dependencies). # Exceptions, if any, will be found in gemfiles/*.gemfile -gemspec path: '../' +gemspec path: "../" diff --git a/lib/hmac/hmac.rb b/lib/hmac/hmac.rb index 8d96deca..62b52542 100644 --- a/lib/hmac/hmac.rb +++ b/lib/hmac/hmac.rb @@ -18,8 +18,8 @@ def initialize(algorithm, block_size, output_length, key) @block_size = block_size @output_length = output_length @status = STATUS_UNDEFINED - @key_xor_ipad = '' - @key_xor_opad = '' + @key_xor_ipad = "" + @key_xor_opad = "" set_key(key) unless key.nil? end @@ -28,7 +28,7 @@ def initialize(algorithm, block_size, output_length, key) def check_status return if @status == STATUS_INITIALIZED - raise 'The underlying hash algorithm has not yet been initialized.' + raise "The underlying hash algorithm has not yet been initialized." end public @@ -50,10 +50,10 @@ def set_key(key) end def reset_key - @key_xor_ipad.gsub!(/./, '?') - @key_xor_opad.gsub!(/./, '?') - @key_xor_ipad[0..-1] = '' - @key_xor_opad[0..-1] = '' + @key_xor_ipad.gsub!(/./, "?") + @key_xor_opad.gsub!(/./, "?") + @key_xor_ipad[0..-1] = "" + @key_xor_opad[0..-1] = "" @status = STATUS_UNDEFINED end @@ -70,7 +70,7 @@ def update(text) md.update(str) @md = md end - alias << update + alias_method :<<, :update def digest check_status @@ -81,7 +81,7 @@ def hexdigest check_status @md.hexdigest end - alias to_s hexdigest + alias_method :to_s, :hexdigest # These two class methods below are safer than using above # instance methods combinatorially because an instance will have diff --git a/lib/hmac/sha1.rb b/lib/hmac/sha1.rb index d2f0088a..e67a294a 100644 --- a/lib/hmac/sha1.rb +++ b/lib/hmac/sha1.rb @@ -1,5 +1,5 @@ -require 'hmac/hmac' -require 'digest/sha1' +require "hmac/hmac" +require "digest/sha1" module HMAC class SHA1 < Base diff --git a/lib/hmac/sha2.rb b/lib/hmac/sha2.rb index 0412ba40..faf63a81 100644 --- a/lib/hmac/sha2.rb +++ b/lib/hmac/sha2.rb @@ -1,5 +1,5 @@ -require 'hmac/hmac' -require 'digest/sha2' +require "hmac/hmac" +require "digest/sha2" module HMAC class SHA256 < Base diff --git a/lib/openid.rb b/lib/openid.rb index 55cbdd6d..6fbdc48c 100644 --- a/lib/openid.rb +++ b/lib/openid.rb @@ -15,6 +15,6 @@ module OpenID end -require 'openid/version' -require 'openid/consumer' -require 'openid/server' +require "openid/version" +require "openid/consumer" +require "openid/server" diff --git a/lib/openid/consumer.rb b/lib/openid/consumer.rb index dc6f40ba..f4b5b084 100644 --- a/lib/openid/consumer.rb +++ b/lib/openid/consumer.rb @@ -1,13 +1,13 @@ -require 'openid/consumer/idres' -require 'openid/consumer/checkid_request' -require 'openid/consumer/associationmanager' -require 'openid/consumer/responses' -require 'openid/consumer/session' -require 'openid/consumer/discovery_manager' -require 'openid/consumer/discovery' -require 'openid/message' -require 'openid/yadis/discovery' -require 'openid/store/nonce' +require "openid/consumer/idres" +require "openid/consumer/checkid_request" +require "openid/consumer/associationmanager" +require "openid/consumer/responses" +require "openid/consumer/session" +require "openid/consumer/discovery_manager" +require "openid/consumer/discovery" +require "openid/message" +require "openid/yadis/discovery" +require "openid/store/nonce" module OpenID # OpenID support for Relying Parties (aka Consumers). @@ -193,7 +193,7 @@ def initialize(session, store) @origin_session = session @session = Session.new(session, OpenID::OpenIDServiceEndpoint) @store = store - @session_key_prefix = 'OpenID::Consumer::' + @session_key_prefix = "OpenID::Consumer::" end # Start the OpenID authentication process. See steps 1-2 in the @@ -224,8 +224,11 @@ def begin(openid_identifier, anonymous = false) service = manager.get_next_service(&method(:discover)) if service.nil? - raise DiscoveryFailure.new('No usable OpenID services were found '\ - "for #{openid_identifier.inspect}", nil) + raise DiscoveryFailure.new( + "No usable OpenID services were found " \ + "for #{openid_identifier.inspect}", + nil, + ) else begin_without_discovery(service, anonymous) end @@ -282,9 +285,9 @@ def begin_without_discovery(service, anonymous) # SUCCESS, CANCEL, FAILURE, or SETUP_NEEDED. def complete(query, current_url) message = Message.from_post_args(query) - mode = message.get_arg(OPENID_NS, 'mode', 'invalid') + mode = message.get_arg(OPENID_NS, "mode", "invalid") begin - meth = method('complete_' + mode) + meth = method("complete_" + mode) rescue NameError meth = method(:complete_invalid) end @@ -309,15 +312,15 @@ def session_key(suffix) end def last_requested_endpoint - session_get('last_requested_endpoint') + session_get("last_requested_endpoint") end def last_requested_endpoint=(endpoint) - session_set('last_requested_endpoint', endpoint) + session_set("last_requested_endpoint", endpoint) end def cleanup_last_requested_endpoint - @session[session_key('last_requested_endpoint')] = nil + @session[session_key("last_requested_endpoint")] = nil end def discovery_manager(openid_identifier) @@ -337,8 +340,12 @@ def negotiator end def association_manager(service) - AssociationManager.new(@store, service.server_url, - service.compatibility_mode, negotiator) + AssociationManager.new( + @store, + service.server_url, + service.compatibility_mode, + negotiator, + ) end def handle_idres(message, current_url) @@ -346,9 +353,11 @@ def handle_idres(message, current_url) end def complete_invalid(message, _unused_return_to) - mode = message.get_arg(OPENID_NS, 'mode', '') - FailureResponse.new(last_requested_endpoint, - "Invalid openid.mode: #{mode}") + mode = message.get_arg(OPENID_NS, "mode", "") + FailureResponse.new( + last_requested_endpoint, + "Invalid openid.mode: #{mode}", + ) end def complete_cancel(_unused_message, _unused_return_to) @@ -356,24 +365,28 @@ def complete_cancel(_unused_message, _unused_return_to) end def complete_error(message, _unused_return_to) - error = message.get_arg(OPENID_NS, 'error') - contact = message.get_arg(OPENID_NS, 'contact') - reference = message.get_arg(OPENID_NS, 'reference') + error = message.get_arg(OPENID_NS, "error") + contact = message.get_arg(OPENID_NS, "contact") + reference = message.get_arg(OPENID_NS, "reference") - FailureResponse.new(last_requested_endpoint, - error, contact, reference) + FailureResponse.new( + last_requested_endpoint, + error, + contact, + reference, + ) end def complete_setup_needed(message, _unused_return_to) return complete_invalid(message, nil) if message.is_openid1 - setup_url = message.get_arg(OPENID2_NS, 'user_setup_url') + setup_url = message.get_arg(OPENID2_NS, "user_setup_url") SetupNeededResponse.new(last_requested_endpoint, setup_url) end def complete_id_res(message, current_url) if message.is_openid1 - setup_url = message.get_arg(OPENID_NS, 'user_setup_url') + setup_url = message.get_arg(OPENID_NS, "user_setup_url") return SetupNeededResponse.new(last_requested_endpoint, setup_url) unless setup_url.nil? end @@ -382,8 +395,11 @@ def complete_id_res(message, current_url) rescue OpenIDError => e FailureResponse.new(last_requested_endpoint, e.message) else - SuccessResponse.new(idres.endpoint, message, - idres.signed_fields) + SuccessResponse.new( + idres.endpoint, + message, + idres.signed_fields, + ) end end end diff --git a/lib/openid/consumer/associationmanager.rb b/lib/openid/consumer/associationmanager.rb index 2e594819..d9b76a64 100644 --- a/lib/openid/consumer/associationmanager.rb +++ b/lib/openid/consumer/associationmanager.rb @@ -1,17 +1,19 @@ -require 'openid/dh' -require 'openid/util' -require 'openid/kvpost' -require 'openid/cryptutil' -require 'openid/protocolerror' -require 'openid/association' +require "openid/dh" +require "openid/util" +require "openid/kvpost" +require "openid/cryptutil" +require "openid/protocolerror" +require "openid/association" module OpenID class Consumer # A superclass for implementing Diffie-Hellman association sessions. class DiffieHellmanSession class << self - attr_reader :session_type, :secret_size, :allowed_assoc_types, - :hashfunc + attr_reader :session_type, + :secret_size, + :allowed_assoc_types, + :hashfunc end def initialize(dh = nil) @@ -22,10 +24,10 @@ def initialize(dh = nil) # Return the query parameters for requesting an association # using this Diffie-Hellman association session def get_request - args = { 'dh_consumer_public' => CryptUtil.num_to_base64(@dh.public) } + args = {"dh_consumer_public" => CryptUtil.num_to_base64(@dh.public)} unless @dh.using_default_values? - args['dh_modulus'] = CryptUtil.num_to_base64(@dh.modulus) - args['dh_gen'] = CryptUtil.num_to_base64(@dh.generator) + args["dh_modulus"] = CryptUtil.num_to_base64(@dh.modulus) + args["dh_gen"] = CryptUtil.num_to_base64(@dh.generator) end args @@ -34,31 +36,37 @@ def get_request # Process the response from a successful association request and # return the shared secret for this association def extract_secret(response) - dh_server_public64 = response.get_arg(OPENID_NS, 'dh_server_public', - NO_DEFAULT) - enc_mac_key64 = response.get_arg(OPENID_NS, 'enc_mac_key', NO_DEFAULT) + dh_server_public64 = response.get_arg( + OPENID_NS, + "dh_server_public", + NO_DEFAULT, + ) + enc_mac_key64 = response.get_arg(OPENID_NS, "enc_mac_key", NO_DEFAULT) dh_server_public = CryptUtil.base64_to_num(dh_server_public64) enc_mac_key = Util.from_base64(enc_mac_key64) - @dh.xor_secret(self.class.hashfunc, - dh_server_public, enc_mac_key) + @dh.xor_secret( + self.class.hashfunc, + dh_server_public, + enc_mac_key, + ) end end # A Diffie-Hellman association session that uses SHA1 as its hash # function class DiffieHellmanSHA1Session < DiffieHellmanSession - @session_type = 'DH-SHA1' + @session_type = "DH-SHA1" @secret_size = 20 - @allowed_assoc_types = ['HMAC-SHA1'] + @allowed_assoc_types = ["HMAC-SHA1"] @hashfunc = CryptUtil.method(:sha1) end # A Diffie-Hellman association session that uses SHA256 as its hash # function class DiffieHellmanSHA256Session < DiffieHellmanSession - @session_type = 'DH-SHA256' + @session_type = "DH-SHA256" @secret_size = 32 - @allowed_assoc_types = ['HMAC-SHA256'] + @allowed_assoc_types = ["HMAC-SHA256"] @hashfunc = CryptUtil.method(:sha256) end @@ -67,7 +75,7 @@ class NoEncryptionSession class << self attr_reader :session_type, :allowed_assoc_types end - @session_type = 'no-encryption' + @session_type = "no-encryption" @allowed_assoc_types = %w[HMAC-SHA1 HMAC-SHA256] def get_request @@ -75,7 +83,7 @@ def get_request end def extract_secret(response) - mac_key64 = response.get_arg(OPENID_NS, 'mac_key', NO_DEFAULT) + mac_key64 = response.get_arg(OPENID_NS, "mac_key", NO_DEFAULT) Util.from_base64(mac_key64) end end @@ -85,20 +93,20 @@ def extract_secret(response) class AssociationManager def self.create_session(session_type) case session_type - when 'no-encryption' + when "no-encryption" NoEncryptionSession.new - when 'DH-SHA1' + when "DH-SHA1" DiffieHellmanSHA1Session.new - when 'DH-SHA256' + when "DH-SHA256" DiffieHellmanSHA256Session.new else - raise ArgumentError, 'Unknown association session type: '\ - "#{session_type.inspect}" + raise ArgumentError, "Unknown association session type: " \ + "#{session_type.inspect}" end end def initialize(store, server_url, compatibility_mode = false, - negotiator = nil) + negotiator = nil) @store = store @server_url = server_url @compatibility_mode = compatibility_mode @@ -106,7 +114,7 @@ def initialize(store, server_url, compatibility_mode = false, end def get_association - return nil if @store.nil? + return if @store.nil? assoc = @store.get_association(@server_url) if assoc.nil? || assoc.expires_in <= 0 @@ -131,14 +139,14 @@ def negotiate_association request_association(assoc_type, session_type) rescue ServerError => why Util.log("Server #{@server_url} refused its suggested " \ - "association type: session_type=#{session_type}, " \ - "assoc_type=#{assoc_type}") + "association type: session_type=#{session_type}, " \ + "assoc_type=#{assoc_type}") nil end end rescue InvalidOpenIDNamespace Util.log("Server #{@server_url} returned a malformed association " \ - 'response. Falling back to check_id mode for this request.') + "response. Falling back to check_id mode for this request.") nil end end @@ -148,30 +156,30 @@ def negotiate_association def extract_supported_association_type(server_error, assoc_type) # Any error message whose code is not 'unsupported-type' should # be considered a total failure. - if server_error.error_code != 'unsupported-type' or - server_error.message.is_openid1 - Util.log('Server error when requesting an association from '\ - "#{@server_url}: #{server_error.error_text}") - return nil + if server_error.error_code != "unsupported-type" or + server_error.message.is_openid1 + Util.log("Server error when requesting an association from " \ + "#{@server_url}: #{server_error.error_text}") + return end # The server didn't like the association/session type that we # sent, and it sent us back a message that might tell us how to # handle it. - Util.log("Unsupported association type #{assoc_type}: "\ - "#{server_error.error_text}") + Util.log("Unsupported association type #{assoc_type}: " \ + "#{server_error.error_text}") # Extract the session_type and assoc_type from the error message - assoc_type = server_error.message.get_arg(OPENID_NS, 'assoc_type') - session_type = server_error.message.get_arg(OPENID_NS, 'session_type') + assoc_type = server_error.message.get_arg(OPENID_NS, "assoc_type") + session_type = server_error.message.get_arg(OPENID_NS, "session_type") if assoc_type.nil? or session_type.nil? - Util.log("Server #{@server_url} responded with unsupported "\ - 'association session but did not supply a fallback.') + Util.log("Server #{@server_url} responded with unsupported " \ + "association session but did not supply a fallback.") nil elsif !@negotiator.allowed?(assoc_type, session_type) - Util.log('Server sent unsupported session/association type: '\ - "session_type=#{session_type}, assoc_type=#{assoc_type}") + Util.log("Server sent unsupported session/association type: " \ + "session_type=#{session_type}, assoc_type=#{assoc_type}") nil else [assoc_type, session_type] @@ -192,12 +200,12 @@ def request_association(assoc_type, session_type) Util.log("Got HTTP status error when requesting association: #{e}") nil rescue Message::KeyNotFound => e - Util.log('Missing required parameter in response from '\ - "#{@server_url}: #{e}") + Util.log("Missing required parameter in response from " \ + "#{@server_url}: #{e}") nil rescue ProtocolError => e - Util.log("Protocol error processing response from #{@server_url}: "\ - "#{e}") + Util.log("Protocol error processing response from #{@server_url}: " \ + "#{e}") nil end end @@ -208,17 +216,17 @@ def request_association(assoc_type, session_type) def create_associate_request(assoc_type, session_type) assoc_session = self.class.create_session(session_type) args = { - 'mode' => 'associate', - 'assoc_type' => assoc_type + "mode" => "associate", + "assoc_type" => assoc_type, } - args['ns'] = OPENID2_NS unless @compatibility_mode + args["ns"] = OPENID2_NS unless @compatibility_mode # Leave out the session type if we're in compatibility mode # *and* it's no-encryption. if !@compatibility_mode || - assoc_session.class.session_type != 'no-encryption' - args['session_type'] = assoc_session.class.session_type + assoc_session.class.session_type != "no-encryption" + args["session_type"] = assoc_session.class.session_type end args.merge!(assoc_session.get_request) @@ -237,7 +245,7 @@ def create_associate_request(assoc_type, session_type) def get_openid1_session_type(assoc_response) # If it's an OpenID 1 message, allow session_type to default # to nil (which signifies "no-encryption") - session_type = assoc_response.get_arg(OPENID_NS, 'session_type') + session_type = assoc_response.get_arg(OPENID_NS, "session_type") # Handle the differences between no-encryption association # respones in OpenID 1 and 2: @@ -245,16 +253,16 @@ def get_openid1_session_type(assoc_response) # no-encryption is not really a valid session type for # OpenID 1, but we'll accept it anyway, while issuing a # warning. - if session_type == 'no-encryption' - Util.log("WARNING: #{@server_url} sent 'no-encryption'"\ - 'for OpenID 1.X') + if session_type == "no-encryption" + Util.log("WARNING: #{@server_url} sent 'no-encryption'" \ + "for OpenID 1.X") # Missing or empty session type is the way to flag a # 'no-encryption' response. Change the session type to # 'no-encryption' so that it can be handled in the same # way as OpenID 2 'no-encryption' respones. - elsif session_type == '' || session_type.nil? - session_type = 'no-encryption' + elsif session_type == "" || session_type.nil? + session_type = "no-encryption" end session_type @@ -262,8 +270,8 @@ def get_openid1_session_type(assoc_response) def self.extract_expires_in(message) # expires_in should be a base-10 string. - expires_in_str = message.get_arg(OPENID_NS, 'expires_in', NO_DEFAULT) - raise ProtocolError, "Invalid expires_in field: #{expires_in_str}" unless /\A\d+\Z/ =~ expires_in_str + expires_in_str = message.get_arg(OPENID_NS, "expires_in", NO_DEFAULT) + raise ProtocolError, "Invalid expires_in field: #{expires_in_str}" unless /\A\d+\Z/.match?(expires_in_str) expires_in_str.to_i end @@ -274,23 +282,32 @@ def self.extract_expires_in(message) def extract_association(assoc_response, assoc_session) # Extract the common fields from the response, raising an # exception if they are not found - assoc_type = assoc_response.get_arg(OPENID_NS, 'assoc_type', - NO_DEFAULT) - assoc_handle = assoc_response.get_arg(OPENID_NS, 'assoc_handle', - NO_DEFAULT) + assoc_type = assoc_response.get_arg( + OPENID_NS, + "assoc_type", + NO_DEFAULT, + ) + assoc_handle = assoc_response.get_arg( + OPENID_NS, + "assoc_handle", + NO_DEFAULT, + ) expires_in = self.class.extract_expires_in(assoc_response) # OpenID 1 has funny association session behaviour. session_type = if assoc_response.is_openid1 - get_openid1_session_type(assoc_response) - else - assoc_response.get_arg(OPENID2_NS, 'session_type', - NO_DEFAULT) - end + get_openid1_session_type(assoc_response) + else + assoc_response.get_arg( + OPENID2_NS, + "session_type", + NO_DEFAULT, + ) + end # Session type mismatch if assoc_session.class.session_type != session_type - if assoc_response.is_openid1 and session_type == 'no-encryption' + if assoc_response.is_openid1 and session_type == "no-encryption" # In OpenID 1, any association request can result in a # 'no-encryption' association response. Setting # assoc_session to a new no-encryption session should @@ -301,17 +318,17 @@ def extract_association(assoc_response, assoc_session) # Any other mismatch, regardless of protocol version # results in the failure of the association session # altogether. - raise ProtocolError, 'Session type mismatch. Expected '\ - "#{assoc_session.class.session_type}, got "\ - "#{session_type}" + raise ProtocolError, "Session type mismatch. Expected " \ + "#{assoc_session.class.session_type}, got " \ + "#{session_type}" end end # Make sure assoc_type is valid for session_type unless assoc_session.class.allowed_assoc_types.member?(assoc_type) - raise ProtocolError, 'Unsupported assoc_type for session '\ - "#{assoc_session.class.session_type} "\ - "returned: #{assoc_type}" + raise ProtocolError, "Unsupported assoc_type for session " \ + "#{assoc_session.class.session_type} " \ + "returned: #{assoc_type}" end # Delegate to the association session to extract the secret @@ -320,13 +337,17 @@ def extract_association(assoc_response, assoc_session) begin secret = assoc_session.extract_secret(assoc_response) rescue Message::KeyNotFound, ArgumentError => e - raise ProtocolError, 'Malformed response for '\ - "#{assoc_session.class.session_type} "\ - "session: #{e.message}" + raise ProtocolError, "Malformed response for " \ + "#{assoc_session.class.session_type} " \ + "session: #{e.message}" end - Association.from_expires_in(expires_in, assoc_handle, secret, - assoc_type) + Association.from_expires_in( + expires_in, + assoc_handle, + secret, + assoc_type, + ) end end end diff --git a/lib/openid/consumer/checkid_request.rb b/lib/openid/consumer/checkid_request.rb index dd6021ec..422cca84 100644 --- a/lib/openid/consumer/checkid_request.rb +++ b/lib/openid/consumer/checkid_request.rb @@ -1,5 +1,5 @@ -require 'openid/message' -require 'openid/util' +require "openid/message" +require "openid/util" module OpenID class Consumer @@ -36,8 +36,8 @@ def initialize(assoc, endpoint) # with OpenID 1. def anonymous=(is_anonymous) if is_anonymous && @message.is_openid1 - raise ArgumentError, 'OpenID1 requests MUST include the '\ - 'identifier in the request' + raise ArgumentError, "OpenID1 requests MUST include the " \ + "identifier in the request" end @anonymous = is_anonymous end @@ -76,25 +76,25 @@ def get_message(realm, return_to = nil, immediate = false) if !return_to.nil? return_to = Util.append_args(return_to, @return_to_args) elsif immediate - raise ArgumentError, '"return_to" is mandatory when using '\ - '"checkid_immediate"' + raise ArgumentError, '"return_to" is mandatory when using ' \ + '"checkid_immediate"' elsif @message.is_openid1 - raise ArgumentError, '"return_to" is mandatory for OpenID 1 '\ - 'requests' + raise ArgumentError, '"return_to" is mandatory for OpenID 1 ' \ + "requests" elsif @return_to_args.empty? - raise ArgumentError, 'extra "return_to" arguments were specified, '\ - 'but no return_to was specified' + raise ArgumentError, 'extra "return_to" arguments were specified, ' \ + "but no return_to was specified" end message = @message.copy - mode = immediate ? 'checkid_immediate' : 'checkid_setup' - message.set_arg(OPENID_NS, 'mode', mode) + mode = immediate ? "checkid_immediate" : "checkid_setup" + message.set_arg(OPENID_NS, "mode", mode) - realm_key = message.is_openid1 ? 'trust_root' : 'realm' + realm_key = message.is_openid1 ? "trust_root" : "realm" message.set_arg(OPENID_NS, realm_key, realm) - message.set_arg(OPENID_NS, 'return_to', return_to) unless return_to.nil? + message.set_arg(OPENID_NS, "return_to", return_to) unless return_to.nil? unless @anonymous if @endpoint.is_op_identifier @@ -109,20 +109,20 @@ def get_message(realm, return_to = nil, immediate = false) end # This is true for both OpenID 1 and 2 - message.set_arg(OPENID_NS, 'identity', request_identity) + message.set_arg(OPENID_NS, "identity", request_identity) - message.set_arg(OPENID2_NS, 'claimed_id', claimed_id) if message.is_openid2 + message.set_arg(OPENID2_NS, "claimed_id", claimed_id) if message.is_openid2 end if @assoc && (message.is_openid1 || !%w[checkid_setup checkid_immediate].include?(mode)) - message.set_arg(OPENID_NS, 'assoc_handle', @assoc.handle) + message.set_arg(OPENID_NS, "assoc_handle", @assoc.handle) assoc_log_msg = "with assocication #{@assoc.handle}" else - assoc_log_msg = 'using stateless mode.' + assoc_log_msg = "using stateless mode." end - Util.log("Generated #{mode} request to #{@endpoint.server_url} "\ - "#{assoc_log_msg}") + Util.log("Generated #{mode} request to #{@endpoint.server_url} " \ + "#{assoc_log_msg}") message end @@ -146,7 +146,7 @@ def redirect_url(realm, return_to = nil, immediate = false) # overridden. If a value is supplied for 'action' or 'method', # it will be replaced. def form_markup(realm, return_to = nil, immediate = false, - form_tag_attrs = nil) + form_tag_attrs = nil) message = get_message(realm, return_to, immediate) message.to_form_markup(@endpoint.server_url, form_tag_attrs) end @@ -155,11 +155,13 @@ def form_markup(realm, return_to = nil, immediate = false, # with javascript. This method wraps form_markup - see that method's # documentation for help with the parameters. def html_markup(realm, return_to = nil, immediate = false, - form_tag_attrs = nil) - Util.auto_submit_html(form_markup(realm, - return_to, - immediate, - form_tag_attrs)) + form_tag_attrs = nil) + Util.auto_submit_html(form_markup( + realm, + return_to, + immediate, + form_tag_attrs, + )) end # Should this OpenID authentication request be sent as a HTTP diff --git a/lib/openid/consumer/discovery.rb b/lib/openid/consumer/discovery.rb index 7678f5bd..2606daba 100644 --- a/lib/openid/consumer/discovery.rb +++ b/lib/openid/consumer/discovery.rb @@ -1,24 +1,24 @@ # Functions to discover OpenID endpoints from identifiers. -require 'uri' -require 'openid/util' -require 'openid/fetchers' -require 'openid/urinorm' -require 'openid/message' -require 'openid/yadis/discovery' -require 'openid/yadis/xrds' -require 'openid/yadis/xri' -require 'openid/yadis/services' -require 'openid/yadis/filters' -require 'openid/consumer/html_parse' -require 'openid/yadis/xrires' +require "uri" +require "openid/util" +require "openid/fetchers" +require "openid/urinorm" +require "openid/message" +require "openid/yadis/discovery" +require "openid/yadis/xrds" +require "openid/yadis/xri" +require "openid/yadis/services" +require "openid/yadis/filters" +require "openid/consumer/html_parse" +require "openid/yadis/xrires" module OpenID - OPENID_1_0_NS = 'http://openid.net/xmlns/1.0' - OPENID_IDP_2_0_TYPE = 'http://specs.openid.net/auth/2.0/server' - OPENID_2_0_TYPE = 'http://specs.openid.net/auth/2.0/signon' - OPENID_1_1_TYPE = 'http://openid.net/signon/1.1' - OPENID_1_0_TYPE = 'http://openid.net/signon/1.0' + OPENID_1_0_NS = "http://openid.net/xmlns/1.0" + OPENID_IDP_2_0_TYPE = "http://specs.openid.net/auth/2.0/server" + OPENID_2_0_TYPE = "http://specs.openid.net/auth/2.0/signon" + OPENID_1_1_TYPE = "http://openid.net/signon/1.1" + OPENID_1_0_TYPE = "http://openid.net/signon/1.0" OPENID_1_0_MESSAGE_NS = OPENID1_NS OPENID_2_0_MESSAGE_NS = OPENID2_NS @@ -32,7 +32,7 @@ class OpenIDServiceEndpoint OPENID_2_0_TYPE, OPENID_1_1_TYPE, - OPENID_1_0_TYPE + OPENID_1_0_TYPE, ] # the verified identifier. @@ -80,7 +80,7 @@ def uses_extension(extension_uri) def preferred_namespace if @type_uris.member?(OPENID_IDP_2_0_TYPE) or - @type_uris.member?(OPENID_2_0_TYPE) + @type_uris.member?(OPENID_2_0_TYPE) OPENID_2_0_MESSAGE_NS else OPENID_1_0_MESSAGE_NS @@ -117,8 +117,10 @@ def parse_service(yadis_url, uri, type_uris, service_element) # XXX: This has crappy implications for Service elements that # contain both 'server' and 'signon' Types. But that's a # pathological configuration anyway, so I don't think I care. - @local_id = OpenID.find_op_local_identifier(service_element, - @type_uris) + @local_id = OpenID.find_op_local_identifier( + service_element, + @type_uris, + ) @claimed_id = yadis_url end @@ -133,7 +135,7 @@ def get_local_id end def to_session_value - Hash[*instance_variables.map { |name| [name, instance_variable_get(name)] }.flatten(1)] + Hash[*instance_variables.flat_map { |name| [name, instance_variable_get(name)] }] end def ==(other) @@ -166,7 +168,7 @@ def self.from_basic_service_endpoint(endpoint) endpoint.yadis_url, endpoint.uri, endpoint.type_uris, - endpoint.service_element + endpoint.service_element, ) else openid_endpoint = nil @@ -182,8 +184,8 @@ def self.from_html(uri, html) # @rtype: [OpenIDServiceEndpoint] discovery_types = [ - [OPENID_2_0_TYPE, 'openid2.provider', 'openid2.local_id'], - [OPENID_1_1_TYPE, 'openid.server', 'openid.delegate'] + [OPENID_2_0_TYPE, "openid2.provider", "openid2.local_id"], + [OPENID_1_1_TYPE, "openid.server", "openid.delegate"], ] link_attrs = OpenID.parse_link_attrs(html) @@ -223,13 +225,15 @@ def self.from_discovery_result(discovery_result) # # @raises L{XRDSError}: When the XRDS does not parse. meth = if discovery_result.is_xrds - method('from_xrds') - else - method('from_html') - end + method(:from_xrds) + else + method(:from_html) + end - meth.call(discovery_result.normalized_uri, - discovery_result.response_text) + meth.call( + discovery_result.normalized_uri, + discovery_result.response_text, + ) end def self.from_op_endpoint_url(op_endpoint_url) @@ -245,10 +249,16 @@ def self.from_op_endpoint_url(op_endpoint_url) end def to_s - format('<%s server_url=%s claimed_id=%s ' + - 'local_id=%s canonical_id=%s used_yadis=%s>', - self.class, @server_url, @claimed_id, - @local_id, @canonical_id, @used_yadis) + format( + "<%s server_url=%s claimed_id=%s " + + "local_id=%s canonical_id=%s used_yadis=%s>", + self.class, + @server_url, + @claimed_id, + @local_id, + @canonical_id, + @used_yadis, + ) end end @@ -270,16 +280,16 @@ def self.find_op_local_identifier(service_element, type_uris) # Identifier local_id_tags = [] if type_uris.member?(OPENID_1_1_TYPE) or - type_uris.member?(OPENID_1_0_TYPE) + type_uris.member?(OPENID_1_0_TYPE) # local_id_tags << Yadis::nsTag(OPENID_1_0_NS, 'openid', 'Delegate') - service_element.add_namespace('openid', OPENID_1_0_NS) - local_id_tags << 'openid:Delegate' + service_element.add_namespace("openid", OPENID_1_0_NS) + local_id_tags << "openid:Delegate" end if type_uris.member?(OPENID_2_0_TYPE) # local_id_tags.append(Yadis::nsTag(XRD_NS_2_0, 'xrd', 'LocalID')) - service_element.add_namespace('xrd', Yadis::XRD_NS_2_0) - local_id_tags << 'xrd:LocalID' + service_element.add_namespace("xrd", Yadis::XRD_NS_2_0) + local_id_tags << "xrd:LocalID" end # Walk through all the matching tags and make sure that they all @@ -290,7 +300,7 @@ def self.find_op_local_identifier(service_element, type_uris) if local_id.nil? local_id = local_id_element.text elsif local_id != local_id_element.text - format = 'More than one %s tag found in one service element' + format = "More than one %s tag found in one service element" message = format(format, local_id_tag) raise DiscoveryFailure.new(message, nil) end @@ -369,8 +379,10 @@ def self.get_op_or_user_services(openid_services) op_services = arrange_by_type(openid_services, [OPENID_IDP_2_0_TYPE]) - openid_services = arrange_by_type(openid_services, - OpenIDServiceEndpoint::OPENID_TYPE_URIS) + openid_services = arrange_by_type( + openid_services, + OpenIDServiceEndpoint::OPENID_TYPE_URIS, + ) if !op_services.empty? op_services @@ -432,7 +444,7 @@ def self.discover_xri(iname) begin canonical_id, services = Yadis::XRI::ProxyResolver.new.query(iname) - raise Yadis::XRDSError.new(format('No CanonicalID found for XRI %s', iname)) if canonical_id.nil? + raise Yadis::XRDSError.new(format("No CanonicalID found for XRI %s", iname)) if canonical_id.nil? flt = Yadis.make_filter(OpenIDServiceEndpoint) @@ -440,7 +452,7 @@ def self.discover_xri(iname) endpoints += flt.get_service_endpoints(iname, service_element) end rescue Yadis::XRDSError, Yadis::XRI::XRIHTTPError => e - Util.log('xrds error on ' + iname + ': ' + e.to_s) + Util.log("xrds error on " + iname + ": " + e.to_s) end endpoints.each do |endpoint| @@ -457,10 +469,11 @@ def self.discover_xri(iname) def self.discover_no_yadis(uri) http_resp = OpenID.fetch(uri) - if http_resp.code != '200' and http_resp.code != '206' + if http_resp.code != "200" and http_resp.code != "206" raise DiscoveryFailure.new( - 'HTTP Response status from identity URL host is not "200". '\ - "Got status #{http_resp.code.inspect}", http_resp + 'HTTP Response status from identity URL host is not "200". ' \ + "Got status #{http_resp.code.inspect}", + http_resp, ) end @@ -473,7 +486,7 @@ def self.discover_no_yadis(uri) def self.discover_uri(uri) # Hack to work around URI parsing for URls with *no* scheme. - uri = 'http://' + uri if uri.index('://').nil? + uri = "http://" + uri if uri.index("://").nil? begin parsed = URI.parse(uri) diff --git a/lib/openid/consumer/discovery_manager.rb b/lib/openid/consumer/discovery_manager.rb index b3312ba3..22c1acd8 100644 --- a/lib/openid/consumer/discovery_manager.rb +++ b/lib/openid/consumer/discovery_manager.rb @@ -33,10 +33,10 @@ def to_session_value current_val = @current.respond_to?(:to_session_value) ? @current.to_session_value : @current { - 'starting_url' => @starting_url, - 'yadis_url' => @yadis_url, - 'services' => services, - 'current' => current_val + "starting_url" => @starting_url, + "yadis_url" => @yadis_url, + "services" => services, + "current" => current_val, } end @@ -47,11 +47,11 @@ def ==(other) def self.from_session_value(value) return value unless value.is_a?(Hash) - services = value['services'].map { |s| OpenID::OpenIDServiceEndpoint.from_session_value(s) } - current = OpenID::OpenIDServiceEndpoint.from_session_value(value['current']) + services = value["services"].map { |s| OpenID::OpenIDServiceEndpoint.from_session_value(s) } + current = OpenID::OpenIDServiceEndpoint.from_session_value(value["current"]) - obj = new(value['starting_url'], value['yadis_url'], services) - obj.instance_variable_set('@current', current) + obj = new(value["starting_url"], value["yadis_url"], services) + obj.instance_variable_set(:@current, current) obj end end @@ -63,7 +63,7 @@ def initialize(session, url, session_key_suffix = nil) @url = url @session = OpenID::Consumer::Session.new(session, DiscoveredServices) - @session_key_suffix = session_key_suffix || 'auth' + @session_key_suffix = session_key_suffix || "auth" end def get_next_service @@ -111,7 +111,7 @@ def get_manager(force = false) def create_manager(yadis_url, services) manager = get_manager raise StandardError, "There is already a manager for #{yadis_url}" unless manager.nil? - return nil if services.empty? + return if services.empty? manager = DiscoveredServices.new(@url, yadis_url, services) store(manager) @@ -125,7 +125,7 @@ def destroy_manager(force = false) end def session_key - 'OpenID::Consumer::DiscoveredServices::' + @session_key_suffix + "OpenID::Consumer::DiscoveredServices::" + @session_key_suffix end def store(manager) diff --git a/lib/openid/consumer/html_parse.rb b/lib/openid/consumer/html_parse.rb index 38329a47..38d8999f 100644 --- a/lib/openid/consumer/html_parse.rb +++ b/lib/openid/consumer/html_parse.rb @@ -1,4 +1,4 @@ -require 'openid/yadis/htmltokenizer' +require "openid/yadis/htmltokenizer" module OpenID # Stuff to remove before we start looking for tags @@ -20,12 +20,12 @@ module OpenID }mix def self.openid_unescape(s) - s.gsub('&', '&').gsub('<', '<').gsub('>', '>').gsub('"', '"') + s.gsub("&", "&").gsub("<", "<").gsub(">", ">").gsub(""", '"') end def self.unescape_hash(h) newh = {} - h.map do |k, v| + h.map do |k, v| newh[k] = openid_unescape(v) end newh @@ -33,17 +33,17 @@ def self.unescape_hash(h) def self.parse_link_attrs(html) begin - stripped = html.gsub(REMOVED_RE, '') + stripped = html.gsub(REMOVED_RE, "") rescue ArgumentError begin - stripped = html.encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '').gsub( - REMOVED_RE, '' + stripped = html.encode("UTF-8", "binary", invalid: :replace, undef: :replace, replace: "").gsub( + REMOVED_RE, "" ) rescue Encoding::UndefinedConversionError, Encoding::ConverterNotFoundError # needed for a problem in JRuby where it can't handle the conversion. # see details here: https://github.com/jruby/jruby/issues/829 - stripped = html.encode('UTF-8', 'ASCII', invalid: :replace, undef: :replace, replace: '').gsub( - REMOVED_RE, '' + stripped = html.encode("UTF-8", "ASCII", invalid: :replace, undef: :replace, replace: "").gsub( + REMOVED_RE, "" ) end end @@ -56,17 +56,24 @@ def self.parse_link_attrs(html) saw_head = false begin - while el = parser.getTag('head', '/head', 'link', 'body', '/body', - 'html', '/html') + while el = parser.getTag( + "head", + "/head", + "link", + "body", + "/body", + "html", + "/html", + ) # we are leaving head or have reached body, so we bail - return links if ['/head', 'body', '/body', '/html'].member?(el.tag_name) + return links if ["/head", "body", "/body", "/html"].member?(el.tag_name) # enforce html > head > link - in_html = true if el.tag_name == 'html' + in_html = true if el.tag_name == "html" next unless in_html - if el.tag_name == 'head' + if el.tag_name == "head" if saw_head return links # only allow one head end @@ -76,9 +83,9 @@ def self.parse_link_attrs(html) end next unless in_head - return links if el.tag_name == 'html' + return links if el.tag_name == "html" - links << unescape_hash(el.attr_hash) if el.tag_name == 'link' + links << unescape_hash(el.attr_hash) if el.tag_name == "link" end rescue Exception # just stop parsing if there's an error @@ -102,7 +109,7 @@ def self.link_has_rel(link_attrs, target_rel) # Does this link have target_rel as a relationship? # XXX: TESTME - rel_attr = link_attrs['rel'] + rel_attr = link_attrs["rel"] (rel_attr and rel_matches(rel_attr, target_rel)) end @@ -127,9 +134,9 @@ def self.find_first_href(link_attrs_list, target_rel) # XXX: TESTME matches = find_links_rel(link_attrs_list, target_rel) - return nil if !matches or matches.empty? + return if !matches or matches.empty? first = matches[0] - first['href'] + first["href"] end end diff --git a/lib/openid/consumer/idres.rb b/lib/openid/consumer/idres.rb index 18c7acb5..d03edfe0 100644 --- a/lib/openid/consumer/idres.rb +++ b/lib/openid/consumer/idres.rb @@ -15,8 +15,8 @@ def initialize(type_uri, endpoint) end class Consumer - @openid1_return_to_nonce_name = 'rp_nonce' - @openid1_return_to_claimed_id_name = 'openid1_claimed_id' + @openid1_return_to_nonce_name = "rp_nonce" + @openid1_return_to_claimed_id_name = "openid1_claimed_id" # Set the name of the query parameter that this library will use # to thread a nonce through an OpenID 1 transaction. It will be @@ -50,7 +50,7 @@ def initialize(message, current_url, store = nil, endpoint = nil) end def signed_fields - signed_list.map { |x| 'openid.' + x } + signed_list.map { |x| "openid." + x } end protected @@ -81,10 +81,10 @@ def fetch(field, default = NO_DEFAULT) def signed_list if @signed_list.nil? - signed_list_str = fetch('signed', nil) - raise ProtocolError, 'Response missing signed list' if signed_list_str.nil? + signed_list_str = fetch("signed", nil) + raise ProtocolError, "Response missing signed list" if signed_list_str.nil? - @signed_list = signed_list_str.split(',', -1) + @signed_list = signed_list_str.split(",", -1) end @signed_list end @@ -100,15 +100,15 @@ def check_for_fields case openid_namespace when OPENID2_NS - require_fields = basic_fields + ['op_endpoint'] + require_fields = basic_fields + ["op_endpoint"] require_sigs = basic_sig_fields + - %w[response_nonce claimed_id assoc_handle op_endpoint] + %w[response_nonce claimed_id assoc_handle op_endpoint] when OPENID1_NS, OPENID11_NS - require_fields = basic_fields + ['identity'] + require_fields = basic_fields + ["identity"] require_sigs = basic_sig_fields else - raise "check_for_fields doesn't know about "\ - "namespace #{openid_namespace.inspect}" + raise "check_for_fields doesn't know about " \ + "namespace #{openid_namespace.inspect}" end require_fields.each do |field| @@ -125,9 +125,9 @@ def check_for_fields def verify_return_to begin - msg_return_to = URI.parse(URINorm.urinorm(fetch('return_to'))) + msg_return_to = URI.parse(URINorm.urinorm(fetch("return_to"))) rescue URI::InvalidURIError - raise ProtocolError, ('return_to is not a valid URI') + raise ProtocolError, ("return_to is not a valid URI") end verify_return_to_args(msg_return_to) @@ -149,27 +149,27 @@ def verify_return_to_args(msg_return_to) if msg_val.nil? && !rt_val.nil? raise ProtocolError, "Message missing return_to argument '#{rt_key}'" elsif msg_val != rt_val - raise ProtocolError, "Parameter '#{rt_key}' value "\ - "#{msg_val.inspect} does not match "\ - "return_to's value #{rt_val.inspect}" + raise ProtocolError, "Parameter '#{rt_key}' value " \ + "#{msg_val.inspect} does not match " \ + "return_to's value #{rt_val.inspect}" end end @message.get_args(BARE_NS).each_pair do |bare_key, bare_val| rt_val = return_to_parsed_query[bare_key] - unless return_to_parsed_query.has_key? bare_key + unless return_to_parsed_query.has_key?(bare_key) # This may be caused by your web framework throwing extra # entries in to your parameters hash that were not GET or # POST parameters. For example, Rails has been known to # add "controller" and "action" keys; another server adds # at least a "format" key. - raise ProtocolError, 'Unexpected parameter (not on return_to): '\ - "'#{bare_key}'=#{rt_val.inspect})" + raise ProtocolError, "Unexpected parameter (not on return_to): " \ + "'#{bare_key}'=#{rt_val.inspect})" end next unless rt_val != bare_val - raise ProtocolError, "Parameter '#{bare_key}' value "\ - "#{bare_val.inspect} does not match "\ - "return_to's value #{rt_val.inspect}" + raise ProtocolError, "Parameter '#{bare_key}' value " \ + "#{bare_val.inspect} does not match " \ + "return_to's value #{rt_val.inspect}" end end @@ -198,15 +198,15 @@ def check_signature set_endpoint_flag = false if @endpoint.nil? && openid_namespace == OPENID2_NS @endpoint = OpenIDServiceEndpoint.new - @endpoint.server_url = fetch('op_endpoint') + @endpoint.server_url = fetch("op_endpoint") set_endpoint_flag = true end assoc = if @store.nil? - nil - else - @store.get_association(server_url, fetch('assoc_handle')) - end + nil + else + @store.get_association(server_url, fetch("assoc_handle")) + end if assoc.nil? check_auth @@ -228,8 +228,8 @@ def check_auth begin request = create_check_auth_request rescue Message::KeyNotFound => e - raise ProtocolError, "Could not generate 'check_authentication' "\ - "request: #{e.message}" + raise ProtocolError, "Could not generate 'check_authentication' " \ + "request: #{e.message}" end response = OpenID.make_kv_post(request, server_url) @@ -238,7 +238,7 @@ def check_auth end def create_check_auth_request - signed_list = @message.get_arg(OPENID_NS, 'signed', NO_DEFAULT).split(',') + signed_list = @message.get_arg(OPENID_NS, "signed", NO_DEFAULT).split(",") # check that we got all the signed arguments signed_list.each do |k| @@ -246,7 +246,7 @@ def create_check_auth_request end ca_message = @message.copy - ca_message.set_arg(OPENID_NS, 'mode', 'check_authentication') + ca_message.set_arg(OPENID_NS, "mode", "check_authentication") ca_message end @@ -254,9 +254,9 @@ def create_check_auth_request # Process the response message from a check_authentication # request, invalidating associations if requested. def process_check_auth_response(response) - is_valid = response.get_arg(OPENID_NS, 'is_valid', 'false') + is_valid = response.get_arg(OPENID_NS, "is_valid", "false") - invalidate_handle = response.get_arg(OPENID_NS, 'invalidate_handle') + invalidate_handle = response.get_arg(OPENID_NS, "invalidate_handle") unless invalidate_handle.nil? Util.log("Received 'invalidate_handle' from server #{server_url}") if @store.nil? @@ -266,10 +266,10 @@ def process_check_auth_response(response) end end - return unless is_valid != 'true' + return unless is_valid != "true" - raise ProtocolError, "Server #{server_url} responds that the "\ - "'check_authentication' call is not valid" + raise ProtocolError, "Server #{server_url} responds that the " \ + "'check_authentication' call is not valid" end def check_nonce @@ -280,15 +280,15 @@ def check_nonce # We generated the nonce, so it uses the empty string as the # server URL - server_url = '' + server_url = "" when OPENID2_NS - nonce = @message.get_arg(OPENID2_NS, 'response_nonce') + nonce = @message.get_arg(OPENID2_NS, "response_nonce") server_url = self.server_url else - raise StandardError, 'Not reached' + raise StandardError, "Not reached" end - raise ProtocolError, 'Nonce missing from response' if nonce.nil? + raise ProtocolError, "Nonce missing from response" if nonce.nil? begin time, extra = Nonce.split_nonce(nonce) @@ -298,8 +298,8 @@ def check_nonce return unless !@store.nil? && !@store.use_nonce(server_url, time, extra) - raise ProtocolError, 'Nonce already used or out of range: '\ - "#{nonce.inspect}" + raise ProtocolError, "Nonce already used or out of range: " \ + "#{nonce.inspect}" end def verify_discovery_results @@ -318,16 +318,16 @@ def verify_discovery_results def verify_discovery_results_openid2 to_match = OpenIDServiceEndpoint.new to_match.type_uris = [OPENID_2_0_TYPE] - to_match.claimed_id = fetch('claimed_id', nil) - to_match.local_id = fetch('identity', nil) - to_match.server_url = fetch('op_endpoint') + to_match.claimed_id = fetch("claimed_id", nil) + to_match.local_id = fetch("identity", nil) + to_match.server_url = fetch("op_endpoint") if to_match.claimed_id.nil? && !to_match.local_id.nil? - raise ProtocolError, 'openid.identity is present without '\ - 'openid.claimed_id' + raise ProtocolError, "openid.identity is present without " \ + "openid.claimed_id" elsif !to_match.claimed_id.nil? && to_match.local_id.nil? - raise ProtocolError, 'openid.claimed_id is present without '\ - 'openid.identity' + raise ProtocolError, "openid.claimed_id is present without " \ + "openid.identity" # This is a response without identifiers, so there's really no # checking that we can do, so return an endpoint that's for @@ -339,15 +339,15 @@ def verify_discovery_results_openid2 end if @endpoint.nil? - Util.log('No pre-discovered information supplied') + Util.log("No pre-discovered information supplied") discover_and_verify(to_match.claimed_id, [to_match]) else begin verify_discovery_single(@endpoint, to_match) rescue ProtocolError => e - Util.log('Error attempting to use stored discovery '\ - "information: #{e.message}") - Util.log('Attempting discovery to verify endpoint') + Util.log("Error attempting to use stored discovery " \ + "information: #{e.message}") + Util.log("Attempting discovery to verify endpoint") discover_and_verify(to_match.claimed_id, [to_match]) end end @@ -364,11 +364,11 @@ def verify_discovery_results_openid1 if claimed_id.nil? if @endpoint.nil? - raise ProtocolError, 'When using OpenID 1, the claimed ID must '\ - 'be supplied, either by passing it through '\ - 'as a return_to parameter or by using a '\ - 'session, and supplied to the IdResHandler '\ - 'when it is constructed.' + raise ProtocolError, "When using OpenID 1, the claimed ID must " \ + "be supplied, either by passing it through " \ + "as a return_to parameter or by using a " \ + "session, and supplied to the IdResHandler " \ + "when it is constructed." else claimed_id = @endpoint.claimed_id end @@ -376,7 +376,7 @@ def verify_discovery_results_openid1 to_match = OpenIDServiceEndpoint.new to_match.type_uris = [OPENID_1_1_TYPE] - to_match.local_id = fetch('identity') + to_match.local_id = fetch("identity") # Restore delegate information from the initiation phase to_match.claimed_id = claimed_id @@ -391,9 +391,9 @@ def verify_discovery_results_openid1 verify_discovery_single(@endpoint, to_match_1_0) end rescue ProtocolError => e - Util.log('Error attempting to use stored discovery information: ' + + Util.log("Error attempting to use stored discovery information: " + e.message) - Util.log('Attempting discovery to verify endpoint') + Util.log("Attempting discovery to verify endpoint") else return @endpoint end @@ -415,8 +415,8 @@ def discover_and_verify(claimed_id, to_match_endpoints) if services.length == 0 # XXX: this might want to be something other than # ProtocolError. In Python, it's DiscoveryFailure - raise ProtocolError, 'No OpenID information found at '\ - "#{claimed_id}" + raise ProtocolError, "No OpenID information found at " \ + "#{claimed_id}" end verify_discovered_services(claimed_id, services, to_match_endpoints) end @@ -442,12 +442,12 @@ def verify_discovered_services(claimed_id, services, to_match_endpoints) Util.log("Discovery verification failure for #{claimed_id}") failure_messages.each do |failure_message| - Util.log(' * Endpoint mismatch: ' + failure_message) + Util.log(" * Endpoint mismatch: " + failure_message) end # XXX: is DiscoveryFailure in Python OpenID - raise ProtocolError, 'No matching endpoint found after '\ - "discovering #{claimed_id}" + raise ProtocolError, "No matching endpoint found after " \ + "discovering #{claimed_id}" end def verify_discovery_single(endpoint, to_match) @@ -473,20 +473,20 @@ def verify_discovery_single(endpoint, to_match) parsed.to_s end else - raise StandardError, 'Not reached' + raise StandardError, "Not reached" end if defragged_claimed_id != endpoint.claimed_id - raise ProtocolError, 'Claimed ID does not match (different '\ - 'subjects!), Expected '\ - "#{defragged_claimed_id}, got "\ - "#{endpoint.claimed_id}" + raise ProtocolError, "Claimed ID does not match (different " \ + "subjects!), Expected " \ + "#{defragged_claimed_id}, got " \ + "#{endpoint.claimed_id}" end if to_match.get_local_id != endpoint.get_local_id - raise ProtocolError, 'local_id mismatch. Expected '\ - "#{to_match.get_local_id}, got "\ - "#{endpoint.get_local_id}" + raise ProtocolError, "local_id mismatch. Expected " \ + "#{to_match.get_local_id}, got " \ + "#{endpoint.get_local_id}" end # If the server URL is nil, this must be an OpenID 1 @@ -497,15 +497,15 @@ def verify_discovery_single(endpoint, to_match) if to_match.server_url.nil? if to_match.preferred_namespace != OPENID1_NS raise StandardError, - 'The code calling this must ensure that OpenID 2 '\ - "responses have a non-none `openid.op_endpoint' and "\ - "that it is set as the `server_url' attribute of the "\ - "`to_match' endpoint." + "The code calling this must ensure that OpenID 2 " \ + "responses have a non-none `openid.op_endpoint' and " \ + "that it is set as the `server_url' attribute of the " \ + "`to_match' endpoint." end elsif to_match.server_url != endpoint.server_url - raise ProtocolError, 'OP Endpoint mismatch. Expected'\ - "#{to_match.server_url}, got "\ - "#{endpoint.server_url}" + raise ProtocolError, "OP Endpoint mismatch. Expected" \ + "#{to_match.server_url}, got " \ + "#{endpoint.server_url}" end end end diff --git a/lib/openid/consumer/session.rb b/lib/openid/consumer/session.rb index a94d45b3..d8e1063d 100644 --- a/lib/openid/consumer/session.rb +++ b/lib/openid/consumer/session.rb @@ -26,7 +26,7 @@ def to_session_value(val) when Array val.map { |ele| to_session_value(ele) } when Hash - Hash[*val.map { |k, v| [k, to_session_value(v)] }.flatten(1)] + Hash[*val.flat_map { |k, v| [k, to_session_value(v)] }] else val.respond_to?(:to_session_value) ? val.to_session_value : val end diff --git a/lib/openid/cryptutil.rb b/lib/openid/cryptutil.rb index b964d808..597953df 100644 --- a/lib/openid/cryptutil.rb +++ b/lib/openid/cryptutil.rb @@ -1,17 +1,17 @@ -require 'openid/util' -require 'digest/sha1' -require 'digest/sha2' +require "openid/util" +require "digest/sha1" +require "digest/sha2" begin - require 'openssl' + require "openssl" rescue LoadError begin # Try loading the ruby-hmac files if they exist - require 'hmac-sha1' - require 'hmac-sha2' + require "hmac-sha1" + require "hmac-sha2" rescue LoadError # Nothing exists use included hmac files - require 'hmac/sha1' - require 'hmac/sha2' + require "hmac/sha1" + require "hmac/sha2" end end @@ -38,7 +38,7 @@ def self.sha1(text) def self.hmac_sha1(key, text) return HMAC::SHA1.digest(key, text) unless defined? OpenSSL - OpenSSL::HMAC.digest(OpenSSL::Digest.new('SHA1'), key, text) + OpenSSL::HMAC.digest(OpenSSL::Digest.new("SHA1"), key, text) end def self.sha256(text) @@ -48,14 +48,14 @@ def self.sha256(text) def self.hmac_sha256(key, text) return HMAC::SHA256.digest(key, text) unless defined? OpenSSL - OpenSSL::HMAC.digest(OpenSSL::Digest.new('SHA256'), key, text) + OpenSSL::HMAC.digest(OpenSSL::Digest.new("SHA256"), key, text) end # Generate a random string of the given length, composed of the # specified characters. If chars is nil, generate a string # composed of characters in the range 0..255. def self.random_string(length, chars = nil) - s = '' + s = "" if chars.nil? length.times { s << rand(256).chr } @@ -70,8 +70,8 @@ def self.random_string(length, chars = nil) def self.num_to_binary(n) bits = n.to_s(2) prepend = (8 - bits.length % 8) - bits = ('0' * prepend) + bits - [bits].pack('B*') + bits = ("0" * prepend) + bits + [bits].pack("B*") end # Convert a string of bytes into a number. @@ -79,7 +79,7 @@ def self.binary_to_num(s) # taken from openid-ruby 0.0.1 s = "\000" * (4 - (s.length % 4)) + s num = 0 - s.unpack('N*').each do |x| + s.unpack("N*").each do |x| num <<= 32 num |= x end diff --git a/lib/openid/dh.rb b/lib/openid/dh.rb index 26373980..7d6d3a48 100644 --- a/lib/openid/dh.rb +++ b/lib/openid/dh.rb @@ -1,5 +1,5 @@ -require 'openid/util' -require 'openid/cryptutil' +require "openid/util" +require "openid/cryptutil" module OpenID # Encapsulates a Diffie-Hellman key exchange. This class is used @@ -52,15 +52,15 @@ def set_private(priv) def self.strxor(s, t) if s.length != t.length raise ArgumentError, "strxor: lengths don't match. " + - "Inputs were #{s.inspect} and #{t.inspect}" + "Inputs were #{s.inspect} and #{t.inspect}" end - if String.method_defined? :bytes - s.bytes.to_a.zip(t.bytes.to_a).map { |sb, tb| sb ^ tb }.pack('C*') + if String.method_defined?(:bytes) + s.bytes.to_a.zip(t.bytes.to_a).map { |sb, tb| sb ^ tb }.pack("C*") else indices = 0...(s.length) chrs = indices.collect { |i| (s[i] ^ t[i]).chr } - chrs.join('') + chrs.join("") end end diff --git a/lib/openid/extension.rb b/lib/openid/extension.rb index c4d60e45..22e2f73b 100644 --- a/lib/openid/extension.rb +++ b/lib/openid/extension.rb @@ -1,4 +1,4 @@ -require 'openid/message' +require "openid/message" module OpenID # An interface for OpenID extensions. diff --git a/lib/openid/extensions/ax.rb b/lib/openid/extensions/ax.rb index 44a8ccdf..65a66920 100644 --- a/lib/openid/extensions/ax.rb +++ b/lib/openid/extensions/ax.rb @@ -1,20 +1,20 @@ # Implements the OpenID attribute exchange specification, version 1.0 -require 'openid/extension' -require 'openid/trustroot' -require 'openid/message' +require "openid/extension" +require "openid/trustroot" +require "openid/message" module OpenID module AX - UNLIMITED_VALUES = 'unlimited' + UNLIMITED_VALUES = "unlimited" MINIMUM_SUPPORTED_ALIAS_LENGTH = 32 # check alias for invalid characters, raise AXError if found def self.check_alias(name) - return unless name.match(/(,|\.)/) + return unless /(,|\.)/.match?(name) - raise Error, "Alias #{name.inspect} must not contain a "\ - 'comma or period.' + raise Error, "Alias #{name.inspect} must not contain a " \ + "comma or period." end # Raised when data does not comply with AX 1.0 specification @@ -25,16 +25,16 @@ class Error < ArgumentError class AXMessage < Extension attr_accessor :ns_alias, :mode, :ns_uri - NS_URI = 'http://openid.net/srv/ax/1.0' + NS_URI = "http://openid.net/srv/ax/1.0" begin - Message.register_namespace_alias(NS_URI, 'ax') + Message.register_namespace_alias(NS_URI, "ax") rescue NamespaceAliasRegistrationError => e Util.log(e) end def initialize - @ns_alias = 'ax' + @ns_alias = "ax" @ns_uri = NS_URI @mode = nil end @@ -44,14 +44,14 @@ def initialize # Raise an exception if the mode in the attribute exchange # arguments does not match what is expected for this class. def check_mode(ax_args) - actual_mode = ax_args ? ax_args['mode'] : nil + actual_mode = ax_args ? ax_args["mode"] : nil return unless actual_mode != @mode raise Error, "Expected mode #{mode.inspect}, got #{actual_mode.inspect}" end def new_args - { 'mode' => @mode } + {"mode" => @mode} end end @@ -104,7 +104,7 @@ def wants_unlimited_values? def self.to_type_uris(namespace_map, alias_list_s) return [] if alias_list_s.nil? - alias_list_s.split(',').inject([]) do |uris, name| + alias_list_s.split(",").inject([]) do |uris, name| type_uri = namespace_map.get_namespace_uri(name) raise IndexError, "No type defined for attribute name #{name.inspect}" if type_uri.nil? @@ -119,7 +119,7 @@ class FetchRequest < AXMessage attr_reader :requested_attributes attr_accessor :update_url - MODE = 'fetch_request' + MODE = "fetch_request" def initialize(update_url = nil) super() @@ -149,10 +149,10 @@ def get_extension_args ax_args = new_args @requested_attributes.each do |type_uri, attribute| name = if attribute.ns_alias - aliases.add_alias(type_uri, attribute.ns_alias) - else - aliases.add(type_uri) - end + aliases.add_alias(type_uri, attribute.ns_alias) + else + aliases.add(type_uri) + end if attribute.required required << name else @@ -162,8 +162,8 @@ def get_extension_args ax_args["type.#{name}"] = type_uri end - ax_args['required'] = required.join(',') unless required.empty? - ax_args['if_available'] = if_available.join(',') unless if_available.empty? + ax_args["required"] = required.join(",") unless required.empty? + ax_args["if_available"] = if_available.join(",") unless if_available.empty? ax_args end @@ -185,14 +185,17 @@ def get_required_attrs def self.from_openid_request(oidreq) message = oidreq.message ax_args = message.get_args(NS_URI) - return nil if ax_args == {} or ax_args['mode'] != MODE + return if ax_args == {} or ax_args["mode"] != MODE req = new req.parse_extension_args(ax_args) if req.update_url - realm = message.get_arg(OPENID_NS, 'realm', - message.get_arg(OPENID_NS, 'return_to')) + realm = message.get_arg( + OPENID_NS, + "realm", + message.get_arg(OPENID_NS, "return_to"), + ) if realm.nil? or realm.empty? raise Error, "Cannot validate update_url #{req.update_url.inspect} against absent realm" end @@ -211,14 +214,14 @@ def parse_extension_args(ax_args) aliases = NamespaceMap.new - ax_args.each do |k, v| - next unless k.index('type.') == 0 + ax_args.each do |k, v| + next unless k.index("type.") == 0 name = k[5..-1] type_uri = v aliases.add_alias(type_uri, name) - count_key = 'count.' + name + count_key = "count." + name count_s = ax_args[count_key] count = 1 if count_s @@ -232,20 +235,20 @@ def parse_extension_args(ax_args) add(AttrInfo.new(type_uri, name, false, count)) end - required = AX.to_type_uris(aliases, ax_args['required']) + required = AX.to_type_uris(aliases, ax_args["required"]) required.each do |type_uri| @requested_attributes[type_uri].required = true end - if_available = AX.to_type_uris(aliases, ax_args['if_available']) + if_available = AX.to_type_uris(aliases, ax_args["if_available"]) all_type_uris = required + if_available aliases.namespace_uris.each do |type_uri| - unless all_type_uris.member? type_uri + unless all_type_uris.member?(type_uri) raise Error, - "Type URI #{type_uri.inspect} was in the request but not present in 'required' or 'if_available'" + "Type URI #{type_uri.inspect} was in the request but not present in 'required' or 'if_available'" end end - @update_url = ax_args['update_url'] + @update_url = ax_args["update_url"] end # return the list of AttrInfo objects contained in the FetchRequest @@ -270,7 +273,7 @@ class KeyValueMessage < AXMessage attr_reader :data def initialize - super() + super @mode = nil @data = Hash.new { |hash, key| hash[key] = [] } end @@ -298,9 +301,9 @@ def _get_extension_kv_args(aliases = nil) @data.each do |type_uri, values| name = aliases.add(type_uri) - ax_args['type.' + name] = type_uri + ax_args["type." + name] = type_uri if values.size > 1 - ax_args['count.' + name] = values.size.to_s + ax_args["count." + name] = values.size.to_s values.each_with_index do |value, i| key = "value.#{name}.#{i + 1}" @@ -324,8 +327,8 @@ def parse_extension_args(ax_args) check_mode(ax_args) aliases = NamespaceMap.new - ax_args.each do |k, v| - next unless k.index('type.') == 0 + ax_args.each do |k, v| + next unless k.index("type.") == 0 type_uri = v name = k[5..-1] @@ -335,12 +338,12 @@ def parse_extension_args(ax_args) end aliases.each do |type_uri, name| - count_s = ax_args['count.' + name] + count_s = ax_args["count." + name] count = count_s.to_i if count_s.nil? - value = ax_args['value.' + name] + value = ax_args["value." + name] if value.nil? - raise IndexError, "Missing #{'value.' + name} in FetchResponse" + raise IndexError, "Missing #{"value." + name} in FetchResponse" elsif value.empty? values = [] else @@ -399,7 +402,7 @@ class FetchResponse < KeyValueMessage def initialize(update_url = nil) super() - @mode = 'fetch_response' + @mode = "fetch_response" @update_url = update_url @aliases = NamespaceMap.new end @@ -418,7 +421,7 @@ def get_extension_args(request = nil) # counts in the response must be no more than the counts # in the request) @data.keys.each do |type_uri| - unless request.member? type_uri + unless request.member?(type_uri) raise IndexError, "Response attribute not present in request: #{type_uri.inspect}" end end @@ -448,18 +451,18 @@ def get_extension_args(request = nil) zero_value_types.each do |attr_info| name = @aliases.get_alias(attr_info.type_uri) - kv_args['type.' + name] = attr_info.type_uri - kv_args['count.' + name] = '0' + kv_args["type." + name] = attr_info.type_uri + kv_args["count." + name] = "0" end update_url = (request and request.update_url or @update_url) - ax_args['update_url'] = update_url unless update_url.nil? + ax_args["update_url"] = update_url unless update_url.nil? ax_args.update(kv_args) ax_args end def parse_extension_args(ax_args) super - @update_url = ax_args['update_url'] + @update_url = ax_args["update_url"] end # Construct a FetchResponse object from an OpenID library @@ -467,10 +470,10 @@ def parse_extension_args(ax_args) def self.from_success_response(success_response, signed = true) obj = new ax_args = if signed - success_response.get_signed_ns(obj.ns_uri) - else - success_response.message.get_args(obj.ns_uri) - end + success_response.get_signed_ns(obj.ns_uri) + else + success_response.message.get_args(obj.ns_uri) + end begin obj.parse_extension_args(ax_args) @@ -483,7 +486,7 @@ def self.from_success_response(success_response, signed = true) # A store request attribute exchange message representation class StoreRequest < KeyValueMessage - MODE = 'store_request' + MODE = "store_request" def initialize super @@ -496,7 +499,7 @@ def initialize def self.from_openid_request(oidreq) message = oidreq.message ax_args = message.get_args(NS_URI) - return nil if ax_args.empty? or ax_args['mode'] != MODE + return if ax_args.empty? or ax_args["mode"] != MODE req = new req.parse_extension_args(ax_args) @@ -514,25 +517,25 @@ def get_extension_args(aliases = nil) # An indication that the store request was processed along with # this OpenID transaction. class StoreResponse < AXMessage - SUCCESS_MODE = 'store_response_success' - FAILURE_MODE = 'store_response_failure' + SUCCESS_MODE = "store_response_success" + FAILURE_MODE = "store_response_failure" attr_reader :error_message def initialize(succeeded = true, error_message = nil) super() - raise Error, 'Error message included in a success response' if succeeded and error_message + raise Error, "Error message included in a success response" if succeeded and error_message @mode = if succeeded - SUCCESS_MODE - else - FAILURE_MODE - end + SUCCESS_MODE + else + FAILURE_MODE + end @error_message = error_message end def self.from_success_response(success_response) ax_args = success_response.message.get_args(NS_URI) - ax_args.key?('error') ? new(false, ax_args['error']) : new + ax_args.key?("error") ? new(false, ax_args["error"]) : new end def succeeded? @@ -541,7 +544,7 @@ def succeeded? def get_extension_args ax_args = new_args - ax_args['error'] = @error_message if !succeeded? and error_message + ax_args["error"] = @error_message if !succeeded? and error_message ax_args end end diff --git a/lib/openid/extensions/oauth.rb b/lib/openid/extensions/oauth.rb index f0c2b7e9..ff8364b5 100644 --- a/lib/openid/extensions/oauth.rb +++ b/lib/openid/extensions/oauth.rb @@ -2,18 +2,18 @@ # Extension 1.0 # see: http://openid.net/specs/ -require 'openid/extension' +require "openid/extension" module OpenID module OAuth - NS_URI = 'http://specs.openid.net/extensions/oauth/1.0' + NS_URI = "http://specs.openid.net/extensions/oauth/1.0" # An OAuth token request, sent from a relying # party to a provider class Request < Extension attr_accessor :consumer, :scope, :ns_alias, :ns_uri def initialize(consumer = nil, scope = nil) - @ns_alias = 'oauth' + @ns_alias = "oauth" @ns_uri = NS_URI @consumer = consumer @scope = scope @@ -21,8 +21,8 @@ def initialize(consumer = nil, scope = nil) def get_extension_args ns_args = {} - ns_args['consumer'] = @consumer if @consumer - ns_args['scope'] = @scope if @scope + ns_args["consumer"] = @consumer if @consumer + ns_args["scope"] = @scope if @scope ns_args end @@ -32,7 +32,7 @@ def get_extension_args def self.from_openid_request(oid_req) oauth_req = new args = oid_req.message.get_args(NS_URI) - return nil if args == {} + return if args == {} oauth_req.parse_extension_args(args) oauth_req @@ -41,8 +41,8 @@ def self.from_openid_request(oid_req) # Set the state of this request to be that expressed in these # OAuth arguments def parse_extension_args(args) - @consumer = args['consumer'] - @scope = args['scope'] + @consumer = args["consumer"] + @scope = args["scope"] end end @@ -52,7 +52,7 @@ class Response < Extension attr_accessor :request_token, :scope def initialize(request_token = nil, scope = nil) - @ns_alias = 'oauth' + @ns_alias = "oauth" @ns_uri = NS_URI @request_token = request_token @scope = scope @@ -61,7 +61,7 @@ def initialize(request_token = nil, scope = nil) # Create a Response object from an OpenID::Consumer::SuccessResponse def self.from_success_response(success_response) args = success_response.get_signed_ns(NS_URI) - return nil if args.nil? + return if args.nil? oauth_resp = new oauth_resp.parse_extension_args(args) @@ -73,14 +73,14 @@ def self.from_success_response(success_response) # if strict is specified, raise an exception when bad data is # encountered def parse_extension_args(args, _strict = false) - @request_token = args['request_token'] - @scope = args['scope'] + @request_token = args["request_token"] + @scope = args["scope"] end def get_extension_args ns_args = {} - ns_args['request_token'] = @request_token if @request_token - ns_args['scope'] = @scope if @scope + ns_args["request_token"] = @request_token if @request_token + ns_args["scope"] = @scope if @scope ns_args end end diff --git a/lib/openid/extensions/pape.rb b/lib/openid/extensions/pape.rb index 24f4947d..cebd5a14 100644 --- a/lib/openid/extensions/pape.rb +++ b/lib/openid/extensions/pape.rb @@ -2,17 +2,17 @@ # Extension 1.0 # see: http://openid.net/specs/ -require 'openid/extension' +require "openid/extension" module OpenID module PAPE - NS_URI = 'http://specs.openid.net/extensions/pape/1.0' + NS_URI = "http://specs.openid.net/extensions/pape/1.0" AUTH_MULTI_FACTOR_PHYSICAL = - 'http://schemas.openid.net/pape/policies/2007/06/multi-factor-physical' + "http://schemas.openid.net/pape/policies/2007/06/multi-factor-physical" AUTH_MULTI_FACTOR = - 'http://schemas.openid.net/pape/policies/2007/06/multi-factor' + "http://schemas.openid.net/pape/policies/2007/06/multi-factor" AUTH_PHISHING_RESISTANT = - 'http://schemas.openid.net/pape/policies/2007/06/phishing-resistant' + "http://schemas.openid.net/pape/policies/2007/06/phishing-resistant" TIME_VALIDATOR = /\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ/ # A Provider Authentication Policy request, sent from a relying # party to a provider @@ -20,7 +20,7 @@ class Request < Extension attr_accessor :preferred_auth_policies, :max_auth_age, :ns_alias, :ns_uri def initialize(preferred_auth_policies = [], max_auth_age = nil) - @ns_alias = 'pape' + @ns_alias = "pape" @ns_uri = NS_URI @preferred_auth_policies = preferred_auth_policies @max_auth_age = max_auth_age @@ -30,16 +30,16 @@ def initialize(preferred_auth_policies = [], max_auth_age = nil) # This method is intended to be used by the relying party to add # acceptable authentication types to the request. def add_policy_uri(policy_uri) - return if @preferred_auth_policies.member? policy_uri + return if @preferred_auth_policies.member?(policy_uri) @preferred_auth_policies << policy_uri end def get_extension_args ns_args = { - 'preferred_auth_policies' => @preferred_auth_policies.join(' ') + "preferred_auth_policies" => @preferred_auth_policies.join(" "), } - ns_args['max_auth_age'] = @max_auth_age.to_s if @max_auth_age + ns_args["max_auth_age"] = @max_auth_age.to_s if @max_auth_age ns_args end @@ -49,7 +49,7 @@ def get_extension_args def self.from_openid_request(oid_req) pape_req = new args = oid_req.message.get_args(NS_URI) - return nil if args == {} + return if args == {} pape_req.parse_extension_args(args) pape_req @@ -59,14 +59,14 @@ def self.from_openid_request(oid_req) # PAPE arguments def parse_extension_args(args) @preferred_auth_policies = [] - policies_str = args['preferred_auth_policies'] + policies_str = args["preferred_auth_policies"] if policies_str - policies_str.split(' ').each do |uri| + policies_str.split(" ").each do |uri| add_policy_uri(uri) end end - max_auth_age_str = args['max_auth_age'] + max_auth_age_str = args["max_auth_age"] @max_auth_age = (max_auth_age_str.to_i if max_auth_age_str) end @@ -74,7 +74,7 @@ def parse_extension_args(args) # supports, this method returns the subset of those types # that are preferred by the relying party. def preferred_types(supported_types) - @preferred_auth_policies.select { |uri| supported_types.member? uri } + @preferred_auth_policies.select { |uri| supported_types.member?(uri) } end end @@ -84,7 +84,7 @@ class Response < Extension attr_accessor :ns_alias, :auth_policies, :auth_time, :nist_auth_level def initialize(auth_policies = [], auth_time = nil, nist_auth_level = nil) - @ns_alias = 'pape' + @ns_alias = "pape" @ns_uri = NS_URI @auth_policies = auth_policies @auth_time = auth_time @@ -100,7 +100,7 @@ def add_policy_uri(policy_uri) # Create a Response object from an OpenID::Consumer::SuccessResponse def self.from_success_response(success_response) args = success_response.get_signed_ns(NS_URI) - return nil if args.nil? + return if args.nil? pape_resp = new pape_resp.parse_extension_args(args) @@ -112,13 +112,13 @@ def self.from_success_response(success_response) # if strict is specified, raise an exception when bad data is # encountered def parse_extension_args(args, strict = false) - policies_str = args['auth_policies'] - @auth_policies = policies_str.split(' ') if policies_str and policies_str != 'none' + policies_str = args["auth_policies"] + @auth_policies = policies_str.split(" ") if policies_str and policies_str != "none" - nist_level_str = args['nist_auth_level'] + nist_level_str = args["nist_auth_level"] if nist_level_str # special handling of zero to handle to_i behavior - if nist_level_str.strip == '0' + if nist_level_str.strip == "0" nist_level = 0 else nist_level = nist_level_str.to_i @@ -132,36 +132,36 @@ def parse_extension_args(args, strict = false) end end - auth_time_str = args['auth_time'] + auth_time_str = args["auth_time"] return unless auth_time_str # validate time string - if auth_time_str =~ TIME_VALIDATOR + if TIME_VALIDATOR.match?(auth_time_str) @auth_time = auth_time_str elsif strict - raise ArgumentError, 'auth_time must be in RFC3339 format' + raise ArgumentError, "auth_time must be in RFC3339 format" end end def get_extension_args ns_args = {} - ns_args['auth_policies'] = if @auth_policies.empty? - 'none' - else - @auth_policies.join(' ') - end + ns_args["auth_policies"] = if @auth_policies.empty? + "none" + else + @auth_policies.join(" ") + end if @nist_auth_level - unless (0..4).member? @nist_auth_level + unless (0..4).member?(@nist_auth_level) raise ArgumentError, "nist_auth_level must be an integer 0 through 4, not #{@nist_auth_level.inspect}" end - ns_args['nist_auth_level'] = @nist_auth_level.to_s + ns_args["nist_auth_level"] = @nist_auth_level.to_s end if @auth_time - raise ArgumentError, 'auth_time must be in RFC3339 format' unless @auth_time =~ TIME_VALIDATOR + raise ArgumentError, "auth_time must be in RFC3339 format" unless TIME_VALIDATOR.match?(@auth_time) - ns_args['auth_time'] = @auth_time + ns_args["auth_time"] = @auth_time end ns_args end diff --git a/lib/openid/extensions/sreg.rb b/lib/openid/extensions/sreg.rb index 89e81b0a..874b68a9 100644 --- a/lib/openid/extensions/sreg.rb +++ b/lib/openid/extensions/sreg.rb @@ -1,34 +1,34 @@ -require 'openid/extension' -require 'openid/util' -require 'openid/message' +require "openid/extension" +require "openid/util" +require "openid/message" module OpenID module SReg DATA_FIELDS = { - 'fullname' => 'Full Name', - 'nickname' => 'Nickname', - 'dob' => 'Date of Birth', - 'email' => 'E-mail Address', - 'gender' => 'Gender', - 'postcode' => 'Postal Code', - 'country' => 'Country', - 'language' => 'Language', - 'timezone' => 'Time Zone' + "fullname" => "Full Name", + "nickname" => "Nickname", + "dob" => "Date of Birth", + "email" => "E-mail Address", + "gender" => "Gender", + "postcode" => "Postal Code", + "country" => "Country", + "language" => "Language", + "timezone" => "Time Zone", } - NS_URI_1_0 = 'http://openid.net/sreg/1.0' - NS_URI_1_1 = 'http://openid.net/extensions/sreg/1.1' + NS_URI_1_0 = "http://openid.net/sreg/1.0" + NS_URI_1_1 = "http://openid.net/extensions/sreg/1.1" NS_URI = NS_URI_1_1 begin - Message.register_namespace_alias(NS_URI_1_1, 'sreg') + Message.register_namespace_alias(NS_URI_1_1, "sreg") rescue NamespaceAliasRegistrationError => e Util.log(e) end # raise ArgumentError if fieldname is not in the defined sreg fields def OpenID.check_sreg_field_name(fieldname) - return if DATA_FIELDS.member? fieldname + return if DATA_FIELDS.member?(fieldname) raise ArgumentError, "#{fieldname} is not a defined simple registration field" end @@ -49,7 +49,7 @@ def OpenID.get_sreg_ns(message) # try to add an alias, since we didn't find one ns = NS_URI_1_1 begin - message.namespaces.add_alias(ns, 'sreg') + message.namespaces.add_alias(ns, "sreg") rescue IndexError raise NamespaceError end @@ -80,7 +80,7 @@ def initialize(required = nil, optional = nil, policy_url = nil, ns_uri = NS_URI @policy_url = policy_url @ns_uri = ns_uri - @ns_alias = 'sreg' + @ns_alias = "sreg" @required = [] @optional = [] @@ -101,7 +101,7 @@ def self.from_openid_request(request) message = request.message.copy ns_uri = OpenID.get_sreg_ns(message) args = message.get_args(ns_uri) - return nil if args == {} + return if args == {} req = new(nil, nil, nil, ns_uri) req.parse_extension_args(args) @@ -122,24 +122,24 @@ def self.from_openid_request(request) # OpenID server needs more control over how the arguments are # parsed than that method provides. def parse_extension_args(args, strict = false) - required_items = args['required'] + required_items = args["required"] unless required_items.nil? or required_items.empty? - required_items.split(',').each do |field_name| + required_items.split(",").each do |field_name| request_field(field_name, true, strict) rescue ArgumentError raise if strict end end - optional_items = args['optional'] + optional_items = args["optional"] unless optional_items.nil? or optional_items.empty? - optional_items.split(',').each do |field_name| + optional_items.split(",").each do |field_name| request_field(field_name, false, strict) rescue ArgumentError raise if strict end end - @policy_url = args['policy_url'] + @policy_url = args["policy_url"] end # A list of all of the simple registration fields that were @@ -166,14 +166,14 @@ def request_field(field_name, required = false, strict = false) OpenID.check_sreg_field_name(field_name) if strict - raise ArgumentError, 'That field has already been requested' if (@required + @optional).member? field_name + raise ArgumentError, "That field has already been requested" if (@required + @optional).member?(field_name) else - return if @required.member? field_name + return if @required.member?(field_name) - if @optional.member? field_name + if @optional.member?(field_name) return unless required - @optional.delete field_name + @optional.delete(field_name) end end @@ -187,7 +187,7 @@ def request_field(field_name, required = false, strict = false) # Add the given list of fields to the request. def request_fields(field_names, required = false, strict = false) raise ArgumentError unless field_names.respond_to?(:each) and - field_names[0].is_a?(String) + field_names[0].is_a?(String) field_names.each { |fn| request_field(fn, required, strict) } end @@ -198,9 +198,9 @@ def request_fields(field_names, required = false, strict = false) # This method serializes the simple registration request fields. def get_extension_args args = {} - args['required'] = @required.join(',') unless @required.empty? - args['optional'] = @optional.join(',') unless @optional.empty? - args['policy_url'] = @policy_url unless @policy_url.nil? + args["required"] = @required.join(",") unless @required.empty? + args["optional"] = @optional.join(",") unless @optional.empty? + args["policy_url"] = @policy_url unless @policy_url.nil? args end @@ -217,7 +217,7 @@ class Response < Extension attr_reader :ns_uri, :data def initialize(data = {}, ns_uri = NS_URI) - @ns_alias = 'sreg' + @ns_alias = "sreg" @data = data @ns_uri = ns_uri end @@ -238,7 +238,7 @@ def self.from_success_response(success_response, signed_only = true) ns_uri = OpenID.get_sreg_ns(success_response.message) if signed_only args = success_response.get_signed_ns(ns_uri) - return nil if args.nil? # No signed args, so fail + return if args.nil? # No signed args, so fail else args = success_response.message.get_args(ns_uri) end diff --git a/lib/openid/extensions/ui.rb b/lib/openid/extensions/ui.rb index 4b8fed5f..a0bb2164 100644 --- a/lib/openid/extensions/ui.rb +++ b/lib/openid/extensions/ui.rb @@ -1,17 +1,17 @@ # An implementation of the OpenID User Interface Extension 1.0 - DRAFT 0.5 # see: http://svn.openid.net/repos/specifications/user_interface/1.0/trunk/openid-user-interface-extension-1_0.html -require 'openid/extension' +require "openid/extension" module OpenID module UI - NS_URI = 'http://specs.openid.net/extensions/ui/1.0' + NS_URI = "http://specs.openid.net/extensions/ui/1.0" class Request < Extension attr_accessor :lang, :icon, :mode, :ns_alias, :ns_uri def initialize(mode = nil, icon = nil, lang = nil) - @ns_alias = 'ui' + @ns_alias = "ui" @ns_uri = NS_URI @lang = lang @icon = icon @@ -20,9 +20,9 @@ def initialize(mode = nil, icon = nil, lang = nil) def get_extension_args ns_args = {} - ns_args['lang'] = @lang if @lang - ns_args['icon'] = @icon if @icon - ns_args['mode'] = @mode if @mode + ns_args["lang"] = @lang if @lang + ns_args["icon"] = @icon if @icon + ns_args["mode"] = @mode if @mode ns_args end @@ -32,7 +32,7 @@ def get_extension_args def self.from_openid_request(oid_req) ui_req = new args = oid_req.message.get_args(NS_URI) - return nil if args == {} + return if args == {} ui_req.parse_extension_args(args) ui_req @@ -40,9 +40,9 @@ def self.from_openid_request(oid_req) # Set UI extension parameters def parse_extension_args(args) - @lang = args['lang'] - @icon = args['icon'] - @mode = args['mode'] + @lang = args["lang"] + @icon = args["icon"] + @mode = args["mode"] end end end diff --git a/lib/openid/fetchers.rb b/lib/openid/fetchers.rb index 9da95d26..2cf95ec7 100644 --- a/lib/openid/fetchers.rb +++ b/lib/openid/fetchers.rb @@ -1,13 +1,13 @@ -require 'net/http' -require 'openid/util' -require 'openid/version' +require "net/http" +require "openid/util" +require "openid/version" begin - require 'net/https' + require "net/https" rescue LoadError - OpenID::Util.log('WARNING: no SSL support found. Will not be able ' + - 'to fetch HTTPS URLs!') - require 'net/http' + OpenID::Util.log("WARNING: no SSL support found. Will not be able " + + "to fetch HTTPS URLs!") + require "net/http" end MAX_RESPONSE_KB = 10_485_760 # 10 MB (can be smaller, I guess) @@ -18,13 +18,13 @@ def post_connection_check(hostname) check_common_name = true cert = @socket.io.peer_cert cert.extensions.each do |ext| - next if ext.oid != 'subjectAltName' + next if ext.oid != "subjectAltName" ext.value.split(/,\s+/).each do |general_name| if /\ADNS:(.*)/ =~ general_name check_common_name = false - reg = Regexp.escape(::Regexp.last_match(1)).gsub(/\\\*/, '[^.]+') - return true if /\A#{reg}\z/i =~ hostname + reg = Regexp.escape(::Regexp.last_match(1)).gsub("\\*", "[^.]+") + return true if /\A#{reg}\z/i.match?(hostname) elsif /\AIP Address:(.*)/ =~ general_name check_common_name = false return true if ::Regexp.last_match(1) == hostname @@ -33,13 +33,13 @@ def post_connection_check(hostname) end if check_common_name cert.subject.to_a.each do |oid, value| - if oid == 'CN' - reg = Regexp.escape(value).gsub(/\\\*/, '[^.]+') - return true if /\A#{reg}\z/i =~ hostname + if oid == "CN" + reg = Regexp.escape(value).gsub("\\*", "[^.]+") + return true if /\A#{reg}\z/i.match?(hostname) end end end - raise OpenSSL::SSL::SSLError, 'hostname does not match' + raise OpenSSL::SSL::SSLError, "hostname does not match" end end end @@ -62,13 +62,13 @@ def method_missing(method, *args) end def body=(s) - @_response.instance_variable_set('@body', s) + @_response.instance_variable_set(:@body, s) # XXX Hack to work around ruby's HTTP library behavior. @body # is only returned if it has been read from the response # object's socket, but since we're not using a socket in this # case, we need to set the @read flag to true to avoid a bug in # Net::HTTPResponse.stream_check when @socket is nil. - @_response.instance_variable_set('@read', true) + @_response.instance_variable_set(:@read, true) end end @@ -84,7 +84,7 @@ class SSLFetchingError < FetchingError @fetcher = nil def self.fetch(url, body = nil, headers = nil, - redirect_limit = StandardFetcher::REDIRECT_LIMIT) + redirect_limit = StandardFetcher::REDIRECT_LIMIT) fetcher.fetch(url, body, headers, redirect_limit) end @@ -101,25 +101,29 @@ def self.fetcher=(fetcher) # Set the default fetcher to use the HTTP proxy defined in the environment # variable 'http_proxy'. def self.fetcher_use_env_http_proxy - proxy_string = ENV['http_proxy'] + proxy_string = ENV["http_proxy"] return unless proxy_string proxy_uri = URI.parse(proxy_string) - @fetcher = StandardFetcher.new(proxy_uri.host, proxy_uri.port, - proxy_uri.user, proxy_uri.password) + @fetcher = StandardFetcher.new( + proxy_uri.host, + proxy_uri.port, + proxy_uri.user, + proxy_uri.password, + ) end class StandardFetcher USER_AGENT = "ruby-openid/#{OpenID::VERSION} (#{RUBY_PLATFORM})" REDIRECT_LIMIT = 5 - TIMEOUT = ENV['RUBY_OPENID_FETCHER_TIMEOUT'] || 60 + TIMEOUT = ENV["RUBY_OPENID_FETCHER_TIMEOUT"] || 60 attr_accessor :ca_file, :timeout, :ssl_verify_peer # I can fetch through a HTTP proxy; arguments are as for Net::HTTP::Proxy. def initialize(proxy_addr = nil, proxy_port = nil, - proxy_user = nil, proxy_pass = nil) + proxy_user = nil, proxy_pass = nil) @ca_file = nil @proxy = Net::HTTP::Proxy(proxy_addr, proxy_port, proxy_user, proxy_pass) @timeout = TIMEOUT @@ -139,21 +143,23 @@ def make_http(uri) def set_verified(conn, verify) conn.verify_mode = if verify - OpenSSL::SSL::VERIFY_PEER - else - OpenSSL::SSL::VERIFY_NONE - end + OpenSSL::SSL::VERIFY_PEER + else + OpenSSL::SSL::VERIFY_NONE + end end def make_connection(uri) conn = make_http(uri) unless conn.is_a?(Net::HTTP) - raise format('Expected Net::HTTP object from make_http; got %s', - conn.class).to_s + raise format( + "Expected Net::HTTP object from make_http; got %s", + conn.class, + ).to_s end - if uri.scheme == 'https' + if uri.scheme == "https" raise "SSL support not found; cannot fetch #{uri}" unless supports_ssl?(conn) conn.use_ssl = true @@ -165,7 +171,7 @@ def make_connection(uri) set_verified(conn, true) else Util.log("WARNING: making https request to #{uri} without verifying " + - 'server certificate; no CA path was specified.') + "server certificate; no CA path was specified.") set_verified(conn, false) end @@ -180,17 +186,17 @@ def fetch(url, body = nil, headers = nil, redirect_limit = REDIRECT_LIMIT) raise FetchingError, "Invalid URL: #{unparsed_url}" if url.nil? headers ||= {} - headers['User-agent'] ||= USER_AGENT + headers["User-agent"] ||= USER_AGENT begin conn = make_connection(url) response = nil - whole_body = '' + whole_body = "" body_size_limitter = lambda do |r| r.read_body do |partial| # read body now whole_body << partial - raise FetchingError.new('Response Too Large') if whole_body.length > MAX_RESPONSE_KB + raise FetchingError.new("Response Too Large") if whole_body.length > MAX_RESPONSE_KB end whole_body end @@ -201,7 +207,7 @@ def fetch(url, body = nil, headers = nil, redirect_limit = REDIRECT_LIMIT) if body.nil? conn.request_get(url.request_uri, headers, &body_size_limitter) else - headers['Content-type'] ||= 'application/x-www-form-urlencoded' + headers["Content-type"] ||= "application/x-www-form-urlencoded" conn.request_post(url.request_uri, body, headers, &body_size_limitter) end end @@ -221,11 +227,11 @@ def fetch(url, body = nil, headers = nil, redirect_limit = REDIRECT_LIMIT) when Net::HTTPRedirection if redirect_limit <= 0 raise HTTPRedirectLimitReached.new( - "Too many redirects, not fetching #{response['location']}" + "Too many redirects, not fetching #{response["location"]}", ) end begin - fetch(response['location'], body, headers, redirect_limit - 1) + fetch(response["location"], body, headers, redirect_limit - 1) rescue HTTPRedirectLimitReached => e raise e rescue FetchingError => e @@ -243,11 +249,12 @@ def fetch(url, body = nil, headers = nil, redirect_limit = REDIRECT_LIMIT) def setup_encoding(response) return unless defined?(Encoding.default_external) - return unless charset = response.type_params['charset'] + return unless charset = response.type_params["charset"] begin encoding = Encoding.find(charset) rescue ArgumentError + # NOOP end encoding ||= Encoding.default_external diff --git a/lib/openid/kvform.rb b/lib/openid/kvform.rb index dd79f342..391312dd 100644 --- a/lib/openid/kvform.rb +++ b/lib/openid/kvform.rb @@ -26,7 +26,7 @@ def self.seq_to_kv(seq, strict = false) raise KVFormError, "Invalid input for seq_to_kv: key contains newline: #{k.inspect}" unless k.index("\n").nil? - raise KVFormError, "Invalid input for seq_to_kv: key contains colon: #{k.inspect}" unless k.index(':').nil? + raise KVFormError, "Invalid input for seq_to_kv: key contains colon: #{k.inspect}" unless k.index(":").nil? err.call("Key has whitespace at beginning or end: #{k.inspect}") if k.strip != k @@ -39,10 +39,10 @@ def self.seq_to_kv(seq, strict = false) err.call("Value has whitespace at beginning or end: #{v.inspect}") if v.strip != v - lines << k + ':' + v + "\n" + lines << k + ":" + v + "\n" end - lines.join('') + lines.join("") end def self.kv_to_seq(data, strict = false) @@ -62,7 +62,7 @@ def self.kv_to_seq(data, strict = false) return [] if data.empty? if data[-1].chr != "\n" - err.call('Does not end in a newline') + err.call("Does not end in a newline") # We don't expect the last element of lines to be an empty # string because split() doesn't behave that way. end @@ -73,9 +73,9 @@ def self.kv_to_seq(data, strict = false) line_num += 1 # Ignore blank lines - next if line.strip == '' + next if line.strip == "" - pair = line.split(':', 2) + pair = line.split(":", 2) if pair.length == 2 k, v = pair k_s = k.strip diff --git a/lib/openid/kvpost.rb b/lib/openid/kvpost.rb index 22f7789d..a101e5ea 100644 --- a/lib/openid/kvpost.rb +++ b/lib/openid/kvpost.rb @@ -1,5 +1,5 @@ -require 'openid/message' -require 'openid/fetchers' +require "openid/message" +require "openid/fetchers" module OpenID # Exception that is raised when the server returns a 400 response @@ -15,9 +15,12 @@ def initialize(error_text, error_code, message) end def self.from_message(msg) - error_text = msg.get_arg(OPENID_NS, 'error', - '') - error_code = msg.get_arg(OPENID_NS, 'error_code') + error_text = msg.get_arg( + OPENID_NS, + "error", + "", + ) + error_code = msg.get_arg(OPENID_NS, "error_code") new(error_text, error_code, msg) end end @@ -39,8 +42,8 @@ def self.from_http_response(response, server_url) when 400 raise ServerError.from_message(msg) else - error_message = "bad status code from server #{server_url}: "\ - "#{response.code}" + error_message = "bad status code from server #{server_url}: " \ + "#{response.code}" raise HTTPStatusError.new(error_message) end end diff --git a/lib/openid/protocolerror.rb b/lib/openid/protocolerror.rb index 15d9a2b7..7c2e2a14 100644 --- a/lib/openid/protocolerror.rb +++ b/lib/openid/protocolerror.rb @@ -1,4 +1,4 @@ -require 'openid/util' +require "openid/util" module OpenID # An error in the OpenID protocol diff --git a/lib/openid/store/filesystem.rb b/lib/openid/store/filesystem.rb index 2a7a3dfc..1f9b3585 100644 --- a/lib/openid/store/filesystem.rb +++ b/lib/openid/store/filesystem.rb @@ -1,21 +1,21 @@ -require 'fileutils' -require 'pathname' -require 'tempfile' +require "fileutils" +require "pathname" +require "tempfile" -require 'openid/util' -require 'openid/store/interface' -require 'openid/association' +require "openid/util" +require "openid/store/interface" +require "openid/association" module OpenID module Store class Filesystem < Interface - @@FILENAME_ALLOWED = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-'.split('') + @@FILENAME_ALLOWED = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-".split("") # Create a Filesystem store instance, putting all data in +directory+. def initialize(directory) - @nonce_dir = File.join(directory, 'nonces') - @association_dir = File.join(directory, 'associations') - @temp_dir = File.join(directory, 'temp') + @nonce_dir = File.join(directory, "nonces") + @association_dir = File.join(directory, "associations") + @temp_dir = File.join(directory, "temp") ensure_dir(@nonce_dir) ensure_dir(@association_dir) @@ -26,17 +26,17 @@ def initialize(directory) # filename that is returned will contain the domain name from the # server URL for ease of human inspection of the data dir. def get_association_filename(server_url, handle) - raise ArgumentError, "Bad server URL: #{server_url}" unless server_url.index('://') + raise ArgumentError, "Bad server URL: #{server_url}" unless server_url.index("://") - proto, rest = server_url.split('://', 2) - domain = filename_escape(rest.split('/', 2)[0]) + proto, rest = server_url.split("://", 2) + domain = filename_escape(rest.split("/", 2)[0]) url_hash = safe64(server_url) handle_hash = if handle - safe64(handle) - else - '' - end - filename = [proto, domain, url_hash, handle_hash].join('-') + safe64(handle) + else + "" + end + filename = [proto, domain, url_hash, handle_hash].join("-") File.join(@association_dir, filename) end @@ -78,7 +78,7 @@ def get_association(server_url, handle = nil) filename = get_association_filename(server_url, handle) return _get_association(filename) if handle - assoc_filenames = Dir.glob(filename.to_s + '*') + assoc_filenames = Dir.glob(filename.to_s + "*") assocs = assoc_filenames.collect do |f| _get_association(f) @@ -87,13 +87,13 @@ def get_association(server_url, handle = nil) assocs = assocs.find_all { |a| !a.nil? } assocs = assocs.sort_by { |a| a.issued } - return nil if assocs.empty? + return if assocs.empty? assocs[-1] end def _get_association(filename) - assoc_file = File.open(filename, 'r') + assoc_file = File.open(filename, "r") rescue Errno::ENOENT nil else @@ -107,7 +107,7 @@ def _get_association(filename) association = Association.deserialize(assoc_s) rescue StandardError remove_if_present(filename) - return nil + return end # clean up expired associations @@ -132,18 +132,18 @@ def use_nonce(server_url, timestamp, salt) return false if (timestamp - Time.now.to_i).abs > Nonce.skew if server_url and !server_url.empty? - proto, rest = server_url.split('://', 2) + proto, rest = server_url.split("://", 2) else - proto = '' - rest = '' + proto = "" + rest = "" end - raise 'Bad server URL' unless proto && rest + raise "Bad server URL" unless proto && rest - domain = filename_escape(rest.split('/', 2)[0]) + domain = filename_escape(rest.split("/", 2)[0]) url_hash = safe64(server_url) salt_hash = safe64(salt) - nonce_fn = format('%08x-%s-%s-%s-%s', timestamp, proto, domain, url_hash, salt_hash) + nonce_fn = format("%08x-%s-%s-%s-%s", timestamp, proto, domain, url_hash, salt_hash) filename = File.join(@nonce_dir, nonce_fn) @@ -164,10 +164,10 @@ def cleanup end def cleanup_associations - association_filenames = Dir[File.join(@association_dir, '*')] + association_filenames = Dir[File.join(@association_dir, "*")] count = 0 association_filenames.each do |af| - f = File.open(af, 'r') + f = File.open(af, "r") rescue Errno::ENOENT next else @@ -192,13 +192,13 @@ def cleanup_associations end def cleanup_nonces - nonces = Dir[File.join(@nonce_dir, '*')] + nonces = Dir[File.join(@nonce_dir, "*")] now = Time.now.to_i count = 0 nonces.each do |filename| - nonce = filename.split('/')[-1] - timestamp = nonce.split('-', 2)[0].to_i(16) + nonce = filename.split("/")[-1] + timestamp = nonce.split("-", 2)[0].to_i(16) nonce_age = (timestamp - now).abs if nonce_age > Nonce.skew remove_if_present(filename) @@ -212,19 +212,19 @@ def cleanup_nonces # Create a temporary file and return the File object and filename. def mktemp - f = Tempfile.new('tmp', @temp_dir) + f = Tempfile.new("tmp", @temp_dir) [f, f.path] end # create a safe filename from a url def filename_escape(s) - s = '' if s.nil? + s = "" if s.nil? s.each_char.flat_map do |c| if @@FILENAME_ALLOWED.include?(c) c else c.bytes.map do |b| - '_%02X' % b + "_%02X" % b end end end.join @@ -233,9 +233,9 @@ def filename_escape(s) def safe64(s) s = OpenID::CryptUtil.sha1(s) s = OpenID::Util.to_base64(s) - s.gsub!('+', '_') - s.gsub!('/', '.') - s.gsub!('=', '') + s.tr!("+", "_") + s.tr!("/", ".") + s.delete!("=") s end diff --git a/lib/openid/store/interface.rb b/lib/openid/store/interface.rb index 1a3774d9..ccb29a36 100644 --- a/lib/openid/store/interface.rb +++ b/lib/openid/store/interface.rb @@ -1,4 +1,4 @@ -require 'openid/util' +require "openid/util" module OpenID # Stores for Associations and nonces. Used by both the Consumer and diff --git a/lib/openid/store/memcache.rb b/lib/openid/store/memcache.rb index c98633d7..66271f84 100644 --- a/lib/openid/store/memcache.rb +++ b/lib/openid/store/memcache.rb @@ -1,14 +1,14 @@ -require 'openid/util' -require 'openid/store/interface' -require 'openid/store/nonce' -require 'time' +require "openid/util" +require "openid/store/interface" +require "openid/store/nonce" +require "time" module OpenID module Store class Memcache < Interface attr_accessor :key_prefix - def initialize(cache_client, key_prefix = 'openid-store:') + def initialize(cache_client, key_prefix = "openid-store:") @cache_client = cache_client self.key_prefix = key_prefix end @@ -58,30 +58,33 @@ def use_nonce(server_url, timestamp, salt) return false if (timestamp - Time.now.to_i).abs > Nonce.skew ts = timestamp.to_s # base 10 seconds since epoch - nonce_key = key_prefix + 'N' + server_url + '|' + ts + '|' + salt - result = @cache_client.add(nonce_key, '', expiry(Nonce.skew + 5)) - return !!(result =~ /^STORED/) if result.is_a? String + nonce_key = key_prefix + "N" + server_url + "|" + ts + "|" + salt + result = @cache_client.add(nonce_key, "", expiry(Nonce.skew + 5)) + return !!(result =~ /^STORED/) if result.is_a?(String) !!result end def assoc_key(server_url, assoc_handle = nil) - key = key_prefix + 'A' + server_url - key += '|' + assoc_handle if assoc_handle + key = key_prefix + "A" + server_url + key += "|" + assoc_handle if assoc_handle key end - def cleanup_nonces; end + def cleanup_nonces + end - def cleanup; end + def cleanup + end - def cleanup_associations; end + def cleanup_associations + end protected def delete(key) result = @cache_client.delete(key) - return !!(result =~ /^DELETED/) if result.is_a? String + return !!(result =~ /^DELETED/) if result.is_a?(String) !!result end diff --git a/lib/openid/store/memory.rb b/lib/openid/store/memory.rb index 4d03e1db..71937055 100644 --- a/lib/openid/store/memory.rb +++ b/lib/openid/store/memory.rb @@ -1,4 +1,4 @@ -require 'openid/store/interface' +require "openid/store/interface" module OpenID module Store # An in-memory implementation of Store. This class is mainly used @@ -14,16 +14,15 @@ def initialize def store_association(server_url, assoc) assocs = @associations[server_url] - @associations[server_url] = assocs.merge({ assoc.handle => deepcopy(assoc) }) + @associations[server_url] = assocs.merge({assoc.handle => deepcopy(assoc)}) end def get_association(server_url, handle = nil) assocs = @associations[server_url] - assoc = nil if handle assocs[handle] else - assocs.values.sort { |a, b| a.issued <=> b.issued }[-1] + assocs.values.sort_by(&:issued)[-1] end end @@ -37,7 +36,7 @@ def remove_association(server_url, handle) def use_nonce(server_url, timestamp, salt) return false if (timestamp - Time.now.to_i).abs > Nonce.skew - nonce = [server_url, timestamp, salt].join('') + nonce = [server_url, timestamp, salt].join("") return false if @nonces[nonce] @nonces[nonce] = timestamp diff --git a/lib/openid/store/nonce.rb b/lib/openid/store/nonce.rb index 3eaf7fbd..27008c49 100644 --- a/lib/openid/store/nonce.rb +++ b/lib/openid/store/nonce.rb @@ -1,13 +1,13 @@ -require 'openid/cryptutil' -require 'date' -require 'time' +require "openid/cryptutil" +require "date" +require "time" module OpenID module Nonce DEFAULT_SKEW = 60 * 60 * 5 - TIME_FMT = '%Y-%m-%dT%H:%M:%SZ' - TIME_STR_LEN = '0000-00-00T00:00:00Z'.size - @@NONCE_CHRS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' + TIME_FMT = "%Y-%m-%dT%H:%M:%SZ" + TIME_STR_LEN = "0000-00-00T00:00:00Z".size + @@NONCE_CHRS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" TIME_VALIDATOR = /\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\dZ/ @skew = DEFAULT_SKEW @@ -58,10 +58,10 @@ def self.check_timestamp(nonce_str, allowed_skew = nil, now = nil) def self.mk_nonce(time = nil) salt = CryptUtil.random_string(6, @@NONCE_CHRS) t = if time.nil? - Time.now.getutc - else - Time.at(time).getutc - end + Time.now.getutc + else + Time.at(time).getutc + end time_str = t.strftime(TIME_FMT) time_str + salt end diff --git a/lib/openid/trustroot.rb b/lib/openid/trustroot.rb index 9abad71c..81a246b0 100644 --- a/lib/openid/trustroot.rb +++ b/lib/openid/trustroot.rb @@ -1,5 +1,5 @@ -require 'uri' -require 'openid/urinorm' +require "uri" +require "openid/urinorm" module OpenID class RealmVerificationRedirected < Exception @@ -17,24 +17,286 @@ def to_s module TrustRoot TOP_LEVEL_DOMAINS = %w[ - ac ad ae aero af ag ai al am an ao aq ar arpa as asia at - au aw ax az ba bb bd be bf bg bh bi biz bj bm bn bo br bs bt - bv bw by bz ca cat cc cd cf cg ch ci ck cl cm cn co com coop - cr cu cv cx cy cz de dj dk dm do dz ec edu ee eg er es et eu - fi fj fk fm fo fr ga gb gd ge gf gg gh gi gl gm gn gov gp gq - gr gs gt gu gw gy hk hm hn hr ht hu id ie il im in info int - io iq ir is it je jm jo jobs jp ke kg kh ki km kn kp kr kw - ky kz la lb lc li lk lr ls lt lu lv ly ma mc md me mg mh mil - mk ml mm mn mo mobi mp mq mr ms mt mu museum mv mw mx my mz - na name nc ne net nf ng ni nl no np nr nu nz om org pa pe pf - pg ph pk pl pm pn pr pro ps pt pw py qa re ro rs ru rw sa sb - sc sd se sg sh si sj sk sl sm sn so sr st su sv sy sz tc td - tel tf tg th tj tk tl tm tn to tp tr travel tt tv tw tz ua - ug uk us uy uz va vc ve vg vi vn vu wf ws xn--0zwm56d - xn--11b5bs3a9aj6g xn--80akhbyknj4f xn--9t4b11yi5a - xn--deba0ad xn--g6w251d xn--hgbk6aj7f53bba - xn--hlcj6aya9esc7a xn--jxalpdlp xn--kgbechtv xn--zckzah ye - yt yu za zm zw + ac + ad + ae + aero + af + ag + ai + al + am + an + ao + aq + ar + arpa + as + asia + at + au + aw + ax + az + ba + bb + bd + be + bf + bg + bh + bi + biz + bj + bm + bn + bo + br + bs + bt + bv + bw + by + bz + ca + cat + cc + cd + cf + cg + ch + ci + ck + cl + cm + cn + co + com + coop + cr + cu + cv + cx + cy + cz + de + dj + dk + dm + do + dz + ec + edu + ee + eg + er + es + et + eu + fi + fj + fk + fm + fo + fr + ga + gb + gd + ge + gf + gg + gh + gi + gl + gm + gn + gov + gp + gq + gr + gs + gt + gu + gw + gy + hk + hm + hn + hr + ht + hu + id + ie + il + im + in + info + int + io + iq + ir + is + it + je + jm + jo + jobs + jp + ke + kg + kh + ki + km + kn + kp + kr + kw + ky + kz + la + lb + lc + li + lk + lr + ls + lt + lu + lv + ly + ma + mc + md + me + mg + mh + mil + mk + ml + mm + mn + mo + mobi + mp + mq + mr + ms + mt + mu + museum + mv + mw + mx + my + mz + na + name + nc + ne + net + nf + ng + ni + nl + no + np + nr + nu + nz + om + org + pa + pe + pf + pg + ph + pk + pl + pm + pn + pr + pro + ps + pt + pw + py + qa + re + ro + rs + ru + rw + sa + sb + sc + sd + se + sg + sh + si + sj + sk + sl + sm + sn + so + sr + st + su + sv + sy + sz + tc + td + tel + tf + tg + th + tj + tk + tl + tm + tn + to + tp + tr + travel + tt + tv + tw + tz + ua + ug + uk + us + uy + uz + va + vc + ve + vg + vi + vn + vu + wf + ws + xn--0zwm56d + xn--11b5bs3a9aj6g + xn--80akhbyknj4f + xn--9t4b11yi5a + xn--deba0ad + xn--g6w251d + xn--hgbk6aj7f53bba + xn--hlcj6aya9esc7a + xn--jxalpdlp + xn--kgbechtv + xn--zckzah + ye + yt + yu + za + zm + zw ] ALLOWED_PROTOCOLS = %w[http https] @@ -43,7 +305,7 @@ module TrustRoot # # XXX: This should probably live somewhere else (like in # OpenID or OpenID::Yadis somewhere) - RP_RETURN_TO_URL_TYPE = 'http://specs.openid.net/auth/2.0/return_to' + RP_RETURN_TO_URL_TYPE = "http://specs.openid.net/auth/2.0/return_to" # If the endpoint is a relying party OpenID return_to endpoint, # return the endpoint URL. Otherwise, return None. @@ -74,11 +336,11 @@ def self.return_to_matches(allowed_return_to_urls, return_to) return_realm = TrustRoot.parse(allowed_return_to) if !return_realm.nil? and - # Does not have a wildcard - !return_realm.wildcard and + # Does not have a wildcard + !return_realm.wildcard and - # Matches the return_to that we passed in with it - return_realm.validate_url(return_to) # Parses as a trust root + # Matches the return_to that we passed in with it + return_realm.validate_url(return_to) # Parses as a trust root return true end @@ -116,9 +378,9 @@ def self.get_allowed_return_urls(relying_party_url) # true if the return_to URL is valid for the realm def self.verify_return_to(realm_str, return_to, _vrfy = nil) # _vrfy parameter is there to make testing easier - _vrfy = method('get_allowed_return_urls') if _vrfy.nil? + _vrfy = method(:get_allowed_return_urls) if _vrfy.nil? - raise ArgumentError, '_vrfy must be a Proc or Method' unless _vrfy.is_a?(Proc) or _vrfy.is_a?(Method) + raise ArgumentError, "_vrfy must be a Proc or Method" unless _vrfy.is_a?(Proc) or _vrfy.is_a?(Method) realm = TrustRoot.parse(realm_str) if realm.nil? @@ -148,12 +410,12 @@ class TrustRoot def self._build_path(path, query = nil, frag = nil) s = path.dup - frag = nil if frag == '' - query = nil if query == '' + frag = nil if frag == "" + query = nil if query == "" - s << '?' << query if query + s << "?" << query if query - s << '#' << frag if frag + s << "#" << frag if frag s end @@ -168,15 +430,21 @@ def self._parse_url(url) begin parsed = URI::DEFAULT_PARSER.parse(url) rescue URI::InvalidURIError - return nil + return end - path = TrustRoot._build_path(parsed.path, - parsed.query, - parsed.fragment) + path = TrustRoot._build_path( + parsed.path, + parsed.query, + parsed.fragment, + ) - [parsed.scheme || '', parsed.host || '', - parsed.port || '', path || ''] + [ + parsed.scheme || "", + parsed.host || "", + parsed.port || "", + path || "", + ] end def self.parse(trust_root) @@ -184,26 +452,26 @@ def self.parse(trust_root) unparsed = trust_root.dup # look for wildcard - wildcard = !trust_root.index('://*.').nil? - trust_root.sub!('*.', '') if wildcard + wildcard = !trust_root.index("://*.").nil? + trust_root.sub!("*.", "") if wildcard # handle http://*/ case if !wildcard and @@empty_re.match(trust_root) - proto = trust_root.split(':')[0] - port = proto == 'http' ? 80 : 443 - return new(unparsed, proto, true, '', port, '/') + proto = trust_root.split(":")[0] + port = (proto == "http") ? 80 : 443 + return new(unparsed, proto, true, "", port, "/") end parts = TrustRoot._parse_url(trust_root) - return nil if parts.nil? + return if parts.nil? proto, host, port, path = parts - return nil if host[0] == '.' + return if host[0] == "." # check for URI fragment - return nil if path and !path.index('#').nil? + return if path and !path.index("#").nil? - return nil unless %w[http https].member?(proto) + return unless %w[http https].member?(proto) new(unparsed, proto, wildcard, host, port, path) end @@ -236,8 +504,8 @@ def build_discovery_url return @unparsed unless wildcard # Use "www." in place of the star - www_domain = 'www.' + @host - port = (!@port.nil? and ![80, 443].member?(@port)) ? (':' + @port.to_s) : '' + www_domain = "www." + @host + port = (!@port.nil? and ![80, 443].member?(@port)) ? (":" + @port.to_s) : "" "#{@proto}://#{www_domain}#{port}#{@path}" end @@ -251,9 +519,9 @@ def initialize(unparsed, proto, wildcard, host, port, path) end def sane? - return true if @host == 'localhost' + return true if @host == "localhost" - host_parts = @host.split('.') + host_parts = @host.split(".") # a note: ruby string split does not put an empty string at # the end of the list if the split element is last. for @@ -263,7 +531,7 @@ def sane? return false if host_parts.length == 0 # no adjacent dots - return false if host_parts.member?('') + return false if host_parts.member?("") # last part must be a tld tld = host_parts[-1] @@ -289,13 +557,13 @@ def validate_url(url) return false unless proto == @proto return false unless port == @port - return false unless host.index('*').nil? + return false unless host.index("*").nil? if !@wildcard return false if host != @host - elsif (@host != '') and - !host.end_with?('.' + @host) and - (host != @host) + elsif (@host != "") and + !host.end_with?("." + @host) and + (host != @host) return false end @@ -309,11 +577,11 @@ def validate_url(url) # These characters must be on the boundary between the end # of the trust root's path and the start of the URL's path. - allowed = if !@path.index('?').nil? - '&' - else - '?/' - end + allowed = if !@path.index("?").nil? + "&" + else + "?/" + end return (!allowed.index(@path[-1]).nil? or !allowed.index(path[path_len]).nil?) diff --git a/lib/openid/urinorm.rb b/lib/openid/urinorm.rb index 308fbb2e..7a6ce480 100644 --- a/lib/openid/urinorm.rb +++ b/lib/openid/urinorm.rb @@ -1,4 +1,4 @@ -require 'uri' +require "uri" module OpenID module URINorm @@ -7,19 +7,19 @@ module URINorm def self.urinorm(uri) uri = URI.parse(uri) - raise URI::InvalidURIError.new('no scheme') unless uri.scheme + raise URI::InvalidURIError.new("no scheme") unless uri.scheme uri.scheme = uri.scheme.downcase - raise URI::InvalidURIError.new('Not an HTTP or HTTPS URI') unless VALID_URI_SCHEMES.member?(uri.scheme) + raise URI::InvalidURIError.new("Not an HTTP or HTTPS URI") unless VALID_URI_SCHEMES.member?(uri.scheme) - raise URI::InvalidURIError.new('no host') if uri.host.nil? # For Ruby 2.7 + raise URI::InvalidURIError.new("no host") if uri.host.nil? # For Ruby 2.7 - raise URI::InvalidURIError.new('no host') if uri.host.empty? # For Ruby 3+ + raise URI::InvalidURIError.new("no host") if uri.host.empty? # For Ruby 3+ uri.host = uri.host.downcase uri.path = remove_dot_segments(uri.path) - uri.path = '/' if uri.path.empty? + uri.path = "/" if uri.path.empty? uri = uri.normalize.to_s uri.gsub(PERCENT_ESCAPE_RE) do @@ -39,33 +39,33 @@ def self.remove_dot_segments(path) result_segments = [] while path.length > 0 - if path.start_with?('../') + if path.start_with?("../") path = path[3..-1] - elsif path.start_with?('./') + elsif path.start_with?("./") path = path[2..-1] - elsif path.start_with?('/./') + elsif path.start_with?("/./") path = path[2..-1] - elsif path == '/.' - path = '/' - elsif path.start_with?('/../') + elsif path == "/." + path = "/" + elsif path.start_with?("/../") path = path[3..-1] result_segments.pop if result_segments.length > 0 - elsif path == '/..' - path = '/' + elsif path == "/.." + path = "/" result_segments.pop if result_segments.length > 0 - elsif ['..', '.'].include?(path) - path = '' + elsif ["..", "."].include?(path) + path = "" else i = 0 - i = 1 if path[0].chr == '/' - i = path.index('/', i) + i = 1 if path[0].chr == "/" + i = path.index("/", i) i = path.length if i.nil? result_segments << path[0...i] path = path[i..-1] end end - result_segments.join('') + result_segments.join("") end end end diff --git a/lib/openid/version.rb b/lib/openid/version.rb index 590a1e65..7a85990d 100644 --- a/lib/openid/version.rb +++ b/lib/openid/version.rb @@ -1,3 +1,3 @@ module OpenID - VERSION = '2.9.2' + VERSION = "2.9.2" end diff --git a/lib/openid/yadis/accept.rb b/lib/openid/yadis/accept.rb index 31256e4a..26a21784 100644 --- a/lib/openid/yadis/accept.rb +++ b/lib/openid/yadis/accept.rb @@ -7,14 +7,14 @@ def self.generate_accept_header(*elements) parts = [] elements.each do |element| if element.is_a?(String) - qs = '1.0' + qs = "1.0" mtype = element else mtype, q = element q = q.to_f raise ArgumentError.new("Invalid preference factor: #{q}") if q > 1 or q <= 0 - qs = format('%0.1f', q) + qs = format("%0.1f", q) end parts << [qs, mtype] @@ -23,14 +23,14 @@ def self.generate_accept_header(*elements) parts.sort! chunks = [] parts.each do |q, mtype| - chunks << if q == '1.0' - mtype - else - format('%s; q=%s', mtype, q) - end + chunks << if q == "1.0" + mtype + else + format("%s; q=%s", mtype, q) + end end - chunks.join(', ') + chunks.join(", ") end def self.parse_accept_header(value) @@ -40,24 +40,24 @@ def self.parse_accept_header(value) # subtype, and quality markdown. # # str -> [(str, str, float)] - chunks = value.split(',', -1).collect { |v| v.strip } + chunks = value.split(",", -1).collect { |v| v.strip } accept = [] chunks.each do |chunk| - parts = chunk.split(';', -1).collect { |s| s.strip } + parts = chunk.split(";", -1).collect { |s| s.strip } mtype = parts.shift - if mtype.index('/').nil? + if mtype.index("/").nil? # This is not a MIME type, so ignore the bad data next end - main, sub = mtype.split('/', 2) + main, sub = mtype.split("/", 2) q = nil parts.each do |ext| - unless ext.index('=').nil? - k, v = ext.split('=', 2) - q = v.to_f if k == 'q' + unless ext.index("=").nil? + k, v = ext.split("=", 2) + q = v.to_f if k == "q" end end @@ -85,19 +85,19 @@ def self.match_types(accept_types, have_types) # # Type signature: ([(str, str, float)], [str]) -> [(str, float)] default = if accept_types.nil? or accept_types == [] - # Accept all of them - 1 - else - 0 - end + # Accept all of them + 1 + else + 0 + end match_main = {} match_sub = {} accept_types.each do |main, sub, q| - if main == '*' + if main == "*" default = [default, q].max next - elsif sub == '*' + elsif sub == "*" match_main[main] = [match_main.fetch(main, 0), q].max else match_sub[[main, sub]] = [match_sub.fetch([main, sub], 0), q].max @@ -107,12 +107,12 @@ def self.match_types(accept_types, have_types) accepted_list = [] order_maintainer = 0 have_types.each do |mtype| - main, sub = mtype.split('/', 2) + main, sub = mtype.split("/", 2) q = if match_sub.member?([main, sub]) - match_sub[[main, sub]] - else - match_main.fetch(main, default) - end + match_sub[[main, sub]] + else + match_main.fetch(main, default) + end if q != 0 accepted_list << [1 - q, order_maintainer, q, mtype] diff --git a/lib/openid/yadis/constants.rb b/lib/openid/yadis/constants.rb index f59197ef..3df3dee2 100644 --- a/lib/openid/yadis/constants.rb +++ b/lib/openid/yadis/constants.rb @@ -1,16 +1,16 @@ -require 'openid/yadis/accept' +require "openid/yadis/accept" module OpenID module Yadis - YADIS_HEADER_NAME = 'X-XRDS-Location' - YADIS_CONTENT_TYPE = 'application/xrds+xml' + YADIS_HEADER_NAME = "X-XRDS-Location" + YADIS_CONTENT_TYPE = "application/xrds+xml" # A value suitable for using as an accept header when performing # YADIS discovery, unless the application has special requirements YADIS_ACCEPT_HEADER = generate_accept_header( - ['text/html', 0.3], - ['application/xhtml+xml', 0.5], - [YADIS_CONTENT_TYPE, 1.0] + ["text/html", 0.3], + ["application/xhtml+xml", 0.5], + [YADIS_CONTENT_TYPE, 1.0], ) end end diff --git a/lib/openid/yadis/discovery.rb b/lib/openid/yadis/discovery.rb index 70de54e9..e40e4fc3 100644 --- a/lib/openid/yadis/discovery.rb +++ b/lib/openid/yadis/discovery.rb @@ -1,7 +1,7 @@ -require 'openid/util' -require 'openid/fetchers' -require 'openid/yadis/constants' -require 'openid/yadis/parsehtml' +require "openid/util" +require "openid/fetchers" +require "openid/yadis/constants" +require "openid/yadis/parsehtml" module OpenID # Raised when a error occurs in the discovery process @@ -70,14 +70,15 @@ def is_xrds def self.discover(uri) result = DiscoveryResult.new(uri) begin - resp = OpenID.fetch(uri, nil, { 'Accept' => YADIS_ACCEPT_HEADER }) + resp = OpenID.fetch(uri, nil, {"Accept" => YADIS_ACCEPT_HEADER}) rescue Exception raise DiscoveryFailure.new("Failed to fetch identity URL #{uri} : #{$!}", $!) end - if resp.code != '200' and resp.code != '206' + if resp.code != "200" and resp.code != "206" raise DiscoveryFailure.new( - 'HTTP Response status from identity URL host is not "200".'\ - "Got status #{resp.code.inspect} for #{resp.final_url}", resp + 'HTTP Response status from identity URL host is not "200".' \ + "Got status #{resp.code.inspect} for #{resp.final_url}", + resp, ) end @@ -86,7 +87,7 @@ def self.discover(uri) # Attempt to find out where to go to discover the document or if # we already have it - result.content_type = resp['content-type'] + result.content_type = resp["content-type"] result.xrds_uri = where_is_yadis?(resp) @@ -96,16 +97,17 @@ def self.discover(uri) rescue StandardError raise DiscoveryFailure.new("Failed to fetch Yadis URL #{result.xrds_uri} : #{$!}", $!) end - if resp.code != '200' and resp.code != '206' + if resp.code != "200" and resp.code != "206" exc = DiscoveryFailure.new( 'HTTP Response status from Yadis host is not "200". ' + - "Got status #{resp.code.inspect} for #{resp.final_url}", resp + "Got status #{resp.code.inspect} for #{resp.final_url}", + resp, ) exc.identity_url = result.normalized_uri raise exc end - result.content_type = resp['content-type'] + result.content_type = resp["content-type"] end result.response_text = resp.body @@ -122,12 +124,12 @@ def self.discover(uri) def self.where_is_yadis?(resp) # Attempt to find out where to go to discover the document or if # we already have it - content_type = resp['content-type'] + content_type = resp["content-type"] # According to the spec, the content-type header must be an # exact match, or else we have to look for an indirection. if !content_type.nil? and !content_type.to_s.empty? and - content_type.split(';', 2)[0].downcase == YADIS_CONTENT_TYPE + content_type.split(";", 2)[0].downcase == YADIS_CONTENT_TYPE return resp.final_url else # Try the header diff --git a/lib/openid/yadis/filters.rb b/lib/openid/yadis/filters.rb index 49566802..b3bf5005 100644 --- a/lib/openid/yadis/filters.rb +++ b/lib/openid/yadis/filters.rb @@ -133,7 +133,7 @@ def get_service_endpoints(yadis_url, service_element) # Exception raised when something is not able to be turned into a # filter @@filter_type_error = TypeError.new( - 'Expected a filter, an endpoint, a callable or a list of any of these.' + "Expected a filter, an endpoint, a callable or a list of any of these.", ) # Convert a filter-convertable thing into a filter @@ -155,7 +155,7 @@ def self.make_filter(parts) # # parts should be a list of things that can be passed to make_filter def self.mk_compound_filter(parts) - raise TypeError, "#{parts.inspect} is not iterable" unless parts.respond_to?('each') + raise TypeError, "#{parts.inspect} is not iterable" unless parts.respond_to?(:each) # Separate into a list of callables and a list of filter objects transformers = [] @@ -163,14 +163,14 @@ def self.mk_compound_filter(parts) parts.each do |subfilter| if !subfilter.is_a?(Array) # If it's not an iterable - if subfilter.respond_to?('get_service_endpoints') + if subfilter.respond_to?(:get_service_endpoints) # It's a full filter filters << subfilter - elsif subfilter.respond_to?('from_basic_service_endpoint') + elsif subfilter.respond_to?(:from_basic_service_endpoint) # It's an endpoint object, so put its endpoint conversion # attribute into the list of endpoint transformers - transformers << subfilter.method('from_basic_service_endpoint') - elsif subfilter.respond_to?('call') + transformers << subfilter.method(:from_basic_service_endpoint) + elsif subfilter.respond_to?(:call) # It's a proc, so add it to the list of endpoint # transformers transformers << subfilter diff --git a/lib/openid/yadis/htmltokenizer.rb b/lib/openid/yadis/htmltokenizer.rb index 6d99b07b..81185727 100644 --- a/lib/openid/yadis/htmltokenizer.rb +++ b/lib/openid/yadis/htmltokenizer.rb @@ -66,20 +66,20 @@ def reset # Look at the next token, but don't actually grab it def peekNextToken - return nil if @cur_pos == @page.length + return if @cur_pos == @page.length - if '<' == @page[@cur_pos] + if "<" == @page[@cur_pos] # Next token is a tag of some kind - if '!--' == @page[(@cur_pos + 1), 3] + if "!--" == @page[(@cur_pos + 1), 3] # Token is a comment - tag_end = @page.index('-->', (@cur_pos + 1)) + tag_end = @page.index("-->", (@cur_pos + 1)) raise HTMLTokenizerError, "No end found to started comment:\n#{@page[@cur_pos, 80]}" if tag_end.nil? # p @page[@cur_pos .. (tag_end+2)] HTMLComment.new(@page[@cur_pos..(tag_end + 2)]) else # Token is a html tag - tag_end = @page.index('>', (@cur_pos + 1)) + tag_end = @page.index(">", (@cur_pos + 1)) raise HTMLTokenizerError, "No end found to started tag:\n#{@page[@cur_pos, 80]}" if tag_end.nil? # p @page[@cur_pos .. tag_end] @@ -87,7 +87,7 @@ def peekNextToken end else # Next token is text - text_end = @page.index('<', @cur_pos) + text_end = @page.index("<", @cur_pos) text_end = text_end.nil? ? -1 : (text_end - 1) # p @page[@cur_pos .. text_end] HTMLText.new(@page[@cur_pos..text_end]) @@ -119,7 +119,7 @@ def getTag(*sought_tags) while (tag = getNextToken) if tag.is_a?(HTMLTag) and - (0 == sought_tags.length or sought_tags.include?(tag.tag_name)) + (0 == sought_tags.length or sought_tags.include?(tag.tag_name)) break end end @@ -130,20 +130,20 @@ def getTag(*sought_tags) # (if specified) or a specific later tag def getText(until_tag = nil) if until_tag.nil? - if '<' == @page[@cur_pos] + if "<" == @page[@cur_pos] # Next token is a tag, not text - '' + "" else # Next token is text getNextToken.text end else - ret_str = '' + ret_str = "" while (tag = peekNextToken) break if tag.is_a?(HTMLTag) and tag.tag_name == until_tag - ret_str << (tag.text + ' ') if '' != tag.text + ret_str << (tag.text + " ") if "" != tag.text getNextToken end @@ -155,7 +155,7 @@ def getText(until_tag = nil) # leading and trailing whitespace, and squeezing multiple # spaces into a single space. def getTrimmedText(until_tag = nil) - getText(until_tag).strip.gsub(/\s+/m, ' ') + getText(until_tag).strip.gsub(/\s+/m, " ") end end @@ -178,11 +178,11 @@ def to_s # By default tokens have no text representation def text - '' + "" end def trimmed_text - text.strip.gsub(/\s+/m, ' ') + text.strip.gsub(/\s+/m, " ") end # Compare to another based on the raw source @@ -203,9 +203,9 @@ class HTMLComment < HTMLToken attr_accessor :contents def initialize(text) - super(text) + super temp_arr = text.scan(/^$/m) - raise HTMLTokenizerError, 'Text passed to HTMLComment.initialize is not a comment' if temp_arr[0].nil? + raise HTMLTokenizerError, "Text passed to HTMLComment.initialize is not a comment" if temp_arr[0].nil? @contents = temp_arr[0][0] end @@ -216,9 +216,9 @@ class HTMLTag < HTMLToken attr_reader :end_tag, :tag_name def initialize(text) - super(text) - if '<' != text[0] or '>' != text[-1] - raise HTMLTokenizerError, 'Text passed to HTMLComment.initialize is not a comment' + super + if "<" != text[0] or ">" != text[-1] + raise HTMLTokenizerError, "Text passed to HTMLComment.initialize is not a comment" end @attr_hash = {} @@ -227,10 +227,10 @@ def initialize(text) tag_name = text.scan(/[\w:-]+/)[0] raise HTMLTokenizerError, "Error, tag is nil: #{tag_name}" if tag_name.nil? - if '/' == text[1] + if "/" == text[1] # It's an end tag @end_tag = true - @tag_name = '/' + tag_name.downcase + @tag_name = "/" + tag_name.downcase else @end_tag = false @tag_name = tag_name.downcase @@ -257,12 +257,12 @@ def attr_hash # * removing enclosing quotes attr_arr.each do |item| val = if item[1].nil? - item[0] - elsif '"'[0] == item[1][0] or '\''[0] == item[1][0] - item[1][1..-2] - else - item[1] - end + item[0] + elsif '"'[0] == item[1][0] or "'"[0] == item[1][0] + item[1][1..-2] + else + item[1] + end @attr_hash[item[0].downcase] = val end end @@ -279,12 +279,12 @@ def attr_hash def text unless end_tag case tag_name - when 'img' - return attr_hash['alt'] unless attr_hash['alt'].nil? - when 'applet' - return attr_hash['alt'] unless attr_hash['alt'].nil? + when "img" + return attr_hash["alt"] unless attr_hash["alt"].nil? + when "applet" + return attr_hash["alt"] unless attr_hash["alt"].nil? end end - '' + "" end end diff --git a/lib/openid/yadis/parsehtml.rb b/lib/openid/yadis/parsehtml.rb index b096b85d..792a178d 100644 --- a/lib/openid/yadis/parsehtml.rb +++ b/lib/openid/yadis/parsehtml.rb @@ -1,5 +1,5 @@ -require 'openid/yadis/htmltokenizer' -require 'cgi' +require "openid/yadis/htmltokenizer" +require "cgi" module OpenID module Yadis @@ -10,27 +10,34 @@ def self.html_yadis_location(html) in_head = false begin - while el = parser.getTag('head', '/head', 'meta', 'body', '/body', - 'html', 'script') + while el = parser.getTag( + "head", + "/head", + "meta", + "body", + "/body", + "html", + "script", + ) # we are leaving head or have reached body, so we bail - return nil if ['/head', 'body', '/body'].member?(el.tag_name) + return if ["/head", "body", "/body"].member?(el.tag_name) - if el.tag_name == 'head' && !(el.to_s[-2] == '/') + if el.tag_name == "head" && !(el.to_s[-2] == "/") in_head = true # tag ends with a /: a short tag end next unless in_head - if el.tag_name == 'script' && !(el.to_s[-2] == '/') - parser.getTag('/script') # tag ends with a /: a short tag + if el.tag_name == "script" && !(el.to_s[-2] == "/") + parser.getTag("/script") # tag ends with a /: a short tag end - return nil if el.tag_name == 'html' + return if el.tag_name == "html" - next unless el.tag_name == 'meta' and (equiv = el.attr_hash['http-equiv']) + next unless el.tag_name == "meta" and (equiv = el.attr_hash["http-equiv"]) if %w[x-xrds-location x-yadis-location].member?(equiv.downcase) && - el.attr_hash.member?('content') - return CGI.unescapeHTML(el.attr_hash['content']) + el.attr_hash.member?("content") + return CGI.unescapeHTML(el.attr_hash["content"]) end end rescue HTMLTokenizerError # just stop parsing if there's an error diff --git a/lib/openid/yadis/services.rb b/lib/openid/yadis/services.rb index 648c3588..88f1bc49 100644 --- a/lib/openid/yadis/services.rb +++ b/lib/openid/yadis/services.rb @@ -1,6 +1,6 @@ -require 'openid/yadis/filters' -require 'openid/yadis/discovery' -require 'openid/yadis/xrds' +require "openid/yadis/filters" +require "openid/yadis/discovery" +require "openid/yadis/xrds" module OpenID module Yadis @@ -14,8 +14,11 @@ def self.get_service_endpoints(input_url, flt = nil) # BasicEndpoint objects. result = Yadis.discover(input_url) begin - endpoints = Yadis.apply_filter(result.normalized_uri, - result.response_text, flt) + endpoints = Yadis.apply_filter( + result.normalized_uri, + result.response_text, + flt, + ) rescue XRDSError => e raise DiscoveryFailure.new(e.to_s, nil) end diff --git a/lib/openid/yadis/xrds.rb b/lib/openid/yadis/xrds.rb index 7c00cddc..0476c631 100644 --- a/lib/openid/yadis/xrds.rb +++ b/lib/openid/yadis/xrds.rb @@ -1,17 +1,17 @@ -require 'rexml/document' -require 'rexml/element' -require 'rexml/xpath' +require "rexml/document" +require "rexml/element" +require "rexml/xpath" -require 'openid/yadis/xri' +require "openid/yadis/xri" module OpenID module Yadis - XRD_NS_2_0 = 'xri://$xrd*($v*2.0)' - XRDS_NS = 'xri://$xrds' + XRD_NS_2_0 = "xri://$xrd*($v*2.0)" + XRDS_NS = "xri://$xrds" XRDS_NAMESPACES = { - 'xrds' => XRDS_NS, - 'xrd' => XRD_NS_2_0 + "xrds" => XRDS_NS, + "xrd" => XRD_NS_2_0, } class XRDSError < StandardError; end @@ -33,7 +33,7 @@ def self.get_canonical_id(iname, xrd_tree) # @returntype: unicode or None xrd_list = [] - REXML::XPath.match(xrd_tree.root, '/xrds:XRDS/xrd:XRD', XRDS_NAMESPACES).each do |el| + REXML::XPath.match(xrd_tree.root, "/xrds:XRDS/xrd:XRD", XRDS_NAMESPACES).each do |el| xrd_list << el end @@ -43,28 +43,31 @@ def self.get_canonical_id(iname, xrd_tree) unless xrd_list.empty? xrd_list[0].elements.each do |e| - next unless e.respond_to?('name') + next unless e.respond_to?(:name) - cid_elements << e if e.name == 'CanonicalID' + cid_elements << e if e.name == "CanonicalID" end end cid_element = cid_elements[0] - return nil unless cid_element + return unless cid_element canonical_id = XRI.make_xri(cid_element.text) child_id = canonical_id.downcase xrd_list[1..-1].each do |xrd| - parent_sought = child_id[0...child_id.rindex('!')] + parent_sought = child_id[0...child_id.rindex("!")] - parent = XRI.make_xri(xrd.elements['CanonicalID'].text) + parent = XRI.make_xri(xrd.elements["CanonicalID"].text) if parent_sought != parent.downcase - raise XRDSFraud.new(format('%s can not come from %s', parent_sought, - parent)) + raise XRDSFraud.new(format( + "%s can not come from %s", + parent_sought, + parent, + )) end child_id = parent_sought @@ -72,7 +75,7 @@ def self.get_canonical_id(iname, xrd_tree) root = XRI.root_authority(iname) unless XRI.provider_is_authoritative(root, child_id) - raise XRDSFraud.new(format('%s can not come from root %s', child_id, root)) + raise XRDSFraud.new(format("%s can not come from root %s", child_id, root)) end canonical_id @@ -83,17 +86,17 @@ class XRDSError < StandardError def self.parseXRDS(text) disable_entity_expansion do - raise XRDSError.new('Not an XRDS document.') if text.nil? + raise XRDSError.new("Not an XRDS document.") if text.nil? begin d = REXML::Document.new(text) rescue RuntimeError - raise XRDSError.new('Not an XRDS document. Failed to parse XML.') + raise XRDSError.new("Not an XRDS document. Failed to parse XML.") end return d if is_xrds?(d) - raise XRDSError.new('Not an XRDS document.') + raise XRDSError.new("Not an XRDS document.") end end @@ -108,23 +111,25 @@ def self.disable_entity_expansion def self.is_xrds?(xrds_tree) xrds_root = xrds_tree.root (!xrds_root.nil? and - xrds_root.name == 'XRDS' and + xrds_root.name == "XRDS" and xrds_root.namespace == XRDS_NS) end def self.get_yadis_xrd(xrds_tree) - REXML::XPath.each(xrds_tree.root, - '/xrds:XRDS/xrd:XRD[last()]', - XRDS_NAMESPACES) do |el| + REXML::XPath.each( + xrds_tree.root, + "/xrds:XRDS/xrd:XRD[last()]", + XRDS_NAMESPACES, + ) do |el| return el end - raise XRDSError.new('No XRD element found.') + raise XRDSError.new("No XRD element found.") end # aka iterServices in Python def self.each_service(xrds_tree, &block) xrd = get_yadis_xrd(xrds_tree) - xrd.each_element('Service', &block) + xrd.each_element("Service", &block) end def self.services(xrds_tree) @@ -137,9 +142,9 @@ def self.services(xrds_tree) def self.expand_service(service_element) es = service_element.elements - uris = es.each('URI') { |u| } + uris = es.each("URI") { |u| } uris = prio_sort(uris) - types = es.each('Type/text()') + types = es.each("Type/text()") # REXML::Text objects are not strings. types = types.collect { |t| t.to_s } uris.collect { |uri| [types, uri.text, service_element] } @@ -148,7 +153,7 @@ def self.expand_service(service_element) # Sort a list of elements that have priority attributes. def self.prio_sort(elements) elements.sort do |a, b| - a.attribute('priority').to_s.to_i <=> b.attribute('priority').to_s.to_i + a.attribute("priority").to_s.to_i <=> b.attribute("priority").to_s.to_i end end end diff --git a/lib/openid/yadis/xri.rb b/lib/openid/yadis/xri.rb index f1029763..beff3742 100644 --- a/lib/openid/yadis/xri.rb +++ b/lib/openid/yadis/xri.rb @@ -1,17 +1,17 @@ -require 'openid/fetchers' +require "openid/fetchers" module OpenID module Yadis module XRI # The '(' is for cross-reference authorities, and hopefully has a # matching ')' somewhere. - XRI_AUTHORITIES = ['!', '=', '@', '+', '$', '('] + XRI_AUTHORITIES = ["!", "=", "@", "+", "$", "("] def self.identifier_scheme(identifier) if !identifier.nil? and - identifier.length > 0 and - (identifier.match('^xri://') or - XRI_AUTHORITIES.member?(identifier[0].chr)) + identifier.length > 0 and + (identifier.match("^xri://") or + XRI_AUTHORITIES.member?(identifier[0].chr)) :xri else :uri @@ -23,7 +23,7 @@ def self.identifier_scheme(identifier) # than once. XRI Syntax section 2.3.1 def self.to_iri_normal(xri) iri = xri.dup - iri.insert(0, 'xri://') unless iri.match('^xri://') + iri.insert(0, "xri://") unless iri.match?("^xri://") escape_for_iri(iri) end @@ -32,7 +32,7 @@ def self.to_iri_normal(xri) def self.escape_for_iri(xri) esc = xri.dup # encode all % - esc.gsub!(/%/, '%25') + esc.gsub!("%", "%25") esc.gsub!(/\((.*?)\)/) do |xref_match| xref_match.gsub(%r{[/?\#]}) do |char_match| CGI.escape(char_match) @@ -56,7 +56,7 @@ def self.iri_to_uri(iri) end def self.provider_is_authoritative(provider_id, canonical_id) - lastbang = canonical_id.rindex('!') + lastbang = canonical_id.rindex("!") return false unless lastbang parent = canonical_id[0...lastbang] @@ -64,21 +64,21 @@ def self.provider_is_authoritative(provider_id, canonical_id) end def self.root_authority(xri) - xri = xri[6..-1] if xri.index('xri://') == 0 - authority = xri.split('/', 2)[0] - root = if authority[0].chr == '(' - authority[0...authority.index(')') + 1] - elsif XRI_AUTHORITIES.member?(authority[0].chr) - authority[0].chr - else - authority.split(/[!*]/)[0] - end + xri = xri[6..-1] if xri.index("xri://") == 0 + authority = xri.split("/", 2)[0] + root = if authority[0].chr == "(" + authority[0...authority.index(")") + 1] + elsif XRI_AUTHORITIES.member?(authority[0].chr) + authority[0].chr + else + authority.split(/[!*]/)[0] + end make_xri(root) end def self.make_xri(xri) - xri = 'xri://' + xri if xri.index('xri://') != 0 + xri = "xri://" + xri if xri.index("xri://") != 0 xri end end diff --git a/lib/openid/yadis/xrires.rb b/lib/openid/yadis/xrires.rb index d1dcc899..964a6cc6 100644 --- a/lib/openid/yadis/xrires.rb +++ b/lib/openid/yadis/xrires.rb @@ -1,7 +1,7 @@ -require 'cgi' -require 'openid/yadis/xri' -require 'openid/yadis/xrds' -require 'openid/fetchers' +require "cgi" +require "openid/yadis/xri" +require "openid/yadis/xrds" +require "openid/fetchers" module OpenID module Yadis @@ -9,12 +9,12 @@ module XRI class XRIHTTPError < StandardError; end class ProxyResolver - DEFAULT_PROXY = 'http://proxy.xri.net/' + DEFAULT_PROXY = "http://proxy.xri.net/" def initialize(proxy_url = nil) @proxy_url = proxy_url || DEFAULT_PROXY - @proxy_url += '/' unless @proxy_url.match('/$') + @proxy_url += "/" unless @proxy_url.match?("/$") end def query_url(xri, service_type = nil) @@ -23,12 +23,12 @@ def query_url(xri, service_type = nil) # XRI Resolution WD 11. qxri = XRI.to_uri_normal(xri)[6..-1] hxri = @proxy_url + qxri - args = { '_xrd_r' => 'application/xrds+xml' } + args = {"_xrd_r" => "application/xrds+xml"} if service_type - args['_xrd_t'] = service_type + args["_xrd_t"] = service_type else # don't perform service endpoint selection - args['_xrd_r'] += ';sep=false' + args["_xrd_r"] += ";sep=false" end XRI.append_args(hxri, args) @@ -46,9 +46,9 @@ def query(xri) raise XRIHTTPError, "Could not fetch #{xri}" if response.nil? xrds = Yadis.parseXRDS(response.body) - canonicalID = Yadis.get_canonical_id(xri, xrds) + canonical_id = Yadis.get_canonical_id(xri, xrds) - [canonicalID, Yadis.services(xrds)] + [canonical_id, Yadis.services(xrds)] # TODO: # * If we do get hits for multiple service_types, we're almost # certainly going to have duplicated service entries and @@ -59,9 +59,9 @@ def query(xri) def self.urlencode(args) a = [] args.each do |key, val| - a << (CGI.escape(key) + '=' + CGI.escape(val)) + a << (CGI.escape(key) + "=" + CGI.escape(val)) end - a.join('&') + a.join("&") end def self.append_args(url, args) @@ -69,13 +69,13 @@ def self.append_args(url, args) # rstrip question marks rstripped = url.dup - rstripped = rstripped[0...rstripped.length - 1] while rstripped[-1].chr == '?' + rstripped = rstripped[0...rstripped.length - 1] while rstripped[-1].chr == "?" - sep = if rstripped.index('?') - '&' - else - '?' - end + sep = if rstripped.index("?") + "&" + else + "?" + end url + sep + XRI.urlencode(args) end diff --git a/lib/ruby-openid.rb b/lib/ruby-openid.rb index 362e03b1..6fedd179 100644 --- a/lib/ruby-openid.rb +++ b/lib/ruby-openid.rb @@ -1 +1 @@ -require 'openid' +require "openid" diff --git a/test/testutil.rb b/test/testutil.rb index b3ee1c50..9aefb5d7 100644 --- a/test/testutil.rb +++ b/test/testutil.rb @@ -1,4 +1,4 @@ -require 'pathname' +require "pathname" if defined? Minitest::Test # We're on Minitest 5+. Nothing to do here. @@ -10,7 +10,7 @@ module OpenID module TestDataMixin TESTS_DIR = Pathname.new(__FILE__).dirname - TEST_DATA_DIR = Pathname.new('data') + TEST_DATA_DIR = Pathname.new("data") def read_data_file(filename, lines = true, data_dir = TEST_DATA_DIR) fname = TESTS_DIR.join(data_dir, filename) @@ -56,8 +56,9 @@ module ProtocolErrorMixin def assert_protocol_error(str_prefix) result = yield rescue ProtocolError => e - message = "Expected prefix #{str_prefix.inspect}, got "\ - "#{e.message.inspect}" + message = "Expected prefix #{str_prefix.inspect}, got " \ + "#{e.message.inspect}" + assert(e.message.start_with?(str_prefix), message) else raise("Expected ProtocolError. Got #{result.inspect}") @@ -76,9 +77,9 @@ def with_method_overridden(method_name, proc) $VERBOSE = verbose yield ensure - if original.respond_to? :owner + if original.respond_to?(:owner) original.owner.send(:undef_method, method_name) - original.owner.send :define_method, method_name, original + original.owner.send(:define_method, method_name, original) else define_method(method_name, original) module_function(method_name) @@ -107,26 +108,26 @@ def instance_def(method_name, &proc) end end - GOODSIG = '[A Good Signature]' + GOODSIG = "[A Good Signature]" class GoodAssoc attr_accessor :handle, :expires_in - def initialize(handle = '-blah-') + def initialize(handle = "-blah-") @handle = handle @expires_in = 3600 end def check_message_signature(msg) - msg.get_arg(OPENID_NS, 'sig') == GOODSIG + msg.get_arg(OPENID_NS, "sig") == GOODSIG end end class HTTPResponse - def self._from_raw_data(status, body = '', headers = {}, final_url = nil) - resp = Net::HTTPResponse.new('1.1', status.to_s, 'NONE') + def self._from_raw_data(status, body = "", headers = {}, final_url = nil) + resp = Net::HTTPResponse.new("1.1", status.to_s, "NONE") me = _from_net_response(resp, final_url) - me.initialize_http_header headers + me.initialize_http_header(headers) me.body = body me end diff --git a/test/util.rb b/test/util.rb index cc013075..63297576 100644 --- a/test/util.rb +++ b/test/util.rb @@ -1,5 +1,5 @@ # Utilities that are only used in the testing code -require 'stringio' +require "stringio" module OpenID module TestUtil @@ -14,8 +14,12 @@ def assert_log_matches(*regexes) end log_output.rewind log_lines = log_output.readlines - assert_equal(regexes.length, log_lines.length, - [regexes, log_lines].inspect) + + assert_equal( + regexes.length, + log_lines.length, + [regexes, log_lines].inspect, + ) log_lines.zip(regexes) do |line, regex| assert_match(regex, line) end @@ -33,6 +37,7 @@ def assert_log_line_count(num_lines) end log_output.rewind log_lines = log_output.readlines + assert_equal(num_lines, log_lines.length) result end From 5b49860d07e073edafd7fa160dfdc892f93205f1 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 02:30:18 -0600 Subject: [PATCH 05/13] =?UTF-8?q?=F0=9F=94=A5=20Travis=20is=20dead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3ac53512..00000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: ruby -sudo: required -dist: trusty -script: rake -rvm: - - "1.9" - - "2.0" - - "2.1" - - "2.2" - - "2.3" - - "2.4" - - "2.5" - - "2.6" - - ruby-head - - jruby - - jruby-head - - jruby-19mode - - rubinius-3 - -before_install: - - "gem install bundler || gem install bundler --version '< 2'" - -matrix: - allow_failures: - - rvm: "ruby-head" - - rvm: "jruby-head" From fcea8246e6eac0d131d5cab4884514773e42b727 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 02:30:45 -0600 Subject: [PATCH 06/13] =?UTF-8?q?=F0=9F=9A=9A=20Rename=20LICENSE.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE => LICENSE.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename LICENSE => LICENSE.txt (100%) diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt From 1e03d259f8fb8af4e0e3034b02c362a357722ddf Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 02:31:00 -0600 Subject: [PATCH 07/13] =?UTF-8?q?=E2=9C=A8=20CODE=5FOF=5FCONDUCT.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CODE_OF_CONDUCT.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100755 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100755 index 00000000..c4880b6d --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,84 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at peter.boling@gmail.com. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, +available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. From f90814f1512b67f6755ef57906b3a0426d550a12 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 02:31:09 -0600 Subject: [PATCH 08/13] =?UTF-8?q?=E2=9C=A8=20SECURITY.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SECURITY.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100755 index 00000000..905a9e80 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,15 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +|---------|-----------| +| 3.x | ✅ | +| 2.x | ❌ | +| 1.x | ❌ | + +## Reporting a Vulnerability + +Peter Boling is the primary maintainer of this gem. Please find a way +to [contact him directly](https://railsbling.com/contact) to report the issue. Include as much relevant information as +possible. From 04618160e73436c552bc99e32edeeb871b36c16c Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 02:31:19 -0600 Subject: [PATCH 09/13] =?UTF-8?q?=E2=9C=A8=20CONTRIBUTING.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CONTRIBUTING.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100755 index 00000000..e2d98484 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,54 @@ +## Contributing + +Bug reports and pull requests are welcome on GitHub at [https://github.com/VitalConnectInc/ruby-openid2][🚎src-main] +. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to +the [code of conduct][🤝conduct]. + +To submit a patch, please fork the project and create a patch with tests. +Once you're happy with it send a pull request. + +## Release + +### One-time, Per-developer, Setup + +**IMPORTANT**: Your public key for signing gems will need to be picked up by the line in the +`gemspec` defining the `spec.cert_chain` (check the relevant ENV variables there), +in order to sign the new release. +See: [RubyGems Security Guide][🔒️rubygems-security-guide] + +### To release a new version: + +1. Run `bin/setup && bin/rake` as a tests, coverage, & linting sanity check +2. Update the version number in `version.rb` +3. Run `bin/setup && bin/rake` again as a secondary check, and to update `Gemfile.lock` +4. Run `git commit -am "🔖 Prepare release v"` to commit the changes +5. Run `git push` to trigger the final CI pipeline before release, & merge PRs + a. NOTE: Remember to [check the build][🧪build]! +6. Run `git checkout main` +7. Run `git pull origin main` to ensure you will release the latest trunk code. +8. Set `SOURCE_DATE_EPOCH` so `rake build` and `rake release` use same timestamp, and generate same checksums + a. Run `export SOURCE_DATE_EPOCH=$EPOCHSECONDS && echo $SOURCE_DATE_EPOCH` + b. If the echo above has no output, then it didn't work. + c. Note that you'll need the `zsh/datetime` module, if running `zsh`. + d. In `bash` you can use `date +%s` instead, i.e. `export SOURCE_DATE_EPOCH=$(date +%s) && echo $SOURCE_DATE_EPOCH` +9. Run `bundle exec rake build` +10. Run [`bin/checksums`][🔒️rubygems-checksums-pr] to create SHA-256 and SHA-512 checksums + a. Checksums will be committed automatically by the script, but not pushed +11. Run `bundle exec rake release` which will create a git tag for the version, + push git commits and tags, and push the `.gem` file to [rubygems.org][💎rubygems] + +## Contributors + +[![Contributors][🖐contributors-img]][🖐contributors] + +Made with [contributors-img][🖐contrib-rocks]. + +[🧪build]: https://github.com/VitalConnectInc/ruby-openid2/actions +[🤝conduct]: https://github.com/VitalConnectInc/ruby-openid2/blob/main/CODE_OF_CONDUCT.md +[🖐contrib-rocks]: https://contrib.rocks +[🖐contributors]: https://github.com/VitalConnectInc/ruby-openid2/graphs/contributors +[🖐contributors-img]: https://contrib.rocks/image?repo=VitalConnectInc/ruby-openid2 +[💎rubygems]: https://rubygems.org +[🔒️rubygems-security-guide]: https://guides.rubygems.org/security/#building-gems +[🔒️rubygems-checksums-pr]: https://github.com/rubygems/guides/pull/325 +[🚎src-main]: https://github.com/VitalConnectInc/ruby-openid2 From 1eb8624b63320f3b1015d48161fb07efce21a7a3 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 02:34:17 -0600 Subject: [PATCH 10/13] =?UTF-8?q?=F0=9F=94=A5=20These=20files=20haven't=20?= =?UTF-8?q?been=20relevant=20since=202008?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGES-2.0.0 | 36 ------------------------------------ CHANGES-2.1.0 | 36 ------------------------------------ 2 files changed, 72 deletions(-) delete mode 100644 CHANGES-2.0.0 delete mode 100644 CHANGES-2.1.0 diff --git a/CHANGES-2.0.0 b/CHANGES-2.0.0 deleted file mode 100644 index 4bca206f..00000000 --- a/CHANGES-2.0.0 +++ /dev/null @@ -1,36 +0,0 @@ - -* API Changes - * PAPE (Provider Authentication Policy Extension) module - * Updated extension for specification draft 2 - * PAPE::Request::from_success_response returns nil if PAPE - response arguments were not signed - * Added functions to generate request/response HTML forms with - auto-submission javascript - * Consumer (relying party) API: - Auth_OpenID_AuthRequest::htmlMarkup - * Server API: Auth_OpenID_OpenIDResponse::toHTML - * Removed Rails login generator - * SReg::Response::from_success_response returns nil when no signed - arguments were found - -* New Features - * Fetchers now only read/request first megabyte of response - -* Bug fixes - * NOT NULL constraints to tables created by ActiveRecordStore - * check_authentication requests: copy entire response, not just - signed fields. Fixes missing namespace in check_authentication - requests - * OpenID 1 association requests no longer explicitly set - no-encryption session type - * Improved HTML parsing - * AssociationRequest::answer: include session_type in - no-encryption assoc responses - * normalize return_to URL before performing return_to verification - * OpenID::Consumer::IdResHandler.verify_discovery_results_openid1: - fall back to OpenID 1.0 type if 1.1 endpoint cannot be found - * StandardFetcher now includes a timeout setting - * Handle blank content types in - OpenID::Yadis::DiscoveryResult.where_is_yadis? - * Properly convert timestamps to ints before storing in DB, and vise - versa diff --git a/CHANGES-2.1.0 b/CHANGES-2.1.0 deleted file mode 100644 index 4bca206f..00000000 --- a/CHANGES-2.1.0 +++ /dev/null @@ -1,36 +0,0 @@ - -* API Changes - * PAPE (Provider Authentication Policy Extension) module - * Updated extension for specification draft 2 - * PAPE::Request::from_success_response returns nil if PAPE - response arguments were not signed - * Added functions to generate request/response HTML forms with - auto-submission javascript - * Consumer (relying party) API: - Auth_OpenID_AuthRequest::htmlMarkup - * Server API: Auth_OpenID_OpenIDResponse::toHTML - * Removed Rails login generator - * SReg::Response::from_success_response returns nil when no signed - arguments were found - -* New Features - * Fetchers now only read/request first megabyte of response - -* Bug fixes - * NOT NULL constraints to tables created by ActiveRecordStore - * check_authentication requests: copy entire response, not just - signed fields. Fixes missing namespace in check_authentication - requests - * OpenID 1 association requests no longer explicitly set - no-encryption session type - * Improved HTML parsing - * AssociationRequest::answer: include session_type in - no-encryption assoc responses - * normalize return_to URL before performing return_to verification - * OpenID::Consumer::IdResHandler.verify_discovery_results_openid1: - fall back to OpenID 1.0 type if 1.1 endpoint cannot be found - * StandardFetcher now includes a timeout setting - * Handle blank content types in - OpenID::Yadis::DiscoveryResult.where_is_yadis? - * Properly convert timestamps to ints before storing in DB, and vise - versa From de310596f3672175ae68ec9fdba6bfb76185ee4b Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 02:39:02 -0600 Subject: [PATCH 11/13] =?UTF-8?q?=F0=9F=9A=A8=20Linting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/bundle | 10 +++++----- lib/openid/fetchers.rb | 16 +++++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/bin/bundle b/bin/bundle index 450605bc..42c7fd7c 100755 --- a/bin/bundle +++ b/bin/bundle @@ -30,7 +30,7 @@ m = Module.new do if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN bundler_version = a end - next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o + next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ bundler_version = $1 update_index = i end @@ -56,7 +56,7 @@ m = Module.new do def lockfile_version return unless File.file?(lockfile) lockfile_contents = File.read(lockfile) - return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o + return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ Regexp.last_match(1) end @@ -83,15 +83,15 @@ m = Module.new do def activate_bundler gem_error = activation_error_handling do - gem("bundler", bundler_requirement) + gem "bundler", bundler_requirement end return if gem_error.nil? require_error = activation_error_handling do require "bundler/version" end return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) - warn("Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`") - exit(42) + warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" + exit 42 end def activation_error_handling diff --git a/lib/openid/fetchers.rb b/lib/openid/fetchers.rb index 2cf95ec7..0776a226 100644 --- a/lib/openid/fetchers.rb +++ b/lib/openid/fetchers.rb @@ -50,17 +50,23 @@ module OpenID class HTTPResponse attr_accessor :final_url, :_response - def self._from_net_response(response, final_url, _headers = nil) - me = new - me._response = response - me.final_url = final_url - me + class << self + def _from_net_response(response, final_url, _headers = nil) + instance = new + instance._response = response + instance.final_url = final_url + instance + end end def method_missing(method, *args) @_response.send(method, *args) end + def respond_to_missing?(method_name, include_private = false) + super + end + def body=(s) @_response.instance_variable_set(:@body, s) # XXX Hack to work around ruby's HTTP library behavior. @body From 31fa9ddd2c8b908be73acc8f98e6312a9f4ff570 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 02:40:06 -0600 Subject: [PATCH 12/13] =?UTF-8?q?=E2=9E=95=20version=5Fgem=20&=20certs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 18 ++++++++++++ Gemfile.lock | 9 +++--- certs/pboling.pem | 27 ++++++++++++++++++ lib/openid.rb | 7 +++++ lib/openid/fetchers.rb | 2 +- lib/openid/version.rb | 4 ++- ruby-openid.gemspec | 40 -------------------------- ruby-openid2.gemspec | 64 ++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 124 insertions(+), 47 deletions(-) create mode 100644 certs/pboling.pem delete mode 100644 ruby-openid.gemspec create mode 100644 ruby-openid2.gemspec diff --git a/CHANGELOG.md b/CHANGELOG.md index 85dc7b9e..1749b0bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,22 @@ # Changelog +All notable changes to this project will be documented in this file. + +Since version 3.0.0, the format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] +### Added +### Changed +### Fixed +### Removed + +## 3.0.0 +3831 relevant lines, 3510 lines covered and 321 lines missed. ( 91.62% ) +1228 total branches, 1070 branches covered and 158 branches missed. ( 87.13% ) +### Fixed +- Compatibility with Ruby 2.7+ +### Removed +- Support for Ruby < 2.7 ## 2.9.2 diff --git a/Gemfile.lock b/Gemfile.lock index d0936350..ab29d4dd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,8 @@ PATH remote: . specs: - ruby-openid (2.9.2) + ruby-openid2 (3.0.0) + version_gem (~> 1.1, >= 1.1.4) GEM remote: https://rubygems.org/ @@ -34,8 +35,7 @@ GEM rainbow (3.1.1) rake (13.2.1) regexp_parser (2.9.2) - rexml (3.3.6) - strscan + rexml (3.3.7) rspec-block_is_expected (1.0.6) rubocop (1.64.1) json (~> 2.3) @@ -119,7 +119,6 @@ GEM standard-custom (>= 1.0.2, < 2) standard-performance (>= 1.3.1, < 2) version_gem (>= 1.1.4, < 3) - strscan (3.1.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) unicode-display_width (2.5.0) @@ -143,7 +142,7 @@ DEPENDENCIES rubocop-lts (~> 18.2, >= 18.2.1) rubocop-minitest (~> 0.36) rubocop-packaging (~> 0.5, >= 0.5.2) - ruby-openid! + ruby-openid2! standard (>= 1.35.1) webrick (~> 1.8) yard (~> 0.9, >= 0.9.34) diff --git a/certs/pboling.pem b/certs/pboling.pem new file mode 100644 index 00000000..33443861 --- /dev/null +++ b/certs/pboling.pem @@ -0,0 +1,27 @@ +-----BEGIN CERTIFICATE----- +MIIEgDCCAuigAwIBAgIBATANBgkqhkiG9w0BAQsFADBDMRUwEwYDVQQDDAxwZXRl +ci5ib2xpbmcxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkW +A2NvbTAeFw0yMzA5MjAxNzMwMjhaFw0yNDA5MTkxNzMwMjhaMEMxFTATBgNVBAMM +DHBldGVyLmJvbGluZzEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPy +LGQBGRYDY29tMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA+a9UvHo3 +84k96WgU5Kk5HB+cLZs/modjorsTfqY67MJF5nNvAoqcKTUBW4uG+Zpfnm3jaDO5 +GxhJEIZWfndYzycHT2KMVQ1uTP82ba8ZaKrPlPIafkbui3mdds47qsmqHiblKERg +U532lkwfqHDlJwE7OBZQ59EwWWLynlT/yAUHpOBbqIuHKUxdpmBI+sIjrZcD1e05 +WmjkO6fwIdC5oM757aoPxIgXD587VOViH11Vkm2doskj4T8yONtwVHlcrrhJ9Bzd +/zdp6vEn7GZQrABvpOlqwWxQ72ZnFhJe/RJZf6CXOPOh69Ai0QKYl2a1sYuCJKS3 +nsBnxXJINEEznjR7rZjNUmYD+CZqfjzgPqedRxTlASe7iA4w7xZOqMDzcuhNwcUQ +tMEH6BTktxKP3jXZPXRfHCf6s+HRVb6vezAonTBVyydf5Xp5VwWkd6cwm+2BzHl5 +7kc/3lLxKMcsyEUprAsk8LdHohwZdC267l+RS++AP6Cz6x+nB3oGob19AgMBAAGj +fzB9MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQCSSas60GqqMjt +xR7LoY1gucEvtzAhBgNVHREEGjAYgRZwZXRlci5ib2xpbmdAZ21haWwuY29tMCEG +A1UdEgQaMBiBFnBldGVyLmJvbGluZ0BnbWFpbC5jb20wDQYJKoZIhvcNAQELBQAD +ggGBAMl9ifcw5p+PdvB7dCPoNKoVdp/2LbC9ztETHuYL2gUMJB6UoS3o9c/piSuR +V3ZMQaijmNu6ms1bWAtJ66LjmYrVflJtf9yp31Kierr9LpisMSUx2qbMOHGa8d2Z +vCUWPF8E9Cg0mP3GAyZ6qql8jDh/anUKeksPXqJvNxNPDu2DVYsa/IWdl96whzS4 +Bl7SwB1E7agps40UcshCSKaVDOU0M+XN6SrnJMElnBic+KSAkBkVFbzS0BE4ODZM +BgE6nYzQ05qhuvbE+oGdACTlemNtDDWCh0uw+7x0q2PocGIDU5zsPn/WNTkCXPmB +CHGvqDNWq4M7ncTKAaS2XExgyb7uPdq9fKiOW8nmH+zCiGzJXzBWwZlKf7L4Ht9E +a3f0e5C+zvee9Z5Ng9ciyfav9/fcXgYt5MjoBv27THr5XfBhgOCIHSYW2tqJmWKi +KuxrfYrN+9HvMdm+nZ6TypmKftHY3Gj+/uu+g8Icm/zrvTWAEE0mcJOkfrIoNPJb +pF8dMA== +-----END CERTIFICATE----- diff --git a/lib/openid.rb b/lib/openid.rb index 6fbdc48c..dfe5d3e2 100644 --- a/lib/openid.rb +++ b/lib/openid.rb @@ -12,9 +12,16 @@ # implied. See the License for the specific language governing # permissions and limitations under the License. +# External Libraries +require "version_gem" + module OpenID end require "openid/version" require "openid/consumer" require "openid/server" + +OpenID::Version.class_eval do + extend VersionGem::Basic +end diff --git a/lib/openid/fetchers.rb b/lib/openid/fetchers.rb index 0776a226..27f7e81d 100644 --- a/lib/openid/fetchers.rb +++ b/lib/openid/fetchers.rb @@ -120,7 +120,7 @@ def self.fetcher_use_env_http_proxy end class StandardFetcher - USER_AGENT = "ruby-openid/#{OpenID::VERSION} (#{RUBY_PLATFORM})" + USER_AGENT = "ruby-openid/#{OpenID::Version::VERSION} (#{RUBY_PLATFORM})" REDIRECT_LIMIT = 5 TIMEOUT = ENV["RUBY_OPENID_FETCHER_TIMEOUT"] || 60 diff --git a/lib/openid/version.rb b/lib/openid/version.rb index 7a85990d..5595b89e 100644 --- a/lib/openid/version.rb +++ b/lib/openid/version.rb @@ -1,3 +1,5 @@ module OpenID - VERSION = "2.9.2" + module Version + VERSION = "3.0.0" + end end diff --git a/ruby-openid.gemspec b/ruby-openid.gemspec deleted file mode 100644 index 7cadc568..00000000 --- a/ruby-openid.gemspec +++ /dev/null @@ -1,40 +0,0 @@ -require File.expand_path("lib/openid/version", __dir__) - -Gem::Specification.new do |s| - s.name = "ruby-openid" - s.author = "JanRain, Inc" - s.email = "openid@janrain.com" - s.homepage = "https://github.com/openid/ruby-openid" - s.summary = "A library for consuming and serving OpenID identities." - s.version = OpenID::VERSION - s.licenses = ["Ruby", "Apache Software License 2.0"] - - # Files - files = Dir.glob("{examples,lib,test}/**/*") - files << "NOTICE" << "CHANGELOG.md" - s.files = files.delete_if { |f| f.include?("_darcs") || f.include?("admin") } - s.require_paths = ["lib"] - s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) } - - # RDoc - s.extra_rdoc_files = ["README.md", "INSTALL.md", "LICENSE", "UPGRADE.md"] - s.rdoc_options << "--main" << "README.md" - - s.add_development_dependency("minitest", ">= 5") - s.add_development_dependency("rake", ">= 13") - s.add_development_dependency("rexml", "~> 3.2") - s.add_development_dependency("webrick", "~> 1.8") - - # Coverage - s.add_development_dependency("kettle-soup-cover", "~> 1.0", ">= 1.0.2") - - # Linting - s.add_development_dependency("rubocop-lts", "~> 18.2", ">= 18.2.1") - s.add_development_dependency("rubocop-minitest", "~> 0.36") - s.add_development_dependency("rubocop-packaging", "~> 0.5", ">= 0.5.2") - s.add_development_dependency("standard", ">= 1.35.1") - - # Documentation - s.add_development_dependency("yard", "~> 0.9", ">= 0.9.34") - s.add_development_dependency("yard-junk", "~> 0.0") -end diff --git a/ruby-openid2.gemspec b/ruby-openid2.gemspec new file mode 100644 index 00000000..330bfc98 --- /dev/null +++ b/ruby-openid2.gemspec @@ -0,0 +1,64 @@ +# Get the GEMFILE_VERSION without *require* "my_gem/version", for code coverage accuracy +# See: https://github.com/simplecov-ruby/simplecov/issues/557#issuecomment-825171399 +load "lib/openid/version.rb" +gem_version = OpenID::Version::VERSION +OpenID::Version.send(:remove_const, :VERSION) + +Gem::Specification.new do |spec| + spec.name = "ruby-openid2" + spec.version = gem_version + + # See CONTRIBUTING.md + spec.cert_chain = [ENV.fetch("GEM_CERT_PATH", "certs/#{ENV.fetch("GEM_CERT_USER", ENV["USER"])}.pem")] + spec.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $PROGRAM_NAME.end_with?("gem") + + spec.authors = ["JanRain, Inc", "Peter Boling"] + spec.email = "peter.boling@gmail.com" + spec.homepage = "https://github.com/VitalConnectInc/#{spec.name}" + spec.summary = "A library for consuming and serving OpenID identities." + + # Specify which files should be added to the gem when it is released. + spec.files = Dir[ + # Splats (alphabetical) + "lib/**/*.rb", + # Files (alphabetical) + "CHANGELOG.md", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE.txt", + "README.md", + "SECURITY.md" + ] + spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) } + spec.licenses = ["Ruby", "Apache Software License 2.0"] + spec.require_paths = ["lib"] + spec.required_ruby_version = ">= 2.7.0" + + spec.metadata["homepage_uri"] = spec.homepage + spec.metadata["source_code_uri"] = "#{spec.homepage}/tree/v#{spec.version}" + spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md" + spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues" + spec.metadata["documentation_uri"] = "https://www.rubydoc.info/gems/#{spec.name}/#{spec.version}" + spec.metadata["wiki_uri"] = "#{spec.homepage}/wiki" + spec.metadata["rubygems_mfa_required"] = "true" + + spec.add_dependency("version_gem", "~> 1.1", ">= 1.1.4") + + spec.add_development_dependency("minitest", ">= 5") + spec.add_development_dependency("rake", ">= 13") + spec.add_development_dependency("rexml", "~> 3.2") + spec.add_development_dependency("webrick", "~> 1.8") + + # Coverage + spec.add_development_dependency("kettle-soup-cover", "~> 1.0", ">= 1.0.2") + + # Linting + spec.add_development_dependency("rubocop-lts", "~> 18.2", ">= 18.2.1") + spec.add_development_dependency("rubocop-minitest", "~> 0.36") + spec.add_development_dependency("rubocop-packaging", "~> 0.5", ">= 0.5.2") + spec.add_development_dependency("standard", ">= 1.35.1") + + # Documentation + spec.add_development_dependency("yard", "~> 0.9", ">= 0.9.34") + spec.add_development_dependency("yard-junk", "~> 0.0") +end From 4d8ac788d6f10fb6ebe9357c481027bfe4bdc322 Mon Sep 17 00:00:00 2001 From: Peter Boling Date: Wed, 4 Sep 2024 03:26:55 -0600 Subject: [PATCH 13/13] =?UTF-8?q?=F0=9F=90=9B=20Use=20modern=20require=5Fr?= =?UTF-8?q?elative=20for=20gem=20internal=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .rubocop_gradual.lock | 757 +++++++++++----------- bin/bundle | 10 +- bin/setup | 8 + lib/openid.rb | 6 +- lib/openid/association.rb | 8 +- lib/openid/consumer.rb | 20 +- lib/openid/consumer/associationmanager.rb | 14 +- lib/openid/consumer/checkid_request.rb | 4 +- lib/openid/consumer/discovery.rb | 22 +- lib/openid/consumer/html_parse.rb | 2 +- lib/openid/consumer/idres.rb | 10 +- lib/openid/cryptutil.rb | 9 +- lib/openid/dh.rb | 4 +- lib/openid/extension.rb | 2 +- lib/openid/extensions/ax.rb | 6 +- lib/openid/extensions/oauth.rb | 2 +- lib/openid/extensions/pape.rb | 2 +- lib/openid/extensions/sreg.rb | 6 +- lib/openid/extensions/ui.rb | 2 +- lib/openid/fetchers.rb | 6 +- lib/openid/kvpost.rb | 4 +- lib/openid/message.rb | 4 +- lib/openid/protocolerror.rb | 2 +- lib/openid/server.rb | 14 +- lib/openid/store/filesystem.rb | 8 +- lib/openid/store/interface.rb | 2 +- lib/openid/store/memcache.rb | 9 +- lib/openid/store/memory.rb | 3 +- lib/openid/store/nonce.rb | 5 +- lib/openid/trustroot.rb | 5 +- lib/openid/urinorm.rb | 1 + lib/openid/yadis/constants.rb | 2 +- lib/openid/yadis/discovery.rb | 8 +- lib/openid/yadis/parsehtml.rb | 5 +- lib/openid/yadis/services.rb | 6 +- lib/openid/yadis/xrds.rb | 2 +- lib/openid/yadis/xri.rb | 2 +- lib/openid/yadis/xrires.rb | 9 +- test/discoverdata.rb | 6 + test/test_accept.rb | 4 + test/test_association.rb | 4 + test/test_associationmanager.rb | 10 +- test/test_ax.rb | 4 + test/test_checkid_request.rb | 6 +- test/test_consumer.rb | 4 + test/test_cryptutil.rb | 8 +- test/test_dh.rb | 4 + test/test_discover.rb | 4 + test/test_discovery_manager.rb | 6 +- test/test_extension.rb | 4 + test/test_fetchers.rb | 12 +- test/test_filters.rb | 8 +- test/test_helper.rb | 2 + test/test_idres.rb | 4 + test/test_kvform.rb | 6 +- test/test_kvpost.rb | 4 + test/test_linkparse.rb | 4 + test/test_message.rb | 4 + test/test_nonce.rb | 4 + test/test_oauth.rb | 4 + test/test_openid_yadis.rb | 4 + test/test_pape.rb | 4 + test/test_parsehtml.rb | 4 + test/test_responses.rb | 4 + test/test_server.rb | 8 +- test/test_sreg.rb | 4 + test/test_stores.rb | 4 + test/test_trustroot.rb | 4 + test/test_ui.rb | 6 +- test/test_urinorm.rb | 4 + test/test_util.rb | 4 + test/test_xrds.rb | 4 + test/test_xri.rb | 4 + test/test_xrires.rb | 4 + test/test_yadis_discovery.rb | 10 +- test/testutil.rb | 1 + test/util.rb | 2 + 77 files changed, 688 insertions(+), 494 deletions(-) create mode 100755 bin/setup diff --git a/.rubocop_gradual.lock b/.rubocop_gradual.lock index 80fdb515..acbabd28 100644 --- a/.rubocop_gradual.lock +++ b/.rubocop_gradual.lock @@ -47,7 +47,7 @@ [89, 5, 130, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2366241697], [97, 5, 136, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 822383092] ], - "lib/openid/association.rb:3104865684": [ + "lib/openid/association.rb:1688874548": [ [7, 3, 221, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1899862968], [26, 5, 751, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3266308441], [50, 5, 154, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1890157839], @@ -57,7 +57,7 @@ [190, 5, 263, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 263588636], [219, 7, 99, "Style/For: Prefer `each` over `for`.", 781032692] ], - "lib/openid/consumer/associationmanager.rb:3564454072": [ + "lib/openid/consumer/associationmanager.rb:3125983805": [ [58, 23, 9, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 3603878063], [60, 30, 13, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 2132475618], [67, 23, 11, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 3318046031], @@ -65,14 +65,13 @@ [78, 23, 15, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 1745937094], [79, 30, 25, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 3501034513], [94, 7, 397, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3776746945], - [140, 35, 3, "Lint/UselessAssignment: Useless assignment to variable - `why`.", 193429443], [159, 58, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], [176, 28, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], [271, 7, 3, "Lint/IneffectiveAccessModifier: `protected` (on line 154) does not make singleton methods protected. Use `protected` inside a `class << self` block instead.", 193404514], [271, 7, 317, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 396086752], [310, 40, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] ], - "lib/openid/consumer/discovery.rb:2910483503": [ + "lib/openid/consumer/discovery.rb:771283325": [ [82, 50, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], [130, 25, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], [145, 5, 223, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2614195864], @@ -102,7 +101,7 @@ "lib/openid/consumer/discovery_manager.rb:1465637735": [ [47, 7, 415, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2381252915] ], - "lib/openid/consumer/html_parse.rb:2168762247": [ + "lib/openid/consumer/html_parse.rb:2869781173": [ [22, 3, 114, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1658766339], [26, 3, 117, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1535590347], [34, 3, 1737, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1968005682], @@ -114,7 +113,7 @@ [131, 3, 344, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2788268418], [137, 24, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240] ], - "lib/openid/consumer/idres.rb:3400213326": [ + "lib/openid/consumer/idres.rb:3192353826": [ [18, 37, 10, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 1542326609], [19, 42, 20, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 422307083], [25, 7, 43, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 2792138045], @@ -132,20 +131,20 @@ [31, 9, 38, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 710955324], [48, 9, 46, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 4279840451] ], - "lib/openid/cryptutil.rb:4280304387": [ - [29, 5, 68, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 33433268], - [34, 5, 59, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2498740062], - [38, 5, 171, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 216141853], - [44, 5, 63, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1057833566], - [48, 5, 177, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3411150301], - [57, 5, 214, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 125842397], - [70, 5, 154, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2301666000], - [78, 5, 217, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 897599771], - [90, 5, 80, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 936504201], - [95, 5, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1329530532], - [99, 5, 186, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3562629295] - ], - "lib/openid/dh.rb:2182923746": [ + "lib/openid/cryptutil.rb:2346731593": [ + [32, 5, 68, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 33433268], + [37, 5, 59, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2498740062], + [41, 5, 171, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 216141853], + [47, 5, 63, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1057833566], + [51, 5, 177, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3411150301], + [60, 5, 214, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 125842397], + [73, 5, 154, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2301666000], + [81, 5, 217, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 897599771], + [93, 5, 80, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 936504201], + [98, 5, 82, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1329530532], + [102, 5, 186, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3562629295] + ], + "lib/openid/dh.rb:3415820258": [ [20, 5, 84, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 464948698], [52, 5, 3, "Lint/IneffectiveAccessModifier: `private` (on line 45) does not make singleton methods private. Use `private_class_method` or `private` inside a `class << self` block instead.", 193404514], [52, 5, 435, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4063524761], @@ -153,7 +152,7 @@ [70, 5, 3, "Lint/IneffectiveAccessModifier: `private` (on line 45) does not make singleton methods private. Use `private_class_method` or `private` inside a `class << self` block instead.", 193404514], [70, 5, 249, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1671549284] ], - "lib/openid/extensions/ax.rb:2542129588": [ + "lib/openid/extensions/ax.rb:3559979558": [ [13, 5, 169, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 642402764], [48, 9, 34, "Style/InvertibleUnlessCondition: Prefer `if actual_mode == @mode` over `unless actual_mode != @mode`.", 3596772208], [104, 5, 342, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4174404327], @@ -169,11 +168,11 @@ [536, 7, 185, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2393057382], [547, 58, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] ], - "lib/openid/extensions/oauth.rb:2413341623": [ + "lib/openid/extensions/oauth.rb:626768005": [ [32, 7, 212, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1662714184], [62, 7, 231, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3920296437] ], - "lib/openid/extensions/pape.rb:41826098": [ + "lib/openid/extensions/pape.rb:2500732192": [ [49, 7, 209, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1353872427], [63, 9, 121, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 1451264569], [70, 26, 41, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 986556649], @@ -183,7 +182,7 @@ [128, 45, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], [154, 25, 7, "Performance/RangeInclude: Use `Range#cover?` instead of `Range#member?`.", 1205904490] ], - "lib/openid/extensions/sreg.rb:514822493": [ + "lib/openid/extensions/sreg.rb:893419087": [ [98, 7, 411, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2730285120], [126, 36, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], [135, 36, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], @@ -191,26 +190,24 @@ [227, 7, 201, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2920278435], [237, 7, 442, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 850652346] ], - "lib/openid/extensions/ui.rb:317587684": [ + "lib/openid/extensions/ui.rb:4031156278": [ [32, 7, 203, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1254387091] ], - "lib/openid/fetchers.rb:2417716268": [ - [8, 72, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [53, 5, 157, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 586528253], - [60, 5, 78, "Style/MissingRespondToMissing: When using `method_missing`, define `respond_to_missing?`.", 944250440], - [86, 3, 160, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 407779678], - [91, 3, 88, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 834352859], - [92, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], - [92, 39, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], - [94, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], - [97, 3, 55, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 702922609], - [98, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], - [103, 3, 284, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2543934372], - [108, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], - [173, 81, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [205, 71, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [222, 7, 80, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 3610119133], - [252, 29, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560] + "lib/openid/fetchers.rb:1654343316": [ + [10, 72, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [94, 3, 160, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 407779678], + [99, 3, 88, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 834352859], + [100, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], + [100, 39, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], + [102, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], + [105, 3, 55, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 702922609], + [106, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], + [111, 3, 284, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2543934372], + [116, 5, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2254613070], + [181, 81, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [213, 71, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [230, 7, 80, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 3610119133], + [260, 29, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560] ], "lib/openid/kvform.rb:3999429111": [ [2, 23, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], @@ -219,13 +216,13 @@ [104, 5, 62, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 440967781], [108, 5, 80, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2800167629] ], - "lib/openid/kvpost.rb:112489384": [ + "lib/openid/kvpost.rb:1266258696": [ [17, 5, 244, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2027637612], [35, 5, 410, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2633894042], [54, 3, 302, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2138086473], [57, 5, 93, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 2065347935] ], - "lib/openid/message.rb:103394192": [ + "lib/openid/message.rb:3209670032": [ [67, 36, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], [70, 43, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], [74, 34, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], @@ -246,7 +243,7 @@ [514, 7, 6, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 3498751916], [519, 7, 5, "Style/InfiniteLoop: Use `Kernel#loop` for infinite loops.", 191284826] ], - "lib/openid/server.rb:615617098": [ + "lib/openid/server.rb:4282974231": [ [83, 7, 1000, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1001267496], [98, 30, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], [138, 9, 2, "Lint/UselessAssignment: Useless assignment to variable - `ih`.", 5861156], @@ -299,49 +296,49 @@ [1518, 29, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], [1524, 27, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378] ], - "lib/openid/store/filesystem.rb:1238143139": [ - [12, 7, 18, "Naming/VariableName: Use snake_case for variable names.", 2080787395], - [134, 23, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] - ], - "lib/openid/store/nonce.rb:503623655": [ - [10, 5, 12, "Naming/VariableName: Use snake_case for variable names.", 2011612633], - [17, 5, 33, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 946500752], - [18, 7, 5, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 214151279], - [21, 5, 55, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2221980689], - [22, 7, 5, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 214151279], - [26, 5, 341, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3565164022], - [39, 5, 480, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3166460613], - [58, 5, 248, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3471362715] - ], - "lib/openid/trustroot.rb:2994376521": [ - [5, 39, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], - [13, 65, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [19, 25, 2692, "Metrics/CollectionLiteralLength: Avoid hard coding large quantities of data in code. Prefer reading the data from an external source.", 3538197388], - [321, 5, 131, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3228933781], - [329, 5, 755, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1710960170], - [337, 31, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [340, 36, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [355, 5, 429, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1374864212], - [379, 5, 825, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4119393793], - [379, 53, 5, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 235583841], - [383, 86, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], - [400, 65, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [410, 7, 232, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1348763082], - [423, 7, 532, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3105728993], - [450, 7, 826, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2732688631], - [459, 22, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [472, 24, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [479, 7, 172, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1035216957], - [488, 7, 120, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2760771742], - [508, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [542, 42, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [564, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [565, 42, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] - ], - "lib/openid/urinorm.rb:520228142": [ - [7, 5, 757, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3673026505], - [34, 5, 58, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1308491834], - [38, 5, 901, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3744415155] + "lib/openid/store/filesystem.rb:2056729715": [ + [14, 7, 18, "Naming/VariableName: Use snake_case for variable names.", 2080787395], + [136, 23, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] + ], + "lib/openid/store/nonce.rb:368349538": [ + [13, 5, 12, "Naming/VariableName: Use snake_case for variable names.", 2011612633], + [20, 5, 33, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 946500752], + [21, 7, 5, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 214151279], + [24, 5, 55, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2221980689], + [25, 7, 5, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 214151279], + [29, 5, 341, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3565164022], + [42, 5, 480, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3166460613], + [61, 5, 248, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3471362715] + ], + "lib/openid/trustroot.rb:63371331": [ + [8, 39, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], + [16, 65, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [22, 25, 2692, "Metrics/CollectionLiteralLength: Avoid hard coding large quantities of data in code. Prefer reading the data from an external source.", 3538197388], + [324, 5, 131, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3228933781], + [332, 5, 755, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1710960170], + [340, 31, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [343, 36, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [358, 5, 429, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1374864212], + [382, 5, 825, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4119393793], + [382, 53, 5, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 235583841], + [386, 86, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], + [403, 65, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [413, 7, 232, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1348763082], + [426, 7, 532, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3105728993], + [453, 7, 826, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2732688631], + [462, 22, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [475, 24, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [482, 7, 172, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1035216957], + [491, 7, 120, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2760771742], + [511, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [545, 42, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [567, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [568, 42, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] + ], + "lib/openid/urinorm.rb:2923360867": [ + [8, 5, 757, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3673026505], + [35, 5, 58, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1308491834], + [39, 5, 901, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3744415155] ], "lib/openid/util.rb:1309152219": [ [7, 26, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], @@ -366,7 +363,7 @@ [87, 38, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], [127, 5, 511, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 874198912] ], - "lib/openid/yadis/discovery.rb:1805682394": [ + "lib/openid/yadis/discovery.rb:1868356602": [ [70, 5, 1560, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1496355252], [74, 7, 102, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 3710982363], [77, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], @@ -393,16 +390,16 @@ [220, 23, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240], [261, 40, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240] ], - "lib/openid/yadis/parsehtml.rb:2074847161": [ - [6, 5, 1225, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3998069435], - [13, 18, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560], - [37, 45, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] + "lib/openid/yadis/parsehtml.rb:2454195738": [ + [9, 5, 1225, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3998069435], + [16, 18, 1, "Lint/AssignmentInCondition: Wrap assignment in parentheses if intentional", 177560], + [40, 45, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] ], - "lib/openid/yadis/services.rb:1899673016": [ + "lib/openid/yadis/services.rb:3116665292": [ [7, 5, 721, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 909444346], [29, 5, 453, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 100913079] ], - "lib/openid/yadis/xrds.rb:2136682986": [ + "lib/openid/yadis/xrds.rb:2062800030": [ [24, 5, 1512, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 973105365], [87, 5, 400, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2072624544], [103, 5, 229, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3284163917], @@ -414,7 +411,7 @@ [143, 5, 338, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3784280011], [154, 5, 156, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3288548303] ], - "lib/openid/yadis/xri.rb:3360501225": [ + "lib/openid/yadis/xri.rb:2593964827": [ [10, 7, 274, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 4070584190], [11, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], [12, 35, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], @@ -427,289 +424,289 @@ [66, 7, 393, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 808077734], [80, 7, 101, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 73560939] ], - "lib/openid/yadis/xrires.rb:761589890": [ - [59, 7, 170, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 430146384], - [67, 7, 356, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3699337347] - ], - "test/test_accept.rb:753975107": [ - [31, 29, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240] - ], - "test/test_association.rb:2828276446": [ - [237, 7, 41, "Minitest/RefuteFalse: Prefer using `refute(assoc.check_message_signature(m))`.", 1974080929], - [283, 7, 45, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA1\", \"DH-SHA1\"))`.", 2533672708], - [284, 7, 51, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA1\", \"no-encryption\"))`.", 124193517], - [285, 7, 49, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA256\", \"DH-SHA256\"))`.", 969984580], - [286, 7, 53, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA256\", \"no-encryption\"))`.", 3634276237], - [291, 7, 49, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA256\", \"DH-SHA256\"))`.", 969984580], - [292, 7, 53, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA256\", \"no-encryption\"))`.", 3634276237], - [298, 7, 53, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA256\", \"no-encryption\"))`.", 3634276237], - [327, 7, 69, "Minitest/RefuteFalse: Prefer using `refute(EncryptedNegotiator.allowed?(\"HMAC-SHA256\", \"no-encryption\"))`.", 4209870257] - ], - "test/test_associationmanager.rb:4037134692": [ - [163, 9, 31, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 4153333934], - [301, 9, 24, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 2990482522], - [304, 15, 10, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 1640279285], - [320, 5, 6, "Naming/ConstantName: Use SCREAMING_SNAKE_CASE for constants.", 2713853249], - [450, 5, 6, "Naming/ConstantName: Use SCREAMING_SNAKE_CASE for constants.", 2713853249], - [581, 9, 63, "Style/InvertibleUnlessCondition: Prefer `if ns == OPENID1_NS or name == \"missing_session_type\"` over `unless ns != OPENID1_NS and name != \"missing_session_type\"`.", 479520905], - [581, 38, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [609, 9, 53, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3499488584], - [737, 11, 49, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 211023675], - [768, 5, 313, "Minitest/MultipleAssertions: Test case has too many assertions [5/3].", 1298333944], - [833, 7, 17, "Minitest/RefuteFalse: Prefer using `refute(ret.nil?)`.", 1970104094] - ], - "test/test_ax.rb:453134826": [ - [11, 15, 7, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 480804425], - [42, 7, 317, "Minitest/MultipleAssertions: Test case has too many assertions [5/3].", 2981613125], - [49, 9, 35, "Minitest/RefuteFalse: Prefer using `refute(ainfo.required)`.", 2720445676], - [253, 7, 255, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 3054475557], - [266, 9, 26, "Minitest/RefuteFalse: Prefer using `refute(@msg.member?(uri))`.", 4033074256], - [295, 30, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [343, 7, 558, "Minitest/MultipleAssertions: Test case has too many assertions [7/3].", 3434206224], - [356, 9, 20, "Minitest/RefuteFalse: Prefer using `refute(ai.required)`.", 3437055720], - [371, 9, 52, "Minitest/RefuteFalse: Prefer using `refute(@msg.requested_attributes[@type_a].required)`.", 2345955159], - [790, 9, 26, "Minitest/RefuteFalse: Prefer using `refute(msg.error_message)`.", 3132408732], - [800, 9, 23, "Minitest/RefuteFalse: Prefer using `refute(msg.succeeded?)`.", 527737196], - [801, 9, 26, "Minitest/RefuteFalse: Prefer using `refute(msg.error_message)`.", 3132408732], - [812, 9, 23, "Minitest/RefuteFalse: Prefer using `refute(msg.succeeded?)`.", 527737196] - ], - "test/test_checkid_request.rb:2026687652": [ - [297, 13, 35, "Naming/ClassAndModuleCamelCase: Use CamelCase for classes and modules.", 4259957932] - ], - "test/test_dh.rb:1574551285": [ - [7, 5, 81, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1962538541], - [89, 7, 33, "Minitest/RefuteFalse: Prefer using `refute(dh.using_default_values?)`.", 3432763311] - ], - "test/test_discover.rb:1595417954": [ - [85, 20, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], - [173, 9, 19, "Minitest/RefuteFalse: Prefer using `refute(claimed_id)`.", 1240093182], - [174, 9, 17, "Minitest/RefuteFalse: Prefer using `refute(local_id)`.", 900303800], - [175, 9, 21, "Minitest/RefuteFalse: Prefer using `refute(s.claimed_id)`.", 3221811299], - [176, 9, 19, "Minitest/RefuteFalse: Prefer using `refute(s.local_id)`.", 2236738853], - [177, 9, 23, "Minitest/RefuteFalse: Prefer using `refute(s.get_local_id)`.", 579848844], - [178, 9, 29, "Minitest/RefuteFalse: Prefer using `refute(s.compatibility_mode)`.", 4108014984], - [192, 9, 91, "Minitest/RefuteFalse: Prefer using `refute(s.used_yadis, \"Expected to use old-style discovery\")`.", 3971431990], - [260, 7, 8, "Lint/UselessAssignment: Useless assignment to variable - `services`.", 907487467], - [589, 19, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [590, 77, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [726, 7, 55, "Minitest/RefuteFalse: Prefer using `refute(services.empty?, \"Expected services, got zero\")`.", 3799265795], - [773, 7, 35, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.is_op_identifier)`.", 873861676], - [779, 7, 35, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.is_op_identifier)`.", 873861676], - [785, 7, 35, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.is_op_identifier)`.", 873861676], - [791, 7, 35, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.is_op_identifier)`.", 873861676], - [806, 7, 35, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.is_op_identifier)`.", 873861676], - [836, 7, 37, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.compatibility_mode)`.", 1374481464], - [853, 7, 11, "Naming/VariableName: Use snake_case for variable names.", 2215990581], - [855, 7, 11, "Naming/VariableName: Use snake_case for variable names.", 2215974520], - [859, 52, 11, "Naming/VariableName: Use snake_case for variable names.", 2215974520], - [860, 54, 11, "Naming/VariableName: Use snake_case for variable names.", 2215990581], - [884, 11, 101, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(@endpoint.supports_type(t), format(\"Must support %s\", t))`?", 56176058], - [889, 11, 107, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!@endpoint.supports_type(t), format(\"Shouldn't support %s\", t))`?", 954251792], - [889, 11, 107, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.supports_type(t), format(\"Shouldn't support %s\", t))`.", 954251792] - ], - "test/test_discovery_manager.rb:2940309917": [ - [34, 7, 38, "Minitest/RefuteFalse: Prefer using `refute(@disco_services.for_url?(nil))`.", 603865808], - [35, 7, 44, "Minitest/RefuteFalse: Prefer using `refute(@disco_services.for_url?(\"invalid\"))`.", 2196506506], - [39, 7, 33, "Minitest/RefuteFalse: Prefer using `refute(@disco_services.started?)`.", 4092600212], - [48, 7, 33, "Minitest/RefuteFalse: Prefer using `refute(@disco_services.started?)`.", 4092600212], - [54, 7, 31, "Minitest/RefuteFalse: Prefer using `refute(@disco_services.empty?)`.", 151347072], - [66, 5, 64, "Style/MissingRespondToMissing: When using `method_missing`, define `respond_to_missing?`.", 281345496], - [86, 7, 59, "Minitest/RefuteFalse: Prefer using `refute(m.instance_variable_get(:@session_key_suffix).nil?)`.", 1408692002] - ], - "test/test_extension.rb:2054469448": [ - [43, 7, 55, "Minitest/RefuteFalse: Prefer using `refute(namespaces.implicit?(DummyExtension::TEST_URI))`.", 1478049918] - ], - "test/test_fetchers.rb:2069247905": [ - [152, 22, 10, "ThreadSafety/NewThread: Avoid starting new threads.", 3411682361], - [243, 27, 4, "Lint/UselessAssignment: Useless assignment to variable - `body`.", 2087730517], - [243, 39, 7, "Lint/UselessAssignment: Useless assignment to variable - `headers`.", 643017641], - [243, 54, 14, "Lint/UselessAssignment: Useless assignment to variable - `redirect_limit`.", 3383958005], - [283, 5, 901, "Style/For: Prefer `each` over `for`.", 316016311] - ], - "test/test_filters.rb:3466801816": [ - [9, 5, 932, "Minitest/MultipleAssertions: Test case has too many assertions [8/3].", 4216474825], - [232, 5, 776, "Minitest/MultipleAssertions: Test case has too many assertions [5/3].", 2440747337] - ], - "test/test_idres.rb:3951721280": [ - [115, 9, 1622, "Minitest/MultipleAssertions: Test case has too many assertions [5/3].", 2912808174], - [502, 13, 31, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 406405732], - [505, 15, 7, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 764524831], - [506, 15, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2800675911], - [697, 9, 427, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 2205583380], - [802, 9, 1272, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 1885911750], - [854, 38, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378] - ], - "test/test_linkparse.rb:2899074310": [ - [16, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [28, 24, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [53, 21, 39, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(attr_cmp(c[0], c[1]), c.inspect)`?", 4229811215], - [54, 20, 40, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!attr_cmp(c[0], c[1]), c.inspect)`?", 4265199310], - [54, 20, 40, "Minitest/RefuteFalse: Prefer using `refute(attr_cmp(c[0], c[1]), c.inspect)`.", 4265199310], - [95, 54, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [95, 76, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] - ], - "test/test_message.rb:3138052519": [ - [108, 7, 48, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(BARE_NS, \"foo\"))`.", 2768469367], - [112, 7, 51, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(OPENID1_NS, \"foo\"))`.", 1991266283], - [116, 7, 51, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(OPENID2_NS, \"foo\"))`.", 1246013416], - [120, 7, 50, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(\"urn:xxx\", \"foo\"))`.", 1565201546], - [262, 7, 34, "Minitest/RefuteFalse: Prefer using `refute(@m.is_openid1)`.", 4103735530], - [266, 7, 34, "Minitest/RefuteFalse: Prefer using `refute(@m.is_openid2)`.", 4103735369], - [416, 7, 50, "Minitest/AssertTruthy: Prefer using `assert(@m.has_key?(OPENID_NS, \"mode\"))`.", 259717620], - [420, 7, 49, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(BARE_NS, \"mode\"))`.", 850337234], - [424, 7, 51, "Minitest/AssertTruthy: Prefer using `assert(@m.has_key?(OPENID1_NS, \"mode\"))`.", 2112409605], - [428, 7, 52, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(OPENID2_NS, \"mode\"))`.", 1046249709], - [432, 7, 51, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(\"urn:xxx\", \"mode\"))`.", 989447183], - [582, 7, 33, "Minitest/AssertTruthy: Prefer using `assert(@m.is_openid1)`.", 1385749217], - [586, 7, 34, "Minitest/RefuteFalse: Prefer using `refute(@m.is_openid2)`.", 4103735369], - [856, 7, 50, "Minitest/AssertTruthy: Prefer using `assert(@m.has_key?(OPENID_NS, \"mode\"))`.", 259717620], - [860, 7, 49, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(BARE_NS, \"mode\"))`.", 850337234], - [864, 7, 52, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(OPENID1_NS, \"mode\"))`.", 3017449934], - [868, 7, 51, "Minitest/AssertTruthy: Prefer using `assert(@m.has_key?(OPENID2_NS, \"mode\"))`.", 1717874022], - [872, 7, 51, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(\"urn:xxx\", \"mode\"))`.", 989447183], - [1072, 7, 34, "Minitest/RefuteFalse: Prefer using `refute(@m.is_openid1)`.", 4103735530], - [1076, 7, 33, "Minitest/AssertTruthy: Prefer using `assert(@m.is_openid2)`.", 1385749250], - [1141, 47, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [1142, 40, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [1159, 75, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [1173, 66, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [1188, 47, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [1189, 40, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [1204, 60, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [1275, 7, 6, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 3498751916], - [1288, 9, 44, "Minitest/RefuteFalse: Prefer using `refute(nsm.member?(uripat % i))`.", 154326771], - [1292, 25, 6, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 3498751916] - ], - "test/test_openid_yadis.rb:2108717525": [ - [17, 3, 70, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2241541269], - [21, 3, 727, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 435754601], - [24, 5, 125, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 290464717], - [30, 5, 293, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 3013004962], - [65, 3, 152, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2562815488] - ], - "test/test_parsehtml.rb:3524160141": [ - [17, 9, 39, "Minitest/RefuteFalse: Prefer using `refute(reserved_values.member?(found))`.", 2704632914], - [31, 9, 20, "Naming/ClassAndModuleCamelCase: Use CamelCase for classes and modules.", 1514831161] - ], - "test/test_server.rb:3910423468": [ - [145, 7, 24, "Minitest/RefuteFalse: Prefer using `refute(e.has_return_to)`.", 2657654983], - [216, 9, 36, "Minitest/RefuteFalse: Prefer using `refute(e.to_s.index(\"values\").nil?)`.", 657105768], - [236, 7, 31, "Minitest/AssertTruthy: Prefer using `assert(r.immediate)`.", 1416352194], - [265, 7, 151, "Minitest/AssertRaisesCompoundBody: Reduce `assert_raises` block body to contain only the raising code.", 647768387], - [312, 9, 22, "Minitest/RefuteFalse: Prefer using `refute(req.id_select)`.", 822457045], - [328, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(r.immediate)`.", 960207049], - [348, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(r.immediate)`.", 960207049], - [381, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(r.immediate)`.", 960207049], - [473, 9, 32, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(e.openid_message, e.to_s)`?", 1858530896], - [755, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(response.render_as_form)`.", 25000324], - [811, 7, 48, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(/ foo=\"bar\"/ =~ form_markup, form_markup)`?", 1957089571], - [859, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(response.render_as_form)`.", 25000324], - [890, 7, 179, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(location.start_with?(request.return_to), format(\n \"%s does not start with %s\",\n location,\n request.return_to,\n ))`?", 12042927], - [1097, 7, 37, "Minitest/RefuteFalse: Prefer using `refute(query.has_key?(\"openid.sig\"))`.", 3540209093], - [1141, 7, 34, "Minitest/RefuteFalse: Prefer using `refute(@request.trust_root_valid)`.", 2061673596], - [1187, 7, 5, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 236623619], - [1190, 7, 7, "Naming/VariableName: Use snake_case for variable names.", 4074303232], - [1198, 59, 7, "Naming/VariableName: Use snake_case for variable names.", 4074303232], - [1202, 7, 77, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 4198858813], - [1207, 7, 11, "Naming/VariableName: Use snake_case for variable names.", 548879287], - [1218, 20, 11, "Naming/VariableName: Use snake_case for variable names.", 548879287], - [1553, 7, 45, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!usu.index(expected_substr).nil?, usu)`?", 681836848], - [1553, 7, 45, "Minitest/RefuteFalse: Prefer using `refute(usu.index(expected_substr).nil?, usu)`.", 681836848], - [1697, 7, 8, "Naming/VariableName: Use snake_case for variable names.", 3407076265], - [1776, 7, 1, "Lint/UselessAssignment: Useless assignment to variable - `r`.", 177623], - [1832, 7, 28, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"mac_key\"))`.", 3386342814], - [1861, 7, 28, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"mac_key\"))`.", 3386342814], - [1945, 7, 48, "Performance/RedundantMerge: Use `openid2_args[\"openid.ns\"] = OPENID2_NS` instead of `openid2_args.merge!({\"openid.ns\" => OPENID2_NS})`.", 2569663590], - [1984, 58, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [1991, 7, 63, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal((0 <= difference and difference <= slop), error_message)`?", 3963220444], - [2010, 7, 33, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"session_type\"))`.", 996256384], - [2011, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"enc_mac_key\"))`.", 934428137], - [2012, 7, 37, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"dh_server_public\"))`.", 3667761681], - [2028, 7, 36, "Minitest/RefuteFalse: Prefer using `refute(@request.message.is_openid1)`.", 3154563632], - [2046, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"enc_mac_key\"))`.", 934428137], - [2047, 7, 37, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"dh_server_public\"))`.", 3667761681], - [2065, 7, 33, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"session_type\"))`.", 996256384], - [2066, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"enc_mac_key\"))`.", 934428137], - [2067, 7, 37, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"dh_server_public\"))`.", 3667761681], - [2119, 26, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], - [2170, 7, 145, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(response.fields.has_key?(OPENID_NS, \"assoc_handle\"), format(\"No assoc_handle here: %s\", response.fields.inspect))`?", 3688376219], - [2196, 7, 60, "Minitest/RefuteFalse: Prefer using `refute(response.fields.has_key?(OPENID_NS, \"assoc_handle\"))`.", 2854410038], - [2197, 7, 58, "Minitest/RefuteFalse: Prefer using `refute(response.fields.has_key?(OPENID_NS, \"assoc_type\"))`.", 2681756964], - [2198, 7, 60, "Minitest/RefuteFalse: Prefer using `refute(response.fields.has_key?(OPENID_NS, \"session_type\"))`.", 877733463], - [2218, 7, 60, "Minitest/RefuteFalse: Prefer using `refute(response.fields.has_key?(OPENID_NS, \"assoc_handle\"))`.", 2854410038], - [2236, 70, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [2237, 72, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], - [2426, 7, 129, "Minitest/RefuteFalse: Prefer using `refute(@store.get_association(@_normal_key, assoc_handle), \"expired association is still retrievable.\")`.", 966024235], - [2433, 7, 63, "Minitest/RefuteFalse: Prefer using `refute(@store.get_association(@_normal_key, new_assoc_handle))`.", 2711960116], - [2469, 7, 63, "Minitest/RefuteFalse: Prefer using `refute(@store.get_association(@_normal_key, new_assoc_handle))`.", 2711960116], - [2513, 7, 17, "Minitest/RefuteFalse: Prefer using `refute(verified)`.", 111313281], - [2529, 7, 17, "Minitest/RefuteFalse: Prefer using `refute(verified)`.", 111313281], - [2552, 7, 17, "Minitest/RefuteFalse: Prefer using `refute(verified)`.", 111313281], - [2570, 7, 14, "Minitest/RefuteFalse: Prefer using `refute(assoc)`.", 168107178], - [2652, 9, 14, "Minitest/RefuteFalse: Prefer using `refute(assoc)`.", 168107178] - ], - "test/test_sreg.rb:3857040769": [ - [36, 11, 40, "Minitest/RefuteFalse: Prefer using `refute(OpenID.supports_sreg?(endpoint))`.", 1330659053], - [158, 9, 219, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 794229251], - [167, 9, 344, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 1722648752], - [325, 11, 35, "Minitest/RefuteFalse: Prefer using `refute(req.were_fields_requested?)`.", 1127897652], - [335, 13, 23, "Minitest/RefuteFalse: Prefer using `refute(req.member?(f))`.", 1475778823], - [337, 11, 38, "Minitest/RefuteFalse: Prefer using `refute(req.member?(\"something else\"))`.", 2405881526], - [345, 9, 879, "Minitest/MultipleAssertions: Test case has too many assertions [8/3].", 3860000910], - [378, 9, 966, "Minitest/MultipleAssertions: Test case has too many assertions [10/3].", 1752993210], - [413, 9, 1096, "Minitest/MultipleAssertions: Test case has too many assertions [6/3].", 1076119837], - [473, 9, 325, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 311804901] - ], - "test/test_stores.rb:1128171358": [ - [59, 28, 6, "Lint/UselessAssignment: Useless assignment to variable - `issued`.", 1645597496], - [91, 29, 6, "Lint/UselessAssignment: Useless assignment to variable - `issued`.", 1645597496], - [108, 29, 6, "Lint/UselessAssignment: Useless assignment to variable - `issued`.", 1645597496], - [150, 9, 11, "Naming/VariableName: Use snake_case for variable names.", 3460325807], - [151, 9, 11, "Naming/VariableName: Use snake_case for variable names.", 3460325804], - [152, 9, 13, "Naming/VariableName: Use snake_case for variable names.", 2369298702], - [153, 9, 13, "Naming/VariableName: Use snake_case for variable names.", 2369298701], - [156, 52, 11, "Naming/VariableName: Use snake_case for variable names.", 3460325807], - [157, 52, 13, "Naming/VariableName: Use snake_case for variable names.", 2369298702], - [158, 52, 13, "Naming/VariableName: Use snake_case for variable names.", 2369298701], - [159, 52, 11, "Naming/VariableName: Use snake_case for variable names.", 3460325804], - [225, 9, 77, "Minitest/RefuteFalse: Prefer using `refute(@store.use_nonce(server_url, ts, salt), \"recent_nonce after cleanup\")`.", 3891537003] - ], - "test/test_trustroot.rb:4002363571": [ - [11, 7, 16, "Minitest/RefuteFalse: Prefer using `refute(tr.nil?)`.", 3450525467], - [13, 7, 81, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(OpenID::TrustRoot::TrustRoot.check_sanity(case_), [case_, desc].join(\" \"))`?", 916980427], - [15, 7, 42, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!tr.sane?, [case_, desc].join(\" \"))`?", 3255143832], - [15, 7, 42, "Minitest/RefuteFalse: Prefer using `refute(tr.sane?, [case_, desc].join(\" \"))`.", 3255143832], - [16, 7, 82, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!OpenID::TrustRoot::TrustRoot.check_sanity(case_), [case_, desc].join(\" \"))`?", 2997549066], - [16, 7, 82, "Minitest/RefuteFalse: Prefer using `refute(OpenID::TrustRoot::TrustRoot.check_sanity(case_), [case_, desc].join(\" \"))`.", 2997549066], - [26, 7, 49, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(actual_match, [trust_root, url].join(\" \"))`?", 2242211977], - [29, 7, 80, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!actual_match, [expected_match, actual_match, trust_root, url].join(\" \"))`?", 3810436984], - [29, 7, 80, "Minitest/RefuteFalse: Prefer using `refute(actual_match, [expected_match, actual_match, trust_root, url].join(\" \"))`.", 3810436984], - [30, 7, 64, "Minitest/RefuteFalse: Prefer using `refute(OpenID::TrustRoot::TrustRoot.check_url(trust_root, url))`.", 1484346761] - ], - "test/test_ui.rb:1420302060": [ - [22, 9, 29, "Minitest/AssertTruthy: Prefer using `assert(req2.icon)`.", 591024350], - [35, 9, 29, "Minitest/AssertTruthy: Prefer using `assert(@req.icon)`.", 1633148460], - [62, 9, 29, "Minitest/AssertTruthy: Prefer using `assert(@req.icon)`.", 1633148460], - [88, 9, 28, "Minitest/AssertTruthy: Prefer using `assert(req.icon)`.", 1476625708] - ], - "test/test_urinorm.rb:3101587968": [ - [22, 11, 12, "Minitest/UselessAssertion: Useless assertion detected.", 2511510896] - ], - "test/test_xrds.rb:1238667361": [ - [48, 9, 41, "Minitest/RefuteFalse: Prefer using `refute(Yadis.is_xrds?(isnt))`.", 2709875658], - [135, 9, 5, "Lint/UselessAssignment: Useless assignment to variable - `types`. Use `_` or `_types` as a variable name to indicate that it won't be used.", 182678350], - [135, 21, 14, "Lint/UselessAssignment: Useless assignment to variable - `result_element`. Use `_` or `_result_element` as a variable name to indicate that it won't be used.", 1272947533], - [138, 9, 5, "Lint/UselessAssignment: Useless assignment to variable - `types`. Use `_` or `_types` as a variable name to indicate that it won't be used.", 182678350], - [138, 21, 14, "Lint/UselessAssignment: Useless assignment to variable - `result_element`. Use `_` or `_result_element` as a variable name to indicate that it won't be used.", 1272947533], - [147, 9, 56, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 2495284533] - ], - "test/test_yadis_discovery.rb:3772993760": [ - [16, 5, 437, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1189860280], - [43, 9, 5, "Style/InfiniteLoop: Use `Kernel#loop` for infinite loops.", 191284826], - [128, 46, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], - [214, 9, 23, "Minitest/RefuteFalse: Prefer using `refute(result.is_xrds)`.", 462657144] - ], - "test/testutil.rb:745136652": [ - [127, 5, 262, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1720821532] + "lib/openid/yadis/xrires.rb:1853519911": [ + [62, 7, 170, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 430146384], + [70, 7, 356, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3699337347] + ], + "test/test_accept.rb:44082637": [ + [35, 29, 2, "Style/AndOr: Use `||` instead of `or`.", 5861240] + ], + "test/test_association.rb:1559540304": [ + [241, 7, 41, "Minitest/RefuteFalse: Prefer using `refute(assoc.check_message_signature(m))`.", 1974080929], + [287, 7, 45, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA1\", \"DH-SHA1\"))`.", 2533672708], + [288, 7, 51, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA1\", \"no-encryption\"))`.", 124193517], + [289, 7, 49, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA256\", \"DH-SHA256\"))`.", 969984580], + [290, 7, 53, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA256\", \"no-encryption\"))`.", 3634276237], + [295, 7, 49, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA256\", \"DH-SHA256\"))`.", 969984580], + [296, 7, 53, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA256\", \"no-encryption\"))`.", 3634276237], + [302, 7, 53, "Minitest/RefuteFalse: Prefer using `refute(neg.allowed?(\"HMAC-SHA256\", \"no-encryption\"))`.", 3634276237], + [331, 7, 69, "Minitest/RefuteFalse: Prefer using `refute(EncryptedNegotiator.allowed?(\"HMAC-SHA256\", \"no-encryption\"))`.", 4209870257] + ], + "test/test_associationmanager.rb:3730352557": [ + [169, 9, 31, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 4153333934], + [307, 9, 24, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 2990482522], + [310, 15, 10, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 1640279285], + [326, 5, 6, "Naming/ConstantName: Use SCREAMING_SNAKE_CASE for constants.", 2713853249], + [456, 5, 6, "Naming/ConstantName: Use SCREAMING_SNAKE_CASE for constants.", 2713853249], + [587, 9, 63, "Style/InvertibleUnlessCondition: Prefer `if ns == OPENID1_NS or name == \"missing_session_type\"` over `unless ns != OPENID1_NS and name != \"missing_session_type\"`.", 479520905], + [587, 38, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [615, 9, 53, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 3499488584], + [743, 11, 49, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 211023675], + [774, 5, 313, "Minitest/MultipleAssertions: Test case has too many assertions [5/3].", 1298333944], + [839, 7, 17, "Minitest/RefuteFalse: Prefer using `refute(ret.nil?)`.", 1970104094] + ], + "test/test_ax.rb:3755793700": [ + [15, 15, 7, "ThreadSafety/MutableClassInstanceVariable: Freeze mutable objects assigned to class instance variables.", 480804425], + [46, 7, 317, "Minitest/MultipleAssertions: Test case has too many assertions [5/3].", 2981613125], + [53, 9, 35, "Minitest/RefuteFalse: Prefer using `refute(ainfo.required)`.", 2720445676], + [257, 7, 255, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 3054475557], + [270, 9, 26, "Minitest/RefuteFalse: Prefer using `refute(@msg.member?(uri))`.", 4033074256], + [299, 30, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [347, 7, 558, "Minitest/MultipleAssertions: Test case has too many assertions [7/3].", 3434206224], + [360, 9, 20, "Minitest/RefuteFalse: Prefer using `refute(ai.required)`.", 3437055720], + [375, 9, 52, "Minitest/RefuteFalse: Prefer using `refute(@msg.requested_attributes[@type_a].required)`.", 2345955159], + [794, 9, 26, "Minitest/RefuteFalse: Prefer using `refute(msg.error_message)`.", 3132408732], + [804, 9, 23, "Minitest/RefuteFalse: Prefer using `refute(msg.succeeded?)`.", 527737196], + [805, 9, 26, "Minitest/RefuteFalse: Prefer using `refute(msg.error_message)`.", 3132408732], + [816, 9, 23, "Minitest/RefuteFalse: Prefer using `refute(msg.succeeded?)`.", 527737196] + ], + "test/test_checkid_request.rb:1229444522": [ + [301, 13, 35, "Naming/ClassAndModuleCamelCase: Use CamelCase for classes and modules.", 4259957932] + ], + "test/test_dh.rb:231225915": [ + [11, 5, 81, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1962538541], + [93, 7, 33, "Minitest/RefuteFalse: Prefer using `refute(dh.using_default_values?)`.", 3432763311] + ], + "test/test_discover.rb:1574949676": [ + [89, 20, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], + [177, 9, 19, "Minitest/RefuteFalse: Prefer using `refute(claimed_id)`.", 1240093182], + [178, 9, 17, "Minitest/RefuteFalse: Prefer using `refute(local_id)`.", 900303800], + [179, 9, 21, "Minitest/RefuteFalse: Prefer using `refute(s.claimed_id)`.", 3221811299], + [180, 9, 19, "Minitest/RefuteFalse: Prefer using `refute(s.local_id)`.", 2236738853], + [181, 9, 23, "Minitest/RefuteFalse: Prefer using `refute(s.get_local_id)`.", 579848844], + [182, 9, 29, "Minitest/RefuteFalse: Prefer using `refute(s.compatibility_mode)`.", 4108014984], + [196, 9, 91, "Minitest/RefuteFalse: Prefer using `refute(s.used_yadis, \"Expected to use old-style discovery\")`.", 3971431990], + [264, 7, 8, "Lint/UselessAssignment: Useless assignment to variable - `services`.", 907487467], + [593, 19, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [594, 77, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [730, 7, 55, "Minitest/RefuteFalse: Prefer using `refute(services.empty?, \"Expected services, got zero\")`.", 3799265795], + [777, 7, 35, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.is_op_identifier)`.", 873861676], + [783, 7, 35, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.is_op_identifier)`.", 873861676], + [789, 7, 35, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.is_op_identifier)`.", 873861676], + [795, 7, 35, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.is_op_identifier)`.", 873861676], + [810, 7, 35, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.is_op_identifier)`.", 873861676], + [840, 7, 37, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.compatibility_mode)`.", 1374481464], + [857, 7, 11, "Naming/VariableName: Use snake_case for variable names.", 2215990581], + [859, 7, 11, "Naming/VariableName: Use snake_case for variable names.", 2215974520], + [863, 52, 11, "Naming/VariableName: Use snake_case for variable names.", 2215974520], + [864, 54, 11, "Naming/VariableName: Use snake_case for variable names.", 2215990581], + [888, 11, 101, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(@endpoint.supports_type(t), format(\"Must support %s\", t))`?", 56176058], + [893, 11, 107, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!@endpoint.supports_type(t), format(\"Shouldn't support %s\", t))`?", 954251792], + [893, 11, 107, "Minitest/RefuteFalse: Prefer using `refute(@endpoint.supports_type(t), format(\"Shouldn't support %s\", t))`.", 954251792] + ], + "test/test_discovery_manager.rb:3215442323": [ + [38, 7, 38, "Minitest/RefuteFalse: Prefer using `refute(@disco_services.for_url?(nil))`.", 603865808], + [39, 7, 44, "Minitest/RefuteFalse: Prefer using `refute(@disco_services.for_url?(\"invalid\"))`.", 2196506506], + [43, 7, 33, "Minitest/RefuteFalse: Prefer using `refute(@disco_services.started?)`.", 4092600212], + [52, 7, 33, "Minitest/RefuteFalse: Prefer using `refute(@disco_services.started?)`.", 4092600212], + [58, 7, 31, "Minitest/RefuteFalse: Prefer using `refute(@disco_services.empty?)`.", 151347072], + [70, 5, 64, "Style/MissingRespondToMissing: When using `method_missing`, define `respond_to_missing?`.", 281345496], + [90, 7, 59, "Minitest/RefuteFalse: Prefer using `refute(m.instance_variable_get(:@session_key_suffix).nil?)`.", 1408692002] + ], + "test/test_extension.rb:614181318": [ + [47, 7, 55, "Minitest/RefuteFalse: Prefer using `refute(namespaces.implicit?(DummyExtension::TEST_URI))`.", 1478049918] + ], + "test/test_fetchers.rb:189338639": [ + [160, 22, 10, "ThreadSafety/NewThread: Avoid starting new threads.", 3411682361], + [251, 27, 4, "Lint/UselessAssignment: Useless assignment to variable - `body`.", 2087730517], + [251, 39, 7, "Lint/UselessAssignment: Useless assignment to variable - `headers`.", 643017641], + [251, 54, 14, "Lint/UselessAssignment: Useless assignment to variable - `redirect_limit`.", 3383958005], + [291, 5, 901, "Style/For: Prefer `each` over `for`.", 316016311] + ], + "test/test_filters.rb:3795604977": [ + [15, 5, 932, "Minitest/MultipleAssertions: Test case has too many assertions [8/3].", 4216474825], + [238, 5, 776, "Minitest/MultipleAssertions: Test case has too many assertions [5/3].", 2440747337] + ], + "test/test_idres.rb:1552300430": [ + [119, 9, 1622, "Minitest/MultipleAssertions: Test case has too many assertions [5/3].", 2912808174], + [506, 13, 31, "ThreadSafety/ClassAndModuleAttributes: Avoid mutating class and module attributes.", 406405732], + [509, 15, 7, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 764524831], + [510, 15, 8, "ThreadSafety/InstanceVariableInClassMethod: Avoid instance variables in class methods.", 2800675911], + [701, 9, 427, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 2205583380], + [806, 9, 1272, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 1885911750], + [858, 38, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378] + ], + "test/test_linkparse.rb:563070408": [ + [20, 29, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [32, 24, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [57, 21, 39, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(attr_cmp(c[0], c[1]), c.inspect)`?", 4229811215], + [58, 20, 40, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!attr_cmp(c[0], c[1]), c.inspect)`?", 4265199310], + [58, 20, 40, "Minitest/RefuteFalse: Prefer using `refute(attr_cmp(c[0], c[1]), c.inspect)`.", 4265199310], + [99, 54, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [99, 76, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806] + ], + "test/test_message.rb:725400553": [ + [112, 7, 48, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(BARE_NS, \"foo\"))`.", 2768469367], + [116, 7, 51, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(OPENID1_NS, \"foo\"))`.", 1991266283], + [120, 7, 51, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(OPENID2_NS, \"foo\"))`.", 1246013416], + [124, 7, 50, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(\"urn:xxx\", \"foo\"))`.", 1565201546], + [266, 7, 34, "Minitest/RefuteFalse: Prefer using `refute(@m.is_openid1)`.", 4103735530], + [270, 7, 34, "Minitest/RefuteFalse: Prefer using `refute(@m.is_openid2)`.", 4103735369], + [420, 7, 50, "Minitest/AssertTruthy: Prefer using `assert(@m.has_key?(OPENID_NS, \"mode\"))`.", 259717620], + [424, 7, 49, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(BARE_NS, \"mode\"))`.", 850337234], + [428, 7, 51, "Minitest/AssertTruthy: Prefer using `assert(@m.has_key?(OPENID1_NS, \"mode\"))`.", 2112409605], + [432, 7, 52, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(OPENID2_NS, \"mode\"))`.", 1046249709], + [436, 7, 51, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(\"urn:xxx\", \"mode\"))`.", 989447183], + [586, 7, 33, "Minitest/AssertTruthy: Prefer using `assert(@m.is_openid1)`.", 1385749217], + [590, 7, 34, "Minitest/RefuteFalse: Prefer using `refute(@m.is_openid2)`.", 4103735369], + [860, 7, 50, "Minitest/AssertTruthy: Prefer using `assert(@m.has_key?(OPENID_NS, \"mode\"))`.", 259717620], + [864, 7, 49, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(BARE_NS, \"mode\"))`.", 850337234], + [868, 7, 52, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(OPENID1_NS, \"mode\"))`.", 3017449934], + [872, 7, 51, "Minitest/AssertTruthy: Prefer using `assert(@m.has_key?(OPENID2_NS, \"mode\"))`.", 1717874022], + [876, 7, 51, "Minitest/RefuteFalse: Prefer using `refute(@m.has_key?(\"urn:xxx\", \"mode\"))`.", 989447183], + [1076, 7, 34, "Minitest/RefuteFalse: Prefer using `refute(@m.is_openid1)`.", 4103735530], + [1080, 7, 33, "Minitest/AssertTruthy: Prefer using `assert(@m.is_openid2)`.", 1385749250], + [1145, 47, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [1146, 40, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [1163, 75, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [1177, 66, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [1192, 47, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [1193, 40, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [1208, 60, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [1279, 7, 6, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 3498751916], + [1292, 9, 44, "Minitest/RefuteFalse: Prefer using `refute(nsm.member?(uripat % i))`.", 154326771], + [1296, 25, 6, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 3498751916] + ], + "test/test_openid_yadis.rb:803050587": [ + [21, 3, 70, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2241541269], + [25, 3, 727, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 435754601], + [28, 5, 125, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 290464717], + [34, 5, 293, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 3013004962], + [69, 3, 152, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 2562815488] + ], + "test/test_parsehtml.rb:1972586883": [ + [21, 9, 39, "Minitest/RefuteFalse: Prefer using `refute(reserved_values.member?(found))`.", 2704632914], + [35, 9, 20, "Naming/ClassAndModuleCamelCase: Use CamelCase for classes and modules.", 1514831161] + ], + "test/test_server.rb:2483966117": [ + [151, 7, 24, "Minitest/RefuteFalse: Prefer using `refute(e.has_return_to)`.", 2657654983], + [222, 9, 36, "Minitest/RefuteFalse: Prefer using `refute(e.to_s.index(\"values\").nil?)`.", 657105768], + [242, 7, 31, "Minitest/AssertTruthy: Prefer using `assert(r.immediate)`.", 1416352194], + [271, 7, 151, "Minitest/AssertRaisesCompoundBody: Reduce `assert_raises` block body to contain only the raising code.", 647768387], + [318, 9, 22, "Minitest/RefuteFalse: Prefer using `refute(req.id_select)`.", 822457045], + [334, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(r.immediate)`.", 960207049], + [354, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(r.immediate)`.", 960207049], + [387, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(r.immediate)`.", 960207049], + [479, 9, 32, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(e.openid_message, e.to_s)`?", 1858530896], + [761, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(response.render_as_form)`.", 25000324], + [817, 7, 48, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(/ foo=\"bar\"/ =~ form_markup, form_markup)`?", 1957089571], + [865, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(response.render_as_form)`.", 25000324], + [896, 7, 179, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(location.start_with?(request.return_to), format(\n \"%s does not start with %s\",\n location,\n request.return_to,\n ))`?", 12042927], + [1103, 7, 37, "Minitest/RefuteFalse: Prefer using `refute(query.has_key?(\"openid.sig\"))`.", 3540209093], + [1147, 7, 34, "Minitest/RefuteFalse: Prefer using `refute(@request.trust_root_valid)`.", 2061673596], + [1193, 7, 5, "Lint/UnderscorePrefixedVariableName: Do not use prefix `_` for a variable that is used.", 236623619], + [1196, 7, 7, "Naming/VariableName: Use snake_case for variable names.", 4074303232], + [1204, 59, 7, "Naming/VariableName: Use snake_case for variable names.", 4074303232], + [1208, 7, 77, "Lint/RescueException: Avoid rescuing the `Exception` class. Perhaps you meant to rescue `StandardError`?", 4198858813], + [1213, 7, 11, "Naming/VariableName: Use snake_case for variable names.", 548879287], + [1224, 20, 11, "Naming/VariableName: Use snake_case for variable names.", 548879287], + [1559, 7, 45, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!usu.index(expected_substr).nil?, usu)`?", 681836848], + [1559, 7, 45, "Minitest/RefuteFalse: Prefer using `refute(usu.index(expected_substr).nil?, usu)`.", 681836848], + [1703, 7, 8, "Naming/VariableName: Use snake_case for variable names.", 3407076265], + [1782, 7, 1, "Lint/UselessAssignment: Useless assignment to variable - `r`.", 177623], + [1838, 7, 28, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"mac_key\"))`.", 3386342814], + [1867, 7, 28, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"mac_key\"))`.", 3386342814], + [1951, 7, 48, "Performance/RedundantMerge: Use `openid2_args[\"openid.ns\"] = OPENID2_NS` instead of `openid2_args.merge!({\"openid.ns\" => OPENID2_NS})`.", 2569663590], + [1990, 58, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [1997, 7, 63, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal((0 <= difference and difference <= slop), error_message)`?", 3963220444], + [2016, 7, 33, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"session_type\"))`.", 996256384], + [2017, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"enc_mac_key\"))`.", 934428137], + [2018, 7, 37, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"dh_server_public\"))`.", 3667761681], + [2034, 7, 36, "Minitest/RefuteFalse: Prefer using `refute(@request.message.is_openid1)`.", 3154563632], + [2052, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"enc_mac_key\"))`.", 934428137], + [2053, 7, 37, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"dh_server_public\"))`.", 3667761681], + [2071, 7, 33, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"session_type\"))`.", 996256384], + [2072, 7, 32, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"enc_mac_key\"))`.", 934428137], + [2073, 7, 37, "Minitest/RefuteFalse: Prefer using `refute(rfg.call(\"dh_server_public\"))`.", 3667761681], + [2125, 26, 9, "Lint/InheritException: Inherit from `RuntimeError` instead of `Exception`.", 3513723378], + [2176, 7, 145, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(response.fields.has_key?(OPENID_NS, \"assoc_handle\"), format(\"No assoc_handle here: %s\", response.fields.inspect))`?", 3688376219], + [2202, 7, 60, "Minitest/RefuteFalse: Prefer using `refute(response.fields.has_key?(OPENID_NS, \"assoc_handle\"))`.", 2854410038], + [2203, 7, 58, "Minitest/RefuteFalse: Prefer using `refute(response.fields.has_key?(OPENID_NS, \"assoc_type\"))`.", 2681756964], + [2204, 7, 60, "Minitest/RefuteFalse: Prefer using `refute(response.fields.has_key?(OPENID_NS, \"session_type\"))`.", 877733463], + [2224, 7, 60, "Minitest/RefuteFalse: Prefer using `refute(response.fields.has_key?(OPENID_NS, \"assoc_handle\"))`.", 2854410038], + [2242, 70, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [2243, 72, 1, "Style/LineEndConcatenation: Use `\\` instead of `+` or `<<` to concatenate those strings.", 177550], + [2432, 7, 129, "Minitest/RefuteFalse: Prefer using `refute(@store.get_association(@_normal_key, assoc_handle), \"expired association is still retrievable.\")`.", 966024235], + [2439, 7, 63, "Minitest/RefuteFalse: Prefer using `refute(@store.get_association(@_normal_key, new_assoc_handle))`.", 2711960116], + [2475, 7, 63, "Minitest/RefuteFalse: Prefer using `refute(@store.get_association(@_normal_key, new_assoc_handle))`.", 2711960116], + [2519, 7, 17, "Minitest/RefuteFalse: Prefer using `refute(verified)`.", 111313281], + [2535, 7, 17, "Minitest/RefuteFalse: Prefer using `refute(verified)`.", 111313281], + [2558, 7, 17, "Minitest/RefuteFalse: Prefer using `refute(verified)`.", 111313281], + [2576, 7, 14, "Minitest/RefuteFalse: Prefer using `refute(assoc)`.", 168107178], + [2658, 9, 14, "Minitest/RefuteFalse: Prefer using `refute(assoc)`.", 168107178] + ], + "test/test_sreg.rb:3096799311": [ + [40, 11, 40, "Minitest/RefuteFalse: Prefer using `refute(OpenID.supports_sreg?(endpoint))`.", 1330659053], + [162, 9, 219, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 794229251], + [171, 9, 344, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 1722648752], + [329, 11, 35, "Minitest/RefuteFalse: Prefer using `refute(req.were_fields_requested?)`.", 1127897652], + [339, 13, 23, "Minitest/RefuteFalse: Prefer using `refute(req.member?(f))`.", 1475778823], + [341, 11, 38, "Minitest/RefuteFalse: Prefer using `refute(req.member?(\"something else\"))`.", 2405881526], + [349, 9, 879, "Minitest/MultipleAssertions: Test case has too many assertions [8/3].", 3860000910], + [382, 9, 966, "Minitest/MultipleAssertions: Test case has too many assertions [10/3].", 1752993210], + [417, 9, 1096, "Minitest/MultipleAssertions: Test case has too many assertions [6/3].", 1076119837], + [477, 9, 325, "Minitest/MultipleAssertions: Test case has too many assertions [4/3].", 311804901] + ], + "test/test_stores.rb:1689036944": [ + [63, 28, 6, "Lint/UselessAssignment: Useless assignment to variable - `issued`.", 1645597496], + [95, 29, 6, "Lint/UselessAssignment: Useless assignment to variable - `issued`.", 1645597496], + [112, 29, 6, "Lint/UselessAssignment: Useless assignment to variable - `issued`.", 1645597496], + [154, 9, 11, "Naming/VariableName: Use snake_case for variable names.", 3460325807], + [155, 9, 11, "Naming/VariableName: Use snake_case for variable names.", 3460325804], + [156, 9, 13, "Naming/VariableName: Use snake_case for variable names.", 2369298702], + [157, 9, 13, "Naming/VariableName: Use snake_case for variable names.", 2369298701], + [160, 52, 11, "Naming/VariableName: Use snake_case for variable names.", 3460325807], + [161, 52, 13, "Naming/VariableName: Use snake_case for variable names.", 2369298702], + [162, 52, 13, "Naming/VariableName: Use snake_case for variable names.", 2369298701], + [163, 52, 11, "Naming/VariableName: Use snake_case for variable names.", 3460325804], + [229, 9, 77, "Minitest/RefuteFalse: Prefer using `refute(@store.use_nonce(server_url, ts, salt), \"recent_nonce after cleanup\")`.", 3891537003] + ], + "test/test_trustroot.rb:450936637": [ + [15, 7, 16, "Minitest/RefuteFalse: Prefer using `refute(tr.nil?)`.", 3450525467], + [17, 7, 81, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(OpenID::TrustRoot::TrustRoot.check_sanity(case_), [case_, desc].join(\" \"))`?", 916980427], + [19, 7, 42, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!tr.sane?, [case_, desc].join(\" \"))`?", 3255143832], + [19, 7, 42, "Minitest/RefuteFalse: Prefer using `refute(tr.sane?, [case_, desc].join(\" \"))`.", 3255143832], + [20, 7, 82, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!OpenID::TrustRoot::TrustRoot.check_sanity(case_), [case_, desc].join(\" \"))`?", 2997549066], + [20, 7, 82, "Minitest/RefuteFalse: Prefer using `refute(OpenID::TrustRoot::TrustRoot.check_sanity(case_), [case_, desc].join(\" \"))`.", 2997549066], + [30, 7, 49, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(actual_match, [trust_root, url].join(\" \"))`?", 2242211977], + [33, 7, 80, "Minitest/AssertWithExpectedArgument: Did you mean to use `assert_equal(!actual_match, [expected_match, actual_match, trust_root, url].join(\" \"))`?", 3810436984], + [33, 7, 80, "Minitest/RefuteFalse: Prefer using `refute(actual_match, [expected_match, actual_match, trust_root, url].join(\" \"))`.", 3810436984], + [34, 7, 64, "Minitest/RefuteFalse: Prefer using `refute(OpenID::TrustRoot::TrustRoot.check_url(trust_root, url))`.", 1484346761] + ], + "test/test_ui.rb:68124450": [ + [26, 9, 29, "Minitest/AssertTruthy: Prefer using `assert(req2.icon)`.", 591024350], + [39, 9, 29, "Minitest/AssertTruthy: Prefer using `assert(@req.icon)`.", 1633148460], + [66, 9, 29, "Minitest/AssertTruthy: Prefer using `assert(@req.icon)`.", 1633148460], + [92, 9, 28, "Minitest/AssertTruthy: Prefer using `assert(req.icon)`.", 1476625708] + ], + "test/test_urinorm.rb:1759769870": [ + [26, 11, 12, "Minitest/UselessAssertion: Useless assertion detected.", 2511510896] + ], + "test/test_xrds.rb:3561804079": [ + [52, 9, 41, "Minitest/RefuteFalse: Prefer using `refute(Yadis.is_xrds?(isnt))`.", 2709875658], + [139, 9, 5, "Lint/UselessAssignment: Useless assignment to variable - `types`. Use `_` or `_types` as a variable name to indicate that it won't be used.", 182678350], + [139, 21, 14, "Lint/UselessAssignment: Useless assignment to variable - `result_element`. Use `_` or `_result_element` as a variable name to indicate that it won't be used.", 1272947533], + [142, 9, 5, "Lint/UselessAssignment: Useless assignment to variable - `types`. Use `_` or `_types` as a variable name to indicate that it won't be used.", 182678350], + [142, 21, 14, "Lint/UselessAssignment: Useless assignment to variable - `result_element`. Use `_` or `_result_element` as a variable name to indicate that it won't be used.", 1272947533], + [151, 9, 56, "Style/SafeNavigation: Use safe navigation (`&.`) instead of checking if an object exists before calling the method.", 2495284533] + ], + "test/test_yadis_discovery.rb:2050267650": [ + [22, 5, 437, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1189860280], + [49, 9, 5, "Style/InfiniteLoop: Use `Kernel#loop` for infinite loops.", 191284826], + [134, 46, 3, "Style/AndOr: Use `&&` instead of `and`.", 193409806], + [220, 9, 23, "Minitest/RefuteFalse: Prefer using `refute(result.is_xrds)`.", 462657144] + ], + "test/testutil.rb:797384289": [ + [128, 5, 262, "Style/ClassMethodsDefinitions: Use `class << self` to define a class method.", 1720821532] ] } diff --git a/bin/bundle b/bin/bundle index 42c7fd7c..450605bc 100755 --- a/bin/bundle +++ b/bin/bundle @@ -30,7 +30,7 @@ m = Module.new do if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN bundler_version = a end - next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ + next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o bundler_version = $1 update_index = i end @@ -56,7 +56,7 @@ m = Module.new do def lockfile_version return unless File.file?(lockfile) lockfile_contents = File.read(lockfile) - return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/ + return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o Regexp.last_match(1) end @@ -83,15 +83,15 @@ m = Module.new do def activate_bundler gem_error = activation_error_handling do - gem "bundler", bundler_requirement + gem("bundler", bundler_requirement) end return if gem_error.nil? require_error = activation_error_handling do require "bundler/version" end return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) - warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" - exit 42 + warn("Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`") + exit(42) end def activation_error_handling diff --git a/bin/setup b/bin/setup new file mode 100755 index 00000000..dce67d86 --- /dev/null +++ b/bin/setup @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' +set -vx + +bundle install + +# Do any other automated setup that you need to do here diff --git a/lib/openid.rb b/lib/openid.rb index dfe5d3e2..5619a12b 100644 --- a/lib/openid.rb +++ b/lib/openid.rb @@ -18,9 +18,9 @@ module OpenID end -require "openid/version" -require "openid/consumer" -require "openid/server" +require_relative "openid/version" +require_relative "openid/consumer" +require_relative "openid/server" OpenID::Version.class_eval do extend VersionGem::Basic diff --git a/lib/openid/association.rb b/lib/openid/association.rb index 7b8d9f40..3dee7994 100644 --- a/lib/openid/association.rb +++ b/lib/openid/association.rb @@ -1,7 +1,7 @@ -require "openid/kvform" -require "openid/util" -require "openid/cryptutil" -require "openid/message" +require_relative "kvform" +require_relative "util" +require_relative "cryptutil" +require_relative "message" module OpenID def self.get_secret_size(assoc_type) diff --git a/lib/openid/consumer.rb b/lib/openid/consumer.rb index f4b5b084..afde3e0e 100644 --- a/lib/openid/consumer.rb +++ b/lib/openid/consumer.rb @@ -1,13 +1,13 @@ -require "openid/consumer/idres" -require "openid/consumer/checkid_request" -require "openid/consumer/associationmanager" -require "openid/consumer/responses" -require "openid/consumer/session" -require "openid/consumer/discovery_manager" -require "openid/consumer/discovery" -require "openid/message" -require "openid/yadis/discovery" -require "openid/store/nonce" +require_relative "consumer/idres" +require_relative "consumer/checkid_request" +require_relative "consumer/associationmanager" +require_relative "consumer/responses" +require_relative "consumer/session" +require_relative "consumer/discovery_manager" +require_relative "consumer/discovery" +require_relative "message" +require_relative "yadis/discovery" +require_relative "store/nonce" module OpenID # OpenID support for Relying Parties (aka Consumers). diff --git a/lib/openid/consumer/associationmanager.rb b/lib/openid/consumer/associationmanager.rb index d9b76a64..81697cdc 100644 --- a/lib/openid/consumer/associationmanager.rb +++ b/lib/openid/consumer/associationmanager.rb @@ -1,9 +1,9 @@ -require "openid/dh" -require "openid/util" -require "openid/kvpost" -require "openid/cryptutil" -require "openid/protocolerror" -require "openid/association" +require_relative "../dh" +require_relative "../util" +require_relative "../kvpost" +require_relative "../cryptutil" +require_relative "../protocolerror" +require_relative "../association" module OpenID class Consumer @@ -137,7 +137,7 @@ def negotiate_association assoc_type, session_type = supported_types begin request_association(assoc_type, session_type) - rescue ServerError => why + rescue ServerError Util.log("Server #{@server_url} refused its suggested " \ "association type: session_type=#{session_type}, " \ "assoc_type=#{assoc_type}") diff --git a/lib/openid/consumer/checkid_request.rb b/lib/openid/consumer/checkid_request.rb index 422cca84..8781d6b5 100644 --- a/lib/openid/consumer/checkid_request.rb +++ b/lib/openid/consumer/checkid_request.rb @@ -1,5 +1,5 @@ -require "openid/message" -require "openid/util" +require_relative "../message" +require_relative "../util" module OpenID class Consumer diff --git a/lib/openid/consumer/discovery.rb b/lib/openid/consumer/discovery.rb index 2606daba..9d66e0b9 100644 --- a/lib/openid/consumer/discovery.rb +++ b/lib/openid/consumer/discovery.rb @@ -1,17 +1,17 @@ # Functions to discover OpenID endpoints from identifiers. require "uri" -require "openid/util" -require "openid/fetchers" -require "openid/urinorm" -require "openid/message" -require "openid/yadis/discovery" -require "openid/yadis/xrds" -require "openid/yadis/xri" -require "openid/yadis/services" -require "openid/yadis/filters" -require "openid/consumer/html_parse" -require "openid/yadis/xrires" +require_relative "../util" +require_relative "../fetchers" +require_relative "../urinorm" +require_relative "../message" +require_relative "../yadis/discovery" +require_relative "../yadis/xrds" +require_relative "../yadis/xri" +require_relative "../yadis/services" +require_relative "../yadis/filters" +require_relative "../consumer/html_parse" +require_relative "../yadis/xrires" module OpenID OPENID_1_0_NS = "http://openid.net/xmlns/1.0" diff --git a/lib/openid/consumer/html_parse.rb b/lib/openid/consumer/html_parse.rb index 38d8999f..09fd881d 100644 --- a/lib/openid/consumer/html_parse.rb +++ b/lib/openid/consumer/html_parse.rb @@ -1,4 +1,4 @@ -require "openid/yadis/htmltokenizer" +require_relative "../yadis/htmltokenizer" module OpenID # Stuff to remove before we start looking for tags diff --git a/lib/openid/consumer/idres.rb b/lib/openid/consumer/idres.rb index d03edfe0..c0722f12 100644 --- a/lib/openid/consumer/idres.rb +++ b/lib/openid/consumer/idres.rb @@ -1,8 +1,8 @@ -require "openid/message" -require "openid/protocolerror" -require "openid/kvpost" -require "openid/consumer/discovery" -require "openid/urinorm" +require_relative "../message" +require_relative "../protocolerror" +require_relative "../kvpost" +require_relative "../urinorm" +require_relative "discovery" module OpenID class TypeURIMismatch < ProtocolError diff --git a/lib/openid/cryptutil.rb b/lib/openid/cryptutil.rb index 597953df..5654547b 100644 --- a/lib/openid/cryptutil.rb +++ b/lib/openid/cryptutil.rb @@ -1,4 +1,4 @@ -require "openid/util" +# stdlib require "digest/sha1" require "digest/sha2" begin @@ -10,11 +10,14 @@ require "hmac-sha2" rescue LoadError # Nothing exists use included hmac files - require "hmac/sha1" - require "hmac/sha2" + require_relative "../hmac/sha1" + require_relative "../hmac/sha2" end end +# This library +require_relative "util" + module OpenID # This module contains everything needed to perform low-level # cryptograph and data manipulation tasks. diff --git a/lib/openid/dh.rb b/lib/openid/dh.rb index 7d6d3a48..e354fd1e 100644 --- a/lib/openid/dh.rb +++ b/lib/openid/dh.rb @@ -1,5 +1,5 @@ -require "openid/util" -require "openid/cryptutil" +require_relative "util" +require_relative "cryptutil" module OpenID # Encapsulates a Diffie-Hellman key exchange. This class is used diff --git a/lib/openid/extension.rb b/lib/openid/extension.rb index 22e2f73b..a602331c 100644 --- a/lib/openid/extension.rb +++ b/lib/openid/extension.rb @@ -1,4 +1,4 @@ -require "openid/message" +require_relative "message" module OpenID # An interface for OpenID extensions. diff --git a/lib/openid/extensions/ax.rb b/lib/openid/extensions/ax.rb index 65a66920..65e2cedf 100644 --- a/lib/openid/extensions/ax.rb +++ b/lib/openid/extensions/ax.rb @@ -1,8 +1,8 @@ # Implements the OpenID attribute exchange specification, version 1.0 -require "openid/extension" -require "openid/trustroot" -require "openid/message" +require_relative "../extension" +require_relative "../trustroot" +require_relative "../message" module OpenID module AX diff --git a/lib/openid/extensions/oauth.rb b/lib/openid/extensions/oauth.rb index ff8364b5..e8da5c6f 100644 --- a/lib/openid/extensions/oauth.rb +++ b/lib/openid/extensions/oauth.rb @@ -2,7 +2,7 @@ # Extension 1.0 # see: http://openid.net/specs/ -require "openid/extension" +require_relative "../extension" module OpenID module OAuth diff --git a/lib/openid/extensions/pape.rb b/lib/openid/extensions/pape.rb index cebd5a14..9662b654 100644 --- a/lib/openid/extensions/pape.rb +++ b/lib/openid/extensions/pape.rb @@ -2,7 +2,7 @@ # Extension 1.0 # see: http://openid.net/specs/ -require "openid/extension" +require_relative "../extension" module OpenID module PAPE diff --git a/lib/openid/extensions/sreg.rb b/lib/openid/extensions/sreg.rb index 874b68a9..47f257c4 100644 --- a/lib/openid/extensions/sreg.rb +++ b/lib/openid/extensions/sreg.rb @@ -1,6 +1,6 @@ -require "openid/extension" -require "openid/util" -require "openid/message" +require_relative "../extension" +require_relative "../util" +require_relative "../message" module OpenID module SReg diff --git a/lib/openid/extensions/ui.rb b/lib/openid/extensions/ui.rb index a0bb2164..460a4327 100644 --- a/lib/openid/extensions/ui.rb +++ b/lib/openid/extensions/ui.rb @@ -1,7 +1,7 @@ # An implementation of the OpenID User Interface Extension 1.0 - DRAFT 0.5 # see: http://svn.openid.net/repos/specifications/user_interface/1.0/trunk/openid-user-interface-extension-1_0.html -require "openid/extension" +require_relative "../extension" module OpenID module UI diff --git a/lib/openid/fetchers.rb b/lib/openid/fetchers.rb index 27f7e81d..5371863e 100644 --- a/lib/openid/fetchers.rb +++ b/lib/openid/fetchers.rb @@ -1,6 +1,8 @@ +# External dependencies require "net/http" -require "openid/util" -require "openid/version" + +# This library +require_relative "util" begin require "net/https" diff --git a/lib/openid/kvpost.rb b/lib/openid/kvpost.rb index a101e5ea..07d8a259 100644 --- a/lib/openid/kvpost.rb +++ b/lib/openid/kvpost.rb @@ -1,5 +1,5 @@ -require "openid/message" -require "openid/fetchers" +require_relative "message" +require_relative "fetchers" module OpenID # Exception that is raised when the server returns a 400 response diff --git a/lib/openid/message.rb b/lib/openid/message.rb index 71368d78..0d58b6ca 100644 --- a/lib/openid/message.rb +++ b/lib/openid/message.rb @@ -1,5 +1,5 @@ -require "openid/util" -require "openid/kvform" +require_relative "util" +require_relative "kvform" module OpenID IDENTIFIER_SELECT = "http://specs.openid.net/auth/2.0/identifier_select" diff --git a/lib/openid/protocolerror.rb b/lib/openid/protocolerror.rb index 7c2e2a14..9cd3f14e 100644 --- a/lib/openid/protocolerror.rb +++ b/lib/openid/protocolerror.rb @@ -1,4 +1,4 @@ -require "openid/util" +require_relative "util" module OpenID # An error in the OpenID protocol diff --git a/lib/openid/server.rb b/lib/openid/server.rb index 762675e3..8ed92ef0 100644 --- a/lib/openid/server.rb +++ b/lib/openid/server.rb @@ -1,10 +1,10 @@ -require "openid/cryptutil" -require "openid/util" -require "openid/dh" -require "openid/store/nonce" -require "openid/trustroot" -require "openid/association" -require "openid/message" +require_relative "cryptutil" +require_relative "util" +require_relative "dh" +require_relative "store/nonce" +require_relative "trustroot" +require_relative "association" +require_relative "message" require "time" diff --git a/lib/openid/store/filesystem.rb b/lib/openid/store/filesystem.rb index 1f9b3585..591df3b3 100644 --- a/lib/openid/store/filesystem.rb +++ b/lib/openid/store/filesystem.rb @@ -1,10 +1,12 @@ +# stdlib require "fileutils" require "pathname" require "tempfile" -require "openid/util" -require "openid/store/interface" -require "openid/association" +# This library +require_relative "../util" +require_relative "../association" +require_relative "interface" module OpenID module Store diff --git a/lib/openid/store/interface.rb b/lib/openid/store/interface.rb index ccb29a36..c0df6938 100644 --- a/lib/openid/store/interface.rb +++ b/lib/openid/store/interface.rb @@ -1,4 +1,4 @@ -require "openid/util" +require_relative "../util" module OpenID # Stores for Associations and nonces. Used by both the Consumer and diff --git a/lib/openid/store/memcache.rb b/lib/openid/store/memcache.rb index 66271f84..4ebb94b6 100644 --- a/lib/openid/store/memcache.rb +++ b/lib/openid/store/memcache.rb @@ -1,8 +1,11 @@ -require "openid/util" -require "openid/store/interface" -require "openid/store/nonce" +# stdlib require "time" +# This library +require_relative "../util" +require_relative "interface" +require_relative "nonce" + module OpenID module Store class Memcache < Interface diff --git a/lib/openid/store/memory.rb b/lib/openid/store/memory.rb index 71937055..858b594e 100644 --- a/lib/openid/store/memory.rb +++ b/lib/openid/store/memory.rb @@ -1,4 +1,5 @@ -require "openid/store/interface" +require_relative "interface" + module OpenID module Store # An in-memory implementation of Store. This class is mainly used diff --git a/lib/openid/store/nonce.rb b/lib/openid/store/nonce.rb index 27008c49..d8a036ef 100644 --- a/lib/openid/store/nonce.rb +++ b/lib/openid/store/nonce.rb @@ -1,7 +1,10 @@ -require "openid/cryptutil" +# stdlib require "date" require "time" +# This library +require_relative "../cryptutil" + module OpenID module Nonce DEFAULT_SKEW = 60 * 60 * 5 diff --git a/lib/openid/trustroot.rb b/lib/openid/trustroot.rb index 81a246b0..12f9f2dd 100644 --- a/lib/openid/trustroot.rb +++ b/lib/openid/trustroot.rb @@ -1,5 +1,8 @@ +# stdlib require "uri" -require "openid/urinorm" + +# This library +require_relative "urinorm" module OpenID class RealmVerificationRedirected < Exception diff --git a/lib/openid/urinorm.rb b/lib/openid/urinorm.rb index 7a6ce480..fb5b9946 100644 --- a/lib/openid/urinorm.rb +++ b/lib/openid/urinorm.rb @@ -1,3 +1,4 @@ +# stdlib require "uri" module OpenID diff --git a/lib/openid/yadis/constants.rb b/lib/openid/yadis/constants.rb index 3df3dee2..ea5ae58c 100644 --- a/lib/openid/yadis/constants.rb +++ b/lib/openid/yadis/constants.rb @@ -1,4 +1,4 @@ -require "openid/yadis/accept" +require_relative "accept" module OpenID module Yadis diff --git a/lib/openid/yadis/discovery.rb b/lib/openid/yadis/discovery.rb index e40e4fc3..a3547667 100644 --- a/lib/openid/yadis/discovery.rb +++ b/lib/openid/yadis/discovery.rb @@ -1,7 +1,7 @@ -require "openid/util" -require "openid/fetchers" -require "openid/yadis/constants" -require "openid/yadis/parsehtml" +require_relative "../util" +require_relative "../fetchers" +require_relative "constants" +require_relative "parsehtml" module OpenID # Raised when a error occurs in the discovery process diff --git a/lib/openid/yadis/parsehtml.rb b/lib/openid/yadis/parsehtml.rb index 792a178d..c95b8b7d 100644 --- a/lib/openid/yadis/parsehtml.rb +++ b/lib/openid/yadis/parsehtml.rb @@ -1,6 +1,9 @@ -require "openid/yadis/htmltokenizer" +# stdlib require "cgi" +# This library +require_relative "htmltokenizer" + module OpenID module Yadis def self.html_yadis_location(html) diff --git a/lib/openid/yadis/services.rb b/lib/openid/yadis/services.rb index 88f1bc49..b850e9b6 100644 --- a/lib/openid/yadis/services.rb +++ b/lib/openid/yadis/services.rb @@ -1,6 +1,6 @@ -require "openid/yadis/filters" -require "openid/yadis/discovery" -require "openid/yadis/xrds" +require_relative "filters" +require_relative "discovery" +require_relative "xrds" module OpenID module Yadis diff --git a/lib/openid/yadis/xrds.rb b/lib/openid/yadis/xrds.rb index 0476c631..7b4ead81 100644 --- a/lib/openid/yadis/xrds.rb +++ b/lib/openid/yadis/xrds.rb @@ -2,7 +2,7 @@ require "rexml/element" require "rexml/xpath" -require "openid/yadis/xri" +require_relative "xri" module OpenID module Yadis diff --git a/lib/openid/yadis/xri.rb b/lib/openid/yadis/xri.rb index beff3742..43eead48 100644 --- a/lib/openid/yadis/xri.rb +++ b/lib/openid/yadis/xri.rb @@ -1,4 +1,4 @@ -require "openid/fetchers" +require_relative "../fetchers" module OpenID module Yadis diff --git a/lib/openid/yadis/xrires.rb b/lib/openid/yadis/xrires.rb index 964a6cc6..21bedfbf 100644 --- a/lib/openid/yadis/xrires.rb +++ b/lib/openid/yadis/xrires.rb @@ -1,7 +1,10 @@ +# stdlib require "cgi" -require "openid/yadis/xri" -require "openid/yadis/xrds" -require "openid/fetchers" + +# This library +require_relative "xri" +require_relative "xrds" +require_relative "../fetchers" module OpenID module Yadis diff --git a/test/discoverdata.rb b/test/discoverdata.rb index fa8656a9..13ce8bae 100644 --- a/test/discoverdata.rb +++ b/test/discoverdata.rb @@ -1,5 +1,11 @@ +# stdlib require "uri" + +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/yadis/constants" require "openid/yadis/discovery" require "openid/util" diff --git a/test/test_accept.rb b/test/test_accept.rb index 2f6ffdcb..c66fa441 100644 --- a/test/test_accept.rb +++ b/test/test_accept.rb @@ -1,5 +1,9 @@ +# test helpers require_relative "test_helper" require_relative "testutil" + +# this library +require "openid" require "openid/yadis/accept" require "openid/util" diff --git a/test/test_association.rb b/test/test_association.rb index de2904a1..7b57c6d9 100644 --- a/test/test_association.rb +++ b/test/test_association.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/association" require "openid/protocolerror" diff --git a/test/test_associationmanager.rb b/test/test_associationmanager.rb index fba39285..6ed6d225 100644 --- a/test/test_associationmanager.rb +++ b/test/test_associationmanager.rb @@ -1,5 +1,13 @@ +# stdlib +require "time" + +# test helpers require_relative "test_helper" require_relative "testutil" +require_relative "util" + +# this library +require "openid" require "openid/consumer/associationmanager" require "openid/association" require "openid/dh" @@ -8,8 +16,6 @@ require "openid/message" require "openid/protocolerror" require "openid/store/memory" -require_relative "util" -require "time" module OpenID class DHAssocSessionTest < Minitest::Test diff --git a/test/test_ax.rb b/test/test_ax.rb index bd869e2c..ab530583 100644 --- a/test/test_ax.rb +++ b/test/test_ax.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/extensions/ax" require "openid/message" require "openid/consumer/responses" diff --git a/test/test_checkid_request.rb b/test/test_checkid_request.rb index 05f550c9..a7da5507 100644 --- a/test/test_checkid_request.rb +++ b/test/test_checkid_request.rb @@ -1,8 +1,12 @@ +# test helpers require_relative "test_helper" require_relative "testutil" +require_relative "util" + +# this library +require "openid" require "openid/consumer/checkid_request" require "openid/message" -require_relative "util" module OpenID class Consumer diff --git a/test/test_consumer.rb b/test/test_consumer.rb index 5099bfbf..399fe18e 100644 --- a/test/test_consumer.rb +++ b/test/test_consumer.rb @@ -1,5 +1,9 @@ +# test helpers require_relative "test_helper" require_relative "testutil" + +# this library +require "openid" require "openid/consumer" module OpenID diff --git a/test/test_cryptutil.rb b/test/test_cryptutil.rb index dc7da7cc..ba904f3f 100644 --- a/test/test_cryptutil.rb +++ b/test/test_cryptutil.rb @@ -1,8 +1,14 @@ # coding: ascii-8bit +# stdlib +require "pathname" + +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/cryptutil" -require "pathname" class CryptUtilTestCase < Minitest::Test BIG = 2**256 diff --git a/test/test_dh.rb b/test/test_dh.rb index 513e3b8d..de4cea2f 100644 --- a/test/test_dh.rb +++ b/test/test_dh.rb @@ -1,5 +1,9 @@ +# test helpers require_relative "test_helper" require_relative "testutil" + +# this library +require "openid" require "openid/dh" module OpenID diff --git a/test/test_discover.rb b/test/test_discover.rb index fe91db3f..491c99a4 100644 --- a/test/test_discover.rb +++ b/test/test_discover.rb @@ -1,6 +1,10 @@ +# test helpers require_relative "test_helper" require_relative "testutil" require_relative "util" + +# this library +require "openid" require "openid/fetchers" require "openid/yadis/discovery" require "openid/consumer/discovery" diff --git a/test/test_discovery_manager.rb b/test/test_discovery_manager.rb index cc4dbc72..41dd29a6 100644 --- a/test/test_discovery_manager.rb +++ b/test/test_discovery_manager.rb @@ -1,7 +1,11 @@ +# test helpers require_relative "test_helper" -require "openid/consumer" require_relative "testutil" +# this library +require "openid" +require "openid/consumer" + module OpenID class TestDiscoveredServices < Minitest::Test def setup diff --git a/test/test_extension.rb b/test/test_extension.rb index e1d339b3..7bcca070 100644 --- a/test/test_extension.rb +++ b/test/test_extension.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/extension" require "openid/message" diff --git a/test/test_fetchers.rb b/test/test_fetchers.rb index 26deede2..0cdc4b4c 100644 --- a/test/test_fetchers.rb +++ b/test/test_fetchers.rb @@ -1,10 +1,18 @@ -require_relative "test_helper" +# stdlib +require "stringio" + +# external libraries require "net/http" require "webrick" + +# test helpers +require_relative "test_helper" require_relative "testutil" require_relative "util" + +# this library +require "openid" require "openid/fetchers" -require "stringio" begin require "net/https" diff --git a/test/test_filters.rb b/test/test_filters.rb index 65b60439..59ef7654 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -1,6 +1,12 @@ +# external libraries +require "rexml/document" + +# test helpers require_relative "test_helper" require_relative "testutil" -require "rexml/document" + +# this library +require "openid" require "openid/yadis/xrds" require "openid/yadis/filters" diff --git a/test/test_helper.rb b/test/test_helper.rb index 17575f83..37c25564 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,4 +1,6 @@ # External dependencies +require "byebug" if ENV.fetch("DEBUG", "false").casecmp?("true") + ## Last thing before loading this gem is to setup code coverage begin # This does not require "simplecov", but diff --git a/test/test_idres.rb b/test/test_idres.rb index 00ebd393..a14e4888 100644 --- a/test/test_idres.rb +++ b/test/test_idres.rb @@ -1,6 +1,10 @@ +# test helpers require_relative "test_helper" require_relative "testutil" require_relative "util" + +# this library +require "openid" require "openid/consumer/idres" require "openid/protocolerror" require "openid/store/memory" diff --git a/test/test_kvform.rb b/test/test_kvform.rb index 7e114f9d..6884b9f4 100644 --- a/test/test_kvform.rb +++ b/test/test_kvform.rb @@ -1,7 +1,11 @@ +# test helpers require_relative "test_helper" +require_relative "util" + +# this library +require "openid" require "openid/kvform" require "openid/util" -require_relative "util" include OpenID diff --git a/test/test_kvpost.rb b/test/test_kvpost.rb index 555c520c..dda8020e 100644 --- a/test/test_kvpost.rb +++ b/test/test_kvpost.rb @@ -1,5 +1,9 @@ +# test helpers require_relative "test_helper" require_relative "testutil" + +# this library +require "openid" require "openid/kvpost" require "openid/kvform" require "openid/message" diff --git a/test/test_linkparse.rb b/test/test_linkparse.rb index 94791207..69fe6331 100644 --- a/test/test_linkparse.rb +++ b/test/test_linkparse.rb @@ -1,5 +1,9 @@ +# test helpers require_relative "test_helper" require_relative "testutil" + +# this library +require "openid" require "openid/consumer/html_parse" class LinkParseTestCase < Minitest::Test diff --git a/test/test_message.rb b/test/test_message.rb index e64dce97..e4d3ce32 100644 --- a/test/test_message.rb +++ b/test/test_message.rb @@ -1,6 +1,10 @@ # last synced with Python openid.test.test_message on 6/29/2007. +# test helpers require_relative "test_helper" require_relative "util" + +# this library +require "openid" require "openid/message" require "rexml/document" diff --git a/test/test_nonce.rb b/test/test_nonce.rb index f6858594..266deea4 100644 --- a/test/test_nonce.rb +++ b/test/test_nonce.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/store/nonce" module OpenID diff --git a/test/test_oauth.rb b/test/test_oauth.rb index c65f05e3..b4bb45dd 100644 --- a/test/test_oauth.rb +++ b/test/test_oauth.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/extensions/oauth" require "openid/message" require "openid/server" diff --git a/test/test_openid_yadis.rb b/test/test_openid_yadis.rb index 5ae13129..50fbfdd7 100644 --- a/test/test_openid_yadis.rb +++ b/test/test_openid_yadis.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/consumer/discovery" require "openid/yadis/services" diff --git a/test/test_pape.rb b/test/test_pape.rb index f4707099..81cdb232 100644 --- a/test/test_pape.rb +++ b/test/test_pape.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/extensions/pape" require "openid/message" require "openid/server" diff --git a/test/test_parsehtml.rb b/test/test_parsehtml.rb index 16baf331..8cd7928c 100644 --- a/test/test_parsehtml.rb +++ b/test/test_parsehtml.rb @@ -1,5 +1,9 @@ +# test helpers require_relative "test_helper" require_relative "testutil" + +# this library +require "openid" require "openid/yadis/parsehtml" module OpenID diff --git a/test/test_responses.rb b/test/test_responses.rb index 46cc1e21..a957fa2c 100644 --- a/test/test_responses.rb +++ b/test/test_responses.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/consumer/discovery" require "openid/consumer/responses" diff --git a/test/test_server.rb b/test/test_server.rb index f211a3d8..f15f40fa 100644 --- a/test/test_server.rb +++ b/test/test_server.rb @@ -1,7 +1,13 @@ +# stdlib +require "uri" + +# test helpers require_relative "test_helper" require_relative "testutil" require_relative "util" -require "uri" + +# this library +require "openid" require "openid/server" require "openid/cryptutil" require "openid/association" diff --git a/test/test_sreg.rb b/test/test_sreg.rb index 1826a61e..be0ff592 100644 --- a/test/test_sreg.rb +++ b/test/test_sreg.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/extensions/sreg" require "openid/message" require "openid/server" diff --git a/test/test_stores.rb b/test/test_stores.rb index a965110e..1cb557c9 100644 --- a/test/test_stores.rb +++ b/test/test_stores.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/store/interface" require "openid/store/filesystem" require "openid/store/memcache" diff --git a/test/test_trustroot.rb b/test/test_trustroot.rb index 895be925..4c81851b 100644 --- a/test/test_trustroot.rb +++ b/test/test_trustroot.rb @@ -1,5 +1,9 @@ +# test helpers require_relative "test_helper" require_relative "testutil" + +# this library +require "openid" require "openid/trustroot" class TrustRootTest < Minitest::Test diff --git a/test/test_ui.rb b/test/test_ui.rb index b665249e..dabddc1f 100644 --- a/test/test_ui.rb +++ b/test/test_ui.rb @@ -1,7 +1,11 @@ +# test helpers +require_relative "test_helper" + +# this library +require "openid" require "openid/extensions/ui" require "openid/message" require "openid/server" -require_relative "test_helper" module OpenID module UITest diff --git a/test/test_urinorm.rb b/test/test_urinorm.rb index 0f6904ff..9f78619e 100644 --- a/test/test_urinorm.rb +++ b/test/test_urinorm.rb @@ -1,5 +1,9 @@ +# test helpers require_relative "test_helper" require_relative "testutil" + +# this library +require "openid" require "openid/urinorm" class URINormTestCase < Minitest::Test diff --git a/test/test_util.rb b/test/test_util.rb index 19fc3b0c..da430aff 100644 --- a/test/test_util.rb +++ b/test/test_util.rb @@ -1,6 +1,10 @@ # encoding: ascii-8bit +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/util" module OpenID diff --git a/test/test_xrds.rb b/test/test_xrds.rb index b96960fd..85cd8f58 100644 --- a/test/test_xrds.rb +++ b/test/test_xrds.rb @@ -1,5 +1,9 @@ +# test helpers require_relative "test_helper" require_relative "testutil" + +# this library +require "openid" require "openid/yadis/xrds" module OpenID diff --git a/test/test_xri.rb b/test/test_xri.rb index 00483e0e..36bf41fe 100644 --- a/test/test_xri.rb +++ b/test/test_xri.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/yadis/xri" module OpenID diff --git a/test/test_xrires.rb b/test/test_xrires.rb index 431885c0..11c56b2b 100644 --- a/test/test_xrires.rb +++ b/test/test_xrires.rb @@ -1,4 +1,8 @@ +# test helpers require_relative "test_helper" + +# this library +require "openid" require "openid/yadis/xrires" module OpenID diff --git a/test/test_yadis_discovery.rb b/test/test_yadis_discovery.rb index b97ba9a2..5cb497fc 100644 --- a/test/test_yadis_discovery.rb +++ b/test/test_yadis_discovery.rb @@ -1,10 +1,16 @@ +# stdlib +require "uri" + +# test helpers require_relative "test_helper" require_relative "testutil" -require "uri" +require_relative "discoverdata" + +# this library +require "openid" require "openid/yadis/discovery" require "openid/fetchers" require "openid/util" -require "discoverdata" module OpenID module YadisDiscovery diff --git a/test/testutil.rb b/test/testutil.rb index 9aefb5d7..292b768d 100644 --- a/test/testutil.rb +++ b/test/testutil.rb @@ -1,3 +1,4 @@ +# external libraries require "pathname" if defined? Minitest::Test diff --git a/test/util.rb b/test/util.rb index 63297576..43c3eb4c 100644 --- a/test/util.rb +++ b/test/util.rb @@ -1,4 +1,6 @@ # Utilities that are only used in the testing code + +# stdlib require "stringio" module OpenID