Gerrit: Clean up msg formatting

Gerrit: Clean up msg formatting

Produce "nicer" messages for events and protect against unexpected data
from killing Hubot.

--- src/scripts/gerrit.coffee
+++ src/scripts/gerrit.coffee
@@ -4,6 +4,9 @@
 # hubot gerrit search <query> - Search Gerrit for changes - the query should follow the normal Gerrit query rules.
 # hubot gerrit (ignore|report) events for (project|user|event) <thing> - Tell Hubot how to report Gerrit events.
 #
+
+cp = require "child_process"
+url = require "url"

 # Required - The SSH URL for your Gerrit server.
 sshUrl = process.env.HUBOT_GERRIT_SSH_URL || ""
@@ -13,38 +16,26 @@
 #   To disable event stream spam, use the value "disabled"
 eventStreamRooms = process.env.HUBOT_GERRIT_EVENTSTREAM_ROOMS

-cp = require "child_process"
-url = require "url"
+# TODO: Make these template driven with env-var overrides possible.
+# See the following for descriptions of the input JSON data:
+# http://gerrit-documentation.googlecode.com/svn/Documentation/2.4/json.html
+# http://gerrit-documentation.googlecode.com/svn/Documentation/2.4/cmd-stream-events.html
+formatters =
+  queryResult:          (json) -> "'#{json.change.subject}' for #{json.change.project}/#{json.change.branch} by #{extractName json.change} on #{formatDate json.change.lastUpdated}: #{json.change.url}"
+  events:
+    "patchset-created": (json) -> "#{extractName json} uploaded patchset #{json.patchSet.number} of '#{json.change.subject}' for #{json.change.project}/#{json.change.branch}: #{json.change.url}"
+    "change-abandoned": (json) -> "#{extractName json} abandoned '#{json.change.subject}' for #{json.change.project}/#{json.change.branch}: #{json.change.url}"
+    "change-restored":  (json) -> "#{extractName json} restored '#{json.change.subject}' for #{json.change.project}/#{json.change.branch}: #{json.change.url}"
+    "change-merged":    (json) -> "#{extractName json} merged patchset #{json.patchSet.number} of '#{json.change.subject}' for #{json.change.project}/#{json.change.branch}: #{json.change.url}"
+    "comment-added":    (json) -> "#{extractName json} reviewed patchset #{json.patchSet.number} (#{extractReviews json}) of '#{json.change.subject}' for #{json.change.project}/#{json.change.branch}: #{json.change.url}"
+    "ref-updated":      (json) -> "#{extractName json} updated reference #{json.refUpdate.project}/#{json.refUpdate.refName}"

-# Format JSON query result (see http://gerrit-documentation.googlecode.com/svn/Documentation/2.4/json.html#change)
-formatQueryResult = (r) ->
-  updated = new Date(r.lastUpdated * 1000).toDateString()
-  "'#{r.subject}' for #{r.project}/#{r.branch} by #{extractName r} on #{updated}: #{r.url}"
-
-# Format JSON event data (see http://gerrit-documentation.googlecode.com/svn/Documentation/2.4/cmd-stream-events.html)
-formatEvent = (e) ->
-  switch e.type
-    when "patchset-created" then formatPatchsetEvent "New patchset", e
-    when "change-abandoned" then formatPatchsetEvent "Patchset abandoned", e
-    when "change-restored"  then formatPatchsetEvent "Patchset restored", e
-    when "change-merged"    then formatPatchsetEvent "Patchset merged", e
-    when "comment-added"    then formatPatchsetEvent "New comments", e
-    when "ref-updated"      then "Ref updated - #{extractProject e}/#{e.refUpdate.refName} by #{extractName e}"
-    else null
-
-formatPatchsetEvent = (type, e) ->
-  "#{type} - '#{e.change.subject}' for #{extractProject e}/#{e.change.branch} by #{extractName e}: #{e.change.url}"
-
-# Format name given best available data. This tries to find an 'account' object
-# given either a 'change' object or a gerrit event-stream object. See...
-# - http://gerrit-documentation.googlecode.com/svn/Documentation/2.4/json.html#account
-# - http://gerrit-documentation.googlecode.com/svn/Documentation/2.4/json.html#change
-# - http://gerrit-documentation.googlecode.com/svn/Documentation/2.4/cmd-stream-events.html
+formatDate = (seconds) -> new Date(seconds * 1000).toDateString()
 extractName = (json) ->
   account = json.uploader || json.abandoner || json.restorer || json.submitter || json.author || json.owner
   account?.name || account?.email || "Gerrit"
-
-extractProject = (json) -> (json.change || json.refUpdate).project
+extractReviews = (json) ->
+  ("#{a.description}=#{a.value}" for a in json.approvals).join ","

 module.exports = (robot) ->
   gerrit = url.parse sshUrl
@@ -68,7 +59,7 @@
       else if status.rowCount == 0
         msg.send "Gerrit didn't find anything matching your query"
       else
-        msg.send formatQueryResult r for r in results when r.id
+        msg.send formatters.queryResult change: r for r in results when r.id

 ignoreOrReportEventsMe = (robot, gerrit) -> (msg) ->
   type = msg.match[2].toLowerCase()
@@ -98,16 +89,27 @@

   isIgnored = (type, thing) -> (t for t in ignoresOfType robot, type when t is thing).length != 0
   isWanted = (event) -> !(
-    isIgnored("project", extractProject event) ||
+    isIgnored("project", (event.change || event.refUpdate).project) ||
     isIgnored("user", extractName event) ||
     isIgnored("event", event.type))

   streamEvents.stderr.on "data", (data) ->
     robot.logger.info "Gerrit stream-events: #{data}"
   streamEvents.stdout.on "data", (data) ->
-    json = JSON.parse data
-    msg = formatEvent json
-    if msg == null
+    robot.logger.debug "Gerrit stream-events: #{data}"
+    json = try
+      JSON.parse data
+    catch error
+      robot.logger.error "Gerrit stream-events: Error parsing Gerrit JSON. Error=#{error}, Event=#{data}"
+      null
+    return unless json
+    formatter = formatters.events[json.type]
+    msg = try
+      formatter json if formatter
+    catch error
+      robot.logger.error "Gerrit stream-events: Error formatting event. Error=#{error}, Event=#{data}"
+      null
+    if formatter == null
       robot.logger.info "Gerrit stream-events: Unrecognized event #{data}"
     else if msg && isWanted json
       # Bug in messageRoom? Doesn't work with multiple rooms


Update generator to enable new functions

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/fulcrumapp/fulcrum-expressions.git/'


Add self-upgrade script

Add self-upgrade script

error: pathspec 'scripts/self-upgrade.coffee' did not match any file(s) known to git

--- scripts/self-upgrade.coffee
+++ scripts/self-upgrade.coffee
@@ -0,0 +1,24 @@
+# Description:
+#   Allows hubot to upgrade himself and reload scripts.
+#
+# Commands:
+#   hubot upgrade|reboot|restart|power up|level up|learn.
+
+module.exports = (robot) ->
+  robot.respond /(upgrade|reboot|restart|power up|level up|learn)$/i, (msg) ->
+    @exec = require('child_process').exec
+    path = require('path').resolve(__dirname, '..')
+    command = 'cd ' + path + ' && git pull && npm install && forever restart 0'
+
+    @exec command, (error, stdout, stderr) ->
+      msg.send error if error
+      msg.send stdout if stdout
+      msg.send stderr if stderr
+
+    command = 'cd ' + path + ' && git pull origin master && forever restart 0'
+
+    msg.send 'BRB, bathroom break...'
+    @exec command, (error, stdout, stderr) ->
+      msg.send error if error
+      msg.send stdout if stdout
+      msg.send stderr if stderr


Add all category to every user

Add all category to every user

