Fixed time-without-period-marker test to use user TZ

--- tests/models/test_punch.coffee
+++ tests/models/test_punch.coffee
@@ -1,5 +1,5 @@

-moment = require 'moment'
+moment = require 'moment-timezone'
 expect = require('chai').expect

 Organization = require('../../src/models/organization').get('test')
@@ -87,9 +87,10 @@
       punch = Punch.parse @user, 'in 9:15', 'in'
       expect(punch).to.have.property 'mode', 'in'
       expect(punch).to.have.deep.property 'times[0]'
-      now = moment()
+      tz = @user.timetable.timezone.name
+      now = moment.tz(tz)
       amPm = now.format('A')
-      expectedTime = moment("9:15 #{amPm}", 'h:mm A')
+      expectedTime = moment.tz("9:15 #{amPm}", 'h:mm A', tz)
       if expectedTime.isAfter now
         if expectedTime.diff(now, 'hours', true) > 6
           expectedTime.subtract(12, 'hours')


Fix slightly broken callout positioning behaviour

--- services/web/public/coffee/ide/review-panel/directives/reviewPanelSorted.coffee
+++ services/web/public/coffee/ide/review-panel/directives/reviewPanelSorted.coffee
@@ -59,19 +59,19 @@

 					line_height = 15

+					positionLayoutEl = ($callout_el, original_top, top) ->
+						if original_top <= top
+							$callout_el.removeClass("rp-entry-callout-inverted")
+							$callout_el.css(top: original_top + line_height, height: top - original_top)
+						else
+							$callout_el.addClass("rp-entry-callout-inverted")
+							$callout_el.css(top: top + line_height + 1, height: original_top - top)
+
 					# Put the focused entry as close to where it wants to be as possible
 					focused_entry_top = Math.max(previousMinTop, focused_entry.scope.entry.screenPos.y)
 					focused_entry.$box_el.css(top: focused_entry_top)
 					focused_entry.$indicator_el.css(top: focused_entry_top)
-					focused_entry.$callout_el.css(top: focused_entry_top + line_height, height: 0)
-
-					positionLayoutEl = ($callout_el, original_top, top) ->
-						if original_top <= top
-							entry.$callout_el.removeClass("rp-entry-callout-inverted")
-							entry.$callout_el.css(top: original_top + line_height, height: top - original_top)
-						else
-							entry.$callout_el.addClass("rp-entry-callout-inverted")
-							entry.$callout_el.css(top: top + line_height + 1, height: original_top - top)
+					positionLayoutEl(focused_entry.$callout_el, focused_entry.scope.entry.screenPos.y, focused_entry_top)

 					previousBottom = focused_entry_top + focused_entry.$layout_el.height()
 					for entry in entries_after


Troca de Mil para mil nos números arrendondados.

--- app/assets/javascripts/angular_app/filters/roundedCurrency.js.coffee
+++ app/assets/javascripts/angular_app/filters/roundedCurrency.js.coffee
@@ -15,7 +15,7 @@
     else if absValue > million
       round(value/million, ' Mi')
     else if absValue > thousand
-      round(value/thousand, ' Mil')
+      round(value/thousand, ' mil')
     else
       round(value)
 ]


Updated the a little code

Updated the a little code

--- app/assets/javascripts/question_bank/question_record_and_flaw.coffee
+++ app/assets/javascripts/question_bank/question_record_and_flaw.coffee
@@ -143,7 +143,6 @@
           method: "DELETE"
           dataType: "json"
         .success (msg) =>
-          console.log msg
           that.set_body(msg.body)
         .error (msg) =>
           console.log(msg)


Unflip should put text upright and not flipped upside down when it returns things to their original state

--- src/scripts/flip.coffee
+++ src/scripts/flip.coffee
@@ -44,7 +44,7 @@
     else if toUnflip == ''
       unflipped = '┬──┬'
     else
-      unflipped = flip(toUnflip)
+      unflipped = toUnflip

     msg.send "#{unflipped} ノ( º _ ºノ)"


Fix timestamp

Fix timestamp

--- src/scripts/main.coffee
+++ src/scripts/main.coffee
@@ -24,7 +24,7 @@

   countdown: ->
     our_date = Date.now()
