Update variables to match class names

Update variables to match class names

--- spec/bookmarks-view-spec.coffee
+++ spec/bookmarks-view-spec.coffee
@@ -1,7 +1,7 @@
 {WorkspaceView} = require 'atom'

 describe "Bookmarks package", ->
-  [editor, editSession, displayBuffer] = []
+  [editorView, editor, displayBuffer] = []

   beforeEach ->
     atom.workspaceView = new WorkspaceView
@@ -14,165 +14,165 @@

     runs ->
       atom.workspaceView.attachToDom()
-      editor = atom.workspaceView.getActiveView()
-      editSession = editor.editor
-      displayBuffer = editSession.displayBuffer
+      editorView = atom.workspaceView.getActiveView()
+      {editor} = editorView
+      {displayBuffer} = editor
       spyOn(atom, 'beep')

   describe "toggling bookmarks", ->
     it "creates a marker when toggled", ->
-      editSession.setCursorBufferPosition([3, 10])
-      expect(displayBuffer.findMarkers(class: 'bookmark').length).toEqual 0
-
-      editor.trigger 'bookmarks:toggle-bookmark'
+      editor.setCursorBufferPosition([3, 10])
+      expect(displayBuffer.findMarkers(class: 'bookmark').length).toEqual 0
+
+      editorView.trigger 'bookmarks:toggle-bookmark'

       markers = displayBuffer.findMarkers(class: 'bookmark')
       expect(markers.length).toEqual 1
       expect(markers[0].getBufferRange()).toEqual [[3, 0], [3, 0]]

     it "removes marker when toggled", ->
-      editSession.setCursorBufferPosition([3, 10])
-      expect(displayBuffer.findMarkers(class: 'bookmark').length).toEqual 0
-
-      editor.trigger 'bookmarks:toggle-bookmark'
+      editor.setCursorBufferPosition([3, 10])
+      expect(displayBuffer.findMarkers(class: 'bookmark').length).toEqual 0
+
+      editorView.trigger 'bookmarks:toggle-bookmark'
       expect(displayBuffer.findMarkers(class: 'bookmark').length).toEqual 1

-      editor.trigger 'bookmarks:toggle-bookmark'
+      editorView.trigger 'bookmarks:toggle-bookmark'
       expect(displayBuffer.findMarkers(class: 'bookmark').length).toEqual 0

     it "toggles proper classes on proper gutter row", ->
-      editSession.setCursorBufferPosition([3, 10])
-      expect(editor.find('.bookmarked').length).toEqual 0
-
-      editor.trigger 'bookmarks:toggle-bookmark'
-
-      lines = editor.find('.bookmarked')
+      editor.setCursorBufferPosition([3, 10])
+      expect(editorView.find('.bookmarked').length).toEqual 0
+
+      editorView.trigger 'bookmarks:toggle-bookmark'
+
+      lines = editorView.find('.bookmarked')
       expect(lines.length).toEqual 1
       expect(lines).toHaveClass 'line-number-3'

-      editor.trigger 'bookmarks:toggle-bookmark'
-      expect(editor.find('.bookmarked').length).toEqual 0
+      editorView.trigger 'bookmarks:toggle-bookmark'
+      expect(editorView.find('.bookmarked').length).toEqual 0

     it "clears all bookmarks", ->
-      editSession.setCursorBufferPosition([3, 10])
-      editor.trigger 'bookmarks:toggle-bookmark'
-      editSession.setCursorBufferPosition([5, 0])
-      editor.trigger 'bookmarks:toggle-bookmark'
-
-      editor.trigger 'bookmarks:clear-bookmarks'
-
-      expect(editor.find('.bookmarked').length).toEqual 0
+      editor.setCursorBufferPosition([3, 10])
+      editorView.trigger 'bookmarks:toggle-bookmark'
+      editor.setCursorBufferPosition([5, 0])
+      editorView.trigger 'bookmarks:toggle-bookmark'
+
+      editorView.trigger 'bookmarks:clear-bookmarks'
+
+      expect(editorView.find('.bookmarked').length).toEqual 0
       expect(displayBuffer.findMarkers(class: 'bookmark')).toHaveLength 0

   describe "when a bookmark is invalidated", ->
     it "creates a marker when toggled", ->
-      editSession.setCursorBufferPosition([3, 10])
-      expect(displayBuffer.findMarkers(class: 'bookmark').length).toEqual 0
-
-      editor.trigger 'bookmarks:toggle-bookmark'
+      editor.setCursorBufferPosition([3, 10])
+      expect(displayBuffer.findMarkers(class: 'bookmark').length).toEqual 0
+
+      editorView.trigger 'bookmarks:toggle-bookmark'
       markers = displayBuffer.findMarkers(class: 'bookmark')
       expect(markers.length).toEqual 1

-      editor.setText('')
+      editorView.setText('')
       markers = displayBuffer.findMarkers(class: 'bookmark')
       expect(markers.length).toEqual 0

   describe "jumping between bookmarks", ->

     it "doesnt die when no bookmarks", ->
-      editSession.setCursorBufferPosition([5, 10])
-
-      editor.trigger 'bookmarks:jump-to-next-bookmark'
-      expect(editSession.getCursor().getBufferPosition()).toEqual [5, 10]
+      editor.setCursorBufferPosition([5, 10])
+
+      editorView.trigger 'bookmarks:jump-to-next-bookmark'
+      expect(editor.getCursor().getBufferPosition()).toEqual [5, 10]
       expect(atom.beep.callCount).toBe 1

-      editor.trigger 'bookmarks:jump-to-previous-bookmark'
-      expect(editSession.getCursor().getBufferPosition()).toEqual [5, 10]
+      editorView.trigger 'bookmarks:jump-to-previous-bookmark'
+      expect(editor.getCursor().getBufferPosition()).toEqual [5, 10]
       expect(atom.beep.callCount).toBe 2

     describe "with one bookmark", ->
       beforeEach ->
-        editSession.setCursorBufferPosition([2, 0])
-        editor.trigger 'bookmarks:toggle-bookmark'
+        editor.setCursorBufferPosition([2, 0])
+        editorView.trigger 'bookmarks:toggle-bookmark'

       it "jump-to-next-bookmark jumps to the right place", ->
-        editSession.setCursorBufferPosition([0, 0])
-
-        editor.trigger 'bookmarks:jump-to-next-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [2, 0]
-
-        editor.trigger 'bookmarks:jump-to-next-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [2, 0]
-
-        editSession.setCursorBufferPosition([5, 0])
-
-        editor.trigger 'bookmarks:jump-to-next-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [2, 0]
+        editor.setCursorBufferPosition([0, 0])
+
+        editorView.trigger 'bookmarks:jump-to-next-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [2, 0]
+
+        editorView.trigger 'bookmarks:jump-to-next-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [2, 0]
+
+        editor.setCursorBufferPosition([5, 0])
+
+        editorView.trigger 'bookmarks:jump-to-next-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [2, 0]

       it "jump-to-previous-bookmark jumps to the right place", ->
-        editSession.setCursorBufferPosition([0, 0])
-
-        editor.trigger 'bookmarks:jump-to-previous-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [2, 0]
-
-        editor.trigger 'bookmarks:jump-to-previous-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [2, 0]
-
-        editSession.setCursorBufferPosition([5, 0])
-
-        editor.trigger 'bookmarks:jump-to-previous-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [2, 0]
+        editor.setCursorBufferPosition([0, 0])
+
+        editorView.trigger 'bookmarks:jump-to-previous-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [2, 0]
+
+        editorView.trigger 'bookmarks:jump-to-previous-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [2, 0]
+
+        editor.setCursorBufferPosition([5, 0])
+
+        editorView.trigger 'bookmarks:jump-to-previous-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [2, 0]

     describe "with bookmarks", ->
       beforeEach ->
-        editSession.setCursorBufferPosition([2, 0])
-        editor.trigger 'bookmarks:toggle-bookmark'
-
-        editSession.setCursorBufferPosition([10, 0])
-        editor.trigger 'bookmarks:toggle-bookmark'
+        editor.setCursorBufferPosition([2, 0])
+        editorView.trigger 'bookmarks:toggle-bookmark'
+
+        editor.setCursorBufferPosition([10, 0])
+        editorView.trigger 'bookmarks:toggle-bookmark'

       it "jump-to-next-bookmark finds next bookmark", ->
-        editSession.setCursorBufferPosition([0, 0])
-
-        editor.trigger 'bookmarks:jump-to-next-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [2, 0]
-
-        editor.trigger 'bookmarks:jump-to-next-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [10, 0]
-
-        editor.trigger 'bookmarks:jump-to-next-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [2, 0]
-
-        editSession.setCursorBufferPosition([11, 0])
-
-        editor.trigger 'bookmarks:jump-to-next-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [2, 0]
+        editor.setCursorBufferPosition([0, 0])
+
+        editorView.trigger 'bookmarks:jump-to-next-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [2, 0]
+
+        editorView.trigger 'bookmarks:jump-to-next-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [10, 0]
+
+        editorView.trigger 'bookmarks:jump-to-next-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [2, 0]
+
+        editor.setCursorBufferPosition([11, 0])
+
+        editorView.trigger 'bookmarks:jump-to-next-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [2, 0]

       it "jump-to-previous-bookmark finds previous bookmark", ->
-        editSession.setCursorBufferPosition([0, 0])
-
-        editor.trigger 'bookmarks:jump-to-previous-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [10, 0]
-
-        editor.trigger 'bookmarks:jump-to-previous-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [2, 0]
-
-        editor.trigger 'bookmarks:jump-to-previous-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [10, 0]
-
-        editSession.setCursorBufferPosition([11, 0])
-
-        editor.trigger 'bookmarks:jump-to-previous-bookmark'
-        expect(editSession.getCursor().getBufferPosition()).toEqual [10, 0]
+        editor.setCursorBufferPosition([0, 0])
+
+        editorView.trigger 'bookmarks:jump-to-previous-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [10, 0]
+
+        editorView.trigger 'bookmarks:jump-to-previous-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [2, 0]
+
+        editorView.trigger 'bookmarks:jump-to-previous-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [10, 0]
+
+        editor.setCursorBufferPosition([11, 0])
+
+        editorView.trigger 'bookmarks:jump-to-previous-bookmark'
+        expect(editor.getCursor().getBufferPosition()).toEqual [10, 0]

   describe "browsing bookmarks", ->
     it "displays a select list of all bookmarks", ->
-      editSession.setCursorBufferPosition([0])
-      editor.trigger 'bookmarks:toggle-bookmark'
-      editSession.setCursorBufferPosition([2])
-      editor.trigger 'bookmarks:toggle-bookmark'
-      editSession.setCursorBufferPosition([4])
-      editor.trigger 'bookmarks:toggle-bookmark'
+      editor.setCursorBufferPosition([0])
+      editorView.trigger 'bookmarks:toggle-bookmark'
+      editor.setCursorBufferPosition([2])
+      editorView.trigger 'bookmarks:toggle-bookmark'
+      editor.setCursorBufferPosition([4])
+      editorView.trigger 'bookmarks:toggle-bookmark'

       atom.workspaceView.trigger 'bookmarks:view-all'

@@ -188,9 +188,9 @@

     describe "when a bookmark is selected", ->
       it "sets the cursor to the location the bookmark", ->
-        editSession.setCursorBufferPosition([8])
-        editor.trigger 'bookmarks:toggle-bookmark'
-        editSession.setCursorBufferPosition([0])
+        editor.setCursorBufferPosition([8])
+        editorView.trigger 'bookmarks:toggle-bookmark'
+        editor.setCursorBufferPosition([0])

         atom.workspaceView.trigger 'bookmarks:view-all'

@@ -199,4 +199,4 @@
         bookmarks.find('.bookmark').mousedown().mouseup()

         waitsFor ->
-         editSession.getCursorBufferPosition().isEqual([8, 0])
+         editor.getCursorBufferPosition().isEqual([8, 0])


Fix typo I thought I fixed earlier.

Fix typo I thought I fixed earlier.

--- spec/contact-parser-spec.coffee
+++ spec/contact-parser-spec.coffee
@@ -254,7 +254,7 @@
     expect(result.province).toEqual('CO')
     expect(result.postal).toEqual('12345-1234')