[#100417500]

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/netguru/people.git/'


Implement value setter NOTE: this code is bad and needs to be refactored

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/artsyca/emberui.git/'


add back in getter and setter comments

add back in getter and setter comments


Add new device type

Add new device type

Signed-off-by: Theodor Gherzan <be3f40ffe21d83aefcbc279c996fd6bca5445244@resin.io>

error: pathspec 'beaglebone-green-wifi.coffee' did not match any file(s) known to git

--- beaglebone-green-wifi.coffee
+++ beaglebone-green-wifi.coffee
@@ -0,0 +1,53 @@
+deviceTypesCommon = require 'resin-device-types/common'
+{ networkOptions, commonImg, instructions } = deviceTypesCommon
+
+BBB_FLASH = 'Power up the <%= TYPE_NAME %> while holding down the small button near the SD slot.
+You need to keep it pressed until the blue LEDs start flashing wildly.'
+
+postProvisioningInstructions = [
+	instructions.BOARD_SHUTDOWN
+	instructions.REMOVE_INSTALL_MEDIA
+	instructions.BOARD_REPOWER
+]
+
+module.exports =
+	slug: 'beaglebone-green-wifi'
+	name: 'BeagleBone Green Wireless'
+	arch: 'armv7hf'
+	state: 'experimental'
+
+	stateInstructions:
+		postProvisioning: postProvisioningInstructions
+
+	instructions: [
+		instructions.ETCHER_SD
+		instructions.EJECT_SD
+		instructions.FLASHER_WARNING
+		BBB_FLASH
+	].concat(postProvisioningInstructions)
+
+	gettingStartedLink:
+		windows: 'http://docs.resin.io/#/pages/installing/gettingStarted-BBB.md#windows'
+		osx: 'http://docs.resin.io/#/pages/installing/gettingStarted-BBB.md#on-mac-and-linux'
+		linux: 'http://docs.resin.io/#/pages/installing/gettingStarted-BBB.md#on-mac-and-linux'
+
+	supportsBlink: true
+
+	yocto:
+		machine: 'beaglebone-green-wifi'
+		image: 'resin-image-flasher'
+		fstype: 'resin-sdcard'
+		version: 'yocto-jethro'
+		deployArtifact: 'resin-image-flasher-beaglebone-green-wifi.resin-sdcard'
+		compressed: true
+
+	options: [ networkOptions.group ]
+
+	configuration:
+		config:
+			partition:
+				primary: 4
+				logical: 1
+			path: '/config.json'
+
+	initialization: commonImg.initialization


JS to auto show/hide category fields

JS to auto show/hide category fields

error: pathspec 'app/assets/javascripts/catalog_admin/items.coffee' did not match any file(s) known to git

--- app/assets/javascripts/catalog_admin/items.coffee
+++ app/assets/javascripts/catalog_admin/items.coffee
@@ -0,0 +1,19 @@
+init = ->
+  $form = $("form.edit_item, form.new_item")
+  hide_all_category_fields($form)
+  $choice_sets = $form.find("[data-choice-category]").parent("select")
+  $choice_sets.each ->
+    show_selected_category_fields($form, $(this))
+  $choice_sets.on "change", (evt)->
+    hide_all_category_fields($form)
+    show_selected_category_fields($form, $(this))
+
+show_selected_category_fields = ($form, $choice_set)->
+  $choice = $choice_set.find("option:selected")
+  category = $choice.data("choice-category")
+  $form.find("[data-field-category=#{category}]").parent(".form-group").show()
+
+hide_all_category_fields = ($form)->
+  $form.find("[data-field-category]").parent(".form-group").hide()
+
+$(document).ready(init)


Remove redundant check for number of cards

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lonelyplanet/rizzo.git/'


fix buildSettings

fix buildSettings

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/prognostikos/uploadcare-widget.git/'


tests fixed

tests fixed

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/keboola/kbc-ui-orchestrators.git/'


Sent entity/show for children ids and waited until parent was rendered.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/urbanetic/bismuth-schema.git/'


Nodejs Web Server: add createssotoken.coffee

error: pathspec 'servers/lib/server/handlers/createssotoken.coffee' did not match any file(s) known to git

--- servers/lib/server/handlers/createssotoken.coffee
+++ servers/lib/server/handlers/createssotoken.coffee
@@ -0,0 +1,82 @@
+
+{ daisy } = require 'bongo'
+
+module.exports = (req, res, next) ->
+
+  { JAccount, JGroup, JUser, JApiToken } = (require '../bongo').models
+
+  # validating req params
+  { error, token, username } = validateRequest req
+  return res.status(error.statusCode).send(error.message)  if error
+
+  account  = null
+  apiToken = null
+
+  queue = [
+
+    ->
+      # checking if token is valid
+      JApiToken.one { code : token }, (err, apiToken_) ->
+        return res.status(500).send 'an error occurred'  if err
+        return res.status(400).send 'invalid token!'     unless apiToken_
+        apiToken = apiToken_
+        queue.next()
+
+    ->
+      # checking if user exists
+      JAccount.one { 'profile.nickname' : username }, (err, account_) ->
+        return res.status(500).send 'an error occurred'  if err
+        return res.status(400).send 'invalid username!'  unless account_
+        account = account_
+        queue.next()
+
+    ->
+      # checking if user is a member of the group of api token
+      client = { connection : { delegate : account } }
+      account.checkGroupMembership client, apiToken.group, (err, isMember) ->
+        return res.status(500).send 'an error occurred'  if err
+        return res.status(400).send 'invalid request'    unless isMember
+        queue.next()
+
+    ->
+      # creating and sending an SSO token
+      data    = { username, group : apiToken.group }
+      options = { expiresInMinutes : 60 }
+      token   = JUser.createJWT data, options
+
+      return res.status(200).send { token }
+
+  ]
+
+  daisy queue
+
+
+
+validateRequest = (req) ->
+
+  { username } = req.body
+
+  errors =
+    invalidRequest      :
+      statusCode        : 400
+      message           : 'invalid request'
+    unauthorizedRequest :
+      statusCode        : 401
+      message           : 'unauthorized request'
+
+  unless username
+    return { error : errors.invalidRequest }
+
+  unless req.headers?.authorization
+    return { error : errors.unauthorizedRequest }
+  parts = req.headers.authorization.split ' '
+
+  unless parts.length is 2 and parts[0] is 'Bearer'
+    return { error : errors.unauthorizedRequest }
+  token = parts[1]
+
+  unless typeof token is 'string'
+    return { error : errors.unauthorizedRequest }
+
+  return { error : null, token, username }
+


Remove unused bootstrapper

Remove unused bootstrapper

--- src/single-window-bootstrap.coffee
+++ src/single-window-bootstrap.coffee
@@ -1,3 +0,0 @@
-# Bootstrap the app in a single window mode
-require 'atom-bootstrap.coffee'
-require 'window-bootstrap.coffee'


Add in the meat

Add in the meat

error: pathspec 'script/hubot-influxdb.coffee' did not match any file(s) known to git

--- script/hubot-influxdb.coffee
+++ script/hubot-influxdb.coffee
@@ -0,0 +1,310 @@
+# Description:
+#   Example scripts for you to examine and try out.
+#
+# Notes:
+#   They are commented out by default, because most of them are pretty silly and
+#   wouldn't be useful and amusing enough for day to day huboting.
+#   Uncomment the ones you want to try and experiment with.
+#
+#   These are from the scripting documentation: https://github.com/github/hubot/blob/master/docs/scripting.md
+
+influx = require('../node_modules/influx')
+redis = require('../node_modules/redis')
+
+OPEN = 0
+ACK  = 1
+
+RANDOM_ID_MAX = 1001
+
+CONFIG_FILE = "../hubot-influx-config.json"
+
+_1_HOUR_MS = 1000*60*60
+HOURS_BEFORE_REPOST = 3
+HOURS_BEFORE_ACK_REPOST = 12
+
+ALERT_CHECK_INTERVAL = 1000*60
+
+config = require(CONFIG_FILE)
+
+show_help = (msg) ->
+    commands = [
+        "influx alerts {off|ok} - toggled automatic alert checking off or on"
+        "influx show - list available query aliases"
+        "influx run QUERY_NAME - run a query alias"
+        "influx query \"QUERY\" [DATABASE] - run a custom query"
+        "influx alerts check- force hubot to run the alert queries. Useful for debugging"
+        "influx claim ID - claim an alert and stop it from posting the same alert for #{HOURS_BEFORE_ACK_REPOST} hour(s) "
+    ]
+    default_db = config.default_database
+
+    if !default_db
+        default_db = "None Set"
+
+    buf = "Influx for Hubot\n\n"
+    buf += "Commands: \n"
+    buf += commands.join("\n")
+    buf += "\n\n"
+    buf += "Default Database: #{default_db}"
+
+    msg.send buf
+
+new_alert = (robot, msg, query_name, data, columns) ->
+    alert_key = _form_alert_key(query_name, data, columns, [])
+
+    #Used to lookup the hashed key when a user acks an alert
+    id = Math.floor(Math.random()*RANDOM_ID_MAX)
+    alert_id = "incident_#{id}"
+    robot.brain.set(alert_id, alert_key)
+
+#    msg.send "Setting #{alert_id} #{alert_key}"
+
+    database =  find_query_db(query_name)
+
+    query_config = config.queries[database][query_name]
+
+    event =
+        status: OPEN
+        assigned: 0
+        ts: (new Date).getTime();
+
+    serialized = JSON.stringify(event)
+    robot.brain.set(alert_key, serialized)
+
+    buf = make_alert_message(query_config, data, columns, msg)
+    buf += "\n"
+    buf += "To claim this alert use the id #{id}. \"influx claim #{id}\"\n"
+    msg.send buf
+
+
+make_alert_message = (query_object, data, columns, msg) ->
+    query_columns = query_object.alert_msg.columns
+    template = query_object.alert_msg.template
+    for col,i in query_object.alert_msg.columns
+        template = template.replace("{#{i}}", data[columns.indexOf(col)])
+    return template
+
+hashCode = (str) ->
+    hash = 0
+    if (str.length == 0)
+        return hash
+    for i in str
+        char = str.charCodeAt(i)
+        hash = ((hash<<5)-hash)+char
+        hash = hash & hash
+
+    hash
+
+
+_form_alert_key = (query_name, points, columns, ignore_fields) ->
+
+    if !ignore_fields
+        ignore_fields = []
+
+    #Default ignore
+    ignore_fields.push("metric")
+
+    hash_points = []
+    for col,i in columns
+        if col in ignore_fields
+            continue
+        hash_points.push points[i]
+
+    hashCode(query_name + hash_points.join(""))
+
+ack_alert = (robot, msg, id, user) ->
+    alert_key = robot.brain.get("incident_#{id}")
+    if !alert_key
+        msg.send "Didn't recognize alert with id #{id}. Please try again."
+    else
+        alert_str = robot.brain.get(alert_key)
+        if !alert_str
+            msg.send "There was an error retrieving this alert"
+        else
+            alert = JSON.parse(alert_str)
+            alert.ack_ts = (new Date).getTime()
+            alert.ack_user = user
+            alert.status = ACK
+            robot.brain.set(alert_key, JSON.stringify(alert))
+            buf= "Thank you #{user} for handling alert #{id}!\n"
+            buf += "You get a gold star (goldstar)."
+            msg.send buf
+
+process_alert = (robot, msg, query_name, data, columns) ->
+    alert_key = _form_alert_key(query_name, data, columns, [])
+    alert = robot.brain.get(alert_key)
+    if alert
+        alert_obj = JSON.parse(alert)
+        #If it's been acknowledged wait 6 hours before reposting
+        if alert_obj.status == ACK
+            ack_ts = alert_obj.ack_ts
+            cur_ts = (new Date).getTime()
+            if cur_ts - ack_ts > _1_HOUR_MS*HOURS_BEFORE_ACK_REPOST
+                 new_alert(robot, msg, query_name, data, columns)
+#            else
+#                 msg.send "Not sending, acked"
+
+        else
+            created_ts = alert_obj.ts
+            cur_ts = (new Date).getTime()
+            if cur_ts - created_ts > _1_HOUR_MS*HOURS_BEFORE_REPOST
+                 new_alert(robot, msg, query_name, data, columns)
+            else
+#                 msg.send "Not sending repeat"
+
+    else
+        new_alert(robot, msg, query_name, data, columns)
+
+
+influx_clients = {}
+redis_client = false
+
+connect = ->
+    #Client for each database
+    influx_connect_config = config.connection
+    for database in Object.keys(config.queries)
+        if (!influx_clients[database])
+            influx_connect_config['database'] = database
+            influx_clients[database] = influx(influx_connect_config)
+    if (!redis_client)
+        redis_client = redis.createClient()
+
+print_queries = (msg) ->
+    query_config = config.queries
+    buf = ""
+    for database in Object.keys(query_config)
+        buf += "Database: #{database}\n"
+        queries = query_config[database]
+        for query_name in Object.keys(queries)
+            query = queries[query_name].query
+            buf += "\t#{query_name}:\t#{query}\n"
+    msg.send buf
+
+user_query = (query_str, database, msg) ->
+    influx_connect_config = config.connection
+    if !influx_clients[database]
+        influx_connect_config['database'] = database
+        influx_clients[database] = influx(influx_connect_config)
+
+    influx_clients[database].query(query_str, (e, return_series) ->
+        msg.send format_query_result(return_series)
+    )
+
+find_query_db = (query_name) ->
+    query_config = config.queries
+    query_db = false
+    for database in Object.keys(query_config)
+        for q in Object.keys(query_config[database])
+            if (query_name == q)
+                query_db = database
+    return query_db
+
+run_query = (query_name, msg) ->
+    query_config = config.queries
+    query_db = find_query_db(query_name)
+
+    if !query_db
+        buf = "Could not find #{query_name}.\n"
+        buf += "To see available queries run \"influx show\"\n"
+        buf += "To run an arbitrary query use \"influx query\"\n"
+        msg.send buf
+    else
+        query = query_config[query_db][query_name].query
+        influx_clients[query_db].query(query, (e, return_series) ->
+            msg.send format_query_result(return_series)
+        )
+
+format_query_result = (query_json) ->
+    for result in query_json
+        columns = result.columns
+        data = result.points
+        buf = columns.join("\t\t") + "\n"
+        for row in data
+            buf += row.join("\t\t") + "\n"
+
+    buf += "\n"
+    return buf
+
+
+check_alert = (robot, msg, query_name, query, database) ->
+    influx_clients[database].query(query, (e, results) ->
+        for data in results
+            columns = data.columns
+            for result in data.points
+                process_alert(robot, msg, query_name, result, columns)
+    )
+
+
+check_for_alerts = (robot, msg) ->
+    connect()
+    for database in Object.keys(config.queries)
+        for query_name in Object.keys(config.queries[database])
+            query_config = config.queries[database][query_name]
+            if query_config.alert
+                query = query_config.query
+                check_alert(robot, msg, query_name, query, database)
+
+module.exports = (robot) ->
+
+   alertIntervalId = false
+
+   robot.hear /influx alerts on/i, (msg) ->
+       if alertIntervalId
+           msg.send "Alert checking already on"
+           return
+
+       alertIntervalId = setInterval () ->
+           check_for_alerts(robot, msg)
+       , ALERT_CHECK_INTERVAL
+       msg.send "Alert checking toggled on (corpsethumb)"
+
+   robot.hear /influx alerts off/i, (msg) ->
+       if !alertIntervalId
+           msg.send "Alert checking already off (dealwithit)"
+           return
+       clearInterval(alertIntervalId)
+       msg.send "Alert checking toggled off (okay)"
+
+   robot.hear /influx show/i, (msg) ->
+     connect()
+     print_queries(msg)
+
+   robot.hear /influx run (.*)/i, (msg) ->
+     connect()
+     run_query(msg.match[1], msg)
+
+   robot.hear /influx query (.*)/i, (msg) ->
+     query_pat = ///\"([^\"]+)\"\s*([^\s]*)///i
+
+     msg.send msg.match[1]
+
+     query_args = msg.match[1].match query_pat
+     if !query_args
+         buf = "Badly formatted query args."
+         buf += "influx query \"QUERY\" [database]"
+         msg.send buf
+
+         return
+
+     query = query_args[1]
+     database = query_args[2]
+     if not database
+         database = config.default_database
+         if not database
+             msg.send "No Database specified and no default set. Cannot query"
+             return
+         msg.send "Using default database #{database}"
+
+     user_query(query, database, msg)
+
+   robot.hear /influx help/i, (msg) ->
+      show_help(msg)
+
+   robot.hear /influx alerts check/i, (msg) ->
+      connect()
+      check_for_alerts(robot, msg)
+
+   robot.hear /influx claim (.*)/i, (msg) ->
+       id = msg.match[1]
+       user = msg.message.user.name
+       ack_alert(robot, msg, id, user)
+


join with '' ,not ','

join with '' ,not ','

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jzwzz/wechat-sample.git/'


Smooth scroll; partial fix to race condition.

--- content_scripts/scroller.coffee
+++ content_scripts/scroller.coffee
@@ -89,13 +89,18 @@
   time = 0
   lastEvent = null
   keyHandler = null
+  keyIsDown = false

   (element, direction, amount) ->
     return unless amount

     keyHandler ?= handlerStack.push
-      keydown: -> lastEvent = event
-      keyup: -> time += 1
+      keydown: ->
+        keyIsDown = true unless event.repeat
+        lastEvent = event
+      keyup: ->
+        keyIsDown = false
+        time += 1

     unless settings.get "smoothScroll"
       # Jump scrolling.
@@ -109,7 +114,7 @@
     activationTime = ++time

     isKeyStillDown = ->
-      time == activationTime
+      time == activationTime and keyIsDown

     # Store amount's sign and make amount positive; the logic is clearer when amount is positive.
     sign = Math.sign amount


ext/edit_object: Object editor window.

ext/edit_object: Object editor window.

error: pathspec 'oghma/ext/edit_object.coffee' did not match any file(s) known to git

--- oghma/ext/edit_object.coffee
+++ oghma/ext/edit_object.coffee
@@ -0,0 +1,106 @@
+# Copyright 2013 Christopher Alfeld
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+Oghma = @Oghma ?= {}
+
+root = this
+
+# Edit Object Window
+#
+# @author Christopher Alfeld (calfeld@calfeld.net)
+# @copyright 2013 Christopher Alfeld
+Ext.define( 'Oghma.Ext.EditObject',
+  extend: 'Ext.window.Window'
+
+  # Object to edit. (Required)
+  object: {}
+
+  # Types of fields of object.
+  #
+  # Supported types are:
+  # - color
+  # - string
+  # - auto
+  types: {}
+
+  # Function to call with edited object if save is pressed. (Required0)
+  onSave: false
+
+  # Function to call if cancel is pressed. (Required)
+  onCancel: false
+
+  # See ExtJS.
+  initComponent: ->
+    Ext.apply(this,
+      width:    400
+      layout:   'fit' # XXX?
+      listeners: [
+        'close': => @onCancel()
+      ]
+    )
+
+    @callParent( arguments )
+
+    if ! @onSave
+      throw 'onSave required.'
+    if ! @onCancel
+      throw 'onCancel required.'
+
+    form_id = Heron.Util.generate_id()
+    root.debug = form = Ext.create( 'Ext.form.Panel',
+      layout: 'anchor'
+      defaults:
+        anchor: '100%'
+      buttons: [
+        {
+          text: 'Save'
+          disabled: true
+          formBind: true
+          handler: =>
+            return if ! form.getForm().isValid()
+            new_object = {}
+            for field in form.items.items
+              key = field.fieldLabel
+              new_object[key] = field.getValue()
+            @onSave( new_object )
+        },
+        {
+          text: 'Cancel'
+          handler: => @onCancel()
+        }
+      ]
+    )
+    fields = []
+    for k, v of @object
+      type = @types[k] ? 'auto'
+      switch type
+        when 'color'
+          field = Ext.create( 'Oghma.Ext.ColorField' )
+        else
+          if type != 'auto' && type != 'string'
+            throw "Unknown type: #{type}"
+          else
+            field = Ext.create( 'Ext.form.field.Text' )
+
+      Ext.apply( field,
+        fieldLabel: k
+        name:       k
+        allowBlank: false
+      )
+      field.setValue( v )
+
+      form.add( field )
+
+    @add( form )
+)


Fix HTML escaping in hipchat notifier

Fix HTML escaping in hipchat notifier

Reported by @fblee

--- plugins/hipchat/index.coffee
+++ plugins/hipchat/index.coffee
@@ -1,4 +1,5 @@
 NotificationPlugin = require "../../notification-plugin"
+Handlebars = require 'handlebars'

 class Hipchat extends NotificationPlugin
   BASE_URL = "https://api.hipchat.com/v1"
@@ -6,20 +7,26 @@
   @receiveEvent: (config, event, callback) ->
     # Build the message
     if event.error
-      # Error events
-      error_string = (event.error.exceptionClass + (if event.error.message then ": #{event.error.message}")).truncate(85)
-
-      message =  "#{event.trigger.message} in #{event.error.releaseStage} from #{event.project.name} in #{event.error.context} (details)"
-      message += "
   #{error_string}"
-      message += "
   #{@firstStacktraceLine(event.error.stacktrace)}" if event.error.stacktrace
-    else
+
+      details =
+        title: "#{event.trigger.message} in #{event.error.releaseStage}"
+        error_string: (event.error.exceptionClass + (if event.error.message then ": #{event.error.message}")).truncate(85)
+        stack_trace_line: event.error.stacktrace && @firstStacktraceLine(event.error.stacktrace)
+        project: event.project
+        error: event.error
+
+    else
+
+      details =
+        title: event.trigger.message
+
       # Non-error events
       message =  "#{event.trigger.message} from #{event.project.name}"

     # Build the payload
-    payload =
+    payload =
       from: "Bugsnag"
-      message: message
+      message: @render details
       auth_token: config.authToken
       room_id: config.roomId
       notify: config.notify || false
@@ -35,4 +42,14 @@
       .end (res) ->
         callback(res.error)

-module.exports = Hipchat+  @render: Handlebars.compile(
+    '{{title}} from {{project.name}}' +
+    '{{#if error}}' +
+      ' in {{error.context}} (details)' +
+      '
   {{error_string}}' +
+      '{{#if stack_trace_line}}
   {{stack_trace_line}}{{/if}}' +
+    '{{/if}}'
+  )
+
+
+module.exports = Hipchat


Put limit on things to be sorted

Put limit on things to be sorted

We might have to alter the queries a bit if we aren't happy with the results

--- server/queues/scoring.coffee
+++ server/queues/scoring.coffee
@@ -154,6 +154,7 @@
           .aggregate()
           .match(queryParams)
           .project(selection)
+          .limit(5000)
           .sort({'submitDate': -1})
           .skip(humanSkipCount)
           .limit(1)
@@ -168,6 +169,7 @@
             .aggregate()
             .match(queryParams)
             .project(selection)
+            .limit(5000)
             .sort({'submitDate': -1})
             .skip(ogresSkipCount)
             .limit(1)


Add error handling for redis connection

Add error handling for redis connection

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Arm1stice/prosu.git/'


Add specs for the Neat object

Add specs for the Neat object

error: pathspec 'test/units/neat.spec.coffee' did not match any file(s) known to git

--- test/units/neat.spec.coffee
+++ test/units/neat.spec.coffee
@@ -0,0 +1,57 @@
+require '../test_helper'
+
+Neat = require '../../lib/neat'
+{logger} = Neat.require 'utils/logs'
+
+describe 'Neat', ->
+  it 'should exist', ->
+    expect(Neat).toBeDefined()
+
+
+  describe '::initLogging', ->
+    beforeEach ->
+      Neat.config =
+        defaultLoggingEngine: 'foo'
+        engines:
+          logging:
+            foo: ->
+
+      spyOn(logger, 'add').andCallFake ->
+
+    it 'should have registered a listener', ->
+      Neat.initLogging()
+
+      expect(logger.add).toHaveBeenCalled()
+
+  describe '::initEnvironment', ->
+    beforeEach ->
+      spyOn(logger, 'add').andCallFake ->
+      spyOn(Neat.beforeEnvironment, 'dispatch').andCallThrough()
+      spyOn(Neat.afterEnvironment, 'dispatch').andCallThrough()
+      spyOn(Neat.beforeInitialize, 'dispatch').andCallThrough()
+      spyOn(Neat.afterInitialize, 'dispatch').andCallThrough()
+
+    it 'should have initialized the logger', (done) ->
+      Neat.initEnvironment ->
+        expect(logger.add).toHaveBeenCalled()
+        done()
+
+    it 'should set the environment', (done) ->
+      Neat.initEnvironment ->
+        expect(Neat.env).toEqual('default')
+        expect(Neat.env.default).toBeDefined()
+        done()
+
+    it 'should have triggered hooks', ->
+      Neat.initEnvironment ->
+        expect(Neat.beforeEnvironment.dispatch).toHaveBeenCalled()
+        expect(Neat.afterEnvironment.dispatch).toHaveBeenCalled()
+        expect(Neat.beforeInitialize.dispatch).toHaveBeenCalled()
+        expect(Neat.afterInitialize.dispatch).toHaveBeenCalled()
+
+    it 'should have created the config object', ->
+      Neat.initEnvironment ->
+        expect(Neat.config).toBeDefined()
+        expect(Neat.CONFIG).toBeDefined()
+
+


Restart app if tmp/restart.txt is touched

--- src/pow/server.coffee
+++ src/pow/server.coffee
@@ -1,3 +1,4 @@
+fs   = require 'fs'
 http = require 'http'
 path = require 'path'
 sys  = require 'sys'
@@ -34,6 +35,9 @@
     sys.pump pool.stdout, process.stdout
     sys.pump pool.stderr, process.stdout

+    fs.watchFile "#{root}/tmp/restart.txt", (curr, prev) ->
+      pool.quit()
+
     pool

   applicationForConfig: (config) ->


ExerciseButton specs

ExerciseButton specs

error: pathspec 'test/buttons/index.coffee' did not match any file(s) known to git

--- test/buttons/index.coffee
+++ test/buttons/index.coffee
@@ -0,0 +1,21 @@
+{Testing, expect, sinon, _} = require 'openstax-react-components/test/helpers'
+React = require 'react'
+{ExerciseButton} = require 'buttons'
+
+TestChildComponent = React.createClass
+  render: -> React.createElement('span', {}, 'i am a label')
+
+describe 'Exercise Button', ->
+  beforeEach ->
+    @props =
+      children: React.createElement(TestChildComponent)
+      onClick: sinon.spy()
+
+  it 'renders child components', ->
+    Testing.renderComponent( ExerciseButton, props: @props ).then ({dom}) ->
+      expect(dom.textContent).equal('i am a label')
+
+  it 'calls onClick callback', ->
+    Testing.renderComponent( ExerciseButton, props: @props ).then ({dom}) =>
+      Testing.actions.click dom.querySelector('span')
+      expect(@props.onClick).to.have.been.called


StaticPage: Add itemprops

StaticPage: Add itemprops

--- servers/lib/crawler/staticpages/activity.coffee
+++ servers/lib/crawler/staticpages/activity.coffee
@@ -16,7 +16,7 @@

 createCreationDate = (createdAt, slug)->
   """
-  <time class="kdview">#{createdAt}</time>
+  <time class="kdview" itemprop="dateCreated">#{createdAt}</time>
   """

 createAuthor = (accountName, nickname)->
@@ -40,7 +40,7 @@

           #{fullName}

-
#{message.body}

+
#{message.body}


added app-controller test

added app-controller test

error: pathspec 'test/unit/controller/app-controller-spec.coffee' did not match any file(s) known to git

--- test/unit/controller/app-controller-spec.coffee
+++ test/unit/controller/app-controller-spec.coffee
@@ -0,0 +1,38 @@
+define [
+  'config'
+  'angular'
+  'controller/app-controller'
+  'factory/page-title-factory'
+], (cfg, A) ->
+  describe 'App controller', () ->
+    $rootScope = null
+    $scope = null
+    createController = null
+    pageTitleFactory = null
+
+    beforeEach module cfg.ngApp
+
+    beforeEach inject ($injector) ->
+      $controller = $injector.get '$controller'
+      $rootScope = $injector.get '$rootScope'
+      pageTitleFactory = $injector.get 'pageTitleFactory'
+      $scope = $rootScope.$new()
+
+      createController = () ->
+        $controller 'appController',
+          $scope: $scope
+          pageTitleFactory: pageTitleFactory
+
+    it 'should add the header and footer partials', () ->
+      controller = createController()
+
+      expect($scope.headerPartial).toBeDefined()
+      expect($scope.footerPartial).toBeDefined()
+
+    it 'should change the title when an event is fired from pageTitleFactory', () ->
+      controller = createController()
+      title = 'foo'
+
+      pageTitleFactory.setTitle title
+
+      expect($scope.pageTitle).toContain title


tests of ViewState added

tests of ViewState added

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/roseliux/CafeTownsend-Angular-Rails.git/'


Environment: Define new action types

Environment: Define new action types

--- client/app/lib/flux/environment/actiontypes.coffee
+++ client/app/lib/flux/environment/actiontypes.coffee
@@ -37,4 +37,6 @@
   'SET_ACTIVE_INVITATION_MACHINE_ID'
   'SET_ACTIVE_LEAVING_SHARED_MACHINE_ID'

+  'GROUP_STACKS_INCONSISTENT'
+  'GROUP_STACKS_CONSISTENT'
 }


