Sha256: 20c7c6dcd2011904a495eaa4143403fdd9e1c706c8257ac547a4ebb48f0a0221

Contents?: true

Size: 818 Bytes

Versions: 1

Compression:

Stored size: 818 Bytes

Contents

# frozen_string_literal: true

module Skunk
  module Cli
    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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skunk-0.5.2 lib/skunk/cli/commands/shareable.rb