<commit_before>Coughdrop::RESERVED_ROUTES = [
  'admin', 'etc', 'settings', 'status', 'reports', 'stats', 'search', 
  'messages', 'inbox', 'log', 'logs', 'session', 'sessions', 'imports', 
  'boards', 'users', 'groups', 'organizations', 'pages', 'people', 'videos', 
  'root', 'www', 'add', 'self', 'files', 'feeds', 
  'dev', 'auth', 'config', 'jobs', 'ssl', 
  'api', 'account', 'accounts', 'oauth', 'oauth_suggess', 'token', 
  'login', 'logout', 'register', 'profile', 'forgot_password', 
  'support', 'help', 'forum', 'talk', 'chat', 'feedback', 'faq', 
  'about', 'contact', 'info', 'docs', 'purchase', 'pricing', 'careers', 
  'news', 'styleguide', 'tour', 'compare', 'guides', 'partners', 
  'privacy', 'terms', 'hipaa', 'accessibility', 
  'js', 'css', 'scripts', 'script', 'pics', 'images',
  'find', 'unknown', 'nobody'
]
require 'resque/server'

Coughdrop::Application.routes.draw do
  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  ember_handler = 'boards#index'
  board_id_regex = /[a-zA-Z0-9_-]+\/[a-zA-Z0-9_-]+|\d+_\d+/
  user_id_regex = /[a-zA-Z0-9_-]+/

  protected_resque = Rack::Auth::Basic.new(Resque::Server.new) do |username, password|
    u = User.find_by(:user_name => username)
    u && u.settings['admin'] && u.valid_password?(password)
  end
  mount protected_resque, :at => "/resque"

  root ember_handler
  get '/cache' => 'boards#cache'
  get '/privacy' => 'boards#privacy'
  get '/terms' => 'boards#terms'
  get '/jobs' => 'boards#jobs'
  
  # TODO: need a simple page that everyone can add as iframe that includes manifest link
  # if Rails.env.production?
  # TODO: need to catch the update event to post a note encouraging the user to reload
    offline = Rack::Offline.configure :cache_interval => 120 do
      cache ActionController::Base.helpers.asset_path("application.css")
      cache ActionController::Base.helpers.asset_path("application.js")
      cache "/fonts/glyphicons-halflings-regular.eot"
      cache "/fonts/glyphicons-halflings-regular.svg"
      cache "/fonts/glyphicons-halflings-regular.ttf"
      cache "/fonts/glyphicons-halflings-regular.woff"
      cache "/images/star.png"
      cache "/images/logo-small.png"
      cache "/images/logo-big.png"
      cache "/images/star_gray.png"
      cache "/images/folder.png"
      cache "/images/spinner.gif"
      cache "/images/talk.png"
      cache "/images/link.png"
      cache "/images/video.svg"
      cache "/images/app.png"
      cache "/images/microphone.svg"
      cache "/images/upload.svg"
      cache "/images/camera.svg"
      cache "/images/delete.svg"
      cache "/images/square.svg"
      cache "/images/cc.png"
      cache "/images/pd.png"
      cache "/images/unknown_action.png"
      cache "/images/settings.png"
      cache "/images/jquery.minicolors.png"
      cache "/offline"
      # cache other assets

      fallback({"/" => "/offline"})
      fallback({"/api/" => "/offline.json"})

      network "*"  
    end<commit_msg>add new images to cache manifest<commit_after>Coughdrop::RESERVED_ROUTES = [
  'admin', 'etc', 'settings', 'status', 'reports', 'stats', 'search', 
  'messages', 'inbox', 'log', 'logs', 'session', 'sessions', 'imports', 
  'boards', 'users', 'groups', 'organizations', 'pages', 'people', 'videos', 
  'root', 'www', 'add', 'self', 'files', 'feeds', 
  'dev', 'auth', 'config', 'jobs', 'ssl', 
  'api', 'account', 'accounts', 'oauth', 'oauth_suggess', 'token', 
  'login', 'logout', 'register', 'profile', 'forgot_password', 
  'support', 'help', 'forum', 'talk', 'chat', 'feedback', 'faq', 
  'about', 'contact', 'info', 'docs', 'purchase', 'pricing', 'careers', 
  'news', 'styleguide', 'tour', 'compare', 'guides', 'partners', 
  'privacy', 'terms', 'hipaa', 'accessibility', 
  'js', 'css', 'scripts', 'script', 'pics', 'images',
  'find', 'unknown', 'nobody'
]
require 'resque/server'

Coughdrop::Application.routes.draw do
  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  ember_handler = 'boards#index'
  board_id_regex = /[a-zA-Z0-9_-]+\/[a-zA-Z0-9_-]+|\d+_\d+/
  user_id_regex = /[a-zA-Z0-9_-]+/

  protected_resque = Rack::Auth::Basic.new(Resque::Server.new) do |username, password|
    u = User.find_by(:user_name => username)
    u && u.settings['admin'] && u.valid_password?(password)
  end
  mount protected_resque, :at => "/resque"

  root ember_handler
  get '/cache' => 'boards#cache'
  get '/privacy' => 'boards#privacy'
  get '/terms' => 'boards#terms'
  get '/jobs' => 'boards#jobs'
  
  # TODO: need a simple page that everyone can add as iframe that includes manifest link
  # if Rails.env.production?
  # TODO: need to catch the update event to post a note encouraging the user to reload
    offline = Rack::Offline.configure :cache_interval => 120 do
      cache ActionController::Base.helpers.asset_path("application.css")
      cache ActionController::Base.helpers.asset_path("application.js")
      cache "/fonts/glyphicons-halflings-regular.eot"
      cache "/fonts/glyphicons-halflings-regular.svg"
      cache "/fonts/glyphicons-halflings-regular.ttf"
      cache "/fonts/glyphicons-halflings-regular.woff"
      cache "/images/star.png"
      cache "/images/logo-small.png"
      cache "/images/logo-big.png"
      cache "/images/star_gray.png"
      cache "/images/folder.png"
      cache "/images/spinner.gif"
      cache "/images/talk.png"
      cache "/images/link.png"
      cache "/images/video.svg"
      cache "/images/app.png"
      cache "/images/microphone.svg"
      cache "/images/upload.svg"
      cache "/images/camera.svg"
      cache "/images/delete.svg"
      cache "/images/square.svg"
      cache "/images/cc.png"
      cache "/images/pd.png"
      cache "/images/unknown_action.png"
      cache "/images/settings.png"
      cache "/images/jquery.minicolors.png"
      cache "/images/web_version.svg"
      cache "/images/ios_app_store.svg"
      cache "/images/google_play.png"
      cache "/offline"
      # cache other assets

      fallback({"/" => "/offline"})
      fallback({"/api/" => "/offline.json"})

      network "*"  
    end
{'fraction_non_alphanumeric': 0.18183277162574227, 'fraction_numerical': 0.002888781896966779, 'mean_word_length': 3.429282160625444, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1598394', 'n_tokens_mistral': 2166, 'n_tokens_neox': 2075, 'n_words': 490}