Module: Skunk::Command::Shareable

Included in:
Compare, Default
Defined in:
lib/skunk/commands/shareable.rb

Overview

This is a module that will be used for sharing reports to a server

Instance Method Summary collapse

Instance Method Details

#share(reporter) ⇒ Object

It shares the report using SHARE_URL or skunk.fastruby.io. It will post all results in JSON format and return a status message.

:reek:FeatureEnvy

Parameters:



12
13
14
15
16
# File 'lib/skunk/commands/shareable.rb', line 12

def share(reporter)
  sharer = Skunk::Command::StatusSharer.new(@options)
  sharer.status_reporter = reporter
  sharer.share
end

#sharing?Boolean

service

Returns:

  • (Boolean)

    If the environment is set to share to an external



20
21
22
# File 'lib/skunk/commands/shareable.rb', line 20

def sharing?
  ENV["SHARE"] == "true"
end