Sha256: f387061d18cf43dca198cf95d92d9102e3a555017f5060f6ceb1f41ed2aa4e11
Contents?: true
Size: 592 Bytes
Versions: 1
Compression:
Stored size: 592 Bytes
Contents
# frozen_string_literal: true module Attractor class JsCalculator < BaseCalculator def initialize(file_prefix: '', ignores: '', minimum_churn_count: 3, start_ago: 365 * 5) super(file_prefix: file_prefix, ignores: ignores, file_extension: '(js|jsx)', minimum_churn_count: minimum_churn_count, start_ago: start_ago) @type = "JavaScript" end def calculate super do |change| complexity, details = JSON.parse(`node #{__dir__}/../../../dist/calculator.bundle.js #{Dir.pwd}/#{change[:file_path]}`) [complexity, details] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
attractor-javascript-0.2.0 | lib/attractor/calculators/js_calculator.rb |