-  it 'should parse when common between address and city is missing and street name is avenue', ->
+  it 'should parse when comma between address and city is missing and street name is avenue', ->
     address = "12345 East Center Avenue Aurora, CO 80012"
     sut = new ContactParser
     result = sut.parse(address)


:lipstick: pane-container-spec

:lipstick: pane-container-spec

--- spec/pane-container-spec.coffee
+++ spec/pane-container-spec.coffee
@@ -27,42 +27,42 @@

     it "preserves the active pane across serialization, independent of focus", ->
       pane3A.activate()
-      expect(containerA.activePane).toBe pane3A
+      expect(containerA.getActivePane()).toBe pane3A

       containerB = containerA.testSerialization()
       [pane1B, pane2B, pane3B] = containerB.getPanes()
-      expect(containerB.activePane).toBe pane3B
+      expect(containerB.getActivePane()).toBe pane3B

-  describe "::activePane", ->
+  it "does not allow the root pane to be destroyed", ->
+    pane1.destroy()
+    expect(container.getRoot()).toBe pane1
+    expect(pane1.isDestroyed()).toBe false
+
+  describe "::getActivePane()", ->
     [container, pane1, pane2] = []

     beforeEach ->
       container = new PaneContainer
-      pane1 = container.root
+      pane1 = container.getRoot()

-    it "references the first pane if no pane has been made active", ->
-      expect(container.activePane).toBe pane1
-      expect(pane1.active).toBe true
+    it "returns the first pane if no pane has been made active", ->
+      expect(container.getActivePane()).toBe pane1
+      expect(pane1.isActive()).toBe true

-    it "references the most pane on which ::activate was most recently called", ->
+    it "returns the most pane on which ::activate() was most recently called", ->
       pane2 = pane1.splitRight()
       pane2.activate()
-      expect(container.activePane).toBe pane2
-      expect(pane1.active).toBe false
-      expect(pane2.active).toBe true
+      expect(container.getActivePane()).toBe pane2
+      expect(pane1.isActive()).toBe false
+      expect(pane2.isActive()).toBe true
       pane1.activate()
-      expect(container.activePane).toBe pane1
-      expect(pane1.active).toBe true
-      expect(pane2.active).toBe false
+      expect(container.getActivePane()).toBe pane1
+      expect(pane1.isActive()).toBe true
+      expect(pane2.isActive()).toBe false

-    it "is reassigned to the next pane if the current active pane is destroyed", ->
+    it "returns the next pane if the current active pane is destroyed", ->
       pane2 = pane1.splitRight()
       pane2.activate()
       pane2.destroy()
-      expect(container.activePane).toBe pane1
-      expect(pane1.active).toBe true
-
-    it "does not allow the root pane to be destroyed", ->
-      pane1.destroy()
-      expect(container.root).toBe pane1
-      expect(pane1.isDestroyed()).toBe false
+      expect(container.getActivePane()).toBe pane1
+      expect(pane1.isActive()).toBe true


stuck on fetch

stuck on fetch

--- desktop/apps/editorial_features/routes.coffee
+++ desktop/apps/editorial_features/routes.coffee
@@ -43,16 +43,19 @@
     success: (curation) ->
       res.locals.sd.CURATION = curation.toJSON()
       videoIndex = 0
-      cbs = []
       if @curation.get('sub_articles').length
-        cbs.push () ->
+        @sub_articles = curation.get('sub_articles')
+        # cbs = [ console.log 'in a callback' ]
+        console.log @sub_articles
+        cbs = [
           @veniceSubArticles.fetch
-            data: ids: @curation.get('sub_articles')
+            data: ids: @sub_articles
+        ]
       else
-        cbs.push (cb) -> console.log 'in empty callback'
-      # console.log cbs
+        cbs = [ console.log 'in empty callback' ]
       Q.all(cbs)
       .then =>
+        console.log @veniceSubArticles
         if req.params.slug
           videoIndex = setVideoIndex(curation, req.params.slug)
           unless videoIndex or videoIndex is 0
@@ -61,7 +64,8 @@
         res.render 'components/venice_2017/templates/index',
           videoIndex: videoIndex
           curation: curation
-          sub_articles: @veniceSubArticles?.toJSON()
+          sub_articles: []
+          # sub_articles: @veniceSubArticles?.toJSON()
     error: next

 @vanity = (req, res, next) ->


Extra space.

Extra space.

--- scripts/time-tracker.coffee
+++ scripts/time-tracker.coffee
@@ -55,7 +55,7 @@

   startTime: -> @starting

-  isRunning: -> @starting? and  not @ending?
+  isRunning: -> @starting? and not @ending?

 (module ?= {}).exports = (robot) ->


a cell should become alive after birth

a cell should become alive after birth

--- spec/lib/grid-spec.coffee
+++ spec/lib/grid-spec.coffee
@@ -7,3 +7,9 @@

     When -> @res = @grid.index 2, 2
     Then -> expect(@res).toBe 22
+
+  describe 'with an alive cell should return true after birth', ->
+
+    When -> @grid.live 3,3
+    Then -> expect(@grid.cell(3,3)).toBe true
+


Updating

Updating

