Sha256: e9eca5286c527fb7b5ab941c3a2339889356cb95f7b64d3541ef8f416efda691

Contents?: true

Size: 1.62 KB

Versions: 5

Compression:

Stored size: 1.62 KB

Contents

#!/usr/bin/env ruby
require 'optparse'

check_comments = false
check_followers = false
check_org_comments = false
historical_import = false

options = {}
choices = OptionParser.new do |opts|
  opts.banner = "Usage: dev_orbit --check-comments"
  opts.on("-h", "--help", "Prints help instructions") do
    puts opts
    exit
  end
  opts.on("--check-comments", "Check for new DEV comments") do
    check_comments = true
  end
  opts.on("--check-followers", "Check for new DEV followers") do
    check_followers = true
  end
  opts.on("--check-organization-comments", "Check for new DEV comments for an organization") do
    check_org_comments = true
  end
  opts.on("--historical-import", "Performa historical import of all new DEV comments") do
    historical_import = true
  end
end.parse!

$LOAD_PATH.unshift(File.expand_path('../lib/dev_orbit', __dir__))

require_relative '../lib/dev_orbit'
require_relative '../scripts/check_comments'
require_relative '../scripts/check_followers'
require_relative '../scripts/check_org_comments'

if check_comments
  puts "Checking for new DEV comments within the past day and posting them to your Orbit workspace..."
  ARGV[0] = 'render'
  ARGV[1] = historical_import
  DevOrbit::Scripts::CheckComments.start(ARGV)
end

if check_followers
  puts "Checking for new DEV followers posting them to your Orbit workspace..."
  ARGV[0] = 'render'
  DevOrbit::Scripts::CheckFollowers.start(ARGV)
end

if check_org_comments
  puts "Checking for new DEV organization comments and posting them to your Orbit workspace..."
  ARGV[0] = 'render'
  ARGV[1] = historical_import
  DevOrbit::Scripts::CheckOrgComments.start(ARGV)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dev_orbit-0.5.2 bin/dev_orbit
dev_orbit-0.5.1 bin/dev_orbit
dev_orbit-0.5.0 bin/dev_orbit
dev_orbit-0.4.1 bin/dev_orbit
dev_orbit-0.4.0 bin/dev_orbit