diff --git a/.rubocop.yml b/.rubocop.yml index b0d0992..2bb9061 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -11,7 +11,7 @@ AllCops: Rails: Enabled: true -Metrics/LineLength: +Layout/LineLength: Max: 185 Metrics/BlockLength: diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index db6a5aa..f1252db 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,398 +1,30 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2017-06-13 08:15:08 -0700 using RuboCop version 0.49.1. +# on 2020-01-15 10:15:34 -0500 using RuboCop version 0.79.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 2 -# Configuration parameters: Include. -# Include: **/Gemfile, **/gems.rb -Bundler/DuplicatedGem: - Exclude: - - 'Gemfile' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: Include, TreatCommentsAsGroupSeparators. -# Include: **/Gemfile, **/gems.rb -Bundler/OrderedGems: - Exclude: - - 'Gemfile' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedHashRocketStyle, SupportedHashRocketStyles, EnforcedColonStyle, SupportedColonStyles, EnforcedLastArgumentHashStyle, SupportedLastArgumentHashStyles. -# SupportedHashRocketStyles: key, separator, table -# SupportedColonStyles: key, separator, table -# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit -Layout/AlignHash: - Exclude: - - 'lib/parsing_nesting/tree.rb' - -# Offense count: 4 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: with_first_parameter, with_fixed_indentation -Layout/AlignParameters: - Exclude: - - 'lib/blacklight_advanced_search/render_constraints_override.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -Layout/EmptyLineAfterMagicComment: - Exclude: - - 'lib/generators/blacklight_advanced_search/templates/saved_searches_controller.rb' - - 'lib/generators/blacklight_advanced_search/templates/search_history_controller.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: symmetrical, new_line, same_line -Layout/MultilineArrayBraceLayout: - Exclude: - - 'spec/parsing_nesting/consuming_spec.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: symmetrical, new_line, same_line -Layout/MultilineMethodCallBraceLayout: - Exclude: - - 'lib/blacklight_advanced_search/render_constraints_override.rb' - -# Offense count: 10 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. -# SupportedStyles: aligned, indented -Layout/MultilineOperationIndentation: - Exclude: - - 'lib/blacklight_advanced_search/advanced_search_builder.rb' - - 'lib/blacklight_advanced_search/controller.rb' - - 'lib/parsing_nesting/grammar.rb' - - 'lib/parsing_nesting/tree.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: space, no_space -Layout/SpaceBeforeBlockBraces: - Exclude: - - 'blacklight_advanced_search.gemspec' - -# Offense count: 1 -Lint/AmbiguousOperator: - Exclude: - - 'spec/parsing_nesting/to_solr_spec.rb' - # Offense count: 3 -# Configuration parameters: AllowSafeAssignment. -Lint/AssignmentInCondition: - Exclude: - - 'lib/parsing_nesting/tree.rb' - -# Offense count: 3 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyleAlignWith, SupportedStylesAlignWith, AutoCorrect. -# SupportedStylesAlignWith: keyword, variable, start_of_line -Lint/EndAlignment: - Exclude: - - 'lib/blacklight_advanced_search/advanced_search_builder.rb' - - 'lib/blacklight_advanced_search/redirect_legacy_params_filter.rb' - - 'lib/parsing_nesting/tree.rb' - -# Offense count: 17 -Lint/ShadowingOuterLocalVariable: - Exclude: - - 'spec/parsing_nesting/build_tree_spec.rb' - - 'spec/parsing_nesting/to_solr_spec.rb' - -# Offense count: 1 -Lint/UselessAssignment: - Exclude: - - 'lib/blacklight_advanced_search/advanced_search_builder.rb' - -# Offense count: 7 -Metrics/AbcSize: - Max: 38 - -# Offense count: 3 -Metrics/CyclomaticComplexity: - Max: 11 - -# Offense count: 13 -# Configuration parameters: CountComments. -Metrics/MethodLength: - Max: 22 - -# Offense count: 2 -Metrics/PerceivedComplexity: - Max: 13 - -# Offense count: 1 -RSpec/BeforeAfterAll: - Exclude: - - 'spec/spec_helper.rb' - - 'spec/rails_helper.rb' - - 'spec/support/**/*.rb' - - 'spec/features/blacklight_advanced_search_form_spec.rb' - -# Offense count: 7 -RSpec/DescribeClass: - Exclude: - - 'spec/features/blacklight_advanced_search_form_spec.rb' - - 'spec/integration/blacklight_stub_spec.rb' - - 'spec/lib/deep_merge_spec.rb' - - 'spec/lib/filter_parser_spec.rb' - - 'spec/parsing_nesting/build_tree_spec.rb' - - 'spec/parsing_nesting/consuming_spec.rb' - - 'spec/parsing_nesting/to_solr_spec.rb' - -# Offense count: 6 -RSpec/EmptyLineAfterFinalLet: - Exclude: - - 'spec/helpers/advanced_helper_spec.rb' - - 'spec/lib/advanced_search_builder_spec.rb' - -# Offense count: 21 -# Configuration parameters: Max. -RSpec/ExampleLength: - Exclude: - - 'spec/parsing_nesting/build_tree_spec.rb' - - 'spec/parsing_nesting/to_solr_spec.rb' - -# Offense count: 40 -# Configuration parameters: CustomTransform, IgnoredWords. -RSpec/ExampleWording: - Exclude: - - 'spec/features/blacklight_advanced_search_form_spec.rb' - - 'spec/helpers/advanced_helper_spec.rb' - - 'spec/integration/blacklight_stub_spec.rb' - - 'spec/lib/filter_parser_spec.rb' - - 'spec/parsing_nesting/build_tree_spec.rb' - - 'spec/parsing_nesting/to_solr_spec.rb' - -# Offense count: 1 -# Configuration parameters: CustomTransform, IgnoreMethods. -RSpec/FilePath: - Exclude: - - 'spec/lib/advanced_search_builder_spec.rb' - -# Offense count: 10 -# Configuration parameters: AssignmentOnly. -RSpec/InstanceVariable: - Exclude: - - 'spec/parsing_nesting/consuming_spec.rb' - - 'spec/parsing_nesting/to_solr_spec.rb' - -# Offense count: 2 -# Configuration parameters: SupportedStyles. -# SupportedStyles: have_received, receive -RSpec/MessageSpies: - EnforcedStyle: receive - -# Offense count: 33 -RSpec/MultipleExpectations: - Max: 6 - -# Offense count: 10 -# Configuration parameters: Max. -RSpec/NestedGroups: - Exclude: - - 'spec/lib/advanced_search_builder_spec.rb' - - 'spec/parsing_nesting/to_solr_spec.rb' - -# Offense count: 2 -# Configuration parameters: IgnoreSymbolicNames. -RSpec/VerifiedDoubles: - Exclude: - - 'spec/helpers/advanced_helper_spec.rb' - -# Offense count: 1 -Rails/OutputSafety: - Exclude: - - 'lib/blacklight_advanced_search/render_constraints_override.rb' - -# Offense count: 2 # Cop supports --auto-correct. -# Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank. -Rails/Present: - Exclude: - - 'app/helpers/blacklight_advanced_search/advanced_helper_behavior.rb' - - 'lib/blacklight_advanced_search/advanced_query_parser.rb' - -# Offense count: 1 -Style/AccessorMethodName: - Exclude: - - 'app/controllers/blacklight_advanced_search/advanced_controller.rb' - -# Offense count: 7 -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: nested, compact -Style/ClassAndModuleChildren: - Exclude: - - 'app/controllers/blacklight_advanced_search/advanced_controller.rb' - - 'lib/blacklight_advanced_search/catalog_helper_override.rb' - - 'lib/blacklight_advanced_search/controller.rb' - - 'lib/blacklight_advanced_search/filter_parser.rb' - - 'lib/blacklight_advanced_search/parsing_nesting_parser.rb' - - 'lib/blacklight_advanced_search/render_constraints_override.rb' - - 'lib/parsing_nesting/tree.rb' - -# Offense count: 26 -Style/Documentation: - Enabled: false - -# Offense count: 1 -# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms. -# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS -Style/FileName: - Exclude: - - 'Gemfile' - -# Offense count: 6 -# Configuration parameters: MinBodyLength. -Style/GuardClause: - Exclude: - - 'app/helpers/blacklight_advanced_search/advanced_helper_behavior.rb' - - 'lib/blacklight_advanced_search/advanced_search_builder.rb' - - 'lib/blacklight_advanced_search/redirect_legacy_params_filter.rb' - - 'lib/blacklight_advanced_search/render_constraints_override.rb' - - 'lib/parsing_nesting/tree.rb' - -# Offense count: 76 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. +# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys Style/HashSyntax: Exclude: - 'Rakefile' - - 'lib/blacklight_advanced_search/advanced_query_parser.rb' - - 'lib/blacklight_advanced_search/redirect_legacy_params_filter.rb' - - 'lib/blacklight_advanced_search/render_constraints_override.rb' - - 'lib/generators/blacklight_advanced_search/assets_generator.rb' - - 'lib/generators/blacklight_advanced_search/templates/advanced_controller.rb' - - 'lib/parsing_nesting/tree.rb' - - 'spec/features/blacklight_advanced_search_form_spec.rb' - - 'spec/lib/advanced_search_builder_spec.rb' - - 'spec/lib/filter_parser_spec.rb' - - 'spec/parsing_nesting/to_solr_spec.rb' - - 'spec/test_app_templates/app/controllers/catalog_controller.rb' - - 'spec/test_app_templates/lib/generators/test_app_generator.rb' - -# Offense count: 1 -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: snake_case, camelCase -Style/MethodName: - Exclude: - - 'spec/lib/filter_parser_spec.rb' - -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: AllowSafeAssignment. -Style/ParenthesesAroundCondition: - Exclude: - - 'lib/blacklight_advanced_search/catalog_helper_override.rb' - - 'lib/blacklight_advanced_search/render_constraints_override.rb' - -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: PreferredDelimiters. -Style/PercentLiteralDelimiters: - Exclude: - - 'spec/lib/filter_parser_spec.rb' - -# Offense count: 4 -# Cop supports --auto-correct. -Style/PerlBackrefs: - Exclude: - - 'spec/parsing_nesting/to_solr_spec.rb' - -# Offense count: 2 -# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist. -# NamePrefix: is_, has_, have_ -# NamePrefixBlacklist: is_, has_, have_ -# NameWhitelist: is_a? -Style/PredicateName: - Exclude: - - 'spec/**/*' - - 'lib/blacklight_advanced_search/advanced_search_builder.rb' - - 'lib/blacklight_advanced_search/controller.rb' - -# Offense count: 5 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: short, verbose -Style/PreferredHashMethods: - Exclude: - - 'lib/parsing_nesting/tree.rb' - -# Offense count: 4 -# Cop supports --auto-correct. -# Configuration parameters: AllowMultipleReturnValues. -Style/RedundantReturn: - Exclude: - - 'app/helpers/blacklight_advanced_search/advanced_helper_behavior.rb' - - 'lib/blacklight_advanced_search/render_constraints_override.rb' - -# Offense count: 6 -# Cop supports --auto-correct. -Style/RedundantSelf: - Exclude: - - 'lib/blacklight_advanced_search/advanced_search_builder.rb' - - 'lib/blacklight_advanced_search/render_constraints_override.rb' - - 'lib/blacklight_advanced_search/version.rb' - - 'lib/parsing_nesting/tree.rb' # Offense count: 1 # Cop supports --auto-correct. -# Configuration parameters: SupportedStyles. +# Configuration parameters: . # SupportedStyles: use_perl_names, use_english_names Style/SpecialGlobalVars: EnforcedStyle: use_perl_names -# Offense count: 398 +# Offense count: 7 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline. +# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. # SupportedStyles: single_quotes, double_quotes Style/StringLiterals: - Enabled: false - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: single_quotes, double_quotes -Style/StringLiteralsInInterpolation: - Exclude: - - 'lib/parsing_nesting/tree.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: MinSize, SupportedStyles. -# SupportedStyles: percent, brackets -Style/SymbolArray: - EnforcedStyle: brackets - -# Offense count: 9 -# Cop supports --auto-correct. -# Configuration parameters: IgnoredMethods. -# IgnoredMethods: respond_to, define_method -Style/SymbolProc: - Exclude: - - 'lib/parsing_nesting/tree.rb' - - 'spec/spec_helper.rb' - -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: AllowNamedUnderscoreVariables. -Style/TrailingUnderscoreVariable: - Exclude: - - 'app/controllers/blacklight_advanced_search/advanced_controller.rb' - -# Offense count: 2 -# Configuration parameters: EnforcedStyle, SupportedStyles. -# SupportedStyles: snake_case, camelCase -Style/VariableName: Exclude: - - 'lib/parsing_nesting/tree.rb' + - 'Rakefile' diff --git a/VERSION b/VERSION index 9c4d836..66ce77b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.0.0.alpha +7.0.0 diff --git a/blacklight_advanced_search.gemspec b/blacklight_advanced_search.gemspec index 8fbba83..621c22a 100644 --- a/blacklight_advanced_search.gemspec +++ b/blacklight_advanced_search.gemspec @@ -9,9 +9,7 @@ Gem::Specification.new do |s| s.email = ["blacklight-development@googlegroups.com"] s.homepage = "http://projectblacklight.org/" s.summary = "Blacklight Advanced Search plugin" - s.license = "Apache 2.0" - - s.rubyforge_project = "blacklight" + s.license = "Apache-2.0" s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")