--- config.cson
+++ config.cson
@@ -37,12 +37,6 @@
         "xhtml"
       ]
     disabledPackages: [
-      "language-markdown"
-      "atom-beautify"
-      "atomic-chrome"
-      "build"
-      "Hydrogen"
-      "language-asciidoc"
     ]
     projectHome: "/home/fusion809/GitHub/mine"
     themes: [


Revert "update users if username matches and is in this project already; #378"

This reverts commit 3306d924d9d2bb84d75e0bdf97ad4a4283c179bf.

--- server/methods/createAccount.coffee
+++ server/methods/createAccount.coffee
@@ -28,45 +28,6 @@

 		if newUsers
 			for newUser in newUsers
-				foundUserId = Meteor.users.findOne({ username: userObject.username }, { fields: { _id: 1 }})._id
-
-				# if user exists, update instead of create
-				if foundUserId?
-					if Roles.userIsInRole foundUserId, Permissions.member, projectId
-						Meteor.users.update({ _id: foundUserId }, {
-							profile: {
-								email: newUser.email,
-								firstname: newUser.firstname,
-								lastname: newUser.lastname,
-								gender: newUser.gender,
-								telefon: newUser.telefon,
-								pioneer: newUser.pioneer,
-								privilege: newUser.privilege,
-								congregation: newUser.congregation,
-								language: newUser.systemLanguage,
-								languages: newUser.foreignLanguages
-							}
-						})
-
-						if newUser.roles && newUser.roles != '' && newUser.roles.includes('=')
-							for roleTarget in newUser.roles.split(';')
-								target = roleTarget.split('=')[0]
-								role = roleTarget.split('=')[1]
-
-								if target == projectId
-									if role in Permissions.member
-										Meteor.call 'changeProjectRole', target, userId, role
-									else
-										Meteor.call 'changeProjectRole', target, userId, 'member'
-								else if target in tagIds
-									if role in Permissions.participant
-										Meteor.call 'changeTagRole', target, userId, role
-									else
-										Meteor.call 'changeTagRole', target, userId, 'participant'
-
-						return
-
-				# else create new user
 				userId = Meteor.call 'createAccount',
 					username: Random.id 5
 					password: ''
@@ -108,3 +69,4 @@

 				if !projectPermissionWasSet
 					Meteor.call 'changeProjectRole', projectId, userId, 'member'
+


referral: change URI path pattern

referral: change URI path pattern

--- client/landing/app/Applications/Account.kdapplication/views/referrermodal.coffee
+++ client/landing/app/Applications/Account.kdapplication/views/referrermodal.coffee
@@ -3,8 +3,8 @@
     options.cssClass       = "referrer-modal"
     options.width          = 570
     options.overlay        = yes
-    options.title          = "Get free space up to 16GB"
-    options.url          or= "#{location.origin}/?r=#{KD.nick()}"
+    options.title          = "Get free disk space!"
+    options.url          or= "#{location.origin}/R/#{KD.nick()}"
     options.tabs           =
       navigable            : no
       goToNextFormOnSubmit : no


Generate all missing tokens

Generate all missing tokens

--- services/web/app/coffee/Features/Project/ProjectDetailsHandler.coffee
+++ services/web/app/coffee/Features/Project/ProjectDetailsHandler.coffee
@@ -82,9 +82,11 @@
 			if project.tokens? and project.tokens.readOnly? and project.tokens.readAndWrite?
 				return callback(null, project.tokens)
 			else
-				tokens =
-					readOnly: ProjectTokenGenerator.readOnlyToken()
-					readAndWrite: ProjectTokenGenerator.readAndWriteToken()
+				tokens = project.tokens || {}
+				if !tokens.readOnly?
+					tokens.readOnly = ProjectTokenGenerator.readOnlyToken()
+				if !tokens.readAndWrite?
+					tokens.readAndWrite = ProjectTokenGenerator.readAndWriteToken()
 				Project.update {_id: project_id}, {$set: {tokens: tokens}}, (err) ->
 					return callback(err) if err?
 					callback(null, tokens)


Adapt to onDidChangeText API

Adapt to onDidChangeText API

--- lib/autocomplete-manager.coffee
+++ lib/autocomplete-manager.coffee
@@ -456,7 +456,7 @@
   bufferSaved: =>
     @hideSuggestionList() unless @autosaveEnabled

-  bufferChangedText: (changes) =>
+  bufferChangedText: ({changes}) =>
     lastCursorPosition = @editor.getLastCursor().getBufferPosition()
     changeOccurredNearLastCursor = changes.some ({start, newExtent}) ->
       newRange = new Range(start, start.traverse(newExtent))


Add custom commands to autocomplete suggestions

--- lib/autocomplete/command.coffee
+++ lib/autocomplete/command.coffee
@@ -109,11 +109,26 @@
           counts: 1
       else
         items[result[1]].counts += 1
+      # Parse custom user-defined commands
+      newCommandReg = /\\(?:re|provide)?(?:new)?command(?:{)?\\(\w+)/g
+      loop
+        result = newCommandReg.exec content
+        break if !result?
+        if not (result[1] of items)
+          items[result[1]] =
+          displayText: result[1]
+          snippet: result[1] + '{$1}'
+          type: 'function'
+          latexType: 'command'
+          chainComplete: false
+          counts: 1
+        else
+          items[result[1]].counts += 1
     return items

   resetCommands: ->
     @items = {}
-
+
   suggestions:
     latex:
       begin:


fix a bug 提示太长，显示不完全

fix a bug
提示太长，显示不完全

--- lib/build/ios-build-view.coffee
+++ lib/build/ios-build-view.coffee
@@ -41,7 +41,7 @@
             @subview 'repository_url', new EditorView(mini: true, placeholderText: 'Click to choose your Application URL')
           @div class: 'form-group', =>
             @label 'Scheme:'
-            @subview 'scheme', new EditorView(mini: true, placeholderText: 'Please input chameleon-bundled or chameleon-sandbox')
+            @subview 'scheme', new EditorView(mini: true, placeholderText: 'chameleon-bundled or chameleon-sandbox')
           @div class: 'form-group', =>
             @label 'Content Src:'
             @subview 'content_src', new EditorView(mini: true, placeholderText: 'Click here to select your content-src')


image size

image size

--- lib/client/autoform-file.coffee
+++ lib/client/autoform-file.coffee
@@ -96,12 +96,12 @@
     if e.target.files[0].type == "image/png" || e.target.files[0].type == "image/jpg"
       img = new Image
       img.onload = () ->
-        if img.width < 1920 && img.height < 1080
+        if img.width <= 2400 && img.height <= 1200
           makeThatImage(e.target.files[0], theTemplate, theEvent)
         else
           BootstrapModalPrompt.prompt
             title: "That file is too big."
-            content: "Please use an image that is less than 1920 pixels by 1080 pixels."
+            content: "We can't process images bigger than 2400 pixels by 1200 pixels."
           , (result) ->
             if result
               #


Remove old prop _isInReplayMode left in by mistake

--- source/server/infrastructure/projection.coffee
+++ source/server/infrastructure/projection.coffee
@@ -3,7 +3,6 @@
   @mixin Space.messaging.EventSubscribing

   collections: {}
-  _isInReplayMode: false
   _state: null
   _queuedEvents: null


Fix BellefitGenerate3DCartOrdersByFreshdeskUserIdCollection

--- lib/Task/DecisionTask.coffee
+++ lib/Task/DecisionTask.coffee
@@ -20,18 +20,15 @@
         @modifiers = []
         for event in @events
           if @[event.eventType]
-            attributes = camelize(event.eventType, true) + "EventAttributes"
-            event[attributes].input = JSON.parse event[attributes].input if event[attributes].input
-            event[attributes].result = JSON.parse event[attributes].result if event[attributes].result
+            attributes = @eventAttributes(event)
+            attributes.input = JSON.parse attributes.input if attributes.input
+            attributes.result = JSON.parse attributes.result if attributes.result
             @info "DecisionTask:processEvent", @details({event: event})
-            @[event.eventType](event, event[attributes], event[attributes].input or event[attributes].result)
+            @[event.eventType](event, attributes, attributes.input or attributes.result)
           else
             throw new errors.EventHandlerNotImplementedError
               message: "Event handler '#{event.eventType}' not implemented"
               event: event
-        if not @decisions.length
-          throw new errors.NoDecisionsError
-            event: event
       catch error
         reject error
       resolve()
@@ -53,20 +50,27 @@
   addDecision: (decision) ->
     @decisions.push decision
   removeDecision: (decisionType, query) ->
-    index = _.findIndex @decisions, (decision) ->
-      console.log decision.decisionType, decisionType
-      return false unless decision.decisionType is decisionType
-      for path, value of query
-        console.log opath.get(decision, path)
-        return false unless opath.get(decision, path) is value
-      console.log true
-      return true
-    console.log index
+    index = @findIndex @decisions, _.extend
+      decisionType: decisionType
+    , query
     throw new errors.RuntimeError(
       message: "Can't find \"#{decisionType}\" decision to remove"
       query: query
     ) if not ~index
     @decisions.splice(index, 1)
+  findIndex: (array, query) ->
+    _.findIndex array, (element) ->
+      for path, value of query
+        return false unless opath.get(element, path) is value
+      return true
+  find: (array, query) ->
+    index = @findIndex array, query
+    array[index] if ~index
+  attributesProperty: (name, suffix) -> camelize(name, true) + suffix
+  eventAttributesProperty: (event) -> @attributesProperty(event.eventType, "EventAttributes")
+  decisionAttributesProperty: (decision) -> @attributesProperty(decision.decisionType, "DecisionAttributes")
+  eventAttributes: (event) -> event[@eventAttributesProperty(event)]
+  decisionAttributes: (decision) -> decision[@decisionAttributesProperty(decision)]
   removeScheduleActivityTaskDecision: (activityId) ->
     @removeDecision "ScheduleActivityTask",
       "scheduleActivityTaskDecisionAttributes.activityId": activityId


Home: homepage's about link is temp. hidden

--- client/landing/Intro/home.coffee
+++ client/landing/Intro/home.coffee
@@ -180,7 +180,7 @@
           </address>

-          About
+          About
           Contact
           University
           Jobs


minor: typo fix

minor: typo fix

--- client/landing/app/Applications/Home.kdapplication/Views/homeloginbar.coffee
+++ client/landing/app/Applications/Home.kdapplication/Views/homeloginbar.coffee
@@ -46,7 +46,7 @@

     @login        = new CustomLinkView
       tagName     : "a"
-      title       : "Already a user? Sign In"
+      title       : "Already a user? Sign In."
       icon        : {}
       cssClass    : "login"
       attributes  :


bongo: emit a 'save' event

bongo: emit a 'save' event

- sort of a no-brainer

--- node_modules_koding/bongo/lib/model/save.coffee
+++ node_modules_koding/bongo/lib/model/save.coffee
@@ -36,7 +36,7 @@
         delete data._id
         delete data.bongo_
         collection.update \
-          (_id: do model.getId), data,
+          (_id: do model.getId), data,
           (safe:yes), helpers.save_1_.bind model, callback, no
     else
       model.rootNode_?.saveAtomically model, callback
@@ -44,7 +44,7 @@
   @function. bound to the model instance
   @signature: save_1_.bind(model, callback)
   @param: model - to bind the function to
-  ###
+  ###
   save_1_:(callback, isNew, err, docs)->
     model = @
     {constructor} = model
@@ -53,4 +53,5 @@
         model.data._id = id
       if constructor.feedable is true or constructor.feedable?.call? model
         constructor.appendToFeed model, if isNew then 'new' else 'update'
-    callback?.call model, err, docs, isNew+    callback?.call model, err, docs, isNew
+    @emit 'save'


Give up regular expression.

Give up regular expression.

--- src/5.test.coffee
+++ src/5.test.coffee
@@ -32,14 +32,15 @@
         testArgName = "testArg_834942610148628375"
         do =>
             s = s.replace(/\([^\)]*\)/, "(#{testArgName})") # not global, only replace first "(...)"
-
-        do =>
+        do =>
+            positions = []
             quote = null
             slashQuoteReady = true
             wordStarted = false
             i = 0
             while i < s.length
                 c = s[i]
+                oldSlashQuoteReady = slashQuoteReady
                 if quote == null
                     if "a" <= c <= "z" or "A" <= c <= "Z" or "0" <= c <= "9" or
                             c == "_" or c == "$" or c == ")" or c == "]"
@@ -47,6 +48,7 @@
                     else if c == " " or c == "\t" or c == "\n" or c == "\r"
                     else
                         slashQuoteReady = true
+                oldWordStarted = wordStarted
                 if quote == null
                     if "a" <= c <= "z" or "A" <= c <= "Z" or "0" <= c <= "9" or
                             c == "_" or c == "$" or c == "."
@@ -60,7 +62,7 @@
                 else if c == "'" and quote == null
                     quote = "single"
                     i++
-                else if c == "/" and quote == null and slashQuoteReady
+                else if c == "/" and quote == null and oldSlashQuoteReady
                     quote = "slash"
                     i++
                 else if (c == "\"" and quote == "double") or
@@ -70,49 +72,17 @@
                     i++
                 else if c == "\\" and quote != null
                     i += 2
-                else if quote == null and not wordStarted
-                    if s.substr(i, 3) == "end"
-                    if c == "="
-                        parsed =
-                            type: "equal"
-                            str1: unitStr.substr(0, i).trim()
-                            str2: unitStr.substr(i + 1).trim()
-                        return
-
-
-        do =>
-            needsSearch = true
-            while needsSearch
-                needsSearch = false
-                console.log("jkdfgfdgsd")
-                s = s.replace(///
-                    ^
-                    (
-                        (?:
-                            (?: [^"'/] | [a-zA-Z0-9_$\])]\s*/ )+?
-                            (?:
-                                " (?: [^"\\] | \\. )* " |
-                                ' (?: [^'\\] | \\. )* ' |
-                                [^a-zA-Z0-9_$\])]\s* / (?:
-                                    [^/\\] | \\.
-                                )* /
-                            )?
-                        )*?
-                        (?:
-                            [^"'/.]\s+ |
-                            [^"'/.a-zA-Z0-9_$]\s* |
-                            [a-zA-Z0-9_$\])]\s*/\s*
-                        )
-                    )
-                    (end | equal | unit)
-                    ([^a-zA-Z0-9_$])
-                ///, (match, p1, p2, p3) =>
-                    needsSearch = true
-                    p1 + testArgName + "." + p2 + p3
-                )
-                console.log(s)
-            console.log("jkdf")
-        console.log(s)
+                else if quote == null and not oldWordStarted and "a" <= c <= "z"
+                    t = s.substr(i, 10)
+                    if t.indexOf("end") == 0 or t.indexOf("equal") == 0 or t.indexOf("unit") == 0
+                        positions.push(i)
+                    i++
+                else
+                    i++
+            positions.forEach((m, index) =>
+                pos = m + (testArgName.length + 1) * index
+                s = s.substr(0, pos) + testArgName + "." + s.substr(pos)
+            )
         do =>
             s = s.replace(///
                 #{testArgName}\.unit\s*\(\s*


rewrite test queries

rewrite test queries

--- test/pagerv2_commands_test.coffee
+++ test/pagerv2_commands_test.coffee
@@ -668,8 +668,19 @@
       context 'when something goes wrong,', ->
         beforeEach ->
           nock('https://api.pagerduty.com')
-          .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-               '&statuses%5B%5D=triggered&limit=100&total=true')
+          .get('/incidents')
+          .query({
+            time_zone: 'UTC',
+            include: [
+              'first_trigger_log_entry'
+            ],
+            date_range: 'all',
+            statuses: [
+              'triggered'
+            ],
+            limit: 100,
+            total: 'true'
+          })
           .reply 503, { error: { code: 503, message: "it's all broken!" } }
         afterEach ->
           room.robot.brain.data.pagerv2 = { }
@@ -684,8 +695,19 @@
         context 'with only one incident', ->
           beforeEach ->
             nock('https://api.pagerduty.com')
-            .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-                 '&statuses%5B%5D=triggered&limit=100&total=true')
+            .get('/incidents')
+            .query({
+              time_zone: 'UTC',
+              include: [
+                'first_trigger_log_entry'
+              ],
+              date_range: 'all',
+              statuses: [
+                'triggered'
+              ],
+              limit: 100,
+              total: 'true'
+            })
             .reply(200, require('./fixtures/incident_list-ok.json'))
             .put('/incidents')
             .reply(200, require('./fixtures/incident_manage-ok.json'))
@@ -699,8 +721,19 @@
         context 'with multiple incidents', ->
           beforeEach ->
             nock('https://api.pagerduty.com')
-            .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-                 '&statuses%5B%5D=triggered&limit=100&total=true')
+            .get('/incidents')
+            .query({
+              time_zone: 'UTC',
+              include: [
+                'first_trigger_log_entry'
+              ],
+              date_range: 'all',
+              statuses: [
+                'triggered'
+              ],
+              limit: 100,
+              total: 'true'
+            })
             .reply(200, require('./fixtures/incident_list_multi-ok.json'))
             .put('/incidents')
             .reply(200, require('./fixtures/incident_manage_multi-ok.json'))
@@ -715,8 +748,19 @@
       context 'when there are no incidents,', ->
         beforeEach ->
           nock('https://api.pagerduty.com')
-          .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all&' +
-               'statuses%5B%5D=triggered&limit=100&total=true')
+          .get('/incidents')
+          .query({
+            time_zone: 'UTC',
+            include: [
+              'first_trigger_log_entry'
+            ],
+            date_range: 'all',
+            statuses: [
+              'triggered'
+            ],
+            limit: 100,
+            total: 'true'
+          })
           .reply(200, require('./fixtures/incident_list-empty.json'))
         afterEach ->
           nock.cleanAll()
@@ -784,8 +828,19 @@
       context 'when something goes wrong,', ->
         beforeEach ->
           nock('https://api.pagerduty.com')
-          .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all&' +
-               'statuses%5B%5D=acknowledged&limit=100&total=true')
+          .get('/incidents')
+          .query({
+            time_zone: 'UTC',
+            include: [
+              'first_trigger_log_entry'
+            ],
+            date_range: 'all',
+            statuses: [
+              'acknowledged'
+            ],
+            limit: 100,
+            total: 'true'
+          })
           .reply 503, { error: { code: 503, message: "it's all broken!" } }
         afterEach ->
           room.robot.brain.data.pagerv2 = { }
@@ -800,8 +855,19 @@
         context 'with only one incident', ->
           beforeEach ->
             nock('https://api.pagerduty.com')
-            .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all&' +
-                 'statuses%5B%5D=acknowledged&limit=100&total=true')
+            .get('/incidents')
+            .query({
+              time_zone: 'UTC',
+              include: [
+                'first_trigger_log_entry'
+              ],
+              date_range: 'all',
+              statuses: [
+                'acknowledged'
+              ],
+              limit: 100,
+              total: 'true'
+            })
             .reply(200, require('./fixtures/incident_list-ok.json'))
             .put('/incidents')
             .reply(200, require('./fixtures/incident_manage-ok.json'))
