Sha256: 36ee20069d973de59cd63b605b02dadb880846669a0c1ab87cf79bb28d0998b4

Contents?: true

Size: 759 Bytes

Versions: 1

Compression:

Stored size: 759 Bytes

Contents

# frozen_string_literal: true

module Skunk
  module Command
    # This is a module that will be used for sharing reports to a server
    module Shareable
      # It shares the report using SHARE_URL or https://skunk.fastruby.io. It
      # will post all results in JSON format and return a status message.
      #
      # @param [Skunk::Command::StatusReporter] A status reporter with analysed modules
      # :reek:FeatureEnvy
      def share(reporter)
        sharer = Skunk::Command::StatusSharer.new(@options)
        sharer.status_reporter = reporter
        sharer.share
      end

      # @return [Boolean] If the environment is set to share to an external
      # service
      def sharing?
        ENV["SHARE"] == "true"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skunk-0.5.3 lib/skunk/commands/shareable.rb