Sha256: 991582b35443662df1127d93ee718ebeda6672a919e492ec3081f58dad881d47

Contents?: true

Size: 743 Bytes

Versions: 81

Compression:

Stored size: 743 Bytes

Contents

require_relative "determines_yaml_path"
require_relative "loads_yaml_with_inheritance"

module Standard
  module Performance
    class BuildsRuleset
      def initialize
        @determines_yaml_path = DeterminesYamlPath.new
        @loads_yaml_with_inheritance = LoadsYamlWithInheritance.new
        @merges_upstream_metadata = LintRoller::Support::MergesUpstreamMetadata.new
      end

      def build(target_ruby_version)
        @merges_upstream_metadata.merge(
          @loads_yaml_with_inheritance.load(@determines_yaml_path.determine(target_ruby_version)),
          @loads_yaml_with_inheritance.load(Pathname.new(Gem.loaded_specs["rubocop-performance"].full_gem_path).join("config/default.yml"))
        )
      end
    end
  end
end

Version data entries

81 entries across 81 versions & 3 rubygems

Version Path
standard-performance-1.7.0 lib/standard/performance/builds_ruleset.rb
standard-performance-1.6.0 lib/standard/performance/builds_ruleset.rb
standard-performance-1.5.0 lib/standard/performance/builds_ruleset.rb
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
standard-performance-1.3.1 lib/standard/performance/builds_ruleset.rb
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.1.99 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.1.98 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.1.97 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb
harbr-0.1.96 vendor/bundle/ruby/3.2.0/gems/standard-performance-1.2.1/lib/standard/performance/builds_ruleset.rb