@@ -817,8 +883,19 @@
         context 'with many incidents', ->
           beforeEach ->
             nock('https://api.pagerduty.com')
-            .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all&' +
-                 'statuses%5B%5D=acknowledged&limit=100&total=true')
+            .get('/incidents')
+            .query({
+              time_zone: 'UTC',
+              include: [
+                'first_trigger_log_entry'
+              ],
+              date_range: 'all',
+              statuses: [
+                'acknowledged'
+              ],
+              limit: 100,
+              total: 'true'
+            })
             .reply(200, require('./fixtures/incident_list_multi-ok.json'))
             .put('/incidents')
             .reply(200, require('./fixtures/incident_manage_multi-ok.json'))
@@ -834,8 +911,19 @@
       context 'when there are no incidents,', ->
         beforeEach ->
           nock('https://api.pagerduty.com')
-          .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all&' +
-               'statuses%5B%5D=acknowledged&limit=100&total=true')
+          .get('/incidents')
+          .query({
+            time_zone: 'UTC',
+            include: [
+              'first_trigger_log_entry'
+            ],
+            date_range: 'all',
+            statuses: [
+              'acknowledged'
+            ],
+            limit: 100,
+            total: 'true'
+          })
           .reply(200, require('./fixtures/incident_list-empty.json'))
         afterEach ->
           nock.cleanAll()
@@ -903,8 +991,20 @@
       context 'when something goes wrong,', ->
         beforeEach ->
           nock('https://api.pagerduty.com')
-          .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-               '&statuses%5B%5D=triggered&statuses%5B%5D=acknowledged&limit=100&total=true')
+          .get('/incidents')
+          .query({
+            time_zone: 'UTC',
+            include: [
+              'first_trigger_log_entry'
+            ],
+            date_range: 'all',
+            statuses: [
+              'triggered',
+              'acknowledged'
+            ],
+            limit: 100,
+            total: 'true'
+          })
           .reply 503, { error: { code: 503, message: "it's all broken!" } }
         afterEach ->
           room.robot.brain.data.pagerv2 = { }
@@ -919,8 +1019,20 @@
         context 'with only one incident', ->
           beforeEach ->
             nock('https://api.pagerduty.com')
-            .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-                 '&statuses%5B%5D=triggered&statuses%5B%5D=acknowledged&limit=100&total=true')
+            .get('/incidents')
+            .query({
+              time_zone: 'UTC',
+              include: [
+                'first_trigger_log_entry'
+              ],
+              date_range: 'all',
+              statuses: [
+                'triggered',
+                'acknowledged'
+              ],
+              limit: 100,
+              total: 'true'
+            })
             .reply(200, require('./fixtures/incident_list-ok.json'))
             .put('/incidents')
             .reply(200, require('./fixtures/incident_manage-ok.json'))
@@ -936,8 +1048,20 @@
         context 'with many incidents', ->
           beforeEach ->
             nock('https://api.pagerduty.com')
-            .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-                 '&statuses%5B%5D=triggered&statuses%5B%5D=acknowledged&limit=100&total=true')
+            .get('/incidents')
+            .query({
+              time_zone: 'UTC',
+              include: [
+                'first_trigger_log_entry'
+              ],
+              date_range: 'all',
+              statuses: [
+                'triggered',
+                'acknowledged'
+              ],
+              limit: 100,
+              total: 'true'
+            })
             .reply(200, require('./fixtures/incident_list-ok.json'))
             .put('/incidents')
             .reply(200, require('./fixtures/incident_manage_multi-ok.json'))
@@ -953,8 +1077,20 @@
       context 'when there are no incidents,', ->
         beforeEach ->
           nock('https://api.pagerduty.com')
-          .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-               '&statuses%5B%5D=triggered&statuses%5B%5D=acknowledged&limit=100&total=true')
+          .get('/incidents')
+          .query({
+            time_zone: 'UTC',
+            include: [
+              'first_trigger_log_entry'
+            ],
+            date_range: 'all',
+            statuses: [
+              'triggered',
+              'acknowledged'
+            ],
+            limit: 100,
+            total: 'true'
+          })
           .reply(200, require('./fixtures/incident_list-empty.json'))
         afterEach ->
           nock.cleanAll()
@@ -1022,8 +1158,20 @@
       context 'when something goes wrong,', ->
         beforeEach ->
           nock('https://api.pagerduty.com')
-          .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-               '&statuses%5B%5D=triggered&statuses%5B%5D=acknowledged&limit=100&total=true')
+          .get('/incidents')
+          .query({
+            time_zone: 'UTC',
+            include: [
+              'first_trigger_log_entry'
+            ],
+            date_range: 'all',
+            statuses: [
+              'triggered',
+              'acknowledged'
+            ],
+            limit: 100,
+            total: 'true'
+          })
           .reply 503, { error: { code: 503, message: "it's all broken!" } }
         afterEach ->
           room.robot.brain.data.pagerv2 = { }
@@ -1038,8 +1186,20 @@
         context 'with only one incident', ->
           beforeEach ->
             nock('https://api.pagerduty.com')
-            .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-                 '&statuses%5B%5D=triggered&statuses%5B%5D=acknowledged&limit=100&total=true')
+            .get('/incidents')
+            .query({
+              time_zone: 'UTC',
+              include: [
+                'first_trigger_log_entry'
+              ],
+              date_range: 'all',
+              statuses: [
+                'triggered',
+                'acknowledged'
+              ],
+              limit: 100,
+              total: 'true'
+            })
             .reply(200, require('./fixtures/incident_list-ok.json'))
             .post('/incidents/PT4KHLK/snooze')
             .reply(200, require('./fixtures/incident_snooze-ok.json'))
@@ -1055,8 +1215,20 @@
         context 'with many incidents', ->
           beforeEach ->
             nock('https://api.pagerduty.com')
-            .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-                 '&statuses%5B%5D=triggered&statuses%5B%5D=acknowledged&limit=100&total=true')
+            .get('/incidents')
+            .query({
+              time_zone: 'UTC',
+              include: [
+                'first_trigger_log_entry'
+              ],
+              date_range: 'all',
+              statuses: [
+                'triggered',
+                'acknowledged'
+              ],
+              limit: 100,
+              total: 'true'
+            })
             .reply(200, require('./fixtures/incident_list_multi-ok.json'))
             .post('/incidents/PT4KHLK/snooze')
             .reply(200, require('./fixtures/incident_snooze-ok.json'))
@@ -1074,8 +1246,20 @@
       context 'when there are no incidents,', ->
         beforeEach ->
           nock('https://api.pagerduty.com')
-          .get('/incidents?time_zone=UTC&include%5B%5D=first_trigger_log_entry&date_range=all' +
-               '&statuses%5B%5D=triggered&statuses%5B%5D=acknowledged&limit=100&total=true')
+          .get('/incidents')
+          .query({
+            time_zone: 'UTC',
+            include: [
+              'first_trigger_log_entry'
+            ],
+            date_range: 'all',
+            statuses: [
+              'triggered',
+              'acknowledged'
+            ],
+            limit: 100,
+            total: 'true'
+          })
           .reply(200, require('./fixtures/incident_list-empty.json'))
         afterEach ->
           nock.cleanAll()


removed console.log

removed console.log

--- lib/editor-background.coffee
+++ lib/editor-background.coffee
@@ -583,7 +583,6 @@
     @elements.textBackground.appendChild line

   drawLines: (attrs) ->
-    console.log attrs
     if attrs?
       if attrs.editorElement? && attrs.screenLines?
         @elements.textBackground.innerText = ''


Fixed typo

Fixed typo

--- source/zen.init.coffee
+++ source/zen.init.coffee
@@ -24,7 +24,8 @@
       $(document.body).removeClass "landing"
       ZEN.process.get()
       ZEN.request.get()
+
   $("header > form > button.connect").on "click", (event) ->
     event.preventDefault()
     event.stopPropagation()
-      $(document.body).addClass "landing"
+    $(document.body).addClass "landing"


Change on tests

Change on tests

--- spec/5_template.coffee
+++ spec/5_template.coffee
@@ -11,8 +11,11 @@
     spy = noop.spy

     class Template extends Atoms.Core.Class.Template
+      @attributes "title", "button"
       template: "

{{title}}

"
       title: "Hi Atoms!!!"
+      button:
+        icon: "profile"

     el = Atoms.$ "
"

@@ -35,5 +38,4 @@

   it "Templates are shielded only be assigned attributes that exist in the base", ->
     template = new Template parent: el
-
-
+    expect(template.constructor.elements).toEqual ["title", "button"]


I don't need to send the query with validateUser

--- src/Carrot.coffee
+++ src/Carrot.coffee
@@ -74,9 +74,8 @@
     true

   validateUser: (accessToken, callback) ->