Request: Add breaking test

Request: Add breaking test

error: pathspec 'tests/suites/casper/request.coffee' did not match any file(s) known to git

--- tests/suites/casper/request.coffee
+++ tests/suites/casper/request.coffee
@@ -0,0 +1,92 @@
+#global casper
+
+#jshint strict:false
+
+SERVER = 'http://localhost:54321/'
+ORIGINAL_URL = "tests/site/index.html"
+CHANGED_URL = "tests/site/index.html?foo=bar"
+
+setToTrueOnResourceRequested = false
+setToTrueOnResourceReceived = false
+requestURLRequested = ''
+requestURLReceived = ''
+
+onResourceRequested = (casper, request) ->
+	if request.url == (SERVER + ORIGINAL_URL)
+		setToTrueOnResourceRequested = true
+		requestURLRequested = request.url
+
+onResourceRequestedWithAbort = (casper, request) ->
+	if request.url == (SERVER + ORIGINAL_URL)
+		request.abort()
+
+onResourceRequestedWithChangeURL = (casper, request) ->
+	if request.url == (SERVER + ORIGINAL_URL)
+		request.changeUrl CHANGED_URL
+
+onResourceReceived = (casper, response) ->
+	if response.url == (SERVER + ORIGINAL_URL)
+		setToTrueOnResourceReceived = true
+		requestURLReceived = response.url
+
+setUp = (test) ->
+	casper.options.onResourceRequested = onResourceRequested
+	casper.options.onResourceReceived = onResourceReceived
+	casper.start()
+
+setUpWithAbort = (test) ->
+	casper.options.onResourceRequested = onResourceRequestedWithAbort
+	casper.options.onResourceReceived = onResourceReceived
+	casper.start()
+
+setUpWithChangeURL = (test) ->
+	casper.options.onResourceRequested = onResourceRequested
+	casper.options.onResourceReceived = onResourceReceived
+	casper.start()
+
+tearDown = (test) ->
+	setToTrueOnResourceRequested = false
+	setToTrueOnResourceReceived = false
+	casper.options.onResourceRequested = null
+
+casper.test.begin "onResourceRequested tests without abort/override", 4,
+	setUp: setUp
+	tearDown: tearDown
+	test: (test) ->
+		casper.open(ORIGINAL_URL).then ->
+
+		casper.wait 3000, ->
+			test.assertEquals setToTrueOnResourceRequested, true, "Casper.options.onResourceRequested called successfully"
+			test.assertEquals requestURLRequested, SERVER+ORIGINAL_URL, "request url successfully recorded"
+			test.assertEquals setToTrueOnResourceReceived, true, "Casper.options.onResourceReceived called successfully"
+			test.assertEquals requestURLReceived, SERVER+ORIGINAL_URL, "response url successfully recorded"
+
+		casper.run ->
+			test.done()
+
+
+casper.test.begin "onResourceRequested tests with request.abort()", 1,
+	setUp: setUpWithAbort
+	tearDown: tearDown
+	test: (test) ->
+		casper.open(ORIGINAL_URL).then ->
+
+		casper.wait 3000, ->
+			test.assertNotEquals setToTrueOnResourceReceived, true, "Casper.options.onResourceReceived correctly never called"
+
+		casper.run ->
+			test.done()
+
+casper.test.begin "onResourceRequested tests with request.changeUrl()", 1,
+	setUp: setUpWithChangeURL
+	tearDown: tearDown
+	test: (test) ->
+		casper.open(ORIGINAL_URL).then ->
+
+		casper.wait 3000, ->
+			test.assertEquals requestURLReceived, SERVER+CHANGED_URL, "response url successfully changed"
+
+		casper.run ->
+			test.done()
+
+


