<commit_before>class SysRouter < AweSim::Router
  # given app string "dashboard"
  # return url for app to access
  # FIXME: we should derive this from the nginx_stage gem
  def url_for_dev_app(app)
    raise "sys owner has shared apps only"
  end

  # given app string "dashboard"
  # and owner "efranz" return the url
  def url_for_shared_app(app)
    "/pun/sys/#{app}"
  end

  # FIXME: to make this "relative to the dashboard deployment"
  # we could just specify the "shared apps path" as being the parent
  # directory of the Rails.root directory for the dashboard
  def shared_apps_path
    "/var/www/docroot/ood/apps/sys"
  end

  def dev_apps_path
    raise "sys owner has shared apps only"
  end

  def setup_access_to_apps_of(user: nil)
    # nothing to do here!
  end
end
<commit_msg>add comment<commit_after>class SysRouter < AweSim::Router
  # given app string "dashboard"
  # return url for app to access
  # FIXME: we should derive this from the nginx_stage gem
  def url_for_dev_app(app)
    raise "sys owner has shared apps only"
  end

  # given app string "dashboard"
  # and owner "efranz" return the url
  # FIXME: we could have /pun/sys be /pun/#{user} and then use the
  # nginx_config to determine whether the apps are user specific or fixed
  # deployment locations so that if later we had a /pun/totalsim that would
  # be fixed like /pun/sys but separate from a user's shared apps i.e. /pun/usr
  # or better... each router is for a single set of apps.
  # So instead of having a router define both shared and dev apps, you have 2
  # routers: one for user shared apps, one for dev apps, one for system
  # installed apps. This is actually a better approach
  def url_for_shared_app(app)
    "/pun/sys/#{app}"
  end

  # FIXME: to make this "relative to the dashboard deployment"
  # we could just specify the "shared apps path" as being the parent
  # directory of the Rails.root directory for the dashboard
  def shared_apps_path
    "/var/www/docroot/ood/apps/sys"
  end

  def dev_apps_path
    raise "sys owner has shared apps only"
  end

  def setup_access_to_apps_of(user: nil)
    # nothing to do here!
  end
end

{'fraction_non_alphanumeric': 0.06790697674418604, 'fraction_numerical': 0.00046511627906976747, 'mean_word_length': 3.363083164300203, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1039318', 'n_tokens_mistral': 685, 'n_tokens_neox': 665, 'n_words': 291}