-    query = window?.document?.location?.search?.substr 1
     @ajaxPost("#{@scheme}://#{@hostname}/games/#{@appId}/users.json",
-      {'access_token': accessToken, 'api_key': @udid, 'query' : query},
+      {'access_token': accessToken, 'api_key': @udid},
       (jqXHR) =>
         switch jqXHR.status
           when 201


assets

assets

--- spec/asset_spec.coffee
+++ spec/asset_spec.coffee
@@ -31,6 +31,8 @@
     it 'should find file if file is named same as folder in a different load path', ->

     it 'should find files with . dots in their name', ->
+
+    it 'should ignore files starting with a ~ tilde', ->

   describe "compression", ->
     it "should use the YUI compressor", ->


Call Editor::setGrammar instead of Editor::reloadGrammar

This ensures the grammar is always set to the one selected

--- lib/grammar-list-view.coffee
+++ lib/grammar-list-view.coffee
@@ -32,9 +32,10 @@
     @cancel()
     if grammar is @autoDetect
       atom.syntax.clearGrammarOverrideForPath(@editor.getPath())
+      @editor.reloadGrammar()
     else
       atom.syntax.setGrammarOverrideForPath(@editor.getPath(), grammar.scopeName)
-    @editor.reloadGrammar()
+      @editor.setGrammar(grammar)

   attach: ->
     @storeFocusedElement()


reactive query working

reactive query working

--- lib/mixins/Base.mixin.coffee
+++ lib/mixins/Base.mixin.coffee
@@ -32,6 +32,8 @@
         @include
           # ##### defaults
           defaults:
+            # ###### Allow the table to be rerendered reactively
+            destroy: true
             # ###### Display Options
             jQueryUI: false
             autoWidth: true


catched a error in toggling

catched a error in toggling

--- lib/opened-files-view.coffee
+++ lib/opened-files-view.coffee
@@ -90,7 +90,10 @@
     @element = null

   toggle: =>
-    if @element.style.display == "" or @element.style.display=="block"
-      @element.style.display="none"
+    if @element?
+      if @element.style.display == "" or @element.style.display=="block"
+        @element.style.display="none"
+      else
+        @element.style.display="block"
     else
-      @element.style.display="block"
+      @draw()


Updated broker to set default options for store and logger.

--- src/broker.coffee
+++ src/broker.coffee
@@ -7,27 +7,28 @@
 # A broker passes reqests/responses between clients/workers.
 module.exports = class Broker
   constructor: (@options={}) ->
-    @_initLog @options.log
-    @_initStore @options.store
+    @_initLog()
+    @_initStore()
     @_initSockets()
     @_bindRouter()
     @_bindDealer()
     @_submitTasks()

-  _initLog: (options) ->
-    level = options?.level or "info"
-    stream = if options?.path?
-      fs.createWriteStream options.path, flags: "a"
+  _initLog: ->
+    level = @options.log?.level or "info"
+    stream = if @options.log?.path?
+      fs.createWriteStream @options.log.path, flags: "a"
     else
       process.stdout
     @log = new Log level, stream

-  _initStore: (options) ->
-    Store  = require "./stores/#{options.type}"
-    @store = new Store options.options
+  _initStore: ->
+    type = @options.store?.type or "memory"
+    Store  = require "./stores/#{type}"
+    @store = new Store @options.store?.options
     @queue = new Queue (task, callback) =>
       @store.write task.id, task, callback
-    , options.maxConnections or 1
+    , @options.store?.maxConnections or 1

   _initSockets: ->
     @router = zmq.socket "router"


(doc re) Majorly refactor usage-text

(doc re) Majorly refactor usage-text

--- Paws/Executables/paws.js.coffee
+++ Paws/Executables/paws.js.coffee
@@ -13,7 +13,7 @@

    out = process.stdout
    err = process.stderr
-
+
    heart = '💖 '
    salutation = 'Paws loves you. Bye!'

@@ -25,37 +25,46 @@
       #  -- standard 80-column terminal ------------------------------------------------|
       usage = seperator + "\n" + _(figlets).sample() + """

-{{#title}}Usages:{{/title}}
-{{#pre}}   > paws.js [{{#flag}}flags{{/flag}}] {{#op}}operation{{/op}} [params]
-            > paws.js {{#u}}file.paws{{/u}} [--] [arguments]
-            > paws.js {{#op}}interact{{/op}}
-            > paws.js {{#op}}parse{{/op}} {{#u}}file.paws{{/u}}{{/pre}}
+{{#title}}Usage:{{/title}}
+{{#pre}}{{prompt}} paws.js [{{#bgflag}}flags{{/bgflag}}] {{#bgop}}operation{{/bgop}} [operation parameters]
+
+           # for example,
+         {{prompt}} paws.js {{#u}}foo.paws{{/u}} [[--] arguments]
+         {{prompt}} paws.js {{#bgop}}interact{{/bgop}}
+         {{prompt}} paws.js {{#bgop}}parse{{/bgop}} {{#u}}bar.paws{{/u}}{{/pre}}

          The first non-flag argument will be an operation to preform; the second depends
          on the operation, but is usually a path to a file to load. If no operation is
-         instructed, then the `start` operation is used.
+         instructed, then the {{#op}}start{{/op}} operation is used.
+
+         In true UNIX style, single-letter flags may be combined serially; that is,
+         {{#c}}-aBc{{/c}} is synonymous with {{#c}}-a -B -c{{/c}}. Furthermore, all arguments following a
+         bare {{#c}}--{{/c}} are passed to the program un-parsed (that is, even if it's a flag that
+         would otherwise be interpreted by the Paws.js CLI, it will be ignored and passed
+         verbatim to the Paws runtime.)

 {{#title}}Operations:{{/title}}
-            [<none>|{{#op}}start{{/op}}] {{#u}}file.paws{{/u}}      Start the Paws reactor, load the given file
+            {{#op}}start{{/op}} {{#u}}filename.paws{{/u}}           Start the Paws reactor, load the given unit
+            {{#op}}parse{{/op}} {{#u}}filename.paws{{/u}}           Show the computed parse-tree for a cPaws file
             {{#op}}interact{{/op}}                      Begin an interactive Paws session (a ‘repl’)
-            {{#op}}parse{{/op}} {{#u}}file.paws{{/u}}               Show the computed parse-tree for a cPaws file

 {{#title}}Flags:{{/title}}
-{{#flag}}   --help{{/flag}}:        Show usage information
+{{#flag}}   --help{{/flag}}:        Show this usage information
 {{#flag}}   --version{{/flag}}:     Show version information

-{{#flag}}   -e "EXPR", --expression="EXPR"{{/flag}}:
-               For {{#b}}parse{{/b}} and {{#b}}start{{/b}}, allows you to provide a cPaws expression at the
-               command-line, to substitute for a file. (If at least one {{#c}}--expression{{/c}} is
-               included, the required filname for those operations may be omitted.)
+{{#flag}}   -e "EXPR"{{/flag}},{{#flag}} --expression="EXPR"{{/flag}}:
+               For {{#op}}parse{{/op}} and {{#op}}start{{/op}}, allows you to provide a cPaws expression at the
+               command-line, to substitute for a file. (If at least one {{#c}}--expression{{/c}}
+               is included, the filname for those operations, normally a required
+               parameter, may be omitted.)

 {{#flag}}   --[no-]start{{/flag}}:
-               Disable the self-scheduling reactor functionality. By default, a Paws
-               reactor runs indefinately, processing combinations when they become
-               available.
+               Disable the self-scheduling reactor functionality. Under normal
+               circumstances (i.e. {{#c}}--start{{/c}}, the default) a Paws reactor runs
+               indefinately, processing combinations when they become available.

-               With the {{#c}}--no-start{{/c}} flag, however, the reactor will shut down as soon as
-               all immediately-known stagings have been completed. This means your
+               With the {{#c}}--no-start{{/c}} flag, however, the reactor will shut down as soon
+               as all immediately-known stagings have been completed. This means your
                program will more intuitively ‘automatically exit,’ but it also means any
                deferred stagings in your code (stagings that cannot immediately execute,
                for instance those with ownership-conflicts, or those deferred by timing
@@ -63,7 +72,7 @@

          Paws.js also accepts several environment variables, in the form:
-{{#pre}}   > VAR=value paws.js ...{{/pre}}
+{{#pre}}{{prompt}} VAR=value paws.js ...{{/pre}}

 {{#title}}Variables:{{/title}}
             {{#b}}SILENT{{/b}}=[true|false]           Suppress all output from Paws.js itself
@@ -84,22 +93,25 @@
          heart: if Paws.use_colour() then heart else '<3'
          b: ->(text, r)-> T.bold r text
          u: ->(text, r)-> T.underline r text
-         c: ->(text, r)-> T.invert r text
+         c: ->(text, r)-> if Paws.use_colour() then T.invert r text else '`'+r(text)+'`'

          op:   ->(text, r)-> T.fg 2, r text
+         bgop: ->(text, r)-> T.bg 2, r text
          flag: ->(text, r)-> T.fg 6, r text
+         bgflag: ->(text, r)-> T.bg 6, r text

          title: ->(text, r)-> T.bold T.underline r text
          link:  ->(text, r)->
             if Paws.use_colour() then T.sgr(34) + T.underline(r text) + T.sgr(39) else r text
+         prompt: -> T.bg 7,'$'
          pre:  ->(text, r)->
-            if Paws.use_colour()
-               lines = text.split "\n"
-               lines = _(lines).map (line)->
-                  sanitized_line = line.replace /\{\{\{?[^}]+\}?\}\}/g, ''
-                  line + new Array(T.columns - sanitized_line.length + 1).join(' ')
-               T.invert r lines.join("\n")
-            else r text
+            lines = text.split "\n"
+            lines = _(lines).map (line)->
+               line = r line
+               sgr_sanitized_line = line.replace /\033.*?m/g, ''
+               spacing = new Array(T.columns - sgr_sanitized_line.length - 4).join(' ')
+               '  ' + (if Paws.use_colour() then T.invert T.fg 10, ' ' + line + spacing else line) + '  '
+            lines.join("\n")

       version()


better log html exports

better log html exports


Don't attach window.JSON, contexts already have their own.

--- src/server/browser.coffee
+++ src/server/browser.coffee
@@ -134,8 +134,6 @@
     augmentWindow : (window) ->
         self = this

-        window.JSON = JSON
-
         # Thanks Zombie for Image code
         window.Image = (width, height) ->
             img = new self.jsdom


Start work on listening for partner id changes from JWT token

--- src/api/apps/users/model.coffee
+++ src/api/apps/users/model.coffee
@@ -25,7 +25,13 @@
     return callback err if err
     db.users.findOne { access_token: encryptedAccessToken }, (err, user) ->
       return callback err if err
-      return callback null, user if user
+      if user
+        savedPartnerIds = user.partner_ids #TO STRING THIS TO COMPARE
+        latestPartnerIds = jwtDecode(accessToken)?.partner_ids or []
+        console.log(jwtDecode(accessToken))
+        console.log(savedPartnerIds)
+        console.log(latestPartnerIds)
+        return callback null, user if savedPartnerIds is latestPartnerIds
       # Otherwise fetch data from Gravity and flatten it into a Positron user
       async.parallel [
         (cb) ->


Add incrementing `seq` field to each WS message

--- src/client.coffee
+++ src/client.coffee
@@ -289,6 +289,7 @@
             return false
         else
             message.id = ++@_messageID
+            message.seq = id
             @_pending[message.id] = message
             @ws.send JSON.stringify(message)
             return message


Fix logger binding

Fix logger binding

--- src/client.coffee
+++ src/client.coffee
@@ -13,6 +13,7 @@
       if options.labels
         _.extend @LabelIcons, options.labels.icons
         _.extend @LabelClasses, options.labels.classes
+      if options.Logger? then @_bindLogger(options.Logger)
     baseConfig.call(Notifications, options)

   add: (arg) -> collection.insert Events.parse(arg)
@@ -28,7 +29,8 @@
     if bindArgs == true
       bindArgs = {level: 'error'}
     bindLevel = bindArgs.level
-    oldMsg = Logger.msg
+    # Store a reference to the original method for idempotency.
+    oldMsg = Logger._origMsg = Logger._origMsg ? Logger.msg
     Logger.msg = (msg, args, func) ->
       level = msg.toLowerCase()
       args = _.toArray(args)


Move the "data-page-initialized" attribute to the <body> tag, easier to reference when using Geb

--- tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
+++ tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
@@ -122,7 +122,7 @@
             # be ready to go. We set a flag, mostly used by test suites, to ensure that all is ready.
             # Note that later Ajax requests do not change this attribute, so their timing continues to be tricky.

-            (dom document.documentElement).attribute "data-page-initialized", "true"
+            dom.body().attribute "data-page-initialized", "true"

     exports = _.extend loadLibrariesAndInitialize,
       # Passed a list of initializers, executes each initializer in order. Due to asynchronous loading


open URI

open URI

--- spotify-control.coffee
+++ spotify-control.coffee
@@ -70,6 +70,13 @@
       .catch (err) ->
         msg.send "Error: #{err}"

+  robot.respond /sp open (.*?)$/i, (msg) ->
+    getInterface()
+      .then (iface) ->
+        iface.OpenUri msg.match[1]
+      .catch (err) ->
+        msg.send "Error: #{err}"
+
 spotifyPid = () ->
   def = q.defer()
   pidof 'spotify', (err, pid) ->


Remove a console.log

Remove a console.log

--- admin/static/coffee/dashboard.coffee
+++ admin/static/coffee/dashboard.coffee
@@ -132,7 +132,7 @@
                     namespaces_without_masters.push
                         id: namespace.get('id')
                         name: namespace.get('name')
-                console.log keys
+
             if namespaces_without_masters.length > 0
                 status.has_availability_problems = true
                 status.has_namespaces_without_masters = true


Declare getLeadingWhitespace and getTrailingWhitespace

And declare variable TextManipulation so we can elegantly access these methods from within the class.

--- lib/text-manipulation.coffee
+++ lib/text-manipulation.coffee
@@ -13,8 +13,8 @@
   constructor: (bufferText, range) ->
     [@start, @end] = range
     element = bufferText.slice @start, @end
-    @leadingWhitespace  = (/^\s*/.exec(element) ? [''])[0]
-    @trailingWhitespace = (/\s*$/.exec(element) ? [''])[0]
+    @leadingWhitespace  = TextManipulation.getLeadingWhitespace(element)
+    @trailingWhitespace = TextManipulation.getTrailingWhitespace(element)
     @eltStart = @start + @leadingWhitespace.length
     @eltEnd = @end - @trailingWhitespace.length
     @strippedElement = bufferText.slice @eltStart, @eltEnd
@@ -26,7 +26,7 @@
       '"' + (if @strippedElement.length <= 8 then @strippedElement else
                 (@strippedElement.slice 0, 3) + '..' + (@strippedElement.slice -3)) + '"'

-module.exports =
+module.exports = TextManipulation =
   ListElement: ListElement

   # Computing the layout for all elements is a bit overkill, but can be optimized later, if necessary.
@@ -235,8 +235,14 @@
       when ')' then '('
       else console.error 'Unknown closing bracket \'' + closingBracket + '\''

-  stripLeadingWhitespace: (source) ->
-    source.replace(/^\s+/, '')
-
-  stripTrailingWhitespace: (source) ->
-    source.replace(/\s+$/, '')
+  getLeadingWhitespace: (text) ->
+    (/^\s*/.exec(text) ? [''])[0]
+
+  getTrailingWhitespace: (text) ->
+    (/\s*$/.exec(text) ? [''])[0]
+
+  stripLeadingWhitespace: (text) ->
+    text.replace(/^\s+/, '')
+
+  stripTrailingWhitespace: (text) ->
+    text.replace(/\s+$/, '')


hub/client metrics: removing debug interval for reporting

--- src/smc-hub/client.coffee
+++ src/smc-hub/client.coffee
@@ -62,7 +62,6 @@
 # How frequently we tell the browser clients to report metrics back to us.
 # Set to 0 to completely disable metrics collection from clients.
 CLIENT_METRICS_INTERVAL_S = 60*2
-CLIENT_METRICS_INTERVAL_S = 10  # for debugging...

 # recording metrics and statistics
 metrics_recorder = require('./metrics-recorder')


ensure after hooks run even if something fails

--- lib/assets/javascripts/jasmine/GWT/Scenario.js.coffee
+++ lib/assets/javascripts/jasmine/GWT/Scenario.js.coffee
@@ -15,10 +15,16 @@
         if position == 'last'
             jasmine.Spec.prototype.removeAllSpies.apply(context)

-      param.apply(context, args)
+      exception = null
+
+      try
+        param.apply(context, args)
+      catch exception

       if position == 'last'
         jasmine.GWT.runHook('After', context)
+
+      throw(exception) if exception

   @runFailure: (type, name, args) ->
     it "#{type} #{name}", ->
@@ -79,18 +85,22 @@

         position = 'first'

+        calcPosition = (index) ->
+          if (index + 2) == _statements.length then 'last' else 'middle'
+
         for index in [ 0..._statements.length ]
           [ type, name, param ] = _statements[index]
           [ _this._type, _this._name ] = [ type, name ]

           args = []

-          codeRunner = (thing, args = []) ->
-            jasmine.GWT.Scenario.runCode(type, name, thing, position, _this, args)
+          codeRunner = (thing, pos, args = []) ->
+            jasmine.GWT.Scenario.runCode(type, name, thing, pos, _this, args)

           if param?
             if typeof param == "function"
-              codeRunner(param)
+              codeRunner(param, position)
+              position = calcPosition(index)

               continue
             else
@@ -100,14 +110,14 @@

           for [ match, code ] in (jasmine.GWT.Steps[type] || [])
             if result = name.match(match)
-              codeRunner(code, result[1..-1].concat(args))
+              codeRunner(code, position, result[1..-1].concat(args))
               found = true

               break

           jasmine.GWT.Scenario.runFailure(type, name, args) if !found

-          position = (if (index + 2) == _statements.length then 'last' else 'middle')
+          position = calcPosition(index)

     jasmine.GWT.currentScenario_ = null


refactor availableUnitScales into unitScales

--- app/assets/javascripts/admin/products/services/variant_unit_manager.js.coffee
+++ app/assets/javascripts/admin/products/services/variant_unit_manager.js.coffee
@@ -29,8 +29,9 @@
           system: 'metric'

     @variantUnitOptions: ->
+      available = availableUnits.split(",")
       options = for unit_type, _ of @units
-        for scale in @availableUnitScales(unit_type)
+        for scale in @unitScales(unit_type, available)
           name = @getUnitName(scale, unit_type)
           ["#{I18n.t(unit_type)} (#{name})", "#{unit_type}_#{scale}"]
       options.push [[I18n.t('items'), 'items']]
@@ -53,15 +54,13 @@
       else
         ''

-    @unitScales: (unitType) ->
-      (parseFloat(scale) for scale in Object.keys(@units[unitType])).sort (a, b) ->
-         a - b
+    @unitScales: (unitType, availableUnits = null) ->
+      scales = Object.keys(@units[unitType])
+      units = @units
+      if availableUnits
+        scales = scales.filter (scale) ->
+          availableUnits.includes(units[unitType][scale]['name'])

-    @availableUnitScales: (unitType) ->
-      available = availableUnits.split(",")
-      units = @units
-      scales = Object.keys(@units[unitType]).filter (scale) ->
-        available.includes(units[unitType][scale]['name'])
       (parseFloat(scale) for scale in scales).sort (a, b) ->
          a - b


Editor for regular labels didn't come up Was due to unexpected jQuery behavior when using a selector with a condition on a parent element (editable grid) and searching for element inside this element (cell)

--- src/resources/forms/orbeon/builder/resources/grid/placeholders.coffee
+++ src/resources/forms/orbeon/builder/resources/grid/placeholders.coffee
@@ -88,10 +88,7 @@
     ]

     # Function dealing with editables
-    anyEditableSelector = do ->                                                                                # A CSS selector matching any editable
-        selectors = _.pluck editables, 'selector'
-        selectors = _.map selectors, (s) -> '.fr-editable ' + s
-        selectors.join ', '
+    anyEditableSelector = _.pluck editables, 'selector'                                                                 # CSS selectors for all the editables
     editable = (element) -> _.first _.filter editables, (e) -> f$.is '*', f$.findOrIs e.selector, element               # element: editable -> editable info
     editableEditInput = (element) -> $ (editable element).editInputSelector                                             # Input field used for editing
     editablePlaceholderOutput = (element) -> $ (editable element).placeholderOutputSelector                             # Element in which we put the placeholder
@@ -121,9 +118,12 @@
     editDone = (f) -> editDoneCallbacks.add f

     # Return elements, maybe relative to a node
-    elementsInContainer = (container) -> f$.find anyEditableSelector, container
-    elementClosest = (element) -> f$.closest anyEditableSelector, element
-    elementsAll = -> $ anyEditableSelector
+    elementsInContainer = (container) -> f$.find (anyEditableSelector.join ', '), container
+    elementClosest = (element) -> f$.closest (anyEditableSelector.join ', '), element
+    elementsAll = ->
+        selectors = _.map anyEditableSelector, (s) -> '.fr-editable ' + s
+        selectors = selectors.join ', '
+        $ selectors

     # Conditions
     isEmpty = (element) -> (f$.text editableInitialValue element) == ''


Send contentType json

Send contentType json

--- plugins/kubernetes/app/assets/javascripts/kubernetes/actions/clusters.coffee
+++ plugins/kubernetes/app/assets/javascripts/kubernetes/actions/clusters.coffee
@@ -24,7 +24,7 @@
       dispatch(requestClusters())

       app.ajaxHelper.get '/clusters',
-        data: {}
+        contentType: 'application/json'
         success: (data, textStatus, jqXHR) ->
           dispatch(receiveClusters(data["clusters"],data["total"]))
         error: ( jqXHR, textStatus, errorThrown) ->


Done with level 5-6

Done with level 5-6

--- server/materials/data/topics/tertiary_search.coffee
+++ server/materials/data/topics/tertiary_search.coffee
@@ -11,6 +11,10 @@
             label("См. видеозаписи лекций ЛКШ.2013.B', раздел \"тернарный поиск\""),
             problem(3398),
             problem(3859),
+            problem({testSystem: "codeforces", contest: "1288", problem: "A"}),
+        ]),
+        advancedProblems: [
             problem(1116),
-        ])
+            problem({testSystem: "codeforces", contest: "1354", problem: "C1"}),
+        ]
     }


extend log hints for more chktex errors

extend log hints for more chktex errors

--- services/web/public/coffee/ide/human-readable-logs/HumanReadableLogsRules.coffee
+++ services/web/public/coffee/ide/human-readable-logs/HumanReadableLogsRules.coffee
@@ -90,6 +90,7 @@
 		"""
 	,
 		ruleId: "hint_mismatched_environment"
+		types: ['environment']
 		regexToMatch: /Error: `([^']{2,})' expected, found `([^']{2,})'.*/
 		newMessage: "Error: environment does not match \\begin{$1} ... \\end{$2}"
 		humanReadableHint: """
@@ -97,27 +98,35 @@
 		"""
 	,
 		ruleId: "hint_mismatched_brackets"
+		types: ['environment']
 		regexToMatch: /Error: `([^a-zA-Z0-9])' expected, found `([^a-zA-Z0-9])'.*/
 		newMessage: "Error: brackets do not match, found '$2' instead of '$1'"
 		humanReadableHint: """
 			You have used an open bracket without a corresponding close bracket.
 		"""
-	,	ruleId: "hint_mismatched_environment2"
-		regexToMatch: /Error: `\\end\{([^\}]+)\})' expected but found `\\end\{([^\}]+)\}'.*/
-		newMessage: "Error: environment does not match \\begin{$1} ... \\end{$2}"
+	,
+		ruleId: "hint_mismatched_environment2"
+		types: ['environment']
+		regexToMatch: /Error: `\\end\{([^\}]+)\}' expected but found `\\end\{([^\}]+)\}'.*/
+		newMessage: "Error: environments do not match: \\begin{$1} ... \\end{$2}"
 		humanReadableHint: """
-			You have used \\begin{...} without a corresponding \\end{...}.
+			You have used \\begin{} without a corresponding \\end{}.
 		"""
-	,	ruleId: "hint_mismatched_environment3"
-		regexToMatch: /Error: No matching \\end found for `\\begin\{([^\}]+)\}'.*/
-		newMessage: "Error: No matching \\end found for \\begin{$1}"
+	,
+		ruleId: "hint_mismatched_environment3"
+		types: ['environment']
+		regexToMatch: /Warning: No matching \\end found for `\\begin\{([^\}]+)\}'.*/
+		newMessage: "Warning: No matching \\end found for \\begin{$1}"
 		humanReadableHint: """
-			You have used \\begin{...} without a corresponding \\end{...}.
+			You have used \\begin{} without a corresponding \\end{}.
 		"""