book base

book base

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Bit18/cyoab_modular_repo.git/'


improved regexp to not replace within html tags

--- packages/rocketchat-highlight-words/client.coffee
+++ packages/rocketchat-highlight-words/client.coffee
@@ -17,9 +17,9 @@

     _.forEach to_highlight, (highlight) ->
       if not _.isBlank(highlight)
-        msg = msg.replace(new RegExp("(#{highlight})", 'gmi'), '$1')
+        msg = msg.replace(new RegExp("(\\b)(#{s.escapeRegExp(highlight)})(\\b)(?![^<]*>|[^<>]*<\\/)", 'gmi'), '$1$2$3')

     message.html = msg
     return message

-RocketChat.callbacks.add 'renderMessage', HighlightWordsClient+RocketChat.callbacks.add 'renderMessage', HighlightWordsClient


Index file read #8

Index file read #8

--- lib/services/php-proxy.coffee
+++ lib/services/php-proxy.coffee
@@ -1,10 +1,18 @@
 exec = require "child_process"
 config = require "../config.coffee"
+md5 = require 'MD5'
+fs = require 'fs'

 data =
   statics: [],
   methods: []

+###*
+ * Executes a command to PHP proxy
+ * @param  {string}  command Command to exectue
+ * @param  {boolean} async   Must be async or not
+ * @return {array}           Json of the response
+###
 execute = (command, async) ->
   return [] if data.error?

@@ -27,6 +35,7 @@
         try
           res = JSON.parse(stdout)
         catch err
+          console.log err
           res =
             error:
               message: err
@@ -37,6 +46,30 @@
         return res
       )

+###*
+ * Reads an index by its name (file in indexes/index.[name].json)
+ * @param {string} name Name of the index to read
+###
+readIndex = (name) ->
+  for directory in atom.project.getDirectories()
+    crypt = md5(directory.path)
+    path = __dirname + "/../../indexes/" + crypt + "/index." + name + ".json"
+
+    try
+      fs.accessSync(path, fs.F_OK | fs.R_OK)
+    catch err
+      return []
+
+    options =
+      encoding: 'UTF-8'
+    return JSON.parse(fs.readFileSync(path, options))
+
+    break
+
+###*
+ * Throw a formatted error
+ * @param {object} error Error to show
+###
 printError = (error) ->
   data.error = true
   message = error.message
@@ -47,6 +80,9 @@
   throw new Error(message)

 module.exports =
+  ###*
+   * Clear all cache of the plugin
+  ###
   clearCache: () ->
     data =
       error: false,
@@ -55,6 +91,10 @@

     #execute("--refresh", true)

+  ###*
+   * Autocomplete for classes name
+   * @return {array}
+  ###
   classes: () ->
     if not data.classes?
       res = execute("--classes", false)
@@ -62,6 +102,10 @@

     return data.classes

+  ###*
+   * Autocomplete for internal PHP functions
+   * @return {array}
+  ###
   functions: () ->
     if not data.functions?
       res = execute("--functions", false)
@@ -69,6 +113,11 @@

     return data.functions

+  ###*
+   * Autocomplete for statics methods of a class
+   * @param  {string} className Class complete name (with namespace)
+   * @return {array}
+  ###
   statics: (className) ->
     if not data.statics[className]?
       res = execute("--statics '" + className + "'")
@@ -76,6 +125,11 @@

     return data.statics[className]

+  ###*
+   * Autocomplete for methods & properties of a class
+   * @param  {string} className Class complete name (with namespace)
+   * @return {array}
+  ###
   methods: (className) ->
     if not data.methods[className]?
       res = execute("--methods '" + className + "'")
@@ -83,6 +137,9 @@

     return data.methods[className]

+  ###*
+   * Method called on plugin activation
+  ###
   init: () ->
     atom.workspace.observeTextEditors (editor) =>
       editor.onDidSave =>


Adding zero-sum to simulated ladder levels.

--- server/queues/scoring.coffee
+++ server/queues/scoring.coffee
@@ -139,7 +139,7 @@
   ogresGameID = req.body.ogresGameID
   return if simulatorIsTooOld req, res
   #ladderGameIDs = ['greed', 'criss-cross', 'brawlwood', 'dungeon-arena', 'gold-rush', 'sky-span']  # Let's not give any extra simulations to old ladders.
