meissadia/tumblr_draftking

View on GitHub
lib/draftking/constants.rb

Summary

Maintainability
A
0 mins
Test Coverage
module DK
  # Posts
  DRAFT   = 'draft'.freeze
  QUEUE   = 'queue'.freeze
  PUBLISH = 'published'.freeze
  VALID_STATE = [DRAFT, QUEUE, PUBLISH].freeze

  # Post
  HTML_TAG_PATTERN = /<[\/]?[\w\d]+\s?(?:[\w\d\-]+=[^>]*>\s?)*>?/

  # Config
  CONFIG_FILENAME = '.dkconfig'.freeze
  VALID_KEYS = %w(consumer_key consumer_secret oauth_token oauth_token_secret).freeze

  # Credit Tag
  CREDIT_TAG = 'DraftKing for Tumblr'.freeze

  # Scaling
  MAX_THREADS = 3
  MAX_RETRY   = 3

  # PostReporter
  REPORT_TITLE  = 'Post Report'.freeze
  REPORT_FIELDS = %w(id state comment tags).freeze
  REPORT_SIM    = '(SIMULATION)'.freeze

  # Uploads
  UPLOAD_FIELDS = %w(count line file caption status).freeze
end