-    time_till_rob = (@date_rob_arrives.getTime() - our_date) / 1000
+    time_till_rob = (@date_rob_arrives - our_date) / 1000

     clock = $('.flipclock').FlipClock( time_till_rob,
       clockFace: "DailyCounter"


Test the FileHandler layer.

Test the FileHandler layer.

--- services/filestore/test/unit/coffee/FileHandlerTests.coffee
+++ services/filestore/test/unit/coffee/FileHandlerTests.coffee
@@ -93,6 +93,13 @@
 				@handler._getConvertedFile.called.should.equal false
 				done()

+		it "should pass options to _getStandardFile", (done) ->
+			options = {start: 0, end: 8}
+			@handler.getFile @bucket, @key, options, =>
+				expect(@handler._getStandardFile.lastCall.args[2].start).to.equal 0
+				expect(@handler._getStandardFile.lastCall.args[2].end).to.equal 8
+				done()
+
 		it "should call _getConvertedFile if a format is defined", (done)->
 			@handler.getFile @bucket, @key, format:"png", =>
 				@handler._getStandardFile.called.should.equal false
@@ -116,6 +123,13 @@
 				err.should.equal "err"
 				stream.should.equal @fileStream
 				done()
+
+		it "should pass options to PersistorManager", (done) ->
+			@handler.getFile @bucket, @key, {start: 0, end: 8}, =>
+				expect(@PersistorManager.getFileStream.lastCall.args[2].start).to.equal 0
+				expect(@PersistorManager.getFileStream.lastCall.args[2].end).to.equal 8
+				done()
+

 	describe "_getConvertedFile", ->

@@ -178,7 +192,3 @@
 				@FileConverter.convert.calledWith(@stubbedPath, @format).should.equal true
 				@LocalFileWriter.deleteFile.calledWith(@stubbedPath).should.equal true
 				done()
-
-
-
-


Get all tests passing with tree-sitter turned on

--- lib/bracket-matcher.coffee
+++ lib/bracket-matcher.coffee
@@ -182,21 +182,30 @@
     /['"`]/.test(string)

   isCursorOnInterpolatedString: ->
-    unless @interpolatedStringSelector?
-      segments = [
-        '*.*.*.interpolated.ruby'
-        'string.interpolated.ruby'
-        'string.regexp.interpolated.ruby'
-        'string.quoted.double.coffee'
-        'string.unquoted.heredoc.ruby'
-        'string.quoted.double.livescript'
-        'string.quoted.double.heredoc.livescript'
-        'string.quoted.double.elixir'
-        'string.quoted.double.heredoc.elixir'
-        'comment.documentation.heredoc.elixir'
-      ]
-      @interpolatedStringSelector = SelectorCache.get(segments.join(' | '))
-    @interpolatedStringSelector.matches(@editor.getLastCursor().getScopeDescriptor().getScopesArray())
+    cursor = @editor.getLastCursor()
+    languageMode = @editor.getBuffer().getLanguageMode()
+    if languageMode.getSyntaxNodeAtPosition?
+      node = languageMode.getSyntaxNodeAtPosition(
+        cursor.getBufferPosition(),
+        (node) -> /string|symbol/.test(node.type)
+      )
+      ['"', ':"', '%('].includes(node?.firstChild?.text)
+    else
+      unless @interpolatedStringSelector?
+        segments = [
+          '*.*.*.interpolated.ruby'
+          'string.interpolated.ruby'
+          'string.regexp.interpolated.ruby'
+          'string.quoted.double.coffee'
+          'string.unquoted.heredoc.ruby'
+          'string.quoted.double.livescript'
+          'string.quoted.double.heredoc.livescript'
+          'string.quoted.double.elixir'
+          'string.quoted.double.heredoc.elixir'
+          'comment.documentation.heredoc.elixir'
+        ]
+        @interpolatedStringSelector = SelectorCache.get(segments.join(' | '))
+      @interpolatedStringSelector.matches(@editor.getLastCursor().getScopeDescriptor().getScopesArray())

   isOpeningBracket: (string) ->
     @matchManager.pairedCharacters.hasOwnProperty(string)


fix creation of allocations on round contributors page

--- src/node_modules/round-contributors/round-contributors-controller.coffee
+++ src/node_modules/round-contributors/round-contributors-controller.coffee
@@ -24,7 +24,7 @@
     else
       allocation = new AllocationModel(
         userId: contributor.user.id
-        amountCents: data * 100
+        amount: data
         roundId: round.id
       )
       round.allocations.push(allocation)


Fix loading when using tool-bar@1.1.0

Fix loading when using tool-bar@1.1.0

--- lib/flex-tool-bar.coffee
+++ lib/flex-tool-bar.coffee
@@ -150,6 +150,10 @@
     @toolBar = toolBar 'flex-toolBar'
     @reloadToolbar(false)

+  getToolbarView: ->
+    # This is an undocumented API that moved in tool-bar@1.1.0
+    @toolBar.toolBarView || @toolBar.toolBar
+
   reloadToolbar: (withNotification=false) ->
     return unless @toolBar?
     try
@@ -165,10 +169,10 @@
       console.error error

   fixToolBarHeight: ->
-    @toolBar.toolBar.element.style.height = "#{@toolBar.toolBar.element.offsetHeight}px"
+    @getToolbarView().element.style.height = "#{@getToolbarView().element.offsetHeight}px"

   unfixToolBarHeight: ->
-    @toolBar.toolBar.element.style.height = null
+    @getToolbarView().element.style.height = null

   addButtons: (toolBarButtons) ->
     if toolBarButtons?


Remove reference to notifications

Remove reference to notifications

--- src/apps/settings/client/index.coffee
+++ src/apps/settings/client/index.coffee
@@ -4,6 +4,5 @@

 module.exports = ->
   general $('.js-general')
-  notifications $('.js-notifications')
   billing $('.js-billing-component')
   group_billing $('.js-group-billing-component')


vue section mark right

vue section mark right

--- src/beautifiers/vue-beautifier.coffee
+++ src/beautifiers/vue-beautifier.coffee
@@ -11,7 +11,7 @@

   beautify: (text, language, options) ->
     return new @Promise((resolve, reject) ->
-      regexp = /(<(template|script|style)[^>]*>)((\s|\S)*?)<\/\2>/gi
+      regexp = /(^<(template|script|style)[^>]*>)((\s|\S)*?)^<\/\2>/gim

       resolve(text.replace(regexp, (match, begin, type, text) ->
         lang = /lang\s*=\s*['"](\w+)["']/.exec(begin)?[1]


Another attempt at heroku support. Prefixed npm by node.

--- lib/plugin-loader.coffee
+++ lib/plugin-loader.coffee
@@ -88,7 +88,7 @@
 		# Execute npm install inside the pugin directory
 		child = exec(
 			# Command
-			"#{npmPath} install"
+			"node #{npmPath} install"

 			# Options
 			{ cwd: @dirPath }


UX improve, scan-by-word was invoked with empty selection, scan by word-boundry

--- lib/provider/scan.coffee
+++ lib/provider/scan.coffee
@@ -16,7 +16,12 @@
   updateGrammarOnQueryChange: false # for manual update

   initialize: ->
-    @scanWord = @getConfig('scanWord')
+    if @options.uiInput? and @editor.getSelectedBufferRange().isEmpty()
+      # scan by word-boundry if scan-by-current-word is invoked with empty selection.
+      @scanWord = true
+    else
+      @scanWord = @getConfig('scanWord')
+
     @highlighter = new Highlighter(this)
     @subscriptions.add new Disposable =>
       @highlighter.destroy()


Remove .coffee extension

Remove .coffee extension

--- lib/settings-view.coffee
+++ lib/settings-view.coffee
@@ -13,8 +13,8 @@
 PackageManager = require './package-manager'
 InstallPanel = require './install-panel'
 ThemesPanel = require './themes-panel'
-InstalledPackagesPanel = require './installed-packages-panel.coffee'
-UpdatesPanel = require './updates-panel.coffee'
+InstalledPackagesPanel = require './installed-packages-panel'
+UpdatesPanel = require './updates-panel'

 module.exports =
 class SettingsView extends ScrollView


Remove uses of deprecated APIs in remote module

--- atom/renderer/api/lib/remote.coffee
+++ atom/renderer/api/lib/remote.coffee
@@ -40,7 +40,7 @@
           constructor: ->
             if @constructor == RemoteFunction
               # Constructor call.
-              obj = ipc.sendChannelSync 'ATOM_BROWSER_CONSTRUCTOR', meta.id, wrapArgs(arguments)
+              obj = ipc.sendSync 'ATOM_BROWSER_CONSTRUCTOR', meta.id, wrapArgs(arguments)

               # Returning object in constructor will replace constructed object
               # with the returned object.
@@ -48,7 +48,7 @@
               return metaToValue obj
             else
               # Function call.
-              ret = ipc.sendChannelSync 'ATOM_BROWSER_FUNCTION_CALL', meta.id, wrapArgs(arguments)
+              ret = ipc.sendSync 'ATOM_BROWSER_FUNCTION_CALL', meta.id, wrapArgs(arguments)
               return metaToValue ret
       else
         ret = v8Util.createObjectWithName meta.name
@@ -62,27 +62,27 @@
               constructor: ->
                 if @constructor is RemoteMemberFunction
                   # Constructor call.
-                  obj = ipc.sendChannelSync 'ATOM_BROWSER_MEMBER_CONSTRUCTOR', meta.id, member.name, wrapArgs(arguments)
+                  obj = ipc.sendSync 'ATOM_BROWSER_MEMBER_CONSTRUCTOR', meta.id, member.name, wrapArgs(arguments)
                   return metaToValue obj
                 else
                   # Call member function.
-                  ret = ipc.sendChannelSync 'ATOM_BROWSER_MEMBER_CALL', meta.id, member.name, wrapArgs(arguments)
+                  ret = ipc.sendSync 'ATOM_BROWSER_MEMBER_CALL', meta.id, member.name, wrapArgs(arguments)
                   return metaToValue ret
           else
             ret.__defineSetter__ member.name, (value) ->
               # Set member data.
-              ipc.sendChannelSync 'ATOM_BROWSER_MEMBER_SET', meta.id, member.name, value
+              ipc.sendSync 'ATOM_BROWSER_MEMBER_SET', meta.id, member.name, value
               value

             ret.__defineGetter__ member.name, ->
               # Get member data.
-              ret = ipc.sendChannelSync 'ATOM_BROWSER_MEMBER_GET', meta.id, member.name
+              ret = ipc.sendSync 'ATOM_BROWSER_MEMBER_GET', meta.id, member.name
               metaToValue ret

       # Track delegate object's life time, and tell the browser to clean up
       # when the object is GCed.
       v8Util.setDestructor ret, ->
-        ipc.sendChannel 'ATOM_BROWSER_DEREFERENCE', meta.storeId
+        ipc.send 'ATOM_BROWSER_DEREFERENCE', meta.storeId

       # Remember object's id.
       v8Util.setHiddenValue ret, 'atomId', meta.id
@@ -104,19 +104,19 @@
 exports.require = (module) ->
   return moduleCache[module] if moduleCache[module]?

-  meta = ipc.sendChannelSync 'ATOM_BROWSER_REQUIRE', module
+  meta = ipc.sendSync 'ATOM_BROWSER_REQUIRE', module
   moduleCache[module] = metaToValue meta

 # Get current window object.
 windowCache = null
 exports.getCurrentWindow = ->
   return windowCache if windowCache?
-  meta = ipc.sendChannelSync 'ATOM_BROWSER_CURRENT_WINDOW', process.guestInstanceId
+  meta = ipc.sendSync 'ATOM_BROWSER_CURRENT_WINDOW', process.guestInstanceId
   windowCache = metaToValue meta

 # Get a global object in browser.
 exports.getGlobal = (name) ->
-  meta = ipc.sendChannelSync 'ATOM_BROWSER_GLOBAL', name
+  meta = ipc.sendSync 'ATOM_BROWSER_GLOBAL', name
   metaToValue meta

 # Get the process object in browser.
@@ -133,5 +133,5 @@

 # Get the guest WebContents from guestInstanceId.
 exports.getGuestWebContents = (guestInstanceId) ->
-  meta = ipc.sendChannelSync 'ATOM_BROWSER_GUEST_WEB_CONTENTS', guestInstanceId
+  meta = ipc.sendSync 'ATOM_BROWSER_GUEST_WEB_CONTENTS', guestInstanceId
   metaToValue meta


Fix classifications export request

Fix classifications export request

--- app/pages/lab/project-details.cjsx
+++ app/pages/lab/project-details.cjsx
@@ -4,6 +4,7 @@
 ImageSelector = require '../../components/image-selector'
 apiClient = require '../../api/client'
 putFile = require '../../lib/put-file'
+moment = require 'moment'

 MAX_AVATAR_SIZE = 64000
 MAX_BACKGROUND_SIZE = 256000
@@ -145,9 +146,9 @@

           Data export

           <button type="button" disabled={@state.exportRequested} onClick={@requestDataExport}>Request data export</button>{' '}
-          <PromiseRenderer tag="small" promise={apiClient.get @props.project._getURL 'classifications_exports'} then={([others..., mostRecent]) =>
-            Most recent: {mostRecent.created_at}
-          } />

+          <PromiseRenderer promise={apiClient.get @props.project._getURL 'classifications_exports'} then={([mostRecent]) =>
+            Most recent request: {moment(mostRecent.created_at).fromNow()}
+          } catch={null} />

           {if @state.exportError?

{@state.exportError.toString()}

@@ -185,7 +186,7 @@

   requestDataExport: ->
     @setState exportError: null
-    apiClient.post @props.project._getURL 'classifications_exports'
+    apiClient.post @props.project._getURL('classifications_exports'), media: content_type: 'text/csv'
       .then =>
         @setState exportRequested: true
       .catch (error) =>


new album alghoritm

new album alghoritm

--- app/scripts/views/main_view.coffee
+++ app/scripts/views/main_view.coffee
@@ -67,13 +67,15 @@
         ITTER--
     else if self.hasClass('right-button')
       if ITTER < @count - 2
-        WIDTH += @ui.img.eq(ITTER).width()
+        if ITTER is @count - 3
+          WIDTH += $(document).width() - @ui.img.eq(-1).width() - @ui.img.eq(-2).width()
+        else
+          WIDTH += @ui.img.eq(ITTER).width()
         ITTER++

-    if WIDTH > MAX_WIDTH
-      @ui.photoalbumInner.stop().animate('left': -MAX_WIDTH, 300)
-    else
-      @ui.photoalbumInner.stop().animate('left': -WIDTH, 300)
+    console.log ITTER
+
+    @ui.photoalbumInner.stop().animate('left': -WIDTH, 300)

   registrationForm: (event) =>
     event.preventDefault()
@@ -127,3 +129,4 @@
       width += $(@).width()

     MAX_WIDTH = width - $(document).width()
+    console.log MAX_WIDTH


typo and comments

typo and comments

--- app/views/CNeditor/CNeditor.coffee
+++ app/views/CNeditor/CNeditor.coffee
@@ -2704,21 +2704,27 @@
     #  Then adapt the type of the first line after the children and siblings of
     #    end line. Its previous sibling or parent might have been deleted,
     #    we then must find its new one in order to adapt its type.
+    ###*
+     * After an insertion or deletion of a bloc of lines, the lines following
+     * the bloc might be incoherent (depth and type of the lines)
+     * This function goes throught these lines to correct their depth.
+     * @param  {Line} startLine     The first line after the bloc of inserted or
+     *                              deleted lines
+     * @param  {Number} deltaInserted Delta of depth between the first line of
+     *                                the block and its last one.
+     * @param  {number} currentDelta  Delta of depth between the last line of
+     *                                the block (startLine) and the following.
+     * @param  {Number} minDepth      The depth under wich (this one included)
+     *                                we are sure the structure is valid and
+     *                                there is no need to check.
+    ###
     _adaptDepth: (startLine, deltaInserted, currentDelta, minDepth) ->
         if startLine.lineNext == null
             return

-        # Calculate depth for start and end line
-        # startLineDepth = startLine.lineDepthAbs
-        # # endLineDepth   = endLine.lineDepthAbs
-        # # deltaDepth     = endLineDepth - startLineDepth
-
-        # # adjust depth of the sons and siblings of endLine if deltadpeth > 1
+
+        # adjust depth of the sons and siblings of endLine if deltadpeth > 1
         firstNextLine = startLine.lineNext
-        # firstNextLineDepth = firstNextLine.lineDepthAbs
-        # currentDelta = firstNextLine.lineDepthAbs - startLineDepth
-        # deltaInserted  = endLineDepth - startLineDepth
-
         if currentDelta > 1
             lineIt = firstNextLine
             lineIt = @_unIndentBlock(lineIt,deltaInserted)
@@ -2726,26 +2732,6 @@
                 lineIt = @_unIndentBlock(lineIt,deltaInserted)

         return true
-
-    # _adaptDepth: (startLine, endLineDepth) ->
-    #     if startLine.lineNext == null
-    #         return
-
-    #     # Calculate depth for start and end line
-    #     startLineDepth = startLine.lineDepthAbs
-    #     # endLineDepth   = endLine.lineDepthAbs
-    #     # deltaDepth     = endLineDepth - startLineDepth
-
-    #     # adjust depth of the sons and siblings of endLine if deltadpeth > 1
-    #     firstNextLine = startLine.lineNext
-    #     firstNextLineDepth = firstNextLine.lineDepthAbs
-    #     delta1 = firstNextLine.lineDepthAbs - startLineDepth
-    #     delta  = endLineDepth - startLineDepth
-
-    #     if delta1 > 1
-    #         lineIt = firstNextLine
-    #         while lineIt != null && lineIt.lineDepthAbs > startLineDepth
-    #             lineIt = @_unIndentBlock(lineIt,delta)

     _adaptType: (startLine) ->
         # depth are ok, now check type : for each line after firstNextLine find
@@ -2762,7 +2748,6 @@

         return true

-
     _unIndentBlock: (firstLine,delta) ->
         line = firstLine
         firstLineDepth = firstLine.lineDepthAbs
@@ -2773,67 +2758,6 @@
             line.setDepthAbs(newDepth)
             line = line.lineNext
         return line
-
-
-    _adaptDepthV0 : (startLine, startLineDepthAbs, endLineDepthAbs, deltaDepth) ->
-        if startLine.lineNext == null
-            return
-
-        # adjuste depth of the sons and siblings of endLine if deltadpeth > 1
-        line = startLine.lineNext
-        deltaDepth1stLine = line.lineDepthAbs - startLineDepthAbs
-        if deltaDepth1stLine > 1
-            while line!= null and line.lineDepthAbs >= endLineDepthAbs
-                newDepth = line.lineDepthAbs - deltaDepth
-                line.setDepthAbs(newDepth)
-                line = line.lineNext
-        lineAfterEndLineSons = line
-
-        # adjust the type of line after endLine
-        line = startLine.lineNext
-        # if the line is a line (Lx), then make it "independant"
-        # by turning it in a Tx, except if unecessary (previou is same
-        # type and same prof)
-        if line.lineType[0] == 'L'
-            prev = @_findPrevSiblingT(line)
-            if prev == null
-                line.setType('T' + line.lineType[1])
-            else
-                line.setType( 'L' + prev.lineType[1] )
-
-        # find the previous sibling of all the lines after the sons and siblings
-        # of endLine (if their depth has been adjusted, other wise we start from
-        # the line just after endLine. Only L are to be checked because their
-        # "parent" might have become of a different type.
-        if line == lineAfterEndLineSons
-            line = line.lineNext
-        else
-            line = lineAfterEndLineSons
-        highestPrevSib = line.linePrev
-        minDepth = line.lineDepthAbs + 1
-
-        # while not at the end and we have not reached a line of depth 1 :
-        while line != null && line.lineDepthAbs > 1
-            depthLine = line.lineDepthAbs
-
-            if line.lineDepthAbs < minDepth
-                minDepth = line.lineDepthAbs
-                if line.lineType[0] == 'L'
-                    prev = highestPrevSib
-                    while prev.lineDepthAbs > depthLine
-                        prev = prev.linePrev
-                    highestPrevSib = prev
-                    if line.lineType[1] != prev.lineType[1]
-                        # adjust all its lines siblings
-                        while line.lineDepthAbs >= prev.lineDepthAbs
-                            if line.lineDepthAbs == prev.lineDepthAbs
-                                if line.lineType[0] == 'L'
-                                    line.setType('L' + prev.lineType[1])
-                                else
-                                    break
-                            line = line.lineNext
-            line = line.lineNext
-

@@ -3987,7 +3911,7 @@
                 lineNextStartLine.linePrev = domWalkContext.lastAddedLine
                 @linesDiv.insertBefore(frag, lineNextStartLine.line$[0])
         ###*
-         * 8- Adapt lines type.
+         * 8- Adapt lines depth and type.
         ###
         # @_adaptDepth(domWalkContext.lastAddedLine, domWalkContext.lastAddedLine.lineDepthAbs)
         lastAdded = domWalkContext.lastAddedLine
@@ -4002,21 +3926,6 @@
                 currentDelta,                  # currentDelta
                 lastAddedDepth  )              # minDepth
             @_adaptType(currSel.startLine)
-
-        # res = @checker.checkLines(this)
-        # if ! res
-        #     debugger
-        #     lastAdded = domWalkContext.lastAddedLine
-        #     if lastAdded.lineNext
-        #         startLineDepth = startLine.lineDepthAbs
-        #         deltaInserted  = startLineDepth - lastAdded.lineDepthAbs
-        #         currentDelta   = lastAdded.lineNext.lineDepthAbs - lastAdded.lineDepthAbs
-        #         @_adaptDepth(
-        #             domWalkContext.lastAddedLine,  # startLine
-        #             deltaInserted,                 # deltaInserted
-        #             currentDelta,                  # currentDelta
-        #             lastAddedDepth )               # minDepth
-        #         @_adaptType(currSel.startLine)

         ###*
          * 9- position caret


Fix league id for Tarena Ladder (#5232)

Fix league id for Tarena Ladder (#5232)

--- app/views/ladder/LadderView.coffee
+++ app/views/ladder/LadderView.coffee
@@ -41,7 +41,7 @@
     'click .spectate-button': 'onClickSpectateButton'

   initialize: (options, @levelID, @leagueType, @leagueID) ->
-    if features.china and @leagueType == 'course' and @leagueID == "5cb8403aa8f4ee00248103c8"   #just for china tarena hackthon 2019 classroom RestPoolLeaf
+    if features.china and @leagueType == 'course' and @leagueID == "5cb8403a60778e004634ee6e"   #just for china tarena hackthon 2019 classroom RestPoolLeaf
       @leagueID = @leagueType = null
     @level = @supermodel.loadModel(new Level(_id: @levelID)).model
     onLoaded = =>


trigger build

trigger build

--- src/default-directory-provider.coffee
+++ src/default-directory-provider.coffee
@@ -20,7 +20,7 @@
     else
       uri

-    # TODO: Stop normalizing the path in pathwatcher's Directory.
+    # TODO: Stop normalizing the path in pathwatcher Directory.
     directory = new Directory(directoryPath)
     if url.parse(directoryPath).protocol?
       directory.path = directoryPath


fixes #34

fixes #34

--- lib/atom-ternjs-provider.coffee
+++ lib/atom-ternjs-provider.coffee
@@ -9,7 +9,7 @@
     suggestionsArr = []
     currentSuggestionIndex: 0
     disposables: []
-    maxItems = null
+    maxItems = 1000
     force = false
     # automcomplete-plus
     autocompletePlus = null
@@ -115,6 +115,7 @@
             return

         currentSuggestion = @suggestionsArr[@currentSuggestionIndex]
+        return unless currentSuggestion
         if !currentSuggestion._ternDocs and !currentSuggestion._ternUrl and !currentSuggestion._ternOrigin
             @manager.documentation.hide()
             return
@@ -159,7 +160,6 @@
         @selector = @selector.replace(',' + selector, '')

     registerEvents: ->
-        @disposables.push atom.config.observe('autocomplete-plus.maxSuggestions', => maxItems = atom.config.get('autocomplete-plus.maxSuggestions'))
         @disposables.push @autocompletePlus.autocompleteManager.suggestionList.emitter.on 'did-cancel', =>
             @clearSuggestions()
             @manager.documentation.hide()


fix for collection bug after resetting form

--- lib/client/autoform-file.coffee
+++ lib/client/autoform-file.coffee
@@ -41,52 +41,49 @@
 		template = 'fileThumbImg'
 	template

-# Template.afFileUpload.rendered = () ->
-# 	doc = Template.parentData(1)._af.doc
-# 	data = Template.currentData()
-
-
 clearFilesFromSession = ->
 	_.each Session.keys, (value, key, index)->
 		if key.indexOf('fileUpload') > -1
 			Session.set key, ''

+getCollection = (context) ->
+  if typeof context.atts.collection == 'string'
+    context.atts.collection = FS._collections[context.atts.collection] or window[context.atts.collection]
+  return context.atts.collection

 AutoForm.addHooks null,
 	onSuccess: ->
 		clearFilesFromSession()
-
-Template.afFileUpload.rendered = ->
-	if typeof @data.atts.collection == 'string'
-		@data.atts.collection = FS._collections[@data.atts.collection] or window[@data.atts.collection]
-
+
 Template.afFileUpload.destroyed = () ->
 	name = @data.name
 	Session.set 'fileUpload['+name+']', null

-Template.afFileUpload.events
-	"change .file-upload": (e, t) ->
-		files = e.target.files
-		collection = t.data.atts.collection
-		collection.insert files[0], (err, fileObj) ->
-			if err
-				console.log err
-			else
-				name = $(e.target).attr('file-input')
-				# console.log $(e.target)
-				# console.log fileObj
-				$('input[name="'+name+'"]').val(fileObj._id)
-				Session.set 'fileUploadSelected['+name+']', files[0].name
-				# console.log fileObj
-				refreshFileInput name
-	'click .file-upload-clear': (e,t)->
-		name = $(e.currentTarget).attr('file-input')
-		$('input[name="' + name + '"]').val('')
-		Session.set 'fileUpload['+name+']', 'delete-file'
+Template.afFileUpload.events {
+  "change .file-upload": (e, t) ->
+    files = e.target.files
+
+    collection = getCollection(t.data)
+    collection.insert files[0], (err, fileObj) ->
+      if err
+        console.log err
+      else
+        name = $(e.target).attr('file-input')
+        # console.log $(e.target)
+        # console.log fileObj
+        $('input[name="' + name + '"]').val(fileObj._id)
+        Session.set 'fileUploadSelected[' + name + ']', files[0].name
+        # console.log fileObj
+        refreshFileInput name
+  'click .file-upload-clear': (e, t)->
+    name = $(e.currentTarget).attr('file-input')
+    $('input[name="' + name + '"]').val('')
+    Session.set 'fileUpload[' + name + ']', 'delete-file'
+}

 Template.afFileUpload.helpers
 	collection: ->
-		@.atts.collection
+		getCollection(@)
 	label: ->
 		@atts.label or 'Choose file'
 	fileUploadAtts: ->
@@ -98,7 +95,7 @@
 		# Template.parentData(4).value

 		name = @atts.name
-		collection = @atts.collection
+		collection = getCollection(@)

 		if af &&  af.submitType == 'insert'
 			doc = af.doc


Updated some comments

Updated some comments

--- lib/index.coffee
+++ lib/index.coffee
@@ -39,10 +39,11 @@
 # - redisObserver:<redis client>. Livedb actually needs 2 redis connections,
 #     because redis doesn't let you use a connection with pubsub subscriptions
 #     to edit data. Livedb will automatically try to clone the first connection
-#     to make the observer connection, but we can't copy some options, like the
-#     selected database. if you want to change that (or do anything else thats
-#     fancy), you should make 2 redis instances and provide livedb with both of
-#     them.
+#     to make the observer connection, but we can't copy some options. if you
+#     want to do anything thats particularly fancy, you should make 2 redis
+#     instances and provide livedb with both of them. Note that because redis
+#     pubsub messages aren't constrained to the selected database, the
+#     redisObserver doesn't need to select the db you have your data in.
 #
 # - extraDbs:{}  This is used to register extra database backends which will be
 #     notified whenever operations are submitted. They can also be used in
@@ -64,6 +65,7 @@
   # operations. We make an extra redis connection for the streams.
   redisObserver = options.redisObserver
   unless redisObserver
+    # We can't copy the selected db, but pubsub messages aren't namespaced to their db anyway.
     redisObserver = redisLib.createClient redis.port, redis.host, redis.options
     redisObserver.auth redis.auth_pass if redis.auth_pass
   redisObserver.setMaxListeners 0
@@ -310,7 +312,8 @@
       return callback err if err

       if ops.length
-        # What should we do in this case, when redis returns ops but is missing ops at the end of the requested range?
+        # What should we do in this case, when redis returns ops but is missing
+        # ops at the end of the requested range?
         #if to? && ops[ops.length - 1].v != to

         # We have at least some of the ops at the end of the range.


update error/warning logging

update error/warning logging

--- lib/index.coffee
+++ lib/index.coffee
@@ -20,9 +20,14 @@
         compiler = webpack(opts)

         compiler.watch opts.watchDelay or 200, (err, stats) ->
-          if err then return console.error('ERROR: ', err)
-          console.log('STATS: ', stats.toJson())
+          if err then return emitter.emit('err',  err)
+          else if (statsJson = stats.toJson()).errors.length > 0
+            return emitter.emit('err',  statsJson.errors)
+          else if statsJson.warnings.length > 0
+            return emitter.emit('warn', statsJson.warnings)
+          else return

         # debug
         emitter.on('err', console.error)
         emitter.on('stats', console.log)
+        emitter.on('warn', console.warn)


add optional watch, compile

add optional watch, compile

--- lib/index.coffee
+++ lib/index.coffee
@@ -2,10 +2,11 @@
 RootsUtil      = require 'roots-util'
 webpack        = require 'webpack'
 {EventEmitter} = require 'events'
+_              = require 'lodash'

 module.exports = (opts) ->
   if opts.filename? then opts.filename = 'bundle.js'
-
+
   webpack_initialized = false
   compiler = null
   emitter = new EventEmitter
@@ -18,11 +19,17 @@
         opts.context = @roots.root
         opts.output.path = path.join(@roots.config.output_path())
         compiler = webpack(opts)
-
-        compiler.watch opts.watchDelay or 200, (err, stats) ->
-          if err
-            throw new Error(err)
+
+        callback = (err, stats) ->
+          if err then throw new Error(err)
           else if (statsJson = stats.toJson()).errors.length > 0
             throw new Error(error) for i, error of statsJson.errors
           else if statsJson.warnings.length > 0
             throw new Error(error) for i, error of statsJson.warnings
+
+        # Temporary solution to define if user is watching `roots watch` or
+        # compiling `roots compile` the project. This solves a hang up from
+        # webpack if `roots compile` is used.
+        unless _.isUndefined @roots._events
+          compiler.watch(opts.watchDelay or 200, callback)
+        else compiler.run(callback)


Added an event blacklist for session events.

--- visualiser/scripts/init.coffee
+++ visualiser/scripts/init.coffee
@@ -29,7 +29,7 @@
 quickPick = (stream) ->
     val = stream.pick(0)
     if val
-        while (val[0].data.event == "start" || val[0].data.event == "finish")
+        while (eventBlacklist.indexOf(val[0].data.event) > -1)
             val = stream.pick(0)
         {values: [val[0].data.datapoints.orientation.x, val[0].data.datapoints.orientation.y], time: val[0].time}
     else
@@ -41,7 +41,7 @@
   i = 0
   val = stream.get(i)
   while(val)
-    if val.data.event isnt "start" and val.data.event isnt "finish"
+    if eventBlacklist.indexOf(val.data.event) is -1
       x = val.data.datapoints.orientation.x
       y = val.data.datapoints.orientation.y
       console.log x, y
@@ -51,4 +51,6 @@
       highest.y = if y > highest.y then y else highest.y
     i++
     val = stream.get(i)
-  [{min: lowest.x, max: highest.x}, {min: lowest.y, max: highest.y}]+  [{min: lowest.x, max: highest.x}, {min: lowest.y, max: highest.y}]
+
+  eventBlacklist = ["start", "finish", "formdata"]


BS isn't used

BS isn't used

--- src/components/task-plan/select-topics.cjsx
+++ src/components/task-plan/select-topics.cjsx
@@ -1,6 +1,6 @@
 React = require 'react'
 _ = require 'underscore'
-BS = require 'react-bootstrap'
+
 Dialog = require '../dialog'
 LoadableItem = require '../loadable-item'
 {TocStore, TocActions} = require '../../flux/toc'


Properly insert type into lhs

Properly insert type into lhs

Closes #113

--- lib/haskell-ghc-mod.coffee
+++ lib/haskell-ghc-mod.coffee
@@ -218,6 +218,9 @@
             {scope, range, symbol} =
               Util.getSymbolAtPoint editor, pos
             symbol = "(#{symbol})" if scope is 'keyword.operator.haskell'
+            # lhs
+            if 'meta.embedded.haskell' in editor.scopeDescriptorForBufferPosition(pos).getScopesArray()
+              indent = editor.getBuffer().getTextInRange([[range.start.row, 0], [range.start.row, 2]]) + indent
             pos = [range.start.row, 0]
             editor.setTextInBufferRange [pos, pos],
               indent + symbol + " :: " + type + "\n"


Apply clearfix to merge conflicts panel

Apply clearfix to merge conflicts panel

Necessary as the Quit button is floated right

--- lib/merge-conflicts-view.coffee
+++ lib/merge-conflicts-view.coffee
@@ -15,7 +15,7 @@
   instance: null

   @content: (state, pkg) ->
-    @div class: 'merge-conflicts tool-panel panel-bottom padded', =>
+    @div class: 'merge-conflicts tool-panel panel-bottom padded clearfix', =>
       @div class: 'panel-heading', =>
         @text 'Conflicts'
         @span class: 'pull-right icon icon-fold', click: 'minimize', 'Hide'


Include hidden files when running nak

Include hidden files when running nak

--- lib/load-paths-task.coffee
+++ lib/load-paths-task.coffee
@@ -15,6 +15,7 @@
     args.unshift('--addVCSIgnores') if config.get('core.excludeVcsIgnoredPaths')
     args.unshift('--ignore', ignoredNames.join(',')) if ignoredNames.length > 0
     args.unshift('--follow')
+    args.unshift('--hidden')

     paths = []
     exit = (code) =>


Rename @typed to @typingCompleted

Rename @typed to @typingCompleted

--- lib/operators/input.coffee
+++ lib/operators/input.coffee
@@ -2,9 +2,9 @@
 _ = require 'underscore-plus'

 # The operation for text entered in input mode. Broadly speaking, input
-# operators manage an undo transaction and set a @typed variable when it's done.
-# When the input operation is completed, the typed variable tells the operation
-# to repeat itself instead of enter insert mode.
+# operators manage an undo transaction and set a @typingCompleted variable when
+# it's done. When the input operation is completed, the typingCompleted variable
+# tells the operation to repeat itself instead of enter insert mode.
 class Insert extends Operator
   standalone: true

@@ -15,12 +15,12 @@
     @typedText = bundler.buildInsertText()

   execute: ->
-    if @typed
+    if @typingCompleted
       @undoTransaction =>
         @editor.getBuffer().insert(@editor.getCursorBufferPosition(), @typedText, true)
     else
       @vimState.activateInsertMode()
-      @typed = true
+      @typingCompleted = true

   inputOperator: -> true

@@ -43,7 +43,7 @@
   execute: (count=1) ->
     # If we've typed, we're being repeated. If we're being repeated,
     # undo transactions are already handled.
-    @editor.beginTransaction() unless @typed
+    @editor.beginTransaction() unless @typingCompleted
     operator = new Delete(@editor, @vimState, allowEOL: true, selectOptions: {excludeWhitespace: true})
     operator.compose(@motion)

@@ -56,10 +56,10 @@
       else
         @editor.insertNewlineAbove()

-    return super if @typed
+    return super if @typingComplete

     @vimState.activateInsertMode(transactionStarted = true)
-    @typed = true
+    @typingComplete = true

   onLastRow: ->
     {row, column} = @editor.getCursorBufferPosition()


Sort packages if sortBy option is given to PackageManager#search

--- lib/package-manager.coffee
+++ lib/package-manager.coffee
@@ -233,6 +233,10 @@
         if code is 0
           try
             packages = JSON.parse(stdout) ? []
+            if options.sortBy
+              packages = _.sortBy packages, (pkg) ->
+                return pkg[options.sortBy]*-1
+
             resolve(packages)
           catch parseError
             error = createJsonParseError(errorMessage, parseError, stdout)


Removed lib/render-template.coffee.

Removed lib/render-template.coffee.

--- lib/render-template.coffee
+++ lib/render-template.coffee
@@ -1,31 +0,0 @@
-React = require 'react'
-ReactDOM = require 'react-dom/server'
-Helmet = require 'react-helmet'
-ReactRouter = require 'react-router'
-
-init = require '../src/scripts/init.coffee'
-createFactory = require '../src/scripts/create-factory.coffee'
-Root = createFactory require '../src/scripts/views/root.coffee'
-IndexTemplate = require '../views/index.coffee'
-
-RouterContext = createFactory ReactRouter.RouterContext
-
-fn = (config) ->
-  { storeModule, serverUrl, params, lang } = config
-  props = config.props || {}
-  Template = config.Template || IndexTemplate
-  { store } = storeModule
-  init(store, params, lang).then ->
-    doctype = '<!DOCTYPE html>'
-    app = ReactDOM.renderToString Root { store }, RouterContext props
-    h = Helmet.rewind()
-    title = h.title.toComponent()[0]
-    meta = h.meta.toComponent()
-    state = store.getState()
-    siteTitle = state.localeState.toJS().localeStrings[lang].title || ''
-    html = ReactDOM.renderToStaticMarkup(
-      React.createElement Template, { siteTitle, title, meta, app, lang, state }
-    )
-    return doctype + html
-
-module.exports = fn


Print log on console when debug-mode option was enabled

--- lib/rubocop-auto-correct.coffee
+++ lib/rubocop-auto-correct.coffee
@@ -87,6 +87,8 @@
     fs.writeFileSync(tempFilePath, buffer.getText())
     args = ['-a', tempFilePath]
     options = { encoding: 'utf-8', timeout: 5000 }
+    notification = atom.config.get('rubocop-auto-correct.notification')
+    debug = atom.config.get('rubocop-auto-correct.debugMode')

     which command, (err) ->
       if (err)
@@ -101,26 +103,35 @@
       rubocop = spawnSync(command, args, options)

       if rubocop.stderr != ""
-        return atom.notifications.addError(rubocop.stderr)
+        if debug
+          return console.error(rubocop.stderr)
+        if notification
+          return atom.notifications.addError(rubocop.stderr)

       if rubocop.stdout.match("corrected")
         buffer.setTextViaDiff(fs.readFileSync(tempFilePath, 'utf-8'))
-        if atom.config.get('rubocop-auto-correct.notification')
+        if notification || debug
           re = /^.+?(:[0-9]+:[0-9]+:.*$)/mg
           offenses = rubocop.stdout.match(re)
           offenses.map (offense) ->
             message = offense.replace(re, buffer.getBaseName() + "$1")
-            atom.notifications.addSuccess(message)
+            if debug
+              console.log(message)
+            if notification
+              atom.notifications.addSuccess(message)

   autoCorrectFile: (filePath)  ->
     command = atom.config.get('rubocop-auto-correct.rubocopCommandPath')
     args = ['-a', filePath]
+    debug = atom.config.get('rubocop-auto-correct.debugMode')
+    notification = atom.config.get('rubocop-auto-correct.notification')
     stdout = (output) ->
       if output.match("corrected")
-        if atom.config.get('rubocop-auto-correct.notification')
-          atom.notifications.addSuccess(output)
+        console.log(output) if debug
+        atom.notifications.addSuccess(output) if notification
     stderr = (output) ->
-      atom.notifications.addError(output)
+      console.error(output) if debug
+      atom.notifications.addError(output) if notification

     which command, (err) ->
       if (err)


Minor change dut to @unimplemented change

--- library/visualize/remote.coffee
+++ library/visualize/remote.coffee
@@ -83,14 +83,14 @@
     # arbitrary remotable action invoke cannot be bound to other than
     # only a set of arguments that must be scalars or similar to them.
     # This method does process the args, each arg being inspected.
-    processed: (parameters...) -> @unimplemented()
+    processed: (parameters...) -> @unimplemented arguments

     # Generation of string representation of the remotable action
     # in JavaScript, so that it can be executed remotely on site. An
     # arbitrary remotable action invoke cannot be bound to other than
     # only a set of arguments that must be scalars or similar to them.
     # This method does not do any processing of args, inserts raws.
-    unprocessed: (parameters...) -> @unimplemented()
+    unprocessed: (parameters...) -> @unimplemented arguments

     # Either get or set the sourcing object for this remotable
     # implementation. The sourcing object is the programmatically


reset demo, shouldnt have deleted this code

--- app/routes/index.coffee
+++ app/routes/index.coffee
@@ -1,4 +1,9 @@
 route = Ember.Route.extend
+  # Reset the demo state
+  deactivate: () ->
+    controller = @get 'controller'
+    controller.setProperties { isDemoActive: false }
+
   actions:
     showDemo: ->
       @get('controller').set('isDemoActive', true)


Mocha 3 compat

Mocha 3 compat

--- spec/runner.coffee
+++ spec/runner.coffee
@@ -327,6 +327,7 @@
         chai.expect(uniques).to.eql expectUniques

         done()
+      return

   describe 'using scripts as API adapter', ->
     details = null


removed pending tests

removed pending tests

--- spec/thread.coffee
+++ spec/thread.coffee
@@ -270,101 +270,101 @@
           "[bg-w]": 200
           "[bg-h]": 100

-      it 'screensize changes', () ->
-        thread.execute
-          commands:[
-            # window
-            ['suggest',['get','[window]'],2000,'require']
-          ]
-
-        expect(thread.getValues()).to.eql
-          "[window]": 2000
-          "[frame-w]": 200
-          "[frame-h]": 200
-          "[bg-w]": 400
-          "[bg-h]": 200
-
-
-  describe 'Scoped Commands', ->
-
-    describe 'PENDING: simulated cropping demo', ->
-
-      thread = new Thread {
-        defaultStrength: "weak"
-      }
-
-      it 'initial layout', () ->
-        thread.execute
-          commands:[
-            # window
-            ['suggest',['get','[window]'],1000,'require']
-
-            # weak layout
-            ['eq',['get','[frame-w]'],['divide',['get','[window]'],10],'weak']
-            ['eq',['get','[frame-h]'],['divide',['get','[window]'],10],'weak']
-
-            # cropping
-            # -----------------------------------
-
-            ['$scope',
-
-              '$frame', # scope id
-
-              [ # commands
-
-                # import vars?
-                #['stay',['get','[frame-w]'],'strong']
-                #['stay',['get','[frame-h]'],'strong']
-
-                # required 2x1 landscape aspect ratio
-                ['eq',['get','[bg-w]'],['multiply',['get','[bg-h]'],2],'require']
-
-                # bg weakly is size of frame
-                ['eq',['get','[frame-w]'],['get','[bg-w]'],'weak']
-                ['eq',['get','[frame-h]'],['get','[bg-h]'],'weak']
-
-                # bg required to cover frame
-                ['lte',['get','[frame-w]'],['get','[bg-w]'],'require']
-                ['lte',['get','[frame-h]'],['get','[bg-h]'],'require']
-              ]
-            ]
-          ]
-        expect(thread.getValues()).to.eql
-          "[window]": 1000
-          "[frame-w]": 100
-          "[frame-h]": 100
-          "[bg-w]": 200
-          "[bg-h]": 100
-
-      it 'screensize changes 1', () ->
-        thread.execute
-          commands:[
-            # window
-            ['suggest',['get','[window]'],2000,'require']
-          ]
-
-        expect(thread.getValues()).to.eql
-          "[window]": 2000
-          "[frame-w]": 200
-          "[frame-h]": 200
-          "[bg-w]": 400
-          "[bg-h]": 200
-
-      it 'screensize changes 2', () ->
-        thread.execute
-          commands:[
-            # window
-            ['suggest',['get','[window]'],100,'require']
-          ]
-
-        expect(thread.getValues()).to.eql
-          "[window]": 100
-          "[frame-w]": 10
-          "[frame-h]": 10
-          "[bg-w]": 20
-          "[bg-h]": 10
-
-
+      #it 'screensize changes', () ->
+      #  thread.execute
+      #    commands:[
+      #      # window
+      #      ['suggest',['get','[window]'],2000,'require']
+      #    ]
+      #
+      #  expect(thread.getValues()).to.eql
+      #    "[window]": 2000
+      #    "[frame-w]": 200
+      #    "[frame-h]": 200
+      #    "[bg-w]": 400
+      #    "[bg-h]": 200
+
+
+  #describe 'Scoped Commands', ->
+  #
+  #  describe 'PENDING: simulated cropping demo', ->
+  #
+  #    thread = new Thread {
+  #      defaultStrength: "weak"
+  #    }
+  #
+  #    it 'initial layout', () ->
+  #      thread.execute
+  #        commands:[
+  #          # window
+  #          ['suggest',['get','[window]'],1000,'require']
+  #
+  #          # weak layout
+  #          ['eq',['get','[frame-w]'],['divide',['get','[window]'],10],'weak']
+  #          ['eq',['get','[frame-h]'],['divide',['get','[window]'],10],'weak']
+  #
+  #          # cropping
+  #          # -----------------------------------
+  #
+  #          ['$scope',
+  #
+  #            '$frame', # scope id
+  #
+  #            [ # commands
+  #
+  #              # import vars?
+  #              #['stay',['get','[frame-w]'],'strong']
+  #              #['stay',['get','[frame-h]'],'strong']
+  #
+  #              # required 2x1 landscape aspect ratio
+  #              ['eq',['get','[bg-w]'],['multiply',['get','[bg-h]'],2],'require']
+  #
+  #              # bg weakly is size of frame
+  #              ['eq',['get','[frame-w]'],['get','[bg-w]'],'weak']
+  #              ['eq',['get','[frame-h]'],['get','[bg-h]'],'weak']
+  #
+  #              # bg required to cover frame
+  #              ['lte',['get','[frame-w]'],['get','[bg-w]'],'require']
+  #              ['lte',['get','[frame-h]'],['get','[bg-h]'],'require']
+  #            ]
+  #          ]
+  #        ]
+  #      expect(thread.getValues()).to.eql
+  #        "[window]": 1000
+  #        "[frame-w]": 100
+  #        "[frame-h]": 100
+  #        "[bg-w]": 200
+  #        "[bg-h]": 100
+  #
+  #    it 'screensize changes 1', () ->
+  #      thread.execute
+  #        commands:[
+  #          # window
+  #          ['suggest',['get','[window]'],2000,'require']
+  #        ]
+  #
+  #      expect(thread.getValues()).to.eql
+  #        "[window]": 2000
+  #        "[frame-w]": 200
+  #        "[frame-h]": 200
+  #        "[bg-w]": 400
+  #        "[bg-h]": 200
+  #
+  #    it 'screensize changes 2', () ->
+  #      thread.execute
+  #        commands:[
+  #          # window
+  #          ['suggest',['get','[window]'],100,'require']
+  #        ]
+  #
+  #      expect(thread.getValues()).to.eql
+  #        "[window]": 100
+  #        "[frame-w]": 10
+  #        "[frame-h]": 10
+  #        "[bg-w]": 20
+  #        "[bg-h]": 10
+  #
+  #

   # DOM Prop Helpers


Edited isNaN check in fullpie.coffee

Edited isNaN check in fullpie.coffee

--- widgets/fullpie/fullpie.coffee
+++ widgets/fullpie/fullpie.coffee
@@ -48,22 +48,9 @@
     for val in data
       sum += val.value

-#    arcs.append("svg:text").attr("transform", (d, i) ->
-#      procent_val = Math.round(data[i].value/sum * 100)
-#      d.innerRadius = (radius * (100-procent_val)/100) - 45  #45=max text size/2
-#      d.outerRadius = radius
-#      "translate(" + arc.centroid(d) + ")")
-#      .attr('fill', "#fff")
-#      .attr("text-anchor", "middle").text((d, i) -> data[i].label).attr('font-size', '28px')
-#      .append('svg:tspan')
-#      .attr('x', 0)
-#      .attr('dy', 25)
-#      .attr('font-size', '90%')
-#      .text((d,i) -> data[i].value + ' (' + Math.round(data[i].value/sum * 100) + '%)')
-
     arcs.append("svg:text").attr("transform", (d, i) ->
-      percent_val = getpercentval()
-      d.innerRadius = (radius * (100-percent_val)/100) - 45  #45=max text size/2
+      procent_val = Math.round(data[i].value/sum * 100)
+      d.innerRadius = (radius * (100-procent_val)/100) - 45  #45=max text size/2
       d.outerRadius = radius
       "translate(" + arc.centroid(d) + ")")
       .attr('fill', "#fff")
@@ -72,10 +59,4 @@
       .attr('x', 0)
       .attr('dy', 25)
       .attr('font-size', '90%')
-      .text((d,i) -> data[i].value + ' (' + percent_val + '%)')
-
-    getpercentval: ->
-      if _.isNan(Math.round(data[i].value/sum * 100))
-        0
-      else
-        Math.round(data[i].value/sum * 100)
+      .text((d,i) -> data[i].value + ' (' + Math.round(data[i].value/sum * 100) + '%)')


Tweak login prompt

Tweak login prompt

--- src/login.coffee
+++ src/login.coffee
@@ -43,12 +43,15 @@
     "AtomPackageManager/#{require('../package.json').version}"

   welcomeMessage: (state) =>
-    welcome =
-       """Welcome to Atom! Before you can publish packages, you'll need an API token.
-       Visit your account page on Atom.io (https://atom.io/account), copy the token
-       and paste it below when prompted.
+    welcome = """
+      Welcome to Atom!

-       """
+      Before you can publish packages, you'll need an API token.
+
+      Visit your account page on Atom.io #{'https://atom.io/account'.underline},
+      copy the token and paste it below when prompted.
+
+    """
     console.log welcome

     @prompt({prompt: "Press [Enter] to open your account page on Atom.io."})


Javascript builtin math.round can't quite do it

--- resources/assets/coffee/react/profile-page/top-ranks.coffee
+++ resources/assets/coffee/react/profile-page/top-ranks.coffee
@@ -50,7 +50,7 @@
     if (i + 1) > limit
       topClasses += ' hidden'

-    title = "#{score.beatmapSet.data.title} [#{score.beatmap.data.version}]#{modsText}(#{Math.round(score.accuracy * 100, 2)}%)"
+    title = "#{score.beatmapSet.data.title} [#{score.beatmap.data.version}]#{modsText}(#{_.round(score.accuracy * 100, 2)}%)"

     li
       key: score.id


indent

indent

--- snippets/inno-setup.coffee
+++ snippets/inno-setup.coffee
@@ -1,556 +1,556 @@
 ".source.inno":
-  AfterInstall:
-    prefix: "AfterInstall"
-    body: "AfterInstall"
-  AfterMyProgInstall:
-    prefix: "AfterMyProgInstall"
-    body: "AfterMyProgInstall"
-  AllowCancelDuringInstall:
-    prefix: "AllowCancelDuringInstall"
-    body: "AllowCancelDuringInstall"
-  AllowNetworkDrive:
-    prefix: "AllowNetworkDrive"
-    body: "AllowNetworkDrive"
-  AllowNoIcons:
-    prefix: "AllowNoIcons"
-    body: "AllowNoIcons"
-  AllowRootDirectory:
-    prefix: "AllowRootDirectory"
-    body: "AllowRootDirectory"
-  AllowUNCPath:
-    prefix: "AllowUNCPath"
-    body: "AllowUNCPath"
-  AlwaysCreateUninstallIcon:
-    prefix: "AlwaysCreateUninstallIcon"
-    body: "AlwaysCreateUninstallIcon"
-  AlwaysRestart:
-    prefix: "AlwaysRestart"
-    body: "AlwaysRestart"
-  AlwaysShowComponentsList:
-    prefix: "AlwaysShowComponentsList"
-    body: "AlwaysShowComponentsList"
-  AlwaysShowDirOnReadyPage:
-    prefix: "AlwaysShowDirOnReadyPage"
-    body: "AlwaysShowDirOnReadyPage"
-  AlwaysShowGroupOnReadyPage:
-    prefix: "AlwaysShowGroupOnReadyPage"
-    body: "AlwaysShowGroupOnReadyPage"
-  AlwaysUsePersonalGroup:
-    prefix: "AlwaysUsePersonalGroup"
-    body: "AlwaysUsePersonalGroup"
-  AppComments:
-    prefix: "AppComments"
-    body: "AppComments"
-  AppContact:
-    prefix: "AppContact"
-    body: "AppContact"
-  AppCopyright:
-    prefix: "AppCopyright"
-    body: "AppCopyright"
-  AppendDefaultDirName:
-    prefix: "AppendDefaultDirName"
-    body: "AppendDefaultDirName"
-  AppendDefaultGroupName:
-    prefix: "AppendDefaultGroupName"
-    body: "AppendDefaultGroupName"
-  AppId:
-    prefix: "AppId"
-    body: "AppId"
-  AppModifyPath:
-    prefix: "AppModifyPath"
-    body: "AppModifyPath"
-  AppMutex:
-    prefix: "AppMutex"
-    body: "AppMutex"
-  AppName:
-    prefix: "AppName"
-    body: "AppName"
-  AppPublisher:
-    prefix: "AppPublisher"
-    body: "AppPublisher"
-  AppPublisherURL:
-    prefix: "AppPublisherURL"
-    body: "AppPublisherURL"
-  AppReadmeFile:
-    prefix: "AppReadmeFile"
-    body: "AppReadmeFile"
-  AppSupportPhone:
-    prefix: "AppSupportPhone"
-    body: "AppSupportPhone"
-  AppSupportURL:
-    prefix: "AppSupportURL"
-    body: "AppSupportURL"
-  AppUpdatesURL:
-    prefix: "AppUpdatesURL"
-    body: "AppUpdatesURL"
-  AppVerName:
-    prefix: "AppVerName"
-    body: "AppVerName"
-  AppVersion:
-    prefix: "AppVersion"
-    body: "AppVersion"
-  ArchitecturesAllowed:
-    prefix: "ArchitecturesAllowed"
-    body: "ArchitecturesAllowed"
-  ArchitecturesInstallIn64BitMode:
-    prefix: "ArchitecturesInstallIn64BitMode"
-    body: "ArchitecturesInstallIn64BitMode"
-  BackColor:
-    prefix: "BackColor"
-    body: "BackColor"
-  BackColor2:
-    prefix: "BackColor2"
-    body: "BackColor2"
-  BackColorDirection:
-    prefix: "BackColorDirection"
-    body: "BackColorDirection"
-  BackSolid:
-    prefix: "BackSolid"
-    body: "BackSolid"
-  BeforeInstall:
-    prefix: "BeforeInstall"
-    body: "BeforeInstall"
-  BeforeMyProgInstall:
-    prefix: "BeforeMyProgInstall"
-    body: "BeforeMyProgInstall"
-  BeveledLabel:
-    prefix: "BeveledLabel"
-    body: "BeveledLabel"
-  ChangesAssociations:
-    prefix: "ChangesAssociations"
-    body: "ChangesAssociations"
-  ChangesEnvironment:
-    prefix: "ChangesEnvironment"
-    body: "ChangesEnvironment"
-  Check:
-    prefix: "Check"
-    body: "Check"
-  CloseApplications:
-    prefix: "CloseApplications"
-    body: "CloseApplications"
-  CloseApplicationsFilter:
-    prefix: "CloseApplicationsFilter"
-    body: "CloseApplicationsFilter"
-  Components:
-    prefix: "Components"
-    body: "Components"
-  Compression:
-    prefix: "Compression"
-    body: "Compression"
-  CompressionThreads:
-    prefix: "CompressionThreads"
-    body: "CompressionThreads"
-  CopyrightFontName:
-    prefix: "CopyrightFontName"
-    body: "CopyrightFontName"
-  CopyrightFontSize:
-    prefix: "CopyrightFontSize"
-    body: "CopyrightFontSize"
-  CreateAppDir:
-    prefix: "CreateAppDir"
-    body: "CreateAppDir"
-  CreateUninstallRegKey:
-    prefix: "CreateUninstallRegKey"
-    body: "CreateUninstallRegKey"
-  DefaultDialogFontName:
-    prefix: "DefaultDialogFontName"
-    body: "DefaultDialogFontName"
-  DefaultDirName:
-    prefix: "DefaultDirName"
-    body: "DefaultDirName"
-  DefaultGroupName:
-    prefix: "DefaultGroupName"
-    body: "DefaultGroupName"
-  DefaultUserInfoName:
-    prefix: "DefaultUserInfoName"
-    body: "DefaultUserInfoName"
-  DefaultUserInfoOrg:
-    prefix: "DefaultUserInfoOrg"
-    body: "DefaultUserInfoOrg"
-  DefaultUserInfoSerial:
-    prefix: "DefaultUserInfoSerial"
-    body: "DefaultUserInfoSerial"
-  Description:
-    prefix: "Description"
-    body: "Description"
-  DestDir:
-    prefix: "DestDir"
-    body: "DestDir"
-  DestName:
-    prefix: "DestName"
-    body: "DestName"
-  DialogFontName:
-    prefix: "DialogFontName"
-    body: "DialogFontName"
-  DialogFontSize:
-    prefix: "DialogFontSize"
-    body: "DialogFontSize"
-  DirExistsWarning:
-    prefix: "DirExistsWarning"
-    body: "DirExistsWarning"
-  DisableAppendDir:
-    prefix: "DisableAppendDir"
-    body: "DisableAppendDir"
-  DisableDirPage:
-    prefix: "DisableDirPage"
-    body: "DisableDirPage"
-  DisableFinishedPage:
-    prefix: "DisableFinishedPage"
-    body: "DisableFinishedPage"
-  DisableProgramGroupPage:
-    prefix: "DisableProgramGroupPage"
-    body: "DisableProgramGroupPage"
-  DisableReadyMemo:
-    prefix: "DisableReadyMemo"
-    body: "DisableReadyMemo"
-  DisableReadyPage:
-    prefix: "DisableReadyPage"
-    body: "DisableReadyPage"
-  DisableStartupPrompt:
-    prefix: "DisableStartupPrompt"
-    body: "DisableStartupPrompt"
-  DisableWelcomePage:
-    prefix: "DisableWelcomePage"
-    body: "DisableWelcomePage"
-  DiskClusterSize:
-    prefix: "DiskClusterSize"
-    body: "DiskClusterSize"
-  DiskSliceSize:
-    prefix: "DiskSliceSize"
-    body: "DiskSliceSize"
-  DiskSpanning:
-    prefix: "DiskSpanning"
-    body: "DiskSpanning"
-  DontMergeDuplicateFiles:
-    prefix: "DontMergeDuplicateFiles"
-    body: "DontMergeDuplicateFiles"
-  EnableDirDoesntExistWarning:
-    prefix: "EnableDirDoesntExistWarning"
-    body: "EnableDirDoesntExistWarning"
-  Encryption:
-    prefix: "Encryption"
-    body: "Encryption"
-  ExtraDiskSpaceRequired:
-    prefix: "ExtraDiskSpaceRequired"
-    body: "ExtraDiskSpaceRequired"
-  Filename:
-    prefix: "Filename"
-    body: "Filename"
-  Flags:
-    prefix: "Flags"
-    body: "Flags"
-  FlatComponentsList:
-    prefix: "FlatComponentsList"
-    body: "FlatComponentsList"
-  InfoAfterFile:
-    prefix: "InfoAfterFile"
-    body: "InfoAfterFile"
-  InfoBeforeFile:
-    prefix: "InfoBeforeFile"
-    body: "InfoBeforeFile"
-  InternalCompressLevel:
-    prefix: "InternalCompressLevel"
-    body: "InternalCompressLevel"
-  LanguageCodePage:
-    prefix: "LanguageCodePage"
-    body: "LanguageCodePage"
-  LanguageDetectionMethod:
-    prefix: "LanguageDetectionMethod"
-    body: "LanguageDetectionMethod"
-  LanguageID:
-    prefix: "LanguageID"
-    body: "LanguageID"
-  LanguageName:
-    prefix: "LanguageName"
-    body: "LanguageName"
-  Languages:
-    prefix: "Languages"
-    body: "Languages"
-  LicenseFile:
-    prefix: "LicenseFile"
-    body: "LicenseFile"
-  LZMAAlgorithm:
-    prefix: "LZMAAlgorithm"
-    body: "LZMAAlgorithm"
-  LZMABlockSize:
-    prefix: "LZMABlockSize"
-    body: "LZMABlockSize"
-  LZMADictionarySize:
-    prefix: "LZMADictionarySize"
-    body: "LZMADictionarySize"
-  LZMAMatchFinder:
-    prefix: "LZMAMatchFinder"
-    body: "LZMAMatchFinder"
-  LZMANumBlockThreads:
-    prefix: "LZMANumBlockThreads"
-    body: "LZMANumBlockThreads"
-  LZMANumFastBytes:
-    prefix: "LZMANumFastBytes"
-    body: "LZMANumFastBytes"
-  LZMAUseSeparateProcess:
-    prefix: "LZMAUseSeparateProcess"
-    body: "LZMAUseSeparateProcess"
-  MergeDuplicateFiles:
-    prefix: "MergeDuplicateFiles"
-    body: "MergeDuplicateFiles"
-  MessagesFile:
-    prefix: "MessagesFile"
-    body: "MessagesFile"
-  MinVersion:
-    prefix: "MinVersion"
-    body: "MinVersion"
-  MyAppName:
-    prefix: "MyAppName"
-    body: "MyAppName"
-  MyAppVerName:
-    prefix: "MyAppVerName"
-    body: "MyAppVerName"
-  MyDescription:
-    prefix: "MyDescription"
-    body: "MyDescription"
-  Name:
-    prefix: "Name"
-    body: "Name"
-  OnlyBelowVersion:
-    prefix: "OnlyBelowVersion"
-    body: "OnlyBelowVersion"
-  Output:
-    prefix: "Output"
-    body: "Output"
-  OutputBaseFilename:
-    prefix: "OutputBaseFilename"
-    body: "OutputBaseFilename"
-  OutputDir:
-    prefix: "OutputDir"
-    body: "OutputDir"
-  OutputManifestFile:
-    prefix: "OutputManifestFile"
-    body: "OutputManifestFile"
-  Parameters:
-    prefix: "Parameters"
-    body: "Parameters"
-  Password:
-    prefix: "Password"
-    body: "Password"
-  PrivilegesRequired:
-    prefix: "PrivilegesRequired"
-    body: "PrivilegesRequired"
-  ReserveBytes:
-    prefix: "ReserveBytes"
-    body: "ReserveBytes"
-  RestartApplications:
-    prefix: "RestartApplications"
-    body: "RestartApplications"
-  RestartIfNeededByRun:
-    prefix: "RestartIfNeededByRun"
-    body: "RestartIfNeededByRun"
-  RightToLeft:
-    prefix: "RightToLeft"
-    body: "RightToLeft"
-  Root:
-    prefix: "Root"
-    body: "Root"
-  SetupIconFile:
-    prefix: "SetupIconFile"
-    body: "SetupIconFile"
-  SetupLogging:
-    prefix: "SetupLogging"
-    body: "SetupLogging"
-  ShowComponentSizes:
-    prefix: "ShowComponentSizes"
-    body: "ShowComponentSizes"
-  ShowLanguageDialog:
-    prefix: "ShowLanguageDialog"
-    body: "ShowLanguageDialog"
-  ShowTasksTreeLines:
-    prefix: "ShowTasksTreeLines"
-    body: "ShowTasksTreeLines"
-  ShowUndisplayableLanguages:
-    prefix: "ShowUndisplayableLanguages"
-    body: "ShowUndisplayableLanguages"
-  SignedUninstaller:
-    prefix: "SignedUninstaller"
-    body: "SignedUninstaller"
-  SignedUninstallerDir:
-    prefix: "SignedUninstallerDir"
-    body: "SignedUninstallerDir"
-  SignTool:
-    prefix: "SignTool"
-    body: "SignTool"
-  SignToolRetryCount:
-    prefix: "SignToolRetryCount"
-    body: "SignToolRetryCount"
-  SlicesPerDisk:
-    prefix: "SlicesPerDisk"
-    body: "SlicesPerDisk"
-  SolidCompression:
-    prefix: "SolidCompression"
-    body: "SolidCompression"
-  Source:
-    prefix: "Source"
-    body: "Source"
-  SourceDir:
-    prefix: "SourceDir"
-    body: "SourceDir"
-  StatusMsg:
-    prefix: "StatusMsg"
-    body: "StatusMsg"
-  Subkey:
-    prefix: "Subkey"
-    body: "Subkey"
-  TerminalServicesAware:
-    prefix: "TerminalServicesAware"
-    body: "TerminalServicesAware"
-  TimeStampRounding:
-    prefix: "TimeStampRounding"
-    body: "TimeStampRounding"
-  TimeStampsInUTC:
-    prefix: "TimeStampsInUTC"
-    body: "TimeStampsInUTC"
-  TitleFontName:
-    prefix: "TitleFontName"
-    body: "TitleFontName"
-  TitleFontSize:
-    prefix: "TitleFontSize"
-    body: "TitleFontSize"
-  TouchDate:
-    prefix: "TouchDate"
-    body: "TouchDate"
-  TouchTime:
-    prefix: "TouchTime"
-    body: "TouchTime"
-  Type:
-    prefix: "Type"
-    body: "Type"
-  Types:
-    prefix: "Types"
-    body: "Types"
-  Uninstallable:
-    prefix: "Uninstallable"
-    body: "Uninstallable"
-  UninstallDisplayIcon:
-    prefix: "UninstallDisplayIcon"
-    body: "UninstallDisplayIcon"
-  UninstallDisplayName:
-    prefix: "UninstallDisplayName"
-    body: "UninstallDisplayName"
-  UninstallDisplaySize:
-    prefix: "UninstallDisplaySize"
-    body: "UninstallDisplaySize"
-  UninstallFilesDir:
-    prefix: "UninstallFilesDir"
-    body: "UninstallFilesDir"
-  UninstallIconFile:
-    prefix: "UninstallIconFile"
-    body: "UninstallIconFile"
-  UninstallIconName:
-    prefix: "UninstallIconName"
-    body: "UninstallIconName"
-  UninstallLogMode:
-    prefix: "UninstallLogMode"
-    body: "UninstallLogMode"
-  UninstallRestartComputer:
-    prefix: "UninstallRestartComputer"
-    body: "UninstallRestartComputer"
-  UninstallStyle:
-    prefix: "UninstallStyle"
-    body: "UninstallStyle"
-  UpdateUninstallLogAppName:
-    prefix: "UpdateUninstallLogAppName"
-    body: "UpdateUninstallLogAppName"
-  UsePreviousAppDir:
-    prefix: "UsePreviousAppDir"
-    body: "UsePreviousAppDir"
-  UsePreviousGroup:
-    prefix: "UsePreviousGroup"
-    body: "UsePreviousGroup"
-  UsePreviousLanguage:
-    prefix: "UsePreviousLanguage"
-    body: "UsePreviousLanguage"
-  UsePreviousSetupType:
-    prefix: "UsePreviousSetupType"
-    body: "UsePreviousSetupType"
-  UsePreviousTasks:
-    prefix: "UsePreviousTasks"
-    body: "UsePreviousTasks"
-  UsePreviousUserInfo:
-    prefix: "UsePreviousUserInfo"
-    body: "UsePreviousUserInfo"
-  UserInfoPage:
-    prefix: "UserInfoPage"
-    body: "UserInfoPage"
-  UseSetupLdr:
-    prefix: "UseSetupLdr"
-    body: "UseSetupLdr"
-  ValueData:
-    prefix: "ValueData"
-    body: "ValueData"
-  ValueName:
-    prefix: "ValueName"
-    body: "ValueName"
-  ValueType:
-    prefix: "ValueType"
-    body: "ValueType"
-  VersionInfoCompany:
-    prefix: "VersionInfoCompany"
-    body: "VersionInfoCompany"
-  VersionInfoCopyright:
-    prefix: "VersionInfoCopyright"
-    body: "VersionInfoCopyright"
-  VersionInfoDescription:
-    prefix: "VersionInfoDescription"
-    body: "VersionInfoDescription"
-  VersionInfoProductName:
-    prefix: "VersionInfoProductName"
-    body: "VersionInfoProductName"
-  VersionInfoProductTextVersion:
-    prefix: "VersionInfoProductTextVersion"
-    body: "VersionInfoProductTextVersion"
-  VersionInfoProductVersion:
-    prefix: "VersionInfoProductVersion"
-    body: "VersionInfoProductVersion"
-  VersionInfoTextVersion:
-    prefix: "VersionInfoTextVersion"
-    body: "VersionInfoTextVersion"
-  VersionInfoVersion:
-    prefix: "VersionInfoVersion"
-    body: "VersionInfoVersion"
-  WelcomeFontName:
-    prefix: "WelcomeFontName"
-    body: "WelcomeFontName"
-  WelcomeFontSize:
-    prefix: "WelcomeFontSize"
-    body: "WelcomeFontSize"
-  WindowResizable:
-    prefix: "WindowResizable"
-    body: "WindowResizable"
-  WindowShowCaption:
-    prefix: "WindowShowCaption"
-    body: "WindowShowCaption"
-  WindowStartMaximized:
-    prefix: "WindowStartMaximized"
-    body: "WindowStartMaximized"
-  WindowVisible:
-    prefix: "WindowVisible"
-    body: "WindowVisible"
-  WizardImageBackColor:
-    prefix: "WizardImageBackColor"
-    body: "WizardImageBackColor"
-  WizardImageFile:
-    prefix: "WizardImageFile"
-    body: "WizardImageFile"
-  WizardImageStretch:
-    prefix: "WizardImageStretch"
-    body: "WizardImageStretch"
-  WizardSmallImageBackColor:
-    prefix: "WizardSmallImageBackColor"
-    body: "WizardSmallImageBackColor"
-  WizardSmallImageFile:
-    prefix: "WizardSmallImageFile"
-    body: "WizardSmallImageFile"
-  WizardStyle:
-    prefix: "WizardStyle"
-    body: "WizardStyle"
-  WorkingDir:
-    prefix: "WorkingDir"
-    body: "WorkingDir"+    AfterInstall:
+        prefix: "AfterInstall"
+        body: "AfterInstall"
+    AfterMyProgInstall:
+        prefix: "AfterMyProgInstall"
+        body: "AfterMyProgInstall"
+    AllowCancelDuringInstall:
+        prefix: "AllowCancelDuringInstall"
+        body: "AllowCancelDuringInstall"
+    AllowNetworkDrive:
+        prefix: "AllowNetworkDrive"
+        body: "AllowNetworkDrive"
+    AllowNoIcons:
+        prefix: "AllowNoIcons"
+        body: "AllowNoIcons"
+    AllowRootDirectory:
+        prefix: "AllowRootDirectory"
+        body: "AllowRootDirectory"
+    AllowUNCPath:
+        prefix: "AllowUNCPath"
+        body: "AllowUNCPath"
+    AlwaysCreateUninstallIcon:
+        prefix: "AlwaysCreateUninstallIcon"
+        body: "AlwaysCreateUninstallIcon"
+    AlwaysRestart:
+        prefix: "AlwaysRestart"
+        body: "AlwaysRestart"
+    AlwaysShowComponentsList:
+        prefix: "AlwaysShowComponentsList"
+        body: "AlwaysShowComponentsList"
+    AlwaysShowDirOnReadyPage:
+        prefix: "AlwaysShowDirOnReadyPage"
+        body: "AlwaysShowDirOnReadyPage"
+    AlwaysShowGroupOnReadyPage:
+        prefix: "AlwaysShowGroupOnReadyPage"
+        body: "AlwaysShowGroupOnReadyPage"
+    AlwaysUsePersonalGroup:
+        prefix: "AlwaysUsePersonalGroup"
+        body: "AlwaysUsePersonalGroup"
+    AppComments:
+        prefix: "AppComments"
+        body: "AppComments"
+    AppContact:
+        prefix: "AppContact"
+        body: "AppContact"
+    AppCopyright:
+        prefix: "AppCopyright"
+        body: "AppCopyright"
+    AppendDefaultDirName:
+        prefix: "AppendDefaultDirName"
+        body: "AppendDefaultDirName"
+    AppendDefaultGroupName:
+        prefix: "AppendDefaultGroupName"
+        body: "AppendDefaultGroupName"
+    AppId:
+        prefix: "AppId"
+        body: "AppId"
+    AppModifyPath:
+        prefix: "AppModifyPath"
+        body: "AppModifyPath"
+    AppMutex:
+        prefix: "AppMutex"
+        body: "AppMutex"
+    AppName:
+        prefix: "AppName"
+        body: "AppName"
+    AppPublisher:
+        prefix: "AppPublisher"
+        body: "AppPublisher"
+    AppPublisherURL:
+        prefix: "AppPublisherURL"
+        body: "AppPublisherURL"
+    AppReadmeFile:
+        prefix: "AppReadmeFile"
+        body: "AppReadmeFile"
+    AppSupportPhone:
+        prefix: "AppSupportPhone"
+        body: "AppSupportPhone"
+    AppSupportURL:
+        prefix: "AppSupportURL"
+        body: "AppSupportURL"
+    AppUpdatesURL:
+        prefix: "AppUpdatesURL"
+        body: "AppUpdatesURL"
+    AppVerName:
+        prefix: "AppVerName"
+        body: "AppVerName"
+    AppVersion:
+        prefix: "AppVersion"
+        body: "AppVersion"
+    ArchitecturesAllowed:
+        prefix: "ArchitecturesAllowed"
+        body: "ArchitecturesAllowed"
+    ArchitecturesInstallIn64BitMode:
+        prefix: "ArchitecturesInstallIn64BitMode"
+        body: "ArchitecturesInstallIn64BitMode"
+    BackColor:
+        prefix: "BackColor"
+        body: "BackColor"
+    BackColor2:
+        prefix: "BackColor2"
+        body: "BackColor2"
+    BackColorDirection:
+        prefix: "BackColorDirection"
+        body: "BackColorDirection"
+    BackSolid:
+        prefix: "BackSolid"
+        body: "BackSolid"
+    BeforeInstall:
+        prefix: "BeforeInstall"
+        body: "BeforeInstall"
+    BeforeMyProgInstall:
+        prefix: "BeforeMyProgInstall"
+        body: "BeforeMyProgInstall"
+    BeveledLabel:
+        prefix: "BeveledLabel"
+        body: "BeveledLabel"
+    ChangesAssociations:
+        prefix: "ChangesAssociations"
+        body: "ChangesAssociations"
+    ChangesEnvironment:
+        prefix: "ChangesEnvironment"
+        body: "ChangesEnvironment"
+    Check:
+        prefix: "Check"
+        body: "Check"
+    CloseApplications:
+        prefix: "CloseApplications"
+        body: "CloseApplications"
+    CloseApplicationsFilter:
+        prefix: "CloseApplicationsFilter"
+        body: "CloseApplicationsFilter"
+    Components:
+        prefix: "Components"
+        body: "Components"
+    Compression:
+        prefix: "Compression"
+        body: "Compression"
+    CompressionThreads:
+        prefix: "CompressionThreads"
+        body: "CompressionThreads"
+    CopyrightFontName:
+        prefix: "CopyrightFontName"
+        body: "CopyrightFontName"
+    CopyrightFontSize:
+        prefix: "CopyrightFontSize"
+        body: "CopyrightFontSize"
+    CreateAppDir:
+        prefix: "CreateAppDir"
+        body: "CreateAppDir"
+    CreateUninstallRegKey:
+        prefix: "CreateUninstallRegKey"
+        body: "CreateUninstallRegKey"
+    DefaultDialogFontName:
+        prefix: "DefaultDialogFontName"
+        body: "DefaultDialogFontName"
+    DefaultDirName:
+        prefix: "DefaultDirName"
+        body: "DefaultDirName"
+    DefaultGroupName:
+        prefix: "DefaultGroupName"
+        body: "DefaultGroupName"
+    DefaultUserInfoName:
+        prefix: "DefaultUserInfoName"
+        body: "DefaultUserInfoName"
+    DefaultUserInfoOrg:
+        prefix: "DefaultUserInfoOrg"
+        body: "DefaultUserInfoOrg"
+    DefaultUserInfoSerial:
+        prefix: "DefaultUserInfoSerial"
+        body: "DefaultUserInfoSerial"
+    Description:
+        prefix: "Description"
+        body: "Description"
+    DestDir:
+        prefix: "DestDir"
+        body: "DestDir"
+    DestName:
+        prefix: "DestName"
+        body: "DestName"
+    DialogFontName:
+        prefix: "DialogFontName"
+        body: "DialogFontName"
+    DialogFontSize:
+        prefix: "DialogFontSize"
+        body: "DialogFontSize"
+    DirExistsWarning:
+        prefix: "DirExistsWarning"
+        body: "DirExistsWarning"
+    DisableAppendDir:
+        prefix: "DisableAppendDir"
+        body: "DisableAppendDir"
+    DisableDirPage:
+        prefix: "DisableDirPage"
+        body: "DisableDirPage"
+    DisableFinishedPage:
+        prefix: "DisableFinishedPage"
+        body: "DisableFinishedPage"
+    DisableProgramGroupPage:
+        prefix: "DisableProgramGroupPage"
+        body: "DisableProgramGroupPage"
+    DisableReadyMemo:
+        prefix: "DisableReadyMemo"
+        body: "DisableReadyMemo"
+    DisableReadyPage:
+        prefix: "DisableReadyPage"
+        body: "DisableReadyPage"
+    DisableStartupPrompt:
+        prefix: "DisableStartupPrompt"
+        body: "DisableStartupPrompt"
+    DisableWelcomePage:
+        prefix: "DisableWelcomePage"
+        body: "DisableWelcomePage"
+    DiskClusterSize:
+        prefix: "DiskClusterSize"
+        body: "DiskClusterSize"
+    DiskSliceSize:
+        prefix: "DiskSliceSize"
+        body: "DiskSliceSize"
+    DiskSpanning:
+        prefix: "DiskSpanning"
+        body: "DiskSpanning"
+    DontMergeDuplicateFiles:
+        prefix: "DontMergeDuplicateFiles"
+        body: "DontMergeDuplicateFiles"
+    EnableDirDoesntExistWarning:
+        prefix: "EnableDirDoesntExistWarning"
+        body: "EnableDirDoesntExistWarning"
+    Encryption:
+        prefix: "Encryption"
+        body: "Encryption"
+    ExtraDiskSpaceRequired:
+        prefix: "ExtraDiskSpaceRequired"
+        body: "ExtraDiskSpaceRequired"
+    Filename:
+        prefix: "Filename"
+        body: "Filename"
+    Flags:
+        prefix: "Flags"
+        body: "Flags"
+    FlatComponentsList:
+        prefix: "FlatComponentsList"
+        body: "FlatComponentsList"
+    InfoAfterFile:
+        prefix: "InfoAfterFile"
+        body: "InfoAfterFile"
+    InfoBeforeFile:
+        prefix: "InfoBeforeFile"
+        body: "InfoBeforeFile"
+    InternalCompressLevel:
+        prefix: "InternalCompressLevel"
+        body: "InternalCompressLevel"
+    LanguageCodePage:
+        prefix: "LanguageCodePage"
+        body: "LanguageCodePage"
+    LanguageDetectionMethod:
+        prefix: "LanguageDetectionMethod"
+        body: "LanguageDetectionMethod"
+    LanguageID:
+        prefix: "LanguageID"
+        body: "LanguageID"
+    LanguageName:
+        prefix: "LanguageName"
+        body: "LanguageName"
+    Languages:
+        prefix: "Languages"
+        body: "Languages"
+    LicenseFile:
+        prefix: "LicenseFile"
+        body: "LicenseFile"
+    LZMAAlgorithm:
+        prefix: "LZMAAlgorithm"
+        body: "LZMAAlgorithm"
+    LZMABlockSize:
+        prefix: "LZMABlockSize"
+        body: "LZMABlockSize"
+    LZMADictionarySize:
+        prefix: "LZMADictionarySize"
+        body: "LZMADictionarySize"
+    LZMAMatchFinder:
+        prefix: "LZMAMatchFinder"
+        body: "LZMAMatchFinder"
+    LZMANumBlockThreads:
+        prefix: "LZMANumBlockThreads"
+        body: "LZMANumBlockThreads"
+    LZMANumFastBytes:
+        prefix: "LZMANumFastBytes"
+        body: "LZMANumFastBytes"
+    LZMAUseSeparateProcess:
+        prefix: "LZMAUseSeparateProcess"
+        body: "LZMAUseSeparateProcess"
+    MergeDuplicateFiles:
+        prefix: "MergeDuplicateFiles"
+        body: "MergeDuplicateFiles"
+    MessagesFile:
+        prefix: "MessagesFile"
+        body: "MessagesFile"
+    MinVersion:
+        prefix: "MinVersion"
+        body: "MinVersion"
+    MyAppName:
+        prefix: "MyAppName"
+        body: "MyAppName"
+    MyAppVerName:
+        prefix: "MyAppVerName"
+        body: "MyAppVerName"
+    MyDescription:
+        prefix: "MyDescription"
+        body: "MyDescription"
+    Name:
+        prefix: "Name"
+        body: "Name"
+    OnlyBelowVersion:
+        prefix: "OnlyBelowVersion"
+        body: "OnlyBelowVersion"
+    Output:
+        prefix: "Output"
+        body: "Output"
+    OutputBaseFilename:
+        prefix: "OutputBaseFilename"
+        body: "OutputBaseFilename"
+    OutputDir:
+        prefix: "OutputDir"
+        body: "OutputDir"
+    OutputManifestFile:
+        prefix: "OutputManifestFile"
+        body: "OutputManifestFile"
+    Parameters:
+        prefix: "Parameters"
+        body: "Parameters"
+    Password:
+        prefix: "Password"
+        body: "Password"
+    PrivilegesRequired:
+        prefix: "PrivilegesRequired"
+        body: "PrivilegesRequired"
+    ReserveBytes:
+        prefix: "ReserveBytes"
+        body: "ReserveBytes"
+    RestartApplications:
+        prefix: "RestartApplications"
+        body: "RestartApplications"
+    RestartIfNeededByRun:
+        prefix: "RestartIfNeededByRun"
+        body: "RestartIfNeededByRun"
+    RightToLeft:
+        prefix: "RightToLeft"
+        body: "RightToLeft"
+    Root:
+        prefix: "Root"
+        body: "Root"
+    SetupIconFile:
+        prefix: "SetupIconFile"
+        body: "SetupIconFile"
+    SetupLogging:
+        prefix: "SetupLogging"
+        body: "SetupLogging"
+    ShowComponentSizes:
+        prefix: "ShowComponentSizes"
+        body: "ShowComponentSizes"
+    ShowLanguageDialog:
+        prefix: "ShowLanguageDialog"
+        body: "ShowLanguageDialog"
+    ShowTasksTreeLines:
+        prefix: "ShowTasksTreeLines"
+        body: "ShowTasksTreeLines"
+    ShowUndisplayableLanguages:
+        prefix: "ShowUndisplayableLanguages"
+        body: "ShowUndisplayableLanguages"
+    SignedUninstaller:
+        prefix: "SignedUninstaller"
+        body: "SignedUninstaller"
+    SignedUninstallerDir:
+        prefix: "SignedUninstallerDir"
+        body: "SignedUninstallerDir"
+    SignTool:
+        prefix: "SignTool"
+        body: "SignTool"
+    SignToolRetryCount:
+        prefix: "SignToolRetryCount"
+        body: "SignToolRetryCount"
+    SlicesPerDisk:
+        prefix: "SlicesPerDisk"
+        body: "SlicesPerDisk"
+    SolidCompression:
+        prefix: "SolidCompression"
+        body: "SolidCompression"
+    Source:
+        prefix: "Source"
+        body: "Source"
+    SourceDir:
+        prefix: "SourceDir"
+        body: "SourceDir"
+    StatusMsg:
+        prefix: "StatusMsg"
+        body: "StatusMsg"
+    Subkey:
+        prefix: "Subkey"
+        body: "Subkey"
+    TerminalServicesAware:
+        prefix: "TerminalServicesAware"
+        body: "TerminalServicesAware"
+    TimeStampRounding:
+        prefix: "TimeStampRounding"
+        body: "TimeStampRounding"
+    TimeStampsInUTC:
+        prefix: "TimeStampsInUTC"
+        body: "TimeStampsInUTC"
+    TitleFontName:
+        prefix: "TitleFontName"
+        body: "TitleFontName"
+    TitleFontSize:
+        prefix: "TitleFontSize"
+        body: "TitleFontSize"
+    TouchDate:
+        prefix: "TouchDate"
+        body: "TouchDate"
+    TouchTime:
+        prefix: "TouchTime"
+        body: "TouchTime"
+    Type:
+        prefix: "Type"
+        body: "Type"
+    Types:
+        prefix: "Types"
+        body: "Types"
+    Uninstallable:
+        prefix: "Uninstallable"
+        body: "Uninstallable"
+    UninstallDisplayIcon:
+        prefix: "UninstallDisplayIcon"
+        body: "UninstallDisplayIcon"
+    UninstallDisplayName:
+        prefix: "UninstallDisplayName"
+        body: "UninstallDisplayName"
+    UninstallDisplaySize:
+        prefix: "UninstallDisplaySize"
+        body: "UninstallDisplaySize"
+    UninstallFilesDir:
+        prefix: "UninstallFilesDir"
+        body: "UninstallFilesDir"
+    UninstallIconFile:
+        prefix: "UninstallIconFile"
+        body: "UninstallIconFile"
+    UninstallIconName:
+        prefix: "UninstallIconName"
+        body: "UninstallIconName"
+    UninstallLogMode:
+        prefix: "UninstallLogMode"
+        body: "UninstallLogMode"
+    UninstallRestartComputer:
+        prefix: "UninstallRestartComputer"
+        body: "UninstallRestartComputer"
+    UninstallStyle:
+        prefix: "UninstallStyle"
+        body: "UninstallStyle"
+    UpdateUninstallLogAppName:
+        prefix: "UpdateUninstallLogAppName"
+        body: "UpdateUninstallLogAppName"
+    UsePreviousAppDir:
+        prefix: "UsePreviousAppDir"
+        body: "UsePreviousAppDir"
+    UsePreviousGroup:
+        prefix: "UsePreviousGroup"
+        body: "UsePreviousGroup"
+    UsePreviousLanguage:
+        prefix: "UsePreviousLanguage"
+        body: "UsePreviousLanguage"
+    UsePreviousSetupType:
+        prefix: "UsePreviousSetupType"
+        body: "UsePreviousSetupType"
+    UsePreviousTasks:
+        prefix: "UsePreviousTasks"
+        body: "UsePreviousTasks"
+    UsePreviousUserInfo:
+        prefix: "UsePreviousUserInfo"
+        body: "UsePreviousUserInfo"
+    UserInfoPage:
+        prefix: "UserInfoPage"
+        body: "UserInfoPage"
+    UseSetupLdr:
+        prefix: "UseSetupLdr"
+        body: "UseSetupLdr"
+    ValueData:
+        prefix: "ValueData"
+        body: "ValueData"
+    ValueName:
+        prefix: "ValueName"
+        body: "ValueName"
+    ValueType:
+        prefix: "ValueType"
+        body: "ValueType"
+    VersionInfoCompany:
+        prefix: "VersionInfoCompany"
+        body: "VersionInfoCompany"
+    VersionInfoCopyright:
+        prefix: "VersionInfoCopyright"
+        body: "VersionInfoCopyright"
+    VersionInfoDescription:
+        prefix: "VersionInfoDescription"
+        body: "VersionInfoDescription"
+    VersionInfoProductName:
+        prefix: "VersionInfoProductName"
+        body: "VersionInfoProductName"
+    VersionInfoProductTextVersion:
+        prefix: "VersionInfoProductTextVersion"
+        body: "VersionInfoProductTextVersion"
+    VersionInfoProductVersion:
+        prefix: "VersionInfoProductVersion"
+        body: "VersionInfoProductVersion"
+    VersionInfoTextVersion:
+        prefix: "VersionInfoTextVersion"
+        body: "VersionInfoTextVersion"
+    VersionInfoVersion:
+        prefix: "VersionInfoVersion"
+        body: "VersionInfoVersion"
+    WelcomeFontName:
+        prefix: "WelcomeFontName"
+        body: "WelcomeFontName"
+    WelcomeFontSize:
+        prefix: "WelcomeFontSize"
+        body: "WelcomeFontSize"
+    WindowResizable:
+        prefix: "WindowResizable"
+        body: "WindowResizable"
+    WindowShowCaption:
+        prefix: "WindowShowCaption"
+        body: "WindowShowCaption"
+    WindowStartMaximized:
+        prefix: "WindowStartMaximized"
+        body: "WindowStartMaximized"
+    WindowVisible:
+        prefix: "WindowVisible"
+        body: "WindowVisible"
+    WizardImageBackColor:
+        prefix: "WizardImageBackColor"
+        body: "WizardImageBackColor"
+    WizardImageFile:
+        prefix: "WizardImageFile"
+        body: "WizardImageFile"
+    WizardImageStretch:
+        prefix: "WizardImageStretch"
+        body: "WizardImageStretch"
+    WizardSmallImageBackColor:
+        prefix: "WizardSmallImageBackColor"
+        body: "WizardSmallImageBackColor"
+    WizardSmallImageFile:
+        prefix: "WizardSmallImageFile"
+        body: "WizardSmallImageFile"
+    WizardStyle:
+        prefix: "WizardStyle"
+        body: "WizardStyle"
+    WorkingDir:
+        prefix: "WorkingDir"
+        body: "WorkingDir"


port over the Block() class

port over the Block() class

--- src/nodes.coffee
+++ src/nodes.coffee
@@ -87,7 +87,7 @@
     node     = @unfoldSoak(o) or this
     node.tab = o.indent
     if node.icedHasContinuation() and not node.icedGotCpsSplitFlag
-      node.compileCps o
+      node.icedCompileCps o
     else if o.level is LEVEL_TOP or not node.isStatement(o)
       node.compileNode o
     else
@@ -212,6 +212,15 @@
       for child in flatten [@[attr]]
         out.push (child)
     out
+
+  # Statements that need CPS translation will have to be split into
+  # pieces like so.
+  icedCompileCps : (o) ->
+    @icedGotCpsSplitFlag = true
+    code = CpsCascade.wrap this, @icedContinuationBlock, null, o
+    code.compile o
+
+  # If the code generation wishes to use the result of a complex expression

   #
   # AST Walking Routines for CPS Pivots, etc.
@@ -354,6 +363,7 @@
 # `if`, `switch`, or `try`, and so on...
 exports.Block = class Block extends Base
   constructor: (nodes) ->
+    super()
     @expressions = compact flatten nodes or []

   children: ['expressions']
@@ -375,7 +385,7 @@
   # If this Block consists of just a single node, unwrap it by pulling
   # it back out.
   unwrap: ->
-    if @expressions.length is 1 then @expressions[0] else this
+    if @expressions.length is 1 then @icedUnwrap @expressions[0] else this

   # Is this an empty block of code?
   isEmpty: ->
@@ -505,6 +515,142 @@
   @wrap: (nodes) ->
     return nodes[0] if nodes.length is 1 and nodes[0] instanceof Block
     new Block nodes
+
+  # Start iced additions
+
+  # When returning from a block, we need to maybe call into a continuation.
+  # This call will thread that "return / call-continuation" through this
+  # block.
+  icedThreadReturn: (call)  ->
+    call = call || new IcedTailCall
+    len = @expressions.length
+    while len--
+      expr = @expressions[len]
+
+      # If the last expression in the block is either a bonafide statement
+      # or if it's going to be pivoted, then don't thread the return value
+      # through the IcedTailCall, just bolt it onto the end.
+      if expr.isStatement()
+        break
+
+      # In this case, we have a value that we're going to return out
+      # of the block, so apply the IcedTamilCall onto the value
+      if expr not instanceof Comment and expr not instanceof Return
+        call.assignValue expr
+        @expressions[len] = call
+        return
+
+    # if nothing was found, just push the call on
+    @expressions.push call
+
+  # Optimization!
+  # Blocks typically don't need their own cpsCascading.  This saves
+  # wasted code.
+  icedCompileCps : (o) ->
+    @icedGotCpsSplitFlag = true
+    if @expressions.length > 1
+      super o
+    else
+      @compileNode o
+
+  #
+  # icedCpsRotate -- This is the key abstract syntax tree rotation of the
+  # CPS translation. Take a block with a bunch of sequential statements
+  # and "pivot" the AST on the first available pivot.  The expressions
+  # on the LHS of the pivot stay where the are.  The expressions on the RHS
+  # of the pivot become the pivot's continuation. And the process is applied
+  # recursively.
+  #
+  icedCpsRotate : ->
+    pivot = null
+
+    # Go ahead an look for a pivot
+    for e,i in @expressions
+      if e.icedIsCpsPivot()
+        pivot = e
+        # The pivot value needs to call the currently active continuation
+        # after it's all done.  For things like if..else.. this does something
+        # interesting and pushes the continuation down both branches.
+        # Note that it's convenient to do this **before** anything is
+        # rotated.
+        pivot.icedCallContinuation()
+
+      # Recursively rotate the children, in depth-first order.
+      e.icedCpsRotate()
+
+      # If we've found a pivot, then we break out of here, and then
+      # handle the rest of these children
+      break if pivot
+
+    # If there's no pivot, then the above should be as in the base
+    # class, and it's safe to return out of here.
+    #
+    # We find a pivot if this node has taming, and it's not an Await
+    # itself.
+    return this unless pivot
+
+    # We should never have a continuation here, even though we rotated
+    # this guy above.  This is true because:
+    #   1. The Pivot must be a statement....
+    #   2. If pivot is a statement, then the continuation will be in the
+    #      grandchild Block node
+    if pivot.icedContinuationBlock
+      throw SyntaxError "unexpected continuation block in node"
+
+    # These are the expressions on the RHS of the pivot split
+    rest = @expressions.slice(i+1)
+
+    # Leave the pivot in the list of expressions
+    @expressions = @expressions.slice(0,i+1)
+
+    # If there are elements in rest, then we need to nest a continuation block
+    if rest.length
+      child = new Block rest
+      pivot.icedNestContinuationBlock child
+
+      # Pass our node bits onto our new children
+      for e in rest
+        child.icedNodeFlag = true      if e.icedNodeFlag
+        child.icedLoopFlag = true      if e.icedLoopFlag
+        child.icedCpsPivotFlag = true  if e.icedCpsPivotFlag
+        child.icedHasAutocbFlag = true if e.icedHasAutocbFlag
+
+      # now recursive apply the transformation to the new child,
+      # this being especially important in blocks that have multiple
+      # awaits on the same level
+      child.icedCpsRotate()
+
+    # return this for chaining
+    this
+
+  # Paste in a require or inline code, depending on the strategy requested
+  icedAddRuntime : (foundDefer, foundAwait) ->
+    index = 0
+    while (node = @expressions[index]) and node instanceof Comment or
+        node instanceof Value and node.isString()
+      index++
+    @expressions.splice index, 0, (new IcedRuntime foundDefer, foundAwait)
+
+  # Perform all steps of the Iced transform
+  icedTransform : ->
+
+    # we need to do at least 1 walk -- do the most important walk first
+    obj = {}
+    @icedWalkAst null, obj
+
+    # Add a runtime if necessary
+    @icedAddRuntime obj.foundDefer, obj.foundAwait
+
+    # short-circuit here for optimization. If we didn't find await
+    # then no need to iced anything in this AST
+    if obj.foundAwait
+      @icedWalkAstLoops false
+      @icedWalkCpsPivots()
+      @icedCpsRotate()
+
+    this
+
+  # end iced additions

 #### Literal


Remove a couple of TODOs (WONTDOs really)

--- src/nodes.coffee
+++ src/nodes.coffee
@@ -53,16 +53,6 @@
   # object with their parent closure, to preserve the expected lexical scope.
   compileClosure: (o) ->
     if jumpNode = @jumps()
-      # TODO It'd be so freaking dope if we could mark the surrounding of the
-      # problematic expression in the error, something like:
-      #
-      #     error: cannot use a pure statement in an expression
-      #     foo = if bar then break else 42
-      #           ~~~~~~~~~~~~^^^^^~~~~~~~~
-      #
-      # Something like Clang does (http://clang.llvm.org/diagnostics.html).
-      # In this case the problematic expression would be `jumpNode` and the
-      # surroundings would be `@`.
       jumpNode.error 'cannot use a pure statement in an expression'
     o.sharedScope = yes
     Closure.wrap(this).compileNode o
@@ -814,7 +804,6 @@
     return (if @front then '({})' else '{}') unless props.length
     if @generated
       for node in props when node instanceof Value
-        # TODO Mark surrounding implicit object.
         node.error 'cannot have an implicit value in an implicit object'
     idt         = o.indent += TAB
     lastNoncom  = @lastNonComment @properties


Lowecase mustache

Lowecase mustache

--- src/Baseamp.coffee
+++ src/Baseamp.coffee
@@ -2,7 +2,7 @@
 util     = require "util"
 async    = require "async"
 debug    = require("debug")("Baseamp:Baseamp")
-Mustache = require "Mustache"
+Mustache = require "mustache"

 class Baseamp
   endpoints:


Account: fixed Account route for loggedout users

--- client/Account/AppController.coffee
+++ client/Account/AppController.coffee
@@ -1,6 +1,10 @@
 class AccountAppController extends AppController

-  handler = (callback)-> KD.singleton('appManager').open 'Account', callback
+  handler = (callback)->
+    if KD.isLoggedIn()
+      KD.singleton('appManager').open 'Account', callback
+    else
+      KD.singletons.router.handleRoute '/'

   KD.registerAppClass this,
     name                         : "Account"


KDFramework: bad indent dedented

KDFramework: bad indent dedented

--- client/Framework/core/KDView.coffee
+++ client/Framework/core/KDView.coffee
@@ -369,8 +369,8 @@
     # instance drops itself from its parent's subviews array

     if @parent?.subViews and (index = @parent.subViews.indexOf @) >= 0
-        @parent.subViews.splice index, 1
-        @unsetParent()
+      @parent.subViews.splice index, 1
+      @unsetParent()

     # instance removes itself from DOM
     @getDomElement().remove()


Fixed: reminders of type 'AUDIO' shouldn't be displayed. Close #155

--- client/app/views/event_modal.coffee
+++ client/app/views/event_modal.coffee
@@ -137,11 +137,13 @@
         @collection.reset @model.get 'attendees'

     addReminder: (reminderM) =>
-        @$('#reminder-explanation').removeClass 'hide'
-        reminder = new ReminderView(model: reminderM)
-        @reminders.push reminder
-        reminder.render()
-        @$('#reminder-container').append reminder.$el
+        # doesn't shown action "AUDIO" because the app doesn't support it
+        if reminderM.action in ['EMAIL', 'DISPLAY', 'BOTH']
+            @$('#reminder-explanation').removeClass 'hide'
+            reminder = new ReminderView model: reminderM
+            @reminders.push reminder
+            reminder.render()
+            @$('#reminder-container').append reminder.$el

     resizeDescription: =>
         notes = @descriptionField.val()


ensure that mention filter uses current query

--- client/shared/helpers/listen.coffee
+++ client/shared/helpers/listen.coffee
@@ -8,22 +8,22 @@
   listenForMentions: ($scope, model) ->
     $scope.mentionables = []
     $scope.mentionableUserIds = []
-    updateMentionables = (q) ->
+    updateMentionables = ->
       chain = Records.users.collection.chain().find(id: {'$in': $scope.mentionableUserIds})
       chain = chain.where (u) ->
-        q = q.toLowerCase()
-        u.name.toLowerCase().startsWith(q) or
-        u.username.toLowerCase().startsWith(q) or
-        u.name.toLowerCase().includes(" #{q}")
+        u.name.toLowerCase().startsWith($scope.q) or
+        u.username.toLowerCase().startsWith($scope.q) or
+        u.name.toLowerCase().includes(" #{$scope.q}")
       $scope.mentionables = chain.data()

     $scope.fetchByNameFragment = (q) ->
-      if q.length > 0
-        Records.users.fetchMentionable(q, model).then (response) ->
+      $scope.q = q.toLowerCase()
+      if $scope.q.length > 0
+        Records.users.fetchMentionable($scope.q, model).then (response) ->
           $scope.mentionableUserIds =  _.uniq($scope.mentionableUserIds.concat(_.pluck(response.users, 'id')))
-          updateMentionables(q)
-        updateMentionables(q)
+          updateMentionables()
+        updateMentionables()
       else
         $scope.mentionables = []


- [grunt] updated path to `_sprites.map.mustache` template in accordance with latest changes

--- tasks/grunt-spritesmith.coffee
+++ tasks/grunt-spritesmith.coffee
@@ -11,4 +11,4 @@
       destCss: '<%= path.temp.styles %>/_sprites.map.scss'
       padding: 2
       engine: 'gmsmith'
-      cssTemplate: '<%= path.source.styles %>/generic/_sprites.map.mustache'+      cssTemplate: '<%= path.source.styles %>/objects/_sprites.map.mustache'


Change order of metadata attributes so Shibboleth will eat it

--- lib/saml2.coffee
+++ lib/saml2.coffee
@@ -60,13 +60,13 @@
           '@protocolSupportEnumeration': 'urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:2.0:protocol',
           { 'md:KeyDescriptor': certificate_to_keyinfo('signing', signing_certificate) },
           { 'md:KeyDescriptor': certificate_to_keyinfo('encryption', encryption_certificate) },
+          'md:SingleLogoutService':
+            '@Binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'
+            '@Location': assert_endpoint
           'md:AssertionConsumerService':
             '@Binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST'
             '@Location': assert_endpoint
             '@index': '0'
-          'md:SingleLogoutService':
-            '@Binding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'
-            '@Location': assert_endpoint
         ]
   .end()

@@ -501,7 +501,7 @@
     create_logout_response_url: (identity_provider, options, cb) ->
       identity_provider = { sso_logout_url: identity_provider, options: {} } if _.isString(identity_provider)
       options = set_option_defaults options, identity_provider.shared_options, @shared_options
-
+
       xml = create_logout_response @entity_id, options.in_response_to, identity_provider.sso_logout_url
       zlib.deflateRaw xml, (err, deflated) =>
         return cb err if err?


use a custom cookie name to not conflict with admin or cms

--- lib/setup.coffee
+++ lib/setup.coffee
@@ -70,6 +70,7 @@
   app.use express.cookieSession
     secret: SESSION_SECRET
     cookie: { domain: COOKIE_DOMAIN }
+    key   : 'force.sess'
   app.use express.bodyParser()
   app.use artsyPassport _.extend config,
     CurrentUser: CurrentUser


Put checkVMState method back for IDEVMItem.

--- client/ide/finder/idevmitem.coffee
+++ client/ide/finder/idevmitem.coffee
@@ -55,6 +55,17 @@

     return items

+  checkVMState:(err, vm, info)->
+    return unless vm is @getData().vmName
+
+    if err or not info
+      @unsetClass 'online'
+      return warn err
+
+    if info.state is "RUNNING"
+    then @setClass 'online'
+    else @unsetClass 'online'
+
   pistachio:->
     return """
       <div class="vm-header">


add stub version of HotReload in production mode

--- client/lanes/lib/production.coffee
+++ client/lanes/lib/production.coffee
@@ -0,0 +1,4 @@
+Lanes.lib.HotReload =
+
+    remember: (klass) ->
+        return klass