-	,	ruleId: "hint_mismatched_environment3"
-		regexToMatch: /Error:  Found `\\end\{([^\}]+)\}' without corresponding \\begin.*/
-		newMessage: "Error: Found \\end{$1} without a corresponding \\begin{$1}"
+	,
+		ruleId: "hint_mismatched_environment4"
+		types: ['environment']
+		cascadesFrom: ['environment']
+		regexToMatch: /Error: Found `\\end\{([^\}]+)\}' without corresponding \\begin.*/
+		newMessage: "Error: found \\end{$1} without a corresponding \\begin{$1}"
 		humanReadableHint: """
-			You have used \\begin{...} without a corresponding \\end{...}.
+			You have used \\begin{} without a corresponding \\end{}.
 		"""
 ]


Fix RemoteSubgraph when uploading graph to runtime dynamically

--- src/RemoteSubGraph.coffee
+++ src/RemoteSubGraph.coffee
@@ -63,8 +63,8 @@
       debug "#{@nodeId} runtime is already running desired graph #{payload.graph}"
       @graphName = payload.graph
       # Already running the desired graph
-      @runtime.setMain
-        name: payload.graph
+      @graph = new noflo.Graph payload.graph
+      @runtime.setMain @graph
       return
     unless definition.graph
       # No graph to upload, accept what runtime has
@@ -87,6 +87,7 @@
     connection.sendGraph graph, @runtime, callback, true

   setupPorts: (ports) ->
+    return unless @graph
     if @graph
       # We should only emit ready once the remote runtime sent us at least all the ports that
       # the graph exports
@@ -96,7 +97,11 @@
       for exported, metadata of @graph.outports
         matching = ports.outPorts.filter (port) -> port.id is exported
         return unless matching.length
-
+
+    inportNames = ports.inPorts.map (p) -> p.id
+    outportNames = ports.outPorts.map (p) -> p.id
+    debug "#{@nodeId} received inports #{inportNames.join(', ')}"
+    debug "#{@nodeId} received outports #{outportNames.join(', ')}"
     @setReady false
     # Expose remote graph's exported ports as node ports
     @prepareInport port for port in ports.inPorts


async doc generation