-  ladderGameIDs = ['dueling-grounds', 'cavern-survival', 'multiplayer-treasure-grove', 'harrowland']  #, 'zero-sum']
+  ladderGameIDs = ['dueling-grounds', 'cavern-survival', 'multiplayer-treasure-grove', 'harrowland', 'zero-sum']
   levelID = _.sample ladderGameIDs
   unless ogresGameID and humansGameID
     async.map [{levelID: levelID, team: 'humans'}, {levelID: levelID, team: 'ogres'}], findRandomSession, (err, sessions) ->


Increased number of matches played.

Increased number of matches played.

--- server/queues/scoring.coffee
+++ server/queues/scoring.coffee
@@ -54,30 +54,30 @@
       sendEachTaskPairToTheQueue taskPairs, (taskPairError) ->
         if taskPairError? then return cb taskPairError,false
         cb null, true
-
+
 module.exports.resimulateAllSessions = (req, res) ->
   unless isUserAdmin req then return errors.unauthorized res, "Unauthorized. Even if you are authorized, you shouldn't do this"
-
+
   originalLevelID = req.body.originalLevelID
   levelMajorVersion = parseInt(req.body.levelMajorVersion)
-
+
   findParameters =
     submitted: true
-    level:
+    level:
       original: originalLevelID
-      majorVersion: levelMajorVersion
+      majorVersion: levelMajorVersion

   query = LevelSession
     .find(findParameters)
     .lean()
-
+
   query.exec (err, result) ->
     if err? then return errors.serverError res, err
     result = _.sample result, 10
     async.each result, resimulateSession.bind(@,originalLevelID,levelMajorVersion), (err) ->
       if err? then return errors.serverError res, err
       sendResponseObject req, res, {"message":"All task pairs were succesfully sent to the queue"}
-
+
 resimulateSession = (originalLevelID, levelMajorVersion, session, cb) =>
   sessionUpdateObject =
     submitted: true
@@ -250,7 +250,7 @@
       cb null, true
     else
       ratio = (updatedSession.numberOfLosses) / (totalNumberOfGamesPlayed)
-      if ratio > 0.2
+      if ratio > 0.33
         cb null, false
         console.log "Ratio(#{ratio}) is bad, ending simulation"
       else
@@ -264,7 +264,7 @@

     queryParameters =
       totalScore:
-        $gt:opponentSessionTotalScore
+        $gt: opponentSessionTotalScore
       _id:
         $nin: opponentSessionIDs
       "level.original": levelOriginalID
@@ -275,7 +275,9 @@
       team: opposingTeam

     if opponentSessionTotalScore < 30
-      queryParameters["totalScore"]["$gt"] = opponentSessionTotalScore + 2
+      # Don't play a ton of matches at low scores--skip some in proportion to how close to 30 we are.
+      # TODO: this could be made a lot more flexible.
+      queryParameters["totalScore"]["$gt"] = opponentSessionTotalScore + 2 * (30 - opponentSessionTotalScore) / 20

     limitNumber = 1


added table schema transformations

added table schema transformations

error: pathspec 'src/gg/data/schemamap.coffee' did not match any file(s) known to git

--- src/gg/data/schemamap.coffee
+++ src/gg/data/schemamap.coffee
@@ -0,0 +1,70 @@
+
+class gg.data.SchemaMap
+
+  @inferMapping: () ->
+
+  # map from source table to new schema
+  # The naive implementation:
+  # 1. recursively flattens the source table
+  # 2. groups flat table on target non-array attributes
+  #
+  # @param source  starting table
+  # @param tSchema target schema to transform table into
+  #                schema's leaf attributes must be a subset of the attributes
+  #                in table's schema
+  @transform: (source, tSchema) ->
+    sSchema = source.schema
+    target = new gg.data.RowTable tSchema
+
+    source_all = sSchema.leafAttrs()
+    source_nonarray = _.reject source_all, sSchema.inArray.bind(sSchema)
+    source_array = _.filter source_all, sSchema.inArray.bind(sSchema)
+    target_all = tSchema.leafAttrs()
+    target_nonarray = _.reject target_all, tSchema.inArray.bind(tSchema)
+    target_array = _.filter target_all, tSchema.inArray.bind(tSchema)
+
+    if _.any(target_all, (tAttr) -> tAttr not in source_all)
+      throw Error("Can't map ??? -> #{tAttr}")
+
+    # how many array attributes are in the target?
+    arr_keys = _.uniq _.map target_array, (attr) ->
+      tSchema.attrToKeys[attr]
+
+    flattened = source.flatten(null, true)
+    gbFunc = (row) ->
+      _.o2map target_nonarray, (attr) -> [attr, row.get(attr)]
+    groups = flattened.split gbFunc
+
+    for group in groups
+      subtable = group.table
+      groupdata = group.key
+      rowData = {}
+
+      _.each group.key, (val, attr) ->
+        if tSchema.isNested attr
+          rowData[attr] = {} unless attr of rowData
+        else if tSchema.inNested attr
+          nestKey = tSchema.attrToKeys[attr]
+          rowData[nestKey] = {} unless nestKey of rowData
+          rowData[nestKey][attr] = val
+        else
+          rowData[attr] = val
+
+      arrs = _.o2map arr_keys, (arr_key) -> [arr_key, []]
+      subtable.each (subrow) ->
+        _.each arrs, (arr, k) -> arr.push {}
+        for key in target_array
+          if subrow.contains key
+            arr_key = tSchema.attrToKeys[key]
+            arr = arrs[arr_key]
+            _.last(arr)[key] = subrow.get key
+      _.extend rowData, arrs
+
+      target.addRow rowData
+
+    target
+
+
+
+
+


Abort submission and alter user if gradefn throws an exception

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/bmedx/modulestore.git/'


LiveStreaming: PROGRAM_ID has been deprecated

--- src/streammachine/outputs/live_streaming.coffee
+++ src/streammachine/outputs/live_streaming.coffee
@@ -106,7 +106,7 @@

                 for key,s of @group.streams
                     @opts.res.write """
-                    #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=#{s.opts.bandwidth},CODECS="#{s.opts.codec}"
+                    #EXT-X-STREAM-INF:BANDWIDTH=#{s.opts.bandwidth},CODECS="#{s.opts.codec}"
                     http://#{s.opts.host}/#{s.key}.m3u8?session_id=#{session_id}

                     """


Reuse compile cache between integration tests

This makes integration tests much faster and less resource-intensive

--- spec/integration/startup-spec.coffee
+++ spec/integration/startup-spec.coffee
@@ -6,20 +6,21 @@
 # run them on Travis.
 return if process.env.TRAVIS

-fs = require "fs"
+fs = require "fs-plus"
 path = require "path"
 temp = require("temp").track()
 runAtom = require "./helpers/start-atom"
 CSON = require "season"

 describe "Starting Atom", ->
-  [tempDirPath, otherTempDirPath, atomHome] = []
+  atomHome = temp.mkdirSync('atom-home')
+  [tempDirPath, otherTempDirPath] = []

   beforeEach ->
     jasmine.useRealClock()
-
-    atomHome = temp.mkdirSync('atom-home')
     fs.writeFileSync(path.join(atomHome, 'config.cson'), fs.readFileSync(path.join(__dirname, 'fixtures', 'atom-home', 'config.cson')))
+    fs.removeSync(path.join(atomHome, 'storage'))
+
     tempDirPath = temp.mkdirSync("empty-dir")
     otherTempDirPath = temp.mkdirSync("another-temp-dir")


Remove debugger

Remove debugger

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Bogdan-p/bookingbug-angular.git/'


client: jekyll: docs: initial docs nav one more level expanded

--- docs/js/nav-terraform.coffee
+++ docs/js/nav-terraform.coffee
@@ -55,7 +55,7 @@
   createSubNavItems docsMap, MAIN_UL

   if pageUrl is '/docs/home'
-    $('aside li ul ul').hide()
+    $('aside li ul ul ul').hide()
   else
     $('aside li ul').hide()


Add snippet to insert Julia code chunks

Add snippet to insert Julia code chunks

error: pathspec 'snippets/language-weave.cson' did not match any file(s) known to git

--- snippets/language-weave.cson
+++ snippets/language-weave.cson
@@ -0,0 +1,9 @@
+'.source.weave.md':
+  'Julia code chunk':
+    'prefix': 'julia'
+    'body': """
+    ```julia
+    $1
+    ```
+    """
+


DIGSIG-195 Fixed bug with firefox preventing users from selecting slots. This was caused by the subtly different way in which firefox and webkit handles event objects.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/biola/digital_signage.git/'


Fixed logs 'from' and 'to' date format for all browsers. (#1902)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/evercam/evercam-dashboard.git/'


allow removing images in froala editor

allow removing images in froala editor

--- app/assets/javascripts/rails_admin/ra.widgets.coffee
+++ app/assets/javascripts/rails_admin/ra.widgets.coffee
@@ -230,13 +230,55 @@
         else
           config_options = { inlineMode: false }

+        uploadEnabled =
         if config_options['imageUploadURL']
-          config_options['imageUploadParams'] = {
+          config_options['imageUploadParams'] =
             authenticity_token: $('meta[name=csrf-token]').attr('content')
-          }

         $(@).addClass('froala-wysiwyged')
         $(@).editable(config_options)
+        if uploadEnabled
+          $(@).on 'editable.imageError', (e, editor, error) ->
+            # Custom error message returned from the server.
+            if error.code == 0
+
+            # Bad link.
+            else if error.code == 1
+
+            # No link in upload response.
+            else if error.code == 2
+
+            # Error during image upload.
+            else if error.code == 3
+
+            # Parsing response failed.
+            else if error.code == 4
+
+            # Image too large.
+            else if error.code == 5
+
+            # Invalid image type.
+            else if error.code == 6
+
+            # Image can be uploaded only to same domain in IE 8 and IE 9.
+            else if error.code == 7
+
+            else
+
+            return
+
+          .on('editable.afterRemoveImage', (e, editor, $img) ->
+            # Set the image source to the image delete params.
+            editor.options.imageDeleteParams =
+              src: $img.attr('src')
+              authenticity_token: $('meta[name=csrf-token]').attr('content')
+            # Make the delete request.
+            editor.deleteImage $img
+            return
+          ).on('editable.imageDeleteSuccess', (e, editor, data) ->
+            # handle success
+          ).on 'editable.imageDeleteError', (e, editor, error) ->
+            # handle error

     array = content.find('[data-richtext=froala-wysiwyg]').not('.froala-wysiwyged')
     if array.length


Change keyword autocomplete logic.

Change keyword autocomplete logic.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/VilkkuV/codecombat.git/'


Remove duplicate timeago

Remove duplicate timeago

--- resources/assets/coffee/osu_common.coffee
+++ resources/assets/coffee/osu_common.coffee
@@ -79,14 +79,6 @@

   initTimeago: ->
     $('.timeago-raw').timeago().removeClass 'timeago-raw'
-
-
-  timeago: (time) ->
-    el = document.createElement('time')
-    el.classList.add 'timeago-raw', 'timeago'
-    el.setAttribute 'datetime', time
-    el.textContent = time
-    el.outerHTML

   reloadPage: (keepScroll = true) ->


add beginnings of a test for slide menu

add beginnings of a test for slide menu

error: pathspec 'test/components/training/slide_menu_test.coffee' did not match any file(s) known to git

--- test/components/training/slide_menu_test.coffee
+++ test/components/training/slide_menu_test.coffee
@@ -0,0 +1,34 @@
+require '../../testHelper'
+TrainingSlideHandler = require '../../../app/assets/javascripts/training/components/training_slide_handler'
+SlideMenu = require '../../../app/assets/javascripts/training/components/slide_menu'
+
+
+describe 'SlideMenu', ->
+  params = {library_id: 'foo', module_id: 'bar', slide_id: 'kittens'}
+  slide = {id: 1, enabled: true, title: 'How to Kitten', slug: 'kittens'}
+  TestMenu = ReactTestUtils.renderIntoDocument(
+    <TrainingSlideHandler
+      loading=false
+      params={params}>
+      <SlideMenu params={params} />
+    </TrainingSlideHandler>
+  )
+
+  beforeEach ->
+    TestMenu.setState(
+      loading: false,
+      currentSlide: {content: 'hello'},
+      slides: [slide],
+      enabledSlides: [slide],
+      nextSlide: { slug: 'foobar' },
+    )
+
+  it 'renders an ol', ->
+    menu = ReactTestUtils.scryRenderedComponentsWithType(TestMenu, SlideMenu)[0]
+    menuNode = ReactDOM.findDOMNode(menu)
+    expect($(menuNode).find('ol').length).to.eq 1
+
+  it 'links to a slide', ->
+    menu = ReactTestUtils.scryRenderedComponentsWithType(TestMenu, SlideMenu)[0]
+    menuNode = ReactDOM.findDOMNode(menu)
+    expect($(menuNode).find('a').attr('href')).to.eq('/training/foo/bar/kittens')


Make remember less spammy.

Make remember less spammy.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/chauffer/hubot-scripts.git/'


Added log tick formatter

Added log tick formatter

error: pathspec 'bokehjs/src/coffee/ticking/log_tick_formatter.coffee' did not match any file(s) known to git

--- bokehjs/src/coffee/ticking/log_tick_formatter.coffee
+++ bokehjs/src/coffee/ticking/log_tick_formatter.coffee
@@ -0,0 +1,95 @@
+define [
+  "underscore",
+  "backbone",
+  "common/has_properties"
+], (_, Backbone, HasProperties) ->
+
+  class LogTickFormatter extends HasProperties
+    type: 'LogTickFormatter'
+
+    initialize: (attrs, options) ->
+      super(attrs, options)
+      @register_property('scientific_limit_low',
+          () -> Math.pow(10.0, @get('power_limit_low'))
+        , true)
+      @add_dependencies('scientific_limit_low', this, ['power_limit_low'])
+
+      @register_property('scientific_limit_high',
+          () -> Math.pow(10.0, @get('power_limit_high'))
+        , true)
+      @add_dependencies('scientific_limit_high', this, ['power_limit_high'])
+
+      @last_precision = 3
+
+    format: (ticks) ->
+      if ticks.length == 0
+        return []
+
+      zero_eps = 0
+      if ticks.length >= 2
+        zero_eps = Math.abs(ticks[1] - ticks[0]) / 10000;
+
+      need_sci = false;
+      if @get('use_scientific')
+        for tick in ticks
+          tick_abs = Math.abs(tick)
+          if tick_abs > zero_eps and (tick_abs >= @get('scientific_limit_high') or tick_abs <= @get('scientific_limit_low'))
+            need_sci = true
+            break
+
+      precision = @get('precision')
+
+      if not precision? or _.isNumber(precision)
+        labels = new Array(ticks.length)
+        if need_sci
+          for i in [0...ticks.length]
+            labels[i] = ticks[i].toExponential(precision or undefined)
+        else
+          for i in [0...ticks.length]
+            labels[i] = ticks[i].toFixed(precision or undefined).replace(/(\.[0-9]*?)0+$/, "$1").replace(/\.$/, "")
+        return labels
+
+      else if precision == 'auto'
+        labels = new Array(ticks.length)
+        for x in [@last_precision..15]
+          is_ok = true
+          if need_sci
+            for i in [0...ticks.length]
+              labels[i] = ticks[i].toExponential(x)
+              if i > 0
+                if labels[i] == labels[i-1]
+                  is_ok = false
+                  break
+            if is_ok
+              break
+          else
+            for i in [0...ticks.length]
+              labels[i] = ticks[i].toFixed(x).replace(/(\.[0-9]*?)0+$/, "$1").replace(/\.$/, "")
+              if i > 0
+                if labels[i] == labels[i-1]
+                  is_ok = false
+                  break
+            if is_ok
+              break
+
+          if is_ok
+            @last_precision = x
+            return labels
+
+      return labels
+
+    defaults: () ->
+      return {
+        precision: 'auto'
+        use_scientific: true
+        power_limit_high: 5
+        power_limit_low: -3
+      }
+
+  class LogTickFormatters extends Backbone.Collection
+    model: LogTickFormatter
+
+  return {
+    "Model": LogTickFormatter,
+    "Collection": new LogTickFormatters()
+  }


Fix page part hiding

Fix page part hiding

Mirrors the change from table row (tr) for page parts to class (.horizontal-form-group)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/arlyxiao/Spina.git/'


start of new CHAP module

start of new CHAP module

 On branch master

	new file:   nodejs_server/lib/chap.coffee

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/FireworksProject/platform.y.git/'


JAccount::fetchAppStorage$ make sure client exists

Fixes following issues in social log https://papertrailapp.com/groups/867873/events?q=program%3Asocialworker.log+toHexString

--- workers/social/lib/social/models/account.coffee
+++ workers/social/lib/social/models/account.coffee
@@ -1028,7 +1028,11 @@
       else
         callback err, storage

-  fetchAppStorage$: secure (client, options, callback)->
+  fetchAppStorage$: secure (client, options, callback) ->
+
+    unless client?.connection?.delegate
+      return callback "Not a valid session"
+
     unless @equals client.connection.delegate
       return callback "Attempt to access unauthorized application storage"


fire callbacks asynchronously

fire callbacks asynchronously

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Qasemt/node-i2c.git/'


Add sample proportion class and basic methods

error: pathspec 'public/js/sample-proportion.coffee' did not match any file(s) known to git

--- public/js/sample-proportion.coffee
+++ public/js/sample-proportion.coffee
@@ -0,0 +1,13 @@
+class App.SampleProportion
+
+	SD_TO_GRAPH = 5
+
+	constructor: (@participants, @conversions) ->
+		@p = @conversions / @participants
+		@sd = this.getStdDev()
+
+	getStdDev: ->
+		Math.sqrt @p * (1 - @p) / @participants
+
+	getXAxisRange: ->
+		new App.Range @p - SD_TO_GRAPH * @sd, @p + SD_TO_GRAPH * @sd


Fix pagination setup to scope to current element like in the rest of the file.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/lonelyplanet/rizzo.git/'


Remove some validation that doesn't reeeeally work

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/dkfiresky/electron-starter.git/'


change from plural to singular

change from plural to singular

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/crcn-archive/mesh.git/'


CMS.Views.WeekEdit tested

CMS.Views.WeekEdit tested

error: pathspec 'cms/static/coffee/spec/views/week_edit_spec.coffee' did not match any file(s) known to git

--- cms/static/coffee/spec/views/week_edit_spec.coffee
+++ cms/static/coffee/spec/views/week_edit_spec.coffee
@@ -0,0 +1,7 @@
+describe "CMS.Views.WeekEdit", ->
+  describe "defaults", ->
+    it "set the correct tagName", ->
+      expect(new CMS.Views.WeekEdit().tagName).toEqual("section")
+
+    it "set the correct className", ->
+      expect(new CMS.Views.WeekEdit().className).toEqual("edit-pane")


Admin: Editor: adds ul and li tags

Admin: Editor: adds ul and li tags

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/startae/hub.git/'


JS tweaks, move feedback into its own template

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/bmedx/modulestore.git/'


Accidentally using deprecated jquery callbacks

--- resources/assets/coffee/forum-topic-cover.coffee
+++ resources/assets/coffee/forum-topic-cover.coffee
@@ -139,9 +139,9 @@
     $.ajax
       url: $button.attr('data-url')
       method: 'delete'
-    .success (data) =>
+    .done (data) =>
       @update data.data
-    .complete =>
+    .always =>
       @loading[0].setAttribute('data-state', '')


homeaccountsecurityview: remove unnecesary lines

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/andrewjcasal/koding.git/'


open main.html when 'onInstalled' event is fired

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rremizov/github-notifier.git/'


New organism "aside"

New organism "aside"

error: pathspec 'source/organism/aside.coffee' did not match any file(s) known to git

--- source/organism/aside.coffee
+++ source/organism/aside.coffee
@@ -0,0 +1,6 @@
+
+class Atoms.Organism.Aside extends Atoms.Core.Class.Organism
+
+  @template """<aside class="active"></aside>"""
+
+  areas: ["header", "section"]


options attempt: new test

options attempt: new test

error: pathspec 'test/options/attempt.coffee' did not match any file(s) known to git

--- test/options/attempt.coffee
+++ test/options/attempt.coffee
@@ -0,0 +1,30 @@
+
+nikita = require '../../src'
+fs = require 'fs'
+
+describe 'options "attempt"', ->
+
+  it 'start with value 0', ->
+    count = 0
+    nikita
+    .call (options) ->
+      options.attempt.should.eql 0
+    .promise()
+
+  it 'follow the number of retry', ->
+    count = 0
+    nikita
+    .call retry: 5, sleep: 0, (options) ->
+      options.attempt.should.eql count++
+      throw Error 'Catchme' if options.attempt < 4
+    .promise()
+
+  it 'reschedule attempt with relax', ->
+    count = 0
+    nikita
+    .call retry: 3, relax: true, sleep: 0, (options) ->
+      options.attempt.should.eql count++
+      throw Error 'Catchme'
+    .call ->
+      count.should.eql 3
+    .promise()


Added a team property to the level session schema.

--- server/levels/sessions/level_session_schema.coffee
+++ server/levels/sessions/level_session_schema.coffee
@@ -25,6 +25,7 @@
   creator: c.objectId(links: [{rel: 'extra', href: "/db/user/{($)}"}])
   created: c.date( { title: 'Created', readOnly: true })
   changed: c.date( { title: 'Changed', readOnly: true })
+  team: c.shortString()
   level: LevelSessionLevelSchema
   screenshot: { type: 'string' }
   state: c.object {}, {


Remove duplicate define app

Remove duplicate define app

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/trantuanckc/ogilvyone-blog.git/'


_finishBtnEventHandler function was implemented

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/NightingaleStudio/exam.js.git/'


remove the contents variable and fix the getRealPath documentation

--- src/file.coffee
+++ src/file.coffee
@@ -148,7 +148,7 @@
   #
   # Returns a {String}.
   getDigestSync: ->
-    contents = @readSync()
+    @readSync()
     # read sets digest
     @digest

@@ -184,7 +184,7 @@
         @realPath = @path
     @realPath

-  # Public: Returns this file's completely resolved {String} path.
+  # Public: Returns a promise that resolves to the file's completely resolved {String} path.
   getRealPath: ->
     if @realPath?
       Q.resolve @realPath


FinderTreeController: Path should not be plain in change object.


Mark class as internal

Mark class as internal

--- src/app/package-config-view.coffee
+++ src/app/package-config-view.coffee
@@ -1,6 +1,10 @@
 semver = require 'semver'
 {$$, View} = require 'space-pen'
 requireWithGlobals 'bootstrap/js/bootstrap-dropdown', jQuery: require 'jquery'
+
+###
+# Internal #
+###

 module.exports =
 class PackageConfigView extends View


Add add argument

Add add argument

--- src/browser/squirrel-update.coffee
+++ src/browser/squirrel-update.coffee
@@ -32,6 +32,7 @@
   fileKeyPath = 'HKCU\\Software\\Classes\\*\\shell\\Atom'

   spawnReg = (args) ->
+    args.unshift('add')
     regProcess = ChildProcess.spawn('reg.exe', args)
     console.log args


:lipstick: Fix warnings of coffeelint.

:lipstick: Fix warnings of coffeelint.

--- src/main.coffee
+++ src/main.coffee
@@ -34,7 +34,7 @@
       else
         @emit('change', event, filePath, oldFilePath)

-  start: () ->
+  start: ->
     @handle = binding.watch(@path)
     handleWatchers.add(@handle, this)


注释放到头部

注释放到头部

--- src/httpclient.coffee
+++ src/httpclient.coffee
@@ -1,11 +1,13 @@
+# 剥离出来的 HttpClient ，目前仅适合 qqapi 使用
+# 返回值：已经解析的json
+
 https = require "https"
 http  = require 'http'
 querystring  = require 'querystring'
 URL  = require('url')
 jsons = JSON.stringify

-# 剥离出来的 HttpClient ，目前仅适合 qqapi 使用
-# 返回值：已经解析的json
+

 # 设置全局cookie


bug fix

bug fix

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/bubblegroup/bubblebot.git/'


adding limits to policies

adding limits to policies


:bug: Fix class name collision

:bug: Fix class name collision

`src/search.coffee` is overwritten by `src/view.coffee`

--- src/view.coffee
+++ src/view.coffee
@@ -7,7 +7,7 @@
 tree = require './tree'

 module.exports =
-class Search extends Command
+class View extends Command
   @commandNames: ['view', 'show']

   parseOptions: (argv) ->


simplify code

simplify code

--- src/yaku.coffee
+++ src/yaku.coffee
@@ -358,7 +358,7 @@
 	###
 	assertIterable = (obj) ->
 		return if obj instanceof Array
-		throw genTypeError $invalid_argument
+		throw genTypeError 'invalid_argument'

 	###*
 	 * Generate type error object.
@@ -384,13 +384,8 @@
 	$resolved = 1
 	$pending = 2

-	$promiseTrace = '_pStack'
-	$settlerTrace = '_sStack'
-
-	# These are some symbols. They won't be used to store data.
-	$circularChain = 'promise_circular_chain'
-
-	$invalid_argument = 'invalid_argument'
+	$promiseTrace = '_pt'
+	$settlerTrace = '_st'

 	$fromPrevious = 'From previous event:'

@@ -600,7 +595,7 @@
 	settleWithX = (p, x) ->
 		# 2.3.1
 		if x == p and x
-			settlePromise p, $rejected, genTypeError($circularChain)
+			settlePromise p, $rejected, genTypeError('promise_circular_chain')
 			return

 		# 2.3.2


tools to deal with browser events

tools to deal with browser events

error: pathspec 'modules/gui/tools/events.coffee' did not match any file(s) known to git

--- modules/gui/tools/events.coffee
+++ modules/gui/tools/events.coffee
@@ -0,0 +1,36 @@
+
+module.exports = events =
+
+    ##
+    ##
+    ##
+    getPageXY: (e)->
+        if e.pageX
+            return x: e.pageX, y: e.pageY
+
+        if touch = (e.touches?[0] || e.changedTouches?[0] || e.originalEvent.touches?[0] || e.originalEvent.changedTouches?[0])
+            return x: touch.pageX, y: touch.pageY
+
+        return error: 'pageXY'
+
+    ##
+    ##
+    ##
+    getPageX: (e)->
+        events.getPageXY(e).x
+
+
+    ##
+    ##
+    ##
+    getPageY: (e)->
+        events.getPageXY(e).y
+
+    ##
+    ##
+    ##
+    rightButton: (e)->
+        if e.which is 3 || e.button is 2
+            return true
+        return false
+


add fix to make declaration of annotation y value for student grade accessible outside forEach

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/UM-USElab/gradecraft-development.git/'


upd: doc

upd: doc

--- src/yaku.coffee
+++ src/yaku.coffee
@@ -496,6 +496,8 @@

 		return

+	# Why are there two "genScheduler"s?
+	# Well, to support the babel's es7 async-await polyfill, I have to hack it.
 	scheduleUnhandledRejection = genScheduler 9, (genScheduler 9, (p) ->
 		# iter tree
 		iter = (node) ->


Add Mobile Mention script

Add Mobile Mention script

error: pathspec 'scripts/mobile-mention.coffee' did not match any file(s) known to git

--- scripts/mobile-mention.coffee
+++ scripts/mobile-mention.coffee
@@ -0,0 +1,24 @@
+# Description:
+#   @mention the mobile team
+#
+# Commands:
+#   @mobile - Reply with @mention of everyone in the mobile team
+#   taylor swift|swifty|tails|tayter tot|taytay|t-swift|t-swizzle|tay - Reply with Taylor Swift
+
+module.exports = (robot) ->
+
+  mention = (user, message) ->
+    nameWithDot = user.match(/(.+)@inin.com/i)[1]
+    name = nameWithDot.split('.').join(' ')
+    nameCap = name.replace(/(^|\s)[a-z]/g, (f) -> f.toUpperCase())
+
+    str = "> ###### [@#{nameCap}](#/person/abcdefghijklmnopqrstuv) said
+          > #{message}
+
+          [](#/person/57350c17a6a8301c3de8b941) [](#/person/54f07909d96de71e0a552740)
+          Yo mobile team! #{nameCap} said something that you all should read."
+
+    return str
+
+  robot.hear /@mobile/i, (msg) ->
+    msg.send mention(msg.message.user.name, msg.message.text)


Comment/formatting tweaks, wrap fetching events in function

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/ESWAT/ottawa.git/'


Hotfix for #550

Hotfix for #550

--- server/commons/Handler.coffee
+++ server/commons/Handler.coffee
@@ -124,7 +124,7 @@
     query = {'original': mongoose.Types.ObjectId(id)}
     sort = {'created': -1}
     selectString = 'slug name version commitMessage created'  # Is this even working?
-    @modelClass.find(query).select(selectString).lean().limit(FETCH_LIMIT).sort(sort).exec (err, results) =>
+    @modelClass.find(query).select(selectString).limit(FETCH_LIMIT).sort(sort).exec (err, results) =>
       return @sendDatabaseError(res, err) if err
       for doc in results
         return @sendUnauthorizedError(res) unless @hasAccessToDocument(req, doc)


Disable nickname tooltip

Disable nickname tooltip


remove pistachios: bugfixes

remove pistachios: bugfixes


subsume Statement into Eval

subsume Statement into Eval

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/showell/CoffeeCoffee.git/'


fix accidental use of non hashed password

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/VoiSmart/Rocket.Chat.git/'


move code comment

move code comment

--- app/assets/javascripts/uploadcare/files.js.coffee
+++ app/assets/javascripts/uploadcare/files.js.coffee
@@ -33,11 +33,11 @@
     input: (settings, input) ->
       [new f.InputFile(settings, input)]
     url: (settings, urls) ->
+      # We also accept plain UUIDs here for an internally used shortcut.
+      # Typically, you should use the `uploaded` converter for clarity.
       unless $.isArray(urls)
         urls = [urls]
       for url in urls
-        # We also accept plain UUIDs here for an internally used shortcut.
-        # Typically, you should use the `uploaded` converter for clarity.
         cdn = new RegExp("^#{settings.cdnBase}/#{utils.uuidRegex.source}", 'i')
         if utils.fullUuidRegex.test(url) || cdn.test(url)
           new f.UploadedFile settings, url


Allow invalid ssl certs.  IE self signed on oembed fetch

--- packages/rocketchat-oembed/server/server.coffee
+++ packages/rocketchat-oembed/server/server.coffee
@@ -15,6 +15,7 @@
 		port: urlObj.port
 		hostname: urlObj.hostname
 		path: urlObj.path
+		rejectUnauthorized: false

 	httpOrHttps = if urlObj.protocol is 'https:' then https else http


Fixes #1223

Fixes #1223

--- app/views/editor/delta.coffee
+++ app/views/editor/delta.coffee
@@ -30,8 +30,7 @@
     @skipPaths = options.skipPaths

     for modelName in ['model', 'headModel', 'comparisonModel']
-      continue unless m = options[modelName]
-      @[modelName] = @supermodel.loadModel(m, 'document').model
+      @[modelName] = options[modelName]

     @buildDeltas() if @supermodel.finished()


Added deserializer

Added deserializer

error: pathspec 'src/utils/deserialize.coffee' did not match any file(s) known to git

--- src/utils/deserialize.coffee
+++ src/utils/deserialize.coffee
@@ -0,0 +1,11 @@
+do (window = @, Elyssa = @Elyssa or= {}) ->
+
+  Elyssa.deserialize = (stringedObject, convert) ->
+    return new Elyssa[convert]() unless stringedObject
+
+    try
+      parsedObject = JSON.parse stringedObject
+      return new Elyssa[convert] parsedObject
+    catch error
+      console.log "Error while converting #{stringedObject} to a #{convert}: #{error}"
+      return new Elyssa[convert]()


add missing request init to link operation tests

--- tests/lib_link_bank_operation.coffee
+++ tests/lib_link_bank_operation.coffee
@@ -50,7 +50,11 @@
             emit doc.date, doc
             return
         BankOperation.defineRequest 'bydate', map, ->
-            Bill.defineRequest 'bydate', map, done
+            Bill.defineRequest 'bydate', map, ->
+                map = (doc) ->
+                    emit doc._id, doc
+                    return
+                BankOperation.defineRequest 'all', map, done

     before (done) ->
         @timeout 4000


[repl] Compile all modules

[repl] Compile all modules

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/demhydraz/cafe.git/'


Update tests to ensure we have deployment url in the package.json

--- test/test-app-file-creation.coffee
+++ test/test-app-file-creation.coffee
@@ -130,7 +130,8 @@
                 githubRepository: 'reveal-js'
             )
             .on 'end', ->
-                assert.fileContent 'Gruntfile.coffee', /git@github.com:yeoman\/reveal-js.git/
+                assert.fileContent 'package.json', /git@github.com:yeoman\/reveal-js.git/
+                assert.fileContent 'Gruntfile.coffee', /<\%= pkg.repository.url %>/
                 assert.fileContent 'Gruntfile.coffee', /grunt.registerTask 'deploy'/
                 assert.fileContent 'package.json', /"grunt-build-control"/
                 assert.fileContent '.yo-rc.json', /"githubUsername": "yeoman"/


small test change

small test change

error: pathspec 'tests/tests/options/option' did not match any file(s) known to git
error: pathspec 'emptyFieldValidation.coffee' did not match any file(s) known to git


coffee tests

coffee tests

error: pathspec 'test/base_test.coffee' did not match any file(s) known to git

--- test/base_test.coffee
+++ test/base_test.coffee
@@ -0,0 +1,20 @@
+'use strict'
+
+vows = require ('vows')
+assert = require ('assert')
+wrap = require ('../../truwrap')
+
+vows
+	.describe('truwrap utilities')
+	.addBatch
+		'Get version as a':
+			'short number?':
+				topic: wrap.getVersion 1
+				'Should result in a short version number x.x.x-x': (topic) ->
+					assert.match topic, /[0-9]+.[0-9]+.[0-9]+[0-9a-z.-]*/
+
+			'long string?':
+				topic: wrap.getVersion 2
+				'Should result in a long version number truwrap vx.x.x-x': (topic) ->
+					assert.match topic, /truwrap v[0-9]+.[0-9]+.[0-9]+[0-9a-z.-]*/
+.export(module)


Added support for custom stylesheets [ES-8]

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/Bogdan-p/bookingbug-angular.git/'


bugfix #8 user email submitted with MVP survey

 On branch bug-#8

	modified:   app/public/commonjs/mvp-main.coffee

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/FireworksProject/corkboard-website.git/'


updated match function to allow all on a null code map

--- app/assets/javascripts/core.js.coffee
+++ app/assets/javascripts/core.js.coffee
@@ -493,7 +493,8 @@
     for entry in this
       afterStart = (!start || entry.timeStamp()>=start)
       beforeEnd = (!end || entry.timeStamp()<=end)
-      if (afterStart && beforeEnd && entry.includesCodeFrom(codeSet) && (includeNegated || !entry.negationInd()))
+      matchesCode = codeSet == null || entry.includesCodeFrom(codeSet)
+      if (afterStart && beforeEnd && matchesCode && (includeNegated || !entry.negationInd()))
         cloned.push(entry)
     cloned


Fix a bug whereby an entry without a values property would cause an exception

--- app/assets/javascripts/core.js.coffee
+++ app/assets/javascripts/core.js.coffee
@@ -418,7 +418,8 @@
   ###
   values: ->
     values = []
-    for value in @json['values']
+    allValues = @json['values'] || []
+    for value in allValues
       if value['scalar']?
         values.push new hQuery.PhysicalQuantity value
       else


add reference to source id to coded entry which is the id from the source document.  ID is the database ID since that should always be present.  Source ID may not be present.

--- app/assets/javascripts/core.js.coffee
+++ app/assets/javascripts/core.js.coffee
@@ -319,7 +319,10 @@
       @_endDate = hQuery.dateFromUtcSeconds @json['end_time']
     @_type = hQuery.createCodedValues @json['codes']
     @_statusCode = @json['status_code']
+    # id of the entry from the database
     @id = @json['_id']
+    # id of the entry from the source document if available
+    @source_id = @json['id']
     @_freeTextType = @json['description']

   ###*


Remove build suffix from version

Remove build suffix from version

--- index.coffee
+++ index.coffee
@@ -33,6 +33,7 @@
     metadata.exe ?= "#{metadata.name}.exe"
     metadata.iconUrl ?= 'https://raw.githubusercontent.com/atom/atom-shell/master/atom/browser/resources/win/atom.ico'
     metadata.owners ?= metadata.authors
+    metadata.version = metadata.version.replace(/-.*$/, '')

     template = _.template(grunt.file.read(path.resolve(__dirname, '..', 'template.nuspec')))
     nuspecContent = template(metadata)


Issue #13: Not all pictures are displayed

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/VivaReal/facewall.git/'


Fixed columnsFromQuery and tableNameFromQuery bug on multi line queries

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/keboola/kbc-ui-ex-sfdc.git/'


Re-add checkAuth middleware

Re-add checkAuth middleware

--- app/site/routes.coffee
+++ app/site/routes.coffee
@@ -10,10 +10,10 @@
 views
 ###
 home = (req, res) ->
-	# if req.session.logged_in
+	if req.session.logged_in
 		res.render "site/index", getTemplateData('HOME')
-	# else
-		# res.render "site/holding", getTemplateData('HOLDING')
+	else
+		res.render "site/holding", getTemplateData('HOLDING')

 about = (req, res) ->
 	res.render "site/index", getTemplateData('ABOUT')
@@ -44,9 +44,9 @@
 basic password-protect
 ###
 checkAuth = (req, res, next) ->
-	# if !req.session.logged_in
-	# 	res.redirect "/#{config.routes.HOME}"
-	# else
+	if !req.session.logged_in
+		res.redirect "/#{config.routes.HOME}"
+	else
 		next()

 login = (req, res) ->


New admin coffee script file dedicated to the admin panel

error: pathspec 'app/assets/javascripts/deal_redemptions/admin.js.coffee' did not match any file(s) known to git


Remove unused requires.

Remove unused requires.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/andrewjcasal/koding.git/'


Add reviewlistitemivew which is based on commentlistitemview

error: pathspec 'client/landing/app/CommonViews/reviews/reviewlistitemview.coffee' did not match any file(s) known to git

--- client/landing/app/CommonViews/reviews/reviewlistitemview.coffee
+++ client/landing/app/CommonViews/reviews/reviewlistitemview.coffee
@@ -0,0 +1,6 @@
+class ReviewListItemView extends CommentListItemView
+  constructor:(options,data)->
+    options = $.extend
+      type      : "review"
+    ,options
+    super options,data


Fix users find by name filter

Fix users find by name filter

[#93002740]

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/netguru/people.git/'


add obj.createConstructor()

add obj.createConstructor()

--- objSpec.coffee
+++ objSpec.coffee
@@ -0,0 +1,13 @@
+_ = require 'util/obj'
+
+describe 'Object utils', ->
+
+  describe 'createConstructor()', ->
+
+    it 'creates a new object as expected', ->
+      proto = a: 123
+      construct = (@b) ->
+      obj = (_.createConstructor proto, construct) 456
+      (expect obj.a).toBe 123
+      (expect obj.b).toBe 456
+


query params for CouchDB query()

query params for CouchDB query()

 On branch master

	modified:   commands/couchdb/query.coffee

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/FireworksProject/corkboard-scripts.git/'


increment friend total in getFeed function

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/fbergin/timeline-stats.git/'


OX-208 added pullworker.coffee

OX-208 added pullworker.coffee

error: pathspec 'app/assets/javascripts/model/pullworker.coffee' did not match any file(s) known to git

--- app/assets/javascripts/model/pullworker.coffee
+++ app/assets/javascripts/model/pullworker.coffee
@@ -0,0 +1,16 @@
+importScripts('../libs/require-2.1.1.js')
+
+### define
+./array_buffer_socket : ArrayBufferSocket
+###
+
+class PullWorker
+
+  # Constants
+  BATCH_LIMIT : 10
+  BATCH_SIZE : 5
+  BUCKET_SIZE_P : 5
+
+  queue : []
+  dataSetId : ""
+  batchCount : 0


Clarify test spec language.

Clarify test spec language.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/JoshuaToenyes/stout-core.git/'


craete basic transporter service

craete basic transporter service

error: pathspec 'frontend/app/js/services/transporter_service.coffee' did not match any file(s) known to git

--- frontend/app/js/services/transporter_service.coffee
+++ frontend/app/js/services/transporter_service.coffee
@@ -0,0 +1,8 @@
+#
+# This service is in charge to manage the request to the server for the trasporter
+#
+angular.module('app').factory('TransporterService', ($resource)->
+	$resource('/api/v1/transporter', {}, {
+		query: {method:'GET', isArray:false}
+		})
+)


Added Pattern Tokenizer

Added Pattern Tokenizer

error: pathspec 'lib/twitter_cldr/js/mustache/tokenizers/pattern_tokenizer.coffee' did not match any file(s) known to git

--- lib/twitter_cldr/js/mustache/tokenizers/pattern_tokenizer.coffee
+++ lib/twitter_cldr/js/mustache/tokenizers/pattern_tokenizer.coffee
@@ -0,0 +1,22 @@
+# Copyright 2012 Twitter, Inc
+# http://www.apache.org/licenses/LICENSE-2.0
+
+class TwitterCldr.PatternTokenizer
+  constructor : (@data_reader, @tokenizer) ->
+
+  tokenize : (pattern) ->
+    @tokenizer.tokenize(pattern)
+
+  expand : (pattern) ->
+    if pattern instanceof Symbol
+      path = patter.to_string.split(".")
+      data = @data_reader.pattern_at_path(path)
+      next_pattern = (if data["pattern"]? then data["pattern"] else data)
+      expand_pattern(next_pattern)
+    else if pattern instanceof Object
+      result = {}
+      for key, value of pattern
+        result[key] = expand(value)
+      result
+    else
+      pattern


Update epsilon_controller.coffee

Update epsilon_controller.coffee

Fix bug with not being able to swipe to the first page

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/C-Bouthoorn/Epsilon.git/'


Add debounce to HTML Editor

Add debounce to HTML Editor

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/BennySamir/Welcomescreen.git/'


Added authentication challenge opcodes

Added authentication challenge opcodes

error: pathspec 'src/wrathnet/expansions/wotlk/enums/auth-challenge-opcode.coffee' did not match any file(s) known to git

--- src/wrathnet/expansions/wotlk/enums/auth-challenge-opcode.coffee
+++ src/wrathnet/expansions/wotlk/enums/auth-challenge-opcode.coffee
@@ -0,0 +1,33 @@
+#
+# WrathNet Foundation
+# Copyright (c) 2012 Tim Kurvers <http://wrathnet.org>
+#
+# World of Warcraft client foundation written in JavaScript, enabling
+# development of expansion-agnostic clients, bots and other useful tools.
+#
+# The contents of this file are subject to the MIT License, under which
+# this library is licensed. See the LICENSE file for the full license.
+#
+
+# Authentication challenge opcodes
+class WrathNet.expansions.wotlk.enums.AuthChallengeOpcode
+
+  @SUCCESS            = 0x00
+  @UNKNOWN0           = 0x01
+  @UNKNOWN1           = 0x02
+  @ACCOUNT_BANNED     = 0x03
+  @ACCOUNT_INVALID    = 0x04
+  @PASSWORD_INVALID   = 0x05
+  @ALREADY_ONLINE     = 0x06
+  @OUT_OF_CREDIT      = 0x07
+  @BUSY               = 0x08
+  @BUILD_INVALID      = 0x09
+  @BUILD_UPDATE       = 0x0A
+  @INVALID_SERVER     = 0x0B
+  @ACCOUNT_SUSPENDED  = 0x0C
+  @ACCESS_DENIED      = 0x0D
+  @SURVEY             = 0x0E
+  @PARENTAL_CONTROL   = 0x0F
+  @LOCK_ENFORCED      = 0x10
+  @TRIAL_EXPIRED      = 0x11
+  @BATTLE_NET         = 0x12


Add comments

Add comments

--- src/coffeescripts/tags/ExpandingTextarea.coffee
+++ src/coffeescripts/tags/ExpandingTextarea.coffee
@@ -66,6 +66,7 @@
     handleChange: (e) ->
       newBlock = _.cloneDeep(this.props.block)

+      # Remove the default text if new text has been entered.
       if @props.block.data.default_text.length and @props.block.data.text.length
         newBlock.data.default_text = ''

@@ -106,6 +107,7 @@
       $pre.css(prop, val) if $pre.css(prop) != val

   componentDidUpdate: ->
+    # Highlight the default text
     if @props.block.data.default_text.length and !@props.block.data.text.length
       @refs.text.getDOMNode().setSelectionRange(0, @props.block.data.default_text.length)


Made basic service to grab list of questions in JSON (actual page it's calling from not yet implemented.)

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/and0p/tysomething.git/'