async doc generation

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -88,14 +88,14 @@
           dest: 'dev/enchant.js'
           options:
             banner: """
-                                                                        /**
-                                                                         * <%= pkg.name %> v<%= pkg.version %>
-                                                                         * <%= pkg.homepage %>
-                                                                         *
-                                                                         * Copyright Ubiquitous Entertainment Inc.
-                                                                         * Released under the MIT license.
-                                                                         */\n\n
-                                                                        """
+/**
+* <%= pkg.name %> v<%= pkg.version %>
+* <%= pkg.homepage %>
+*
+* Copyright Ubiquitous Entertainment Inc.
+* Released under the MIT license.
+*/\n\n
+"""

       uglify:
         dist:
@@ -135,13 +135,17 @@
   grunt.registerTask 'doc', 'Make jsdoc', ()->
     done = this.async
     sh = require('child_process').exec
+    async = grunt.util.async
+    async.forEach ['en', 'ja', 'de'], (lang, cb)->
+      sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js lang/' + lang + '/enchant.js -t=doc/template -d=doc/core/' + lang
+      sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js lang/' + lang + '/enchant.js lang/' + lang + '/plugins/*.js -t=doc/template -d=doc/plugins/' + lang
+      grunt.log.writeln('java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js lang/' + lang + '/enchant.js -t=doc/template -d=doc/core/' + lang)
+      ;
+      grunt.log.writeln('java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js lang/' + lang + '/enchant.js lang/' + lang + '/plugins/*.js -t=doc/template -d=doc/plugins/' + lang)
+      ;
+      cb()
+        , (error) -> done(!error)

-    sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js ja/enchant.js -t=doc/template -d=doc/core/ja'
-    sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js enchant.js -t=doc/template -d=doc/core/en'
-    sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js de/enchant.js -t=doc/template -d=doc/core/de'
-    sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js ja/enchant.js ja/plugins/*.js -t=doc/template -d=doc/plugins/ja'
-    sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js enchant.js plugins/*.js -t=doc/template -d=doc/plugins/en'
-    sh 'java -jar jsdoc-toolkit/jsrun.jar jsdoc-toolkit/app/run.js de/enchant.js de/plugins/*.js -t=doc/template -d=doc/plugins/de'

   grunt.registerTask 'build', '', ()->
     fs = require('fs')
@@ -177,7 +181,7 @@
     repl_de = make_repl 'de'

     (glob.sync "dev/{plugins\/,}*.js").forEach (source)->
-      dist = source.toString().replace(/dev\//, './lang/' +lang+ '/')
+      dist = source.toString().replace(/dev\//, './lang/' + lang + '/')

       fs.writeFileSync dist, (fs.readFileSync source).toString()
       .replace(repl_en, (if lang == 'en' then '$1' else ''))


Gruntfile: clean before test

Gruntfile: clean before test

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -161,6 +161,6 @@
   # Register tasks
   grunt.registerTask 'compile', ['coffee', 'exec:mkbuild', 'closureCompiler']
   grunt.registerTask 'deps', ['coffee', 'closureDepsWriter']
-  grunt.registerTask 'test', ['deps', 'jasmine', 'clean:test']
+  grunt.registerTask 'test', ['clean', 'deps', 'jasmine', 'clean:test']
   grunt.registerTask 'server', ['deps', 'jasmineSpecServer', 'watch']
   grunt.registerTask 'default', ['compile']


Removed duplicate writing of title in jquery.json

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -127,7 +127,6 @@
     pkg = grunt.file.readJSON(src)
     json1 =
       "name": pkg.name
-      "title": pkg.title
       "description": pkg.description
       "version": version()
       "licenses": pkg.licenses


allow tagrelease to commit

allow tagrelease to commit

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -82,7 +82,7 @@
     # release
     tagrelease:
       file: 'package.json'
-      commit: false
+      commit: true
       message: 'Release %version%'
       prefix: 'v'
       annotate: false


adding Gruntfile.coffee with modified line length so build will pass

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -104,7 +104,7 @@
         mode: "VERIFY_ONLY"
         js:
           spaceAfterAnonFunction: true
-          wrapLineLength: 120
+          wrapLineLength: 130
           indentSize: 2

     # CoffeeLint


Update watch config to also watch the plugins folder

Signed-off-by: Marko Locher <9efe9a5a1da5f41a4eb7599f2715dc24abf5bbc8@locher.at>

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -15,7 +15,10 @@
       options:
         livereload: true
       coffee:
-        files: 'src/*.coffee',
+        files: [
+          'src/*.coffee',
+          'src/plugins/*.coffee'
+        ],
         tasks: 'coffee'
       less:
         files: 'src/*.less',


Add compass to gruntfile

Add compass to gruntfile

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -30,7 +30,7 @@
         src: ['js/vex.js', 'js/vex.dialog.js']
         options:
           banner: "/*! vex.js, vex.dialog.js <%= pkg.version %> */\n"
-
+
     compass:
       dist:
         options:
@@ -42,4 +42,4 @@
   grunt.loadNpmTasks 'grunt-contrib-coffee'
   grunt.loadNpmTasks 'grunt-contrib-compass'

-  grunt.registerTask 'default', ['coffee', 'uglify']+  grunt.registerTask 'default', ['coffee', 'uglify', 'compass']


Replace single quotes with double quotes in Gruntfile.coffee

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -50,7 +50,7 @@
                 return
               ), 1000
               return
-            nodemon.on 'log', (event) ->
+            nodemon.on "log", (event) ->
               console.log event.colour
               return
     watch:


Update for 2014

Update for 2014

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -159,17 +159,17 @@
       options:
         targetDir: "#{ DEST }.tmp/bower_exports/"
         cleanTargetDir: true
-        bowerOptions:
-          production: true
-
-      install: {}
+      install:
+        options:
+          bowerOptions:
+            production: true

     uglify:
           options:
             preserveComments: saveLicense
           main:
             options:
-              banner: "/*! Copyright (c) 2013 Shinnosuke Watanabe | MIT License */\n"
+              banner: "/*! Copyright (c) 2013 -2014 Shinnosuke Watanabe | MIT License */\n"
               compress:
                 global_defs:
                   DEBUG: false


Add missing comma

Add missing comma

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -16,7 +16,7 @@
               ' * The contents of this file are subject to the MIT License, under which\n' +
               ' * this library is licensed. See the LICENSE file for the full license.\n' +
               ' */\n\n'
-    }
+    },

     # Compiles CoffeeScript source
     coffee: {


fixed pushTo target

fixed pushTo target

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -11,7 +11,7 @@
     bump:
       options:
         commitMessage: 'chore: release v%VERSION%'
-        pushTo: 'upstream'
+        pushTo: 'origin'

     'auto-release':
       options:


Fix repo user

Fix repo user

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -26,7 +26,7 @@
     token: process.env.GITHUB_TOKEN

   q =
-    user: 'lautis',
+    user: 'baconjs',
     repo: 'bacon.js',
     sha: sha,
     state: state


Use force for coffeelint tasks (temporary)

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -15,7 +15,9 @@
         "*/\n"

     coffeelint:
-      options: grunt.file.readJSON('node_modules/sphere-coffeelint/coffeelint.json')
+      options:
+        force: true # report CoffeeLint errors but not fail the task
+        configFile: grunt.file.readJSON('node_modules/sphere-coffeelint/coffeelint.json')
       default: ["Gruntfile.coffee", "src/**/*.coffee"]

     clean:


* Gruntfile copy task only copy newer files now

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -74,7 +74,7 @@
   grunt.loadNpmTasks('grunt-newer')
   grunt.loadNpmTasks('powerbuild')

-  grunt.registerTask('build', ['newer:coffee', 'copy'])
+  grunt.registerTask('build', ['newer:coffee', 'newer:copy'])
   grunt.registerTask('rebuild', ['clean', 'build'])
   grunt.registerTask('test', ['build', 'mochaTest'])
   grunt.registerTask('watch', ['watch'])


Make tests work on Window

Make tests work on Window

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -32,7 +32,7 @@

     shell:
       test:
-        command: 'node node_modules/.bin/jasmine-focused --coffee --captureExceptions spec'
+        command: 'node node_modules/jasmine-focused/bin/jasmine-focused --coffee --captureExceptions spec'
         options:
           stdout: true
           stderr: true


Gruntfile: Added copy tasks for compiled js and css files.

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -29,6 +29,12 @@
         cwd              : 'src/examples'
         src              : '**'
         dest             : 'build/docs/examples'
+      allJS              :
+        src              : 'build/compiled/compiled.js'
+        dest             : 'build/docs/compiled.js'
+      allCSS             :
+        src              : 'build/css/spark.css'
+        dest             : 'build/docs/spark.css'

     coffee               :
       all                :


Add metrics to dist rule

Add metrics to dist rule

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -379,6 +379,8 @@
               'polymer/vulcanized.{html,js}'

               # actual scripts that run things
+              'freedomjs-anonymized-metrics/anonmetrics.json'
+              'freedomjs-anonymized-metrics/metric.js'
               'freedom-for-chrome/freedom-for-chrome.js'
               'freedom-social-xmpp/social.google.json'
               'freedom-social-xmpp/socialprovider.js'
@@ -410,6 +412,8 @@
               # addon sdk scripts
               'lib/**/*.js'

+              'data/freedomjs-anonymized-metrics/anonmetrics.json'
+              'data/freedomjs-anonymized-metrics/metric.js'
               'data/freedom-for-firefox/freedom-for-firefox.jsm'
               'data/freedom-social-xmpp/social.google.json'
               'data/freedom-social-xmpp/socialprovider.js'


Local server is now accessible from the network

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -92,7 +92,7 @@
 			app:
 				options:
 					base: '<%= settings.distDirectory %>'
-					hostname: 'localhost'
+					hostname: '0.0.0.0' # make server accessible via the network
 					livereload: true
 					middleware: (connect, options, middlewares) ->


test a bunch of browsers

test a bunch of browsers

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -93,7 +93,13 @@
           tunnelTimeout: 5
           build: process.env.TRAVIS_JOB_ID
           concurrency: 3
-          browsers: [{browserName: "chrome", version: "28", platform: "OS X 10.6"}]
+          browsers: [
+            {browserName: "chrome", version: "28", platform: "OS X 10.6"}
+            {browserName: "ipad", version: "6.1", 'device-orientation': 'portrait', platform: 'OS X 10.8'}
+            {browserName: 'internet explorer', version: '11', platform: 'Windows 8.1'}
+            {browserName: 'chrome', version: '31', platform: 'Windows 8.1'}
+            {browserName: 'firefox', version: '25', platform: 'Linux'}
+          ]
           testname: "mocha tests"
           tags: ["master"]


Default task: Unit tests run after they have compiled to JS

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -35,4 +35,4 @@
   grunt.loadNpmTasks 'grunt-coffeelint'

   grunt.registerTask 'test', ['coffeelint', 'mochaTest']
-  grunt.registerTask 'default', ['test', 'coffee', 'uglify']
+  grunt.registerTask 'default', ['coffeelint', 'coffee', 'mochaTest', 'uglify']


integrated nextMeeting helper

integrated nextMeeting helper

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -284,6 +284,9 @@
       baseurl:
         cmd: 'ruby _helpers/setBaseurl.rb' + ' ' + "<%= envBaseUrl %>"

+      next_meeting:
+        cmd: 'ruby _helpers/nextMeeting.rb'
+

     watch:
       options:
@@ -330,6 +333,7 @@
   grunt.registerTask 'build', [
     'set_environment'
     'exec:baseurl'
+    'exec:next_meeting'
     'exec:bundler'
     'exec:bower'
     'jade'


test task adapted

test task adapted

--- Gruntfile.coffee
+++ Gruntfile.coffee
@@ -101,7 +101,7 @@
   ]

   grunt.registerTask 'test', [
-    'compile'
+    'ts:test'
     'karma'
   ]


Revert "Fixed binding type variables, which must be done for all definitions, to get correct fixed var sets"

This reverts commit cc1ad1230ec91135ae68e6332d6c99df69118066.

--- src/js/app/compilers/teascript/compiler.coffee
+++ src/js/app/compilers/teascript/compiler.coffee
@@ -419,11 +419,8 @@
   bindTypeVariables: (vars) ->
     addAllToSet @_scope().boundTypeVariables, vars

-  bindTypeVariablesToOuterScope: (vars) ->
-    addAllToSet @_outerScope().boundTypeVariables, vars
-
   allBoundTypeVariables: ->
-    substituteVarNames this, concatSets (for scope in @scopes[...-1]
+    substituteVarNames this, concatSets (for scope in @scopes
       scope.boundTypeVariables)...

   addToScopeConstraints: (constraints) ->
@@ -1223,6 +1220,7 @@

   definedNames = ctx.definedNames()

+  # log "is deferriing", (print pattern), ctx.shouldDefer()
   # Make sure deferred names are added to scope so they are compiled within functions
   if ctx.shouldDefer()
     shouldDeclareFinally = ctx.isDeclared ctx.deferReason()[1]
@@ -1252,6 +1250,7 @@
     if not ctx.isCurrentlyDeclared name
       ctx.declare name, id: id
     if deps.length > 0
+      # log "adding top level lhs to deferred #{name}", deps
       currentType = substitute ctx.substitution, type
       ctx.addToDeferred
         name: name
@@ -1280,7 +1279,7 @@
       # Check the declared type
       declaredType = ctx.type name
       explicitType = freshInstance ctx, declaredType
-      updatedDeclaredType = quantifyUnbound ctx, (substitute ctx.substitution, explicitType) # to rename user-named type vars
+      updatedDeclaredType = quantifyUnbound ctx, (substitute ctx.substitution, explicitType)
       unify ctx, currentType.type, explicitType.type
       unifiedType = substitute ctx.substitution, explicitType
       inferredType = quantifyUnbound ctx, unifiedType
@@ -1524,8 +1523,8 @@
         withOrigin (ctx.freshTypeVariable star), param
       paramTypeVars = map newParamType, params
       paramTypes = map (__ toForAll, toConstrained), paramTypeVars
+      ctx.newLateScope()
       ctx.bindTypeVariables (map (({name}) -> name), paramTypeVars)
-      ctx.newLateScope()
       # log "adding types", (map _symbol, params), paramTypes
       ctx.declareTyped paramNames, paramTypes
       for param in params
@@ -1840,8 +1839,8 @@
     #   allDeclared = (ctx.isClass c for c in superClasses)

     methodDefinitions = pairs wheres
+    ctx.newScope()
     ctx.bindTypeVariables paramNames
-    ctx.newScope()
     definitionList ctx, methodDefinitions
     declarations = ctx.currentDeclarations()
     ctx.closeScope()
@@ -1997,7 +1996,7 @@
     malformed ctx, typeExpression, 'Type doesn\'t match class type'
     return null

-  ctx.bindTypeVariablesToOuterScope setToArray (findFree freshInstanceType)
+  ctx.bindTypeVariables setToArray (findFree freshInstanceType)
   for name, {arity, type} of values classDeclaration.declarations
     freshType = freshInstance ctx, type
     instanceSpecificType = substitute sub, freshType
@@ -2510,7 +2509,7 @@
     isSubset fixedVars, (findUnconstrained constraint)
   [deferred, retained] = partition isFixed, impliedConstraints
   quantifiedVars = findFree finalType = substitute ctx.substitution, type
-  impliedVars = concatSets (map findConstrained, impliedConstraints)...
+  impliedVars = concatSets (map findConstrained, retained)...
   validVars = concatSets quantifiedVars, impliedVars
   isAmbiguous = (constraint) ->
     not isSubset validVars, (findUnconstrained constraint)
@@ -2743,7 +2742,7 @@
       id = (ctx.definitionName() and ctx.definitionId()) ?
         (ctx.currentDeclarationId symbol) ? ctx.freshId()
       type = toConstrained ctx.freshTypeVariable star
-      ctx.bindTypeVariables [type.type.name]
+      # ctx.bindTypeVariables [type.type.name]
       ctx.addToDefinedNames {name: symbol, id: id, type: type}
       type: type
       id: id
@@ -2763,7 +2762,7 @@
       ctx.addToDeferredNames {name: symbol, type: (mapOrigin type, atom)}
       nameTranslate ctx, atom, symbol, type
     else
-      # console.log "deferring because of #{symbol} rhs:", ctx._deferrableDefinition().name
+      # log "deferring in rhs for #{symbol}", ctx._deferrableDefinition().name
       ctx.doDefer atom, symbol
       translation: deferredExpression()

@@ -3006,6 +3005,7 @@
   inferredType = freshInstance ctx, canonicalType
   ctx.extendSubstitution matchType inferredType.type, (substitute ctx.substitution, type).type
   reduceConstraints ctx, inferredType.constraints
+  console.log (printType (substitute ctx.substitution, inferredType))
   (substitute ctx.substitution, inferredType).constraints

 irReference = (name, type, scopeIndex) ->
@@ -5267,6 +5267,7 @@

 findMatchingDefinitionsOnType = (type, definitionLists) ->
   ctx = new Context
+  console.log definitionLists
   [typed, untyped] = unzip (for definitions, i in definitionLists
     isValid = (name, def) ->
       def.type? and not def.type.TempType
@@ -5511,12 +5512,10 @@
     log (collapse toHtml compiled.ast)
     if _notEmpty compiled.subs
       log map formatFail, compiled.subs
-      failure = yes
     if result isnt (got = eval compiled.compiled)
       log "'#{testName}' expected", result, "got", got
-      success = no
     else
-      success = not failure
+      success = yes
   catch e
     logError "Error in test |#{testName}|\n#{teaSource}\n", e
   success
@@ -6681,11 +6680,38 @@
     (map f lines))

   f (fn [x]
-    x)
+    x
+    y (show x))

   expand (fn [x]
     gg
     gg (g {""}))
+  """
+  '3', 3
+
+  'overloaded reference 2'
+  """
+  Mappable (class [wrapper]
+    map (fn [what onto]
+      (: (Fn (Fn a b) (wrapper a) (wrapper b)))))
+
+  array-mappable (instance (Mappable Array)
+    map (macro [what over]
+      (: (Fn (Fn a b) (Array a) (Array b)))
+      (Js.method over "map" {what})))
+
+  Show (class [a]
+    show (fn [x] (: (Fn a String))))
+
+  show-string (instance (Show String)
+    show (fn [x] x))
+
+  g (fn [x]
+    (map f {}))
+
+  f (fn [x]
+    ""
+    y (show x))
   """
   '3', 3


Fixed method call assignment

Fixed method call assignment

--- src/js/app/compilers/teascript/compiler.coffee
+++ src/js/app/compilers/teascript/compiler.coffee
@@ -1967,14 +1967,15 @@
   [dotMethod, object, args...] = _validTerms call
   labelOperator dotMethod
   call.tea = toConstrained markOrigin jsType, call
-  if object
-    if /^.-/.test dotMethod.symbol
-      (jsAccess (termCompile ctx, object), dotMethod.symbol[2...])
-    else
-      (jsMethod (termCompile ctx, object), dotMethod.symbol[1...], (termsCompile ctx, args))
-  else
-    malformed ctx, call, 'Missing an object'
-    jsNoop()
+  assignCompile ctx, call,
+    if object
+      if /^.-/.test dotMethod.symbol
+        (jsAccess (termCompile ctx, object), dotMethod.symbol[2...])
+      else
+        (jsMethod (termCompile ctx, object), dotMethod.symbol[1...], (termsCompile ctx, args))
+    else
+      malformed ctx, call, 'Missing an object'
+      jsNoop()

 ms['set!'] = ms_doset = (ctx, call) ->
   # (set! (.innerHTML e) "Ahoj")


Only use definition ID if the definition is simple

--- src/js/app/compilers/teascript/compiler.coffee
+++ src/js/app/compilers/teascript/compiler.coffee
@@ -2679,7 +2679,8 @@
         pattern: []
     else
       atom.label = 'name'
-      id = (ctx.definitionId()) ? (ctx.currentDeclarationId symbol) ? ctx.freshId()
+      id = (ctx.definitionName() and ctx.definitionId()) ?
+        (ctx.currentDeclarationId symbol) ? ctx.freshId()
       type = toConstrained ctx.freshTypeVariable star
       # ctx.bindTypeVariables [type.type.name]
       ctx.addToDefinedNames {name: symbol, id: id, type: type}


Added failing test for proper shadowing inside functions

--- src/js/app/compilers/teascript/compiler.coffee
+++ src/js/app/compilers/teascript/compiler.coffee
@@ -6039,6 +6039,19 @@
   """
   '(f (Just 4))', 4

+  'shadowing'
+  """
+  f (macro [x]
+    (: (Fn Num Num))
+    (Js.binary "+" x 2))
+
+  g (fn [x]
+    y
+    y (f x)
+    f (fn [x] x))
+  """
+  '(g 3)', 3
+
   # TODO: support matching with the same name
   #       to implement this we need the iife to take as arguments all variables
   #       with the same names, since JavaScript shadows it too strongly and


fixed active navbar highlighting

fixed active navbar highlighting

--- app/assets/javascripts/router.coffee
+++ app/assets/javascripts/router.coffee
@@ -100,7 +100,7 @@
     # handle all links and manage page changes (rather the reloading the whole site)
     $(document).on("click", "a", (evt) =>

-      url = evt.currentTarget.href
+      url = $(evt.currentTarget).attr("href")
       if url == "#"
         return


Removed test for StartConversationView

Removed test for StartConversationView

--- core/spec/javascripts/views/conversations/start_conversation_view_spec.coffee
+++ core/spec/javascripts/views/conversations/start_conversation_view_spec.coffee
@@ -1,49 +0,0 @@
-#= require jquery
-#= require application
-#= require frontend
-
-describe 'StartConversationView', ->
-  describe 'initial state', ->
-    it 'contains the defaultMessage in the textarea', ->
-      view = new StartConversationView defaultMessage: 'henk'
-      view.render()
-      content = view.$('.js-message-textarea').val()
-      expect(content).to.equal "henk"
-
-    it 'contains the text "Check out this #{Factlink.Global.t.factlink}!"" in the textarea when no default message is given', ->
-      view = new StartConversationView
-      view.render()
-      content = view.$('.js-message-textarea').val()
-      expect(content).to.equal "Check out this #{Factlink.Global.t.factlink}!"
-
-
-  describe "clicking on the textarea", ->
-    it 'should select the text when unchanged', ->
-      view = new StartConversationView defaultMessage: 'henk'
-      view.render()
-      $('body').html(view.el)
-
-      $textarea = view.$('.js-message-textarea')
-
-      $textarea.trigger('focus')
-
-      selection = $textarea.val().substring(
-        $textarea[0].selectionStart, $textarea[0].selectionEnd)
-
-      expect(selection).to.equal "henk"
-
-    it 'should not select the text when changed', ->
-      view = new StartConversationView
-      view.render()
-      $('body').html(view.el)
-
-      $textarea = view.$('.js-message-textarea')
-
-      $textarea.
-        val('henk').
-        trigger('focus')
-
-      selection = $textarea.val().substring(
-        $textarea[0].selectionStart, $textarea[0].selectionEnd)
-
-      expect(selection).to.equal ""


comment out unused code to bump js compilation

--- app/assets/javascripts/init.coffee
+++ app/assets/javascripts/init.coffee
@@ -55,11 +55,11 @@

   # We need to call this because of Flexbox
   # Edge is fine, but all versions of IE are broken, and we should tell peeps
-  msieversion: ->
-    ua = window.navigator.userAgent
-    msie = ua.indexOf('MSIE ')
-    if msie > 0 or ! !navigator.userAgent.match(/Trident.*rv\:11\./)
-      alert parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)))
+  # msieversion: ->
+  #   ua = window.navigator.userAgent
+  #   msie = ua.indexOf('MSIE ')
+  #   if msie > 0 or ! !navigator.userAgent.match(/Trident.*rv\:11\./)
+  #     alert parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)))

 window.updateSearchBikesHeaderLink = ->


Footer: Added target for all links

Footer: Added target for all links

--- app/scripts/directives/footer.coffee
+++ app/scripts/directives/footer.coffee
@@ -6,12 +6,12 @@
     template: """

-
holmes is a free open-source project and is composed of holmes-web ({{ holmesWebVersion }}) and holmes-api ({{ apiVersion }}).

+
holmes is a free open-source project and is composed of holmes-web ({{ holmesWebVersion }}) and holmes-api ({{ apiVersion }}).

           Login
           Logout

-
Copyright globo.com - MIT Licensed - 2013

+
Copyright globo.com - MIT Licensed - 2013

     """