Adding more snippets

Adding more snippets

--- snippets/verify.cson
+++ snippets/verify.cson
@@ -601,279 +601,279 @@
         'body': 'verify the element found by alias "$1" is not clickable within "$2" seconds ignoring timeouts'

     'verify330':
-        'prefix': 'verify the element with the ID of alias "identifier" is displayed'
-        'body': 'verify the element the ID of alias "$1" is displayed'
+        'prefix': 'verify the element with the ID alias of "identifier" is displayed'
+        'body': 'verify the element the ID alias of "$1" is displayed'
     'verify331':
-        'prefix': 'verify the element the ID of alias "identifier" is displayed within "time" seconds'
-        'body': 'verify the element the ID of alias "$1" is displayed within "$2" seconds'
+        'prefix': 'verify the element the ID alias of "identifier" is displayed within "time" seconds'
+        'body': 'verify the element the ID alias of "$1" is displayed within "$2" seconds'
     'verify332':
-        'prefix': 'verify the element the ID of alias "identifier" is displayed within "time" seconds ignoring timeouts'
-        'body': 'verify the element the ID of alias "$1" is displayed within "$2" seconds ignoring timeouts"
+        'prefix': 'verify the element the ID alias of "identifier" is displayed within "time" seconds ignoring timeouts'
+        'body': 'verify the element the ID alias of "$1" is displayed within "$2" seconds ignoring timeouts"
     'verify333':
-        'prefix': 'verify the element the ID of alias "identifier" is present'
-        'body': 'verify the element the ID of alias "$1" is present'
+        'prefix': 'verify the element the ID alias of "identifier" is present'
+        'body': 'verify the element the ID alias of "$1" is present'
     'verify334':
-        'prefix': 'verify the element the ID of alias "identifier" is present within "time" seconds'
-        'body': 'verify the element the ID of alias "$1" is present within "$2" seconds'
+        'prefix': 'verify the element the ID alias of "identifier" is present within "time" seconds'
+        'body': 'verify the element the ID alias of "$1" is present within "$2" seconds'
     'verify335':
-        'prefix': 'verify the element the ID of alias "identifier" is present within "time" seconds ignoring timeouts'
-        'body': 'verify the element the ID of alias "$1" is present within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the ID alias of "identifier" is present within "time" seconds ignoring timeouts'
+        'body': 'verify the element the ID alias of "$1" is present within "$2" seconds ignoring timeouts'
     'verify336':
-        'prefix': 'verify the element the ID of alias "identifier" is clickable'
-        'body': 'verify the element the ID of alias "$1" is clickable'
+        'prefix': 'verify the element the ID alias of "identifier" is clickable'
+        'body': 'verify the element the ID alias of "$1" is clickable'
     'verify337':
-        'prefix': 'verify the element the ID of alias "identifier" is clickable within "time" seconds'
-        'body': 'verify the element the ID of alias "$1" is clickable within "$2" seconds'
+        'prefix': 'verify the element the ID alias of "identifier" is clickable within "time" seconds'
+        'body': 'verify the element the ID alias of "$1" is clickable within "$2" seconds'
     'verify338':
-        'prefix': 'verify the element the ID of alias "identifier" is clickable within "time" seconds ignoring timeouts'
-        'body': 'verify the element the ID of alias "$1" is clickable within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the ID alias of "identifier" is clickable within "time" seconds ignoring timeouts'
+        'body': 'verify the element the ID alias of "$1" is clickable within "$2" seconds ignoring timeouts'
     'verify339':
-        'prefix': 'verify the element the ID of alias "identifier" is not displayed'
-        'body': 'verify the element the ID of alias "$1" is not displayed'
+        'prefix': 'verify the element the ID alias of "identifier" is not displayed'
+        'body': 'verify the element the ID alias of "$1" is not displayed'
     'verify340':
-        'prefix': 'verify the element the ID of alias "identifier" is not displayed within "time" seconds'
-        'body': 'verify the element the ID of alias "$1" is not displayed within "$2" seconds'
+        'prefix': 'verify the element the ID alias of "identifier" is not displayed within "time" seconds'
+        'body': 'verify the element the ID alias of "$1" is not displayed within "$2" seconds'
     'verify341':
-        'prefix': 'verify the element the ID of alias "identifier" is not displayed within "time" seconds ignoring timeouts'
-        'body': 'verify the element the ID of alias "$1" is not displayed within "$2" seconds ignoring timeouts"
+        'prefix': 'verify the element the ID alias of "identifier" is not displayed within "time" seconds ignoring timeouts'
+        'body': 'verify the element the ID alias of "$1" is not displayed within "$2" seconds ignoring timeouts"
     'verify342':
-        'prefix': 'verify the element the ID of alias "identifier" is not present'
-        'body': 'verify the element the ID of alias "$1" is not present'
+        'prefix': 'verify the element the ID alias of "identifier" is not present'
+        'body': 'verify the element the ID alias of "$1" is not present'
     'verify343':
-        'prefix': 'verify the element the ID of alias "identifier" is not present within "time" seconds'
-        'body': 'verify the element the ID of alias "$1" is not present within "$2" seconds'
+        'prefix': 'verify the element the ID alias of "identifier" is not present within "time" seconds'
+        'body': 'verify the element the ID alias of "$1" is not present within "$2" seconds'
     'verify344':
-        'prefix': 'verify the element the ID of alias "identifier" is not present within "time" seconds ignoring timeouts'
-        'body': 'verify the element the ID of alias "$1" is not present within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the ID alias of "identifier" is not present within "time" seconds ignoring timeouts'
+        'body': 'verify the element the ID alias of "$1" is not present within "$2" seconds ignoring timeouts'
     'verify345':
-        'prefix': 'verify the element the ID of alias "identifier" is not clickable'
-        'body': 'verify the element the ID of alias "$1" is not clickable'
+        'prefix': 'verify the element the ID alias of "identifier" is not clickable'
+        'body': 'verify the element the ID alias of "$1" is not clickable'
     'verify346':
-        'prefix': 'verify the element the ID of alias "identifier" is not clickable within "time" seconds'
-        'body': 'verify the element the ID of alias "$1" is not clickable within "$2" seconds'
+        'prefix': 'verify the element the ID alias of "identifier" is not clickable within "time" seconds'
+        'body': 'verify the element the ID alias of "$1" is not clickable within "$2" seconds'
     'verify347':
-        'prefix': 'verify the element the ID of alias "identifier" is not clickable within "time" seconds ignoring timeouts'
-        'body': 'verify the element the ID of alias "$1" is not clickable within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the ID alias of "identifier" is not clickable within "time" seconds ignoring timeouts'
+        'body': 'verify the element the ID alias of "$1" is not clickable within "$2" seconds ignoring timeouts'

     'verify360':
-        'prefix': 'verify the element with the css selector of alias "identifier" is displayed'
-        'body': 'verify the element the css selector of alias "$1" is displayed'
+        'prefix': 'verify the element with the css selector alias of "identifier" is displayed'
+        'body': 'verify the element the css selector alias of "$1" is displayed'
     'verify361':
-        'prefix': 'verify the element the css selector of alias "identifier" is displayed within "time" seconds'
-        'body': 'verify the element the css selector of alias "$1" is displayed within "$2" seconds'
+        'prefix': 'verify the element the css selector alias of "identifier" is displayed within "time" seconds'
+        'body': 'verify the element the css selector alias of "$1" is displayed within "$2" seconds'
     'verify362':
-        'prefix': 'verify the element the css selector of alias "identifier" is displayed within "time" seconds ignoring timeouts'
-        'body': 'verify the element the css selector of alias "$1" is displayed within "$2" seconds ignoring timeouts"
+        'prefix': 'verify the element the css selector alias of "identifier" is displayed within "time" seconds ignoring timeouts'
+        'body': 'verify the element the css selector alias of "$1" is displayed within "$2" seconds ignoring timeouts"
     'verify363':
-        'prefix': 'verify the element the css selector of alias "identifier" is present'
-        'body': 'verify the element the css selector of alias "$1" is present'
+        'prefix': 'verify the element the css selector alias of "identifier" is present'
+        'body': 'verify the element the css selector alias of "$1" is present'
     'verify364':
-        'prefix': 'verify the element the css selector of alias "identifier" is present within "time" seconds'
-        'body': 'verify the element the css selector of alias "$1" is present within "$2" seconds'
+        'prefix': 'verify the element the css selector alias of "identifier" is present within "time" seconds'
+        'body': 'verify the element the css selector alias of "$1" is present within "$2" seconds'
     'verify365':
-        'prefix': 'verify the element the css selector of alias "identifier" is present within "time" seconds ignoring timeouts'
-        'body': 'verify the element the css selector of alias "$1" is present within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the css selector alias of "identifier" is present within "time" seconds ignoring timeouts'
+        'body': 'verify the element the css selector alias of "$1" is present within "$2" seconds ignoring timeouts'
     'verify366':
-        'prefix': 'verify the element the css selector of alias "identifier" is clickable'
-        'body': 'verify the element the css selector of alias "$1" is clickable'
+        'prefix': 'verify the element the css selector alias of "identifier" is clickable'
+        'body': 'verify the element the css selector alias of "$1" is clickable'
     'verify367':
-        'prefix': 'verify the element the css selector of alias "identifier" is clickable within "time" seconds'
-        'body': 'verify the element the css selector of alias "$1" is clickable within "$2" seconds'
+        'prefix': 'verify the element the css selector alias of "identifier" is clickable within "time" seconds'
+        'body': 'verify the element the css selector alias of "$1" is clickable within "$2" seconds'
     'verify368':
-        'prefix': 'verify the element the css selector of alias "identifier" is clickable within "time" seconds ignoring timeouts'
-        'body': 'verify the element the css selector of alias "$1" is clickable within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the css selector alias of "identifier" is clickable within "time" seconds ignoring timeouts'
+        'body': 'verify the element the css selector alias of "$1" is clickable within "$2" seconds ignoring timeouts'
     'verify369':
-        'prefix': 'verify the element the css selector of alias "identifier" is not displayed'
-        'body': 'verify the element the css selector of alias "$1" is not displayed'
+        'prefix': 'verify the element the css selector alias of "identifier" is not displayed'
+        'body': 'verify the element the css selector alias of "$1" is not displayed'
     'verify370':
-        'prefix': 'verify the element the css selector of alias "identifier" is not displayed within "time" seconds'
-        'body': 'verify the element the css selector of alias "$1" is not displayed within "$2" seconds'
+        'prefix': 'verify the element the css selector alias of "identifier" is not displayed within "time" seconds'
+        'body': 'verify the element the css selector alias of "$1" is not displayed within "$2" seconds'
     'verify371':
-        'prefix': 'verify the element the css selector of alias "identifier" is not displayed within "time" seconds ignoring timeouts'
-        'body': 'verify the element the css selector of alias "$1" is not displayed within "$2" seconds ignoring timeouts"
+        'prefix': 'verify the element the css selector alias of "identifier" is not displayed within "time" seconds ignoring timeouts'
+        'body': 'verify the element the css selector alias of "$1" is not displayed within "$2" seconds ignoring timeouts"
     'verify372':
-        'prefix': 'verify the element the css selector of alias "identifier" is not present'
-        'body': 'verify the element the css selector of alias "$1" is not present'
+        'prefix': 'verify the element the css selector alias of "identifier" is not present'
+        'body': 'verify the element the css selector alias of "$1" is not present'
     'verify373':
-        'prefix': 'verify the element the css selector of alias "identifier" is not present within "time" seconds'
-        'body': 'verify the element the css selector of alias "$1" is not present within "$2" seconds'
+        'prefix': 'verify the element the css selector alias of "identifier" is not present within "time" seconds'
+        'body': 'verify the element the css selector alias of "$1" is not present within "$2" seconds'
     'verify374':
-        'prefix': 'verify the element the css selector of alias "identifier" is not present within "time" seconds ignoring timeouts'
-        'body': 'verify the element the css selector of alias "$1" is not present within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the css selector alias of "identifier" is not present within "time" seconds ignoring timeouts'
+        'body': 'verify the element the css selector alias of "$1" is not present within "$2" seconds ignoring timeouts'
     'verify375':
-        'prefix': 'verify the element the css selector of alias "identifier" is not clickable'
-        'body': 'verify the element the css selector of alias "$1" is not clickable'
+        'prefix': 'verify the element the css selector alias of "identifier" is not clickable'
+        'body': 'verify the element the css selector alias of "$1" is not clickable'
     'verify376':
-        'prefix': 'verify the element the css selector of alias "identifier" is not clickable within "time" seconds'
-        'body': 'verify the element the css selector of alias "$1" is not clickable within "$2" seconds'
+        'prefix': 'verify the element the css selector alias of "identifier" is not clickable within "time" seconds'
+        'body': 'verify the element the css selector alias of "$1" is not clickable within "$2" seconds'
     'verify377':
-        'prefix': 'verify the element the css selector of alias "identifier" is not clickable within "time" seconds ignoring timeouts'
-        'body': 'verify the element the css selector of alias "$1" is not clickable within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the css selector alias of "identifier" is not clickable within "time" seconds ignoring timeouts'
+        'body': 'verify the element the css selector alias of "$1" is not clickable within "$2" seconds ignoring timeouts'

     'verify390':
-        'prefix': 'verify the element with the class of alias "identifier" is displayed'
-        'body': 'verify the element the class of alias "$1" is displayed'
+        'prefix': 'verify the element with the class alias of "identifier" is displayed'
+        'body': 'verify the element the class alias of "$1" is displayed'
     'verify391':
-        'prefix': 'verify the element the class of alias "identifier" is displayed within "time" seconds'
-        'body': 'verify the element the class of alias "$1" is displayed within "$2" seconds'
+        'prefix': 'verify the element the class alias of "identifier" is displayed within "time" seconds'
+        'body': 'verify the element the class alias of "$1" is displayed within "$2" seconds'
     'verify392':
-        'prefix': 'verify the element the class of alias "identifier" is displayed within "time" seconds ignoring timeouts'
-        'body': 'verify the element the class of alias "$1" is displayed within "$2" seconds ignoring timeouts"
+        'prefix': 'verify the element the class alias of "identifier" is displayed within "time" seconds ignoring timeouts'
+        'body': 'verify the element the class alias of "$1" is displayed within "$2" seconds ignoring timeouts"
     'verify393':
-        'prefix': 'verify the element the class of alias "identifier" is present'
-        'body': 'verify the element the class of alias "$1" is present'
+        'prefix': 'verify the element the class alias of "identifier" is present'
+        'body': 'verify the element the class alias of "$1" is present'
     'verify394':
-        'prefix': 'verify the element the class of alias "identifier" is present within "time" seconds'
-        'body': 'verify the element the class of alias "$1" is present within "$2" seconds'
+        'prefix': 'verify the element the class alias of "identifier" is present within "time" seconds'
+        'body': 'verify the element the class alias of "$1" is present within "$2" seconds'
     'verify395':
-        'prefix': 'verify the element the class of alias "identifier" is present within "time" seconds ignoring timeouts'
-        'body': 'verify the element the class of alias "$1" is present within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the class alias of "identifier" is present within "time" seconds ignoring timeouts'
+        'body': 'verify the element the class alias of "$1" is present within "$2" seconds ignoring timeouts'
     'verify396':
-        'prefix': 'verify the element the class of alias "identifier" is clickable'
-        'body': 'verify the element the class of alias "$1" is clickable'
+        'prefix': 'verify the element the class alias of "identifier" is clickable'
+        'body': 'verify the element the class alias of "$1" is clickable'
     'verify397':
-        'prefix': 'verify the element the class of alias "identifier" is clickable within "time" seconds'
-        'body': 'verify the element the class of alias "$1" is clickable within "$2" seconds'
+        'prefix': 'verify the element the class alias of "identifier" is clickable within "time" seconds'
+        'body': 'verify the element the class alias of "$1" is clickable within "$2" seconds'
     'verify398':
-        'prefix': 'verify the element the class of alias "identifier" is clickable within "time" seconds ignoring timeouts'
-        'body': 'verify the element the class of alias "$1" is clickable within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the class alias of "identifier" is clickable within "time" seconds ignoring timeouts'
+        'body': 'verify the element the class alias of "$1" is clickable within "$2" seconds ignoring timeouts'
     'verify399':
-        'prefix': 'verify the element the class of alias "identifier" is not displayed'
-        'body': 'verify the element the class of alias "$1" is not displayed'
+        'prefix': 'verify the element the class alias of "identifier" is not displayed'
+        'body': 'verify the element the class alias of "$1" is not displayed'
     'verify400':
-        'prefix': 'verify the element the class of alias "identifier" is not displayed within "time" seconds'
-        'body': 'verify the element the class of alias "$1" is not displayed within "$2" seconds'
+        'prefix': 'verify the element the class alias of "identifier" is not displayed within "time" seconds'
+        'body': 'verify the element the class alias of "$1" is not displayed within "$2" seconds'
     'verify401':
-        'prefix': 'verify the element the class of alias "identifier" is not displayed within "time" seconds ignoring timeouts'
-        'body': 'verify the element the class of alias "$1" is not displayed within "$2" seconds ignoring timeouts"
+        'prefix': 'verify the element the class alias of "identifier" is not displayed within "time" seconds ignoring timeouts'
+        'body': 'verify the element the class alias of "$1" is not displayed within "$2" seconds ignoring timeouts"
     'verify402':
-        'prefix': 'verify the element the class of alias "identifier" is not present'
-        'body': 'verify the element the class of alias "$1" is not present'
+        'prefix': 'verify the element the class alias of "identifier" is not present'
+        'body': 'verify the element the class alias of "$1" is not present'
     'verify403':
-        'prefix': 'verify the element the class of alias "identifier" is not present within "time" seconds'
-        'body': 'verify the element the class of alias "$1" is not present within "$2" seconds'
+        'prefix': 'verify the element the class alias of "identifier" is not present within "time" seconds'
+        'body': 'verify the element the class alias of "$1" is not present within "$2" seconds'
     'verify404':
-        'prefix': 'verify the element the class of alias "identifier" is not present within "time" seconds ignoring timeouts'
-        'body': 'verify the element the class of alias "$1" is not present within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the class alias of "identifier" is not present within "time" seconds ignoring timeouts'
+        'body': 'verify the element the class alias of "$1" is not present within "$2" seconds ignoring timeouts'
     'verify405':
-        'prefix': 'verify the element the class of alias "identifier" is not clickable'
-        'body': 'verify the element the class of alias "$1" is not clickable'
+        'prefix': 'verify the element the class alias of "identifier" is not clickable'
+        'body': 'verify the element the class alias of "$1" is not clickable'
     'verify406':
-        'prefix': 'verify the element the class of alias "identifier" is not clickable within "time" seconds'
-        'body': 'verify the element the class of alias "$1" is not clickable within "$2" seconds'
+        'prefix': 'verify the element the class alias of "identifier" is not clickable within "time" seconds'
+        'body': 'verify the element the class alias of "$1" is not clickable within "$2" seconds'
     'verify407':
-        'prefix': 'verify the element the class of alias "identifier" is not clickable within "time" seconds ignoring timeouts'
-        'body': 'verify the element the class of alias "$1" is not clickable within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the class alias of "identifier" is not clickable within "time" seconds ignoring timeouts'
+        'body': 'verify the element the class alias of "$1" is not clickable within "$2" seconds ignoring timeouts'

     'verify420':
-        'prefix': 'verify the element with the xpath of alias "identifier" is displayed'
-        'body': 'verify the element the xpath of alias "$1" is displayed'
+        'prefix': 'verify the element with the xpath alias of "identifier" is displayed'
+        'body': 'verify the element the xpath alias of "$1" is displayed'
     'verify421':
-        'prefix': 'verify the element the xpath of alias "identifier" is displayed within "time" seconds'
-        'body': 'verify the element the xpath of alias "$1" is displayed within "$2" seconds'
+        'prefix': 'verify the element the xpath alias of "identifier" is displayed within "time" seconds'
+        'body': 'verify the element the xpath alias of "$1" is displayed within "$2" seconds'
     'verify422':
-        'prefix': 'verify the element the xpath of alias "identifier" is displayed within "time" seconds ignoring timeouts'
-        'body': 'verify the element the xpath of alias "$1" is displayed within "$2" seconds ignoring timeouts"
+        'prefix': 'verify the element the xpath alias of "identifier" is displayed within "time" seconds ignoring timeouts'
+        'body': 'verify the element the xpath alias of "$1" is displayed within "$2" seconds ignoring timeouts"
     'verify423':
-        'prefix': 'verify the element the xpath of alias "identifier" is present'
-        'body': 'verify the element the xpath of alias "$1" is present'
+        'prefix': 'verify the element the xpath alias of "identifier" is present'
+        'body': 'verify the element the xpath alias of "$1" is present'
     'verify424':
-        'prefix': 'verify the element the xpath of alias "identifier" is present within "time" seconds'
-        'body': 'verify the element the xpath of alias "$1" is present within "$2" seconds'
+        'prefix': 'verify the element the xpath alias of "identifier" is present within "time" seconds'
+        'body': 'verify the element the xpath alias of "$1" is present within "$2" seconds'
     'verify425':
-        'prefix': 'verify the element the xpath of alias "identifier" is present within "time" seconds ignoring timeouts'
-        'body': 'verify the element the xpath of alias "$1" is present within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the xpath alias of "identifier" is present within "time" seconds ignoring timeouts'
+        'body': 'verify the element the xpath alias of "$1" is present within "$2" seconds ignoring timeouts'
     'verify426':
-        'prefix': 'verify the element the xpath of alias "identifier" is clickable'
-        'body': 'verify the element the xpath of alias "$1" is clickable'
+        'prefix': 'verify the element the xpath alias of "identifier" is clickable'
+        'body': 'verify the element the xpath alias of "$1" is clickable'
     'verify427':
-        'prefix': 'verify the element the xpath of alias "identifier" is clickable within "time" seconds'
-        'body': 'verify the element the xpath of alias "$1" is clickable within "$2" seconds'
+        'prefix': 'verify the element the xpath alias of "identifier" is clickable within "time" seconds'
+        'body': 'verify the element the xpath alias of "$1" is clickable within "$2" seconds'
     'verify428':
-        'prefix': 'verify the element the xpath of alias "identifier" is clickable within "time" seconds ignoring timeouts'
-        'body': 'verify the element the xpath of alias "$1" is clickable within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the xpath alias of "identifier" is clickable within "time" seconds ignoring timeouts'
+        'body': 'verify the element the xpath alias of "$1" is clickable within "$2" seconds ignoring timeouts'
     'verify429':
-        'prefix': 'verify the element the xpath of alias "identifier" is not displayed'
-        'body': 'verify the element the xpath of alias "$1" is not displayed'
+        'prefix': 'verify the element the xpath alias of "identifier" is not displayed'
+        'body': 'verify the element the xpath alias of "$1" is not displayed'
     'verify430':
-        'prefix': 'verify the element the xpath of alias "identifier" is not displayed within "time" seconds'
-        'body': 'verify the element the xpath of alias "$1" is not displayed within "$2" seconds'
+        'prefix': 'verify the element the xpath alias of "identifier" is not displayed within "time" seconds'
+        'body': 'verify the element the xpath alias of "$1" is not displayed within "$2" seconds'
     'verify431':
-        'prefix': 'verify the element the xpath of alias "identifier" is not displayed within "time" seconds ignoring timeouts'
-        'body': 'verify the element the xpath of alias "$1" is not displayed within "$2" seconds ignoring timeouts"
+        'prefix': 'verify the element the xpath alias of "identifier" is not displayed within "time" seconds ignoring timeouts'
+        'body': 'verify the element the xpath alias of "$1" is not displayed within "$2" seconds ignoring timeouts"
     'verify432':
-        'prefix': 'verify the element the xpath of alias "identifier" is not present'
-        'body': 'verify the element the xpath of alias "$1" is not present'
+        'prefix': 'verify the element the xpath alias of "identifier" is not present'
+        'body': 'verify the element the xpath alias of "$1" is not present'
     'verify433':
-        'prefix': 'verify the element the xpath of alias "identifier" is not present within "time" seconds'
-        'body': 'verify the element the xpath of alias "$1" is not present within "$2" seconds'
+        'prefix': 'verify the element the xpath alias of "identifier" is not present within "time" seconds'
+        'body': 'verify the element the xpath alias of "$1" is not present within "$2" seconds'
     'verify434':
-        'prefix': 'verify the element the xpath of alias "identifier" is not present within "time" seconds ignoring timeouts'
-        'body': 'verify the element the xpath of alias "$1" is not present within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the xpath alias of "identifier" is not present within "time" seconds ignoring timeouts'
+        'body': 'verify the element the xpath alias of "$1" is not present within "$2" seconds ignoring timeouts'
     'verify435':
-        'prefix': 'verify the element the xpath of alias "identifier" is not clickable'
-        'body': 'verify the element the xpath of alias "$1" is not clickable'
+        'prefix': 'verify the element the xpath alias of "identifier" is not clickable'
+        'body': 'verify the element the xpath alias of "$1" is not clickable'
     'verify436':
-        'prefix': 'verify the element the xpath of alias "identifier" is not clickable within "time" seconds'
-        'body': 'verify the element the xpath of alias "$1" is not clickable within "$2" seconds'
+        'prefix': 'verify the element the xpath alias of "identifier" is not clickable within "time" seconds'
+        'body': 'verify the element the xpath alias of "$1" is not clickable within "$2" seconds'
     'verify437':
-        'prefix': 'verify the element the xpath of alias "identifier" is not clickable within "time" seconds ignoring timeouts'
-        'body': 'verify the element the xpath of alias "$1" is not clickable within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the xpath alias of "identifier" is not clickable within "time" seconds ignoring timeouts'
+        'body': 'verify the element the xpath alias of "$1" is not clickable within "$2" seconds ignoring timeouts'

     'verify450':
-        'prefix': 'verify the element with the name of alias "identifier" is displayed'
-        'body': 'verify the element the name of alias "$1" is displayed'
+        'prefix': 'verify the element with the name alias of "identifier" is displayed'
+        'body': 'verify the element the name alias of "$1" is displayed'
     'verify451':
-        'prefix': 'verify the element the name of alias "identifier" is displayed within "time" seconds'
-        'body': 'verify the element the name of alias "$1" is displayed within "$2" seconds'
+        'prefix': 'verify the element the name alias of "identifier" is displayed within "time" seconds'
+        'body': 'verify the element the name alias of "$1" is displayed within "$2" seconds'
     'verify452':
-        'prefix': 'verify the element the name of alias "identifier" is displayed within "time" seconds ignoring timeouts'
-        'body': 'verify the element the name of alias "$1" is displayed within "$2" seconds ignoring timeouts"
+        'prefix': 'verify the element the name alias of "identifier" is displayed within "time" seconds ignoring timeouts'
+        'body': 'verify the element the name alias of "$1" is displayed within "$2" seconds ignoring timeouts"
     'verify453':
-        'prefix': 'verify the element the name of alias "identifier" is present'
-        'body': 'verify the element the name of alias "$1" is present'
+        'prefix': 'verify the element the name alias of "identifier" is present'
+        'body': 'verify the element the name alias of "$1" is present'
     'verify454':
-        'prefix': 'verify the element the name of alias "identifier" is present within "time" seconds'
-        'body': 'verify the element the name of alias "$1" is present within "$2" seconds'
+        'prefix': 'verify the element the name alias of "identifier" is present within "time" seconds'
+        'body': 'verify the element the name alias of "$1" is present within "$2" seconds'
     'verify455':
-        'prefix': 'verify the element the name of alias "identifier" is present within "time" seconds ignoring timeouts'
-        'body': 'verify the element the name of alias "$1" is present within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the name alias of "identifier" is present within "time" seconds ignoring timeouts'
+        'body': 'verify the element the name alias of "$1" is present within "$2" seconds ignoring timeouts'
     'verify456':
-        'prefix': 'verify the element the name of alias "identifier" is clickable'
-        'body': 'verify the element the name of alias "$1" is clickable'
+        'prefix': 'verify the element the name alias of "identifier" is clickable'
+        'body': 'verify the element the name alias of "$1" is clickable'
     'verify457':
-        'prefix': 'verify the element the name of alias "identifier" is clickable within "time" seconds'
-        'body': 'verify the element the name of alias "$1" is clickable within "$2" seconds'
+        'prefix': 'verify the element the name alias of "identifier" is clickable within "time" seconds'
+        'body': 'verify the element the name alias of "$1" is clickable within "$2" seconds'
     'verify458':
-        'prefix': 'verify the element the name of alias "identifier" is clickable within "time" seconds ignoring timeouts'
-        'body': 'verify the element the name of alias "$1" is clickable within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the name alias of "identifier" is clickable within "time" seconds ignoring timeouts'
+        'body': 'verify the element the name alias of "$1" is clickable within "$2" seconds ignoring timeouts'
     'verify459':
-        'prefix': 'verify the element the name of alias "identifier" is not displayed'
-        'body': 'verify the element the name of alias "$1" is not displayed'
+        'prefix': 'verify the element the name alias of "identifier" is not displayed'
+        'body': 'verify the element the name alias of "$1" is not displayed'
     'verify460':
-        'prefix': 'verify the element the name of alias "identifier" is not displayed within "time" seconds'
-        'body': 'verify the element the name of alias "$1" is not displayed within "$2" seconds'
+        'prefix': 'verify the element the name alias of "identifier" is not displayed within "time" seconds'
+        'body': 'verify the element the name alias of "$1" is not displayed within "$2" seconds'
     'verify461':
-        'prefix': 'verify the element the name of alias "identifier" is not displayed within "time" seconds ignoring timeouts'
-        'body': 'verify the element the name of alias "$1" is not displayed within "$2" seconds ignoring timeouts"
+        'prefix': 'verify the element the name alias of "identifier" is not displayed within "time" seconds ignoring timeouts'
+        'body': 'verify the element the name alias of "$1" is not displayed within "$2" seconds ignoring timeouts"
     'verify462':
-        'prefix': 'verify the element the name of alias "identifier" is not present'
-        'body': 'verify the element the name of alias "$1" is not present'
+        'prefix': 'verify the element the name alias of "identifier" is not present'
+        'body': 'verify the element the name alias of "$1" is not present'
     'verify463':
-        'prefix': 'verify the element the name of alias "identifier" is not present within "time" seconds'
-        'body': 'verify the element the name of alias "$1" is not present within "$2" seconds'
+        'prefix': 'verify the element the name alias of "identifier" is not present within "time" seconds'
+        'body': 'verify the element the name alias of "$1" is not present within "$2" seconds'
     'verify464':
-        'prefix': 'verify the element the name of alias "identifier" is not present within "time" seconds ignoring timeouts'
-        'body': 'verify the element the name of alias "$1" is not present within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the name alias of "identifier" is not present within "time" seconds ignoring timeouts'
+        'body': 'verify the element the name alias of "$1" is not present within "$2" seconds ignoring timeouts'
     'verify465':
-        'prefix': 'verify the element the name of alias "identifier" is not clickable'
-        'body': 'verify the element the name of alias "$1" is not clickable'
+        'prefix': 'verify the element the name alias of "identifier" is not clickable'
+        'body': 'verify the element the name alias of "$1" is not clickable'
     'verify466':
-        'prefix': 'verify the element the name of alias "identifier" is not clickable within "time" seconds'
-        'body': 'verify the element the name of alias "$1" is not clickable within "$2" seconds'
+        'prefix': 'verify the element the name alias of "identifier" is not clickable within "time" seconds'
+        'body': 'verify the element the name alias of "$1" is not clickable within "$2" seconds'
     'verify467':
-        'prefix': 'verify the element the name of alias "identifier" is not clickable within "time" seconds ignoring timeouts'
-        'body': 'verify the element the name of alias "$1" is not clickable within "$2" seconds ignoring timeouts'
+        'prefix': 'verify the element the name alias of "identifier" is not clickable within "time" seconds ignoring timeouts'
+        'body': 'verify the element the name alias of "$1" is not clickable within "$2" seconds ignoring timeouts'

      'verify400':
          'prefix': 'verify a link with the text content of "identifier" is present'


Wait for host loading in perf measurements

--- js-library/app/js/jail_iframe/classes/performance_measurement.coffee
+++ js-library/app/js/jail_iframe/classes/performance_measurement.coffee
@@ -26,9 +26,10 @@
       (padder + o.offset).substr(-offset_col_width)
     ).join('\n')

-FactlinkJailRoot.core_loaded_promise.then( ->
-  FactlinkJailRoot.delay 1000
-).then( ->
+FactlinkJailRoot.core_loaded_promise
+.then( -> FactlinkJailRoot.host_loaded_promise)
+.then( -> FactlinkJailRoot.delay 1000)
+.then( ->
   console.log document.readyState
   if window.performance && window.performance.timing
     'fetchStart responseEnd domLoading domInteractive domContentLoadedEventEnd domComplete loadEventEnd'


Prefer `chai.should` to `chai.expect` API

--- test/heterarchy.spec.coffee
+++ test/heterarchy.spec.coffee
@@ -6,7 +6,8 @@
 # Most test heterarchies are taken from the [original C3
 # paper](http://192.220.96.201/dylan/linearization-oopsla96.html)

-{expect} = require 'chai'
+chai = {expect} = require 'chai'
+do chai.should

 describe 'heterarchy', ->

@@ -113,23 +114,23 @@
     describe 'mro', ->

         it 'generates empty linearization for arbitrary object', ->
-            expect(mro {}).to.eql []
+            (mro {}).should.eql []

         it 'generates empty linearization for null object', ->
-            expect(mro undefined).to.eql []
-            expect(mro null).to.eql []
+            (mro undefined).should.eql []
+            (mro null).should.eql []

         it 'generates a monotonic linearization', ->
-            expect(mro Pedalo).to.eql [
+            (mro Pedalo).should.eql [
                 Pedalo, PedalWheelBoat, EngineLess, SmallCatamaran,
                 SmallMultiHull, DayBoat, WheelBoat, Boat, Object]

         it 'respects local precedence', ->
-            expect(mro NewPopupMenu).to.eql [
+            (mro NewPopupMenu).should.eql [
                 NewPopupMenu, Menu, PopupMixin, ChoiceWidget, Object]

         it 'respects the extended precedence graph', ->
-            expect(mro EditableScrollablePane).to.eql [
+            (mro EditableScrollablePane).should.eql [
                 EditableScrollablePane, ScrollablePane, EditablePane,
                 Pane, ScrollingMixin, EditingMixin, Object ]

@@ -137,66 +138,66 @@

         it 'calls super properly in multi case', ->
             obj = new D
-            expect(mro D).to.eql [D, B, C, A, Object]
-            expect(obj.method()).to.equal "D>B>C>A"
+            (mro D).should.eql [D, B, C, A, Object]
+            obj.method().should.equal "D>B>C>A"

         it 'calls super properly in recursive multi case', ->
             obj = new G
-            expect(mro G).to.eql [G, D, B, F, C, E, A, Object]
-            expect(obj.method()).to.equal "G>D>B>F>C>E>A"
+            (mro G).should.eql [G, D, B, F, C, E, A, Object]
+            obj.method().should.equal "G>D>B>F>C>E>A"

         it 'gets constructed properly', ->
             obj = new D
-            expect(obj.d).to.equal 'd'
-            expect(obj.c).to.equal 'c'
-            expect(obj.b).to.equal 'b'
-            expect(obj.a).to.equal 'a'
+            obj.d .should.equal 'd'
+            obj.c .should.equal 'c'
+            obj.b .should.equal 'b'
+            obj.a .should.equal 'a'

         it 'can generates the original hierarchy when possible', ->
-            expect(hierarchy D).not.to.eql mro D
-            expect(hierarchy inherited D).not.to.eql mro(D)[1..]
-            expect(hierarchy inherited inherited D).to.eql mro(D)[2..]
+            (hierarchy D).should.not.eql mro D
+            (hierarchy inherited D).should.not.eql mro(D)[1..]
+            (hierarchy inherited inherited D).should.eql mro(D)[2..]

         it 'it memoizes generated superclasses', ->
-            expect(inherited D).to.equal multi B, C
+            (inherited D).should.equal multi B, C

         it 'throws error on inconsistent hierarchy', ->
-            expect(-> multi D, C, B)
-                .to.throw "Inconsistent multiple inheritance"
+            (-> multi D, C, B)
+                .should.throw "Inconsistent multiple inheritance"

         it 'makes sure the next constructor after a root class', ->
             obj = new Deriv
-            expect(obj.base1).to.equal 'base1'
-            expect(obj.base2).to.equal 'base2'
-            expect(obj.deriv).to.equal 'deriv'
+            obj.base1 .should.equal 'base1'
+            obj.base2 .should.equal 'base2'
+            obj.deriv .should.equal 'deriv'

     describe 'isinstance', ->

         it 'checks the classes of an object even with multiple inheritance', ->
-            expect(isinstance new D, D).to.be.true
-            expect(isinstance new D, B).to.be.true
-            expect(isinstance new D, C).to.be.true
-            expect(isinstance new D, A).to.be.true
-            expect(isinstance new D, Object).to.be.true
-            expect(isinstance new A, Object).to.be.true
-            expect(isinstance new Object, A).to.be.false
-            expect(isinstance new Pedalo, D).to.be.false
-            expect(isinstance new Pedalo, A).to.be.false
-            expect(isinstance new Pedalo, SmallCatamaran).to.be.true
+            (isinstance new D, D).should.be.true
+            (isinstance new D, B).should.be.true
+            (isinstance new D, C).should.be.true
+            (isinstance new D, A).should.be.true
+            (isinstance new D, Object).should.be.true
+            (isinstance new A, Object).should.be.true
+            (isinstance new Object, A).should.be.false
+            (isinstance new Pedalo, D).should.be.false
+            (isinstance new Pedalo, A).should.be.false
+            (isinstance new Pedalo, SmallCatamaran).should.be.true

     describe 'issubclass', ->

         it 'checks the relationships of classes even with multiple inheritance', ->
-            expect(issubclass D, D).to.be.true
-            expect(issubclass D, B).to.be.true
-            expect(issubclass D, C).to.be.true
-            expect(issubclass D, A).to.be.true
-            expect(issubclass D, Object).to.be.true
-            expect(issubclass A, Object).to.be.true
-            expect(issubclass Object, A).to.be.false
-            expect(issubclass Pedalo, D).to.be.false
-            expect(issubclass Pedalo, A).to.be.false
-            expect(issubclass Pedalo, SmallCatamaran).to.be.true
+            (issubclass D, D).should.be.true
+            (issubclass D, B).should.be.true
+            (issubclass D, C).should.be.true
+            (issubclass D, A).should.be.true
+            (issubclass D, Object).should.be.true
+            (issubclass A, Object).should.be.true
+            (issubclass Object, A).should.be.false
+            (issubclass Pedalo, D).should.be.false
+            (issubclass Pedalo, A).should.be.false
+            (issubclass Pedalo, SmallCatamaran).should.be.true

 # License
 # -------


chore: update the unit test

chore: update the unit test

remove fake tests

--- test/isomorphic.test.coffee
+++ test/isomorphic.test.coffee
@@ -19,7 +19,3 @@
 describe "Isomorphic", ->
     describe "pellet component", ->
         it "", ->
-            c1 = pellet.createClass
-                render: ()->
-                    react.DOM.dom(null, "hello world!")
-


new functionality for inner describes in JasmineEmulator

--- test/jasmineEmulator.coffee
+++ test/jasmineEmulator.coffee
@@ -6,33 +6,41 @@
   tests     = {}
   afters    = {}
   describes = {}
+  currentPath = []
+  currentPath::last = -> this[@length - 1]
   currentDescribe = undefined
+
+  cleanup = ->
+    eval "delete describes[#{currentPath.join('][')}]"
+    currentPath.pop()

   {
     beforeEach: (fn)->
-      befores[currentDescribe].push fn
+      befores[currentPath.last()].push fn

     afterEach: (fn)->
-      afters[currentDescribe].push fn
+      afters[currentPath.last()].push fn

     it: (name, fn)->
-      tests[currentDescribe].push fn
+      tests[currentPath.last()].push fn

     describe: (name, fn)->
-      currentDescribe = name
+      currentPath.push name
       befores[name]   = []
       tests[name]     = []
       afters[name]    = []
-      describes[name] = fn
+      describes[name] = {func: -> (fn() && cleanup()), name: name, describes: {}}

     run: (context = this)->
-      for desc of describes
+      for _, desc of describes

-        describes[desc].call context
+        desc.func.call(context)

-        before.call(context) for before in befores[desc]
+        before.call(context)     for before in befores[desc]

-        test.call(context)   for test in tests[desc]
+        test.call(context)       for test in tests[desc]

-        after.call(context)  for after in afters[desc]
+        idesc.func.call(context) for _, idesc of desc.describes
+
+        after.call(context)      for after in afters[desc]
   }


coffee fix

coffee fix

--- client/packages/admin/views/stack/application/app_admin.coffee
+++ client/packages/admin/views/stack/application/app_admin.coffee
@@ -9,10 +9,10 @@
     page_class = ev.currentTarget.className.split(/\s+/).filter((a)->
       return /_page_layout$/.test(a)
     )[0]
-    @$("[data-page="+page_class+"]").addClass("active").siblings().removeClass("active");
+    @$("[data-page="+page_class+"]").addClass("active").siblings().removeClass("active")
     @$("[data-page="+page_class+"]").parent().prev().filter("li")
-      .addClass("active").siblings().removeClass("active");
-    @$("[data-page="+page_class+"]").next().filter("ul").find("li").removeClass("active");
+      .addClass("active").siblings().removeClass("active")
+    @$("[data-page="+page_class+"]").next().filter("ul").find("li").removeClass("active")
   logout: ->
     new this.m.models["user.session"]({_id: "me"}).destroy().then(=>
       m.removeProfile("logined")


Team: added nitin to team

Team: added nitin to team

--- client/About/team.coffee
+++ client/About/team.coffee
@@ -60,6 +60,9 @@
       ,
         username  : 'selin'
         title     : 'Data Scientist'
+      ,
+        username  : 'gniting'
+        title     : 'BizDev'
       # ,
       #   username  : 'cenk'
       #   title     : 'Software Engineer'


Fixed the delete feature

Fixed the delete feature

--- client/volunteers.coffee
+++ client/volunteers.coffee
@@ -165,13 +165,13 @@
   'click #deleteVolunteer': (evnt, template) ->
     $('#deleteModal').modal()
   'click #deleteConfirmed': (evnt, template) ->
-    id = Session.get 'active-volunteer-id'
-    Volunteers.remove id
-    Meteor.Router.to 'volunteerList'
-    Template.userMessages.showMessage
-      type: 'info',
-      title: 'Deleted!',
-      message: 'The volunteer was deleted'
+    id = Session.get('active-volunteer')._id
+    Volunteers.remove id, ->
+      Meteor.Router.to 'volunteerList'
+      Template.userMessages.showMessage
+        type: 'info',
+        title: 'Deleted!',
+        message: 'The volunteer was deleted'
   'click #deleteCancelled': (evnt, template) ->
     $('#deleteModal').hide()
   'click #editProfile': (evnt, template) ->


Clearing undefined timeout is a noop, no need to check

--- resources/assets/coffee/react/beatmaps/search-panel.coffee
+++ resources/assets/coffee/react/beatmaps/search-panel.coffee
@@ -37,8 +37,8 @@
       return

     @prevText = text
-    if @keyDelay?
-      Timeout.clear @keyDelay
+
+    Timeout.clear @keyDelay
     @keyDelay = Timeout.set 500, @submit

   submit: =>


Updated sinon.stub calls to use callsFake.

--- test/unit/boot/setup.coffee
+++ test/unit/boot/setup.coffee
@@ -78,9 +78,9 @@
       {err,token} = {}

       before (done) ->
-        sinon.stub fs, 'readFileSync', ->
+        sinon.stub(fs, 'readFileSync').callsFake( ->
           toString: ->
-            '0123456789abcdef'
+            '0123456789abcdef')
         sinon.stub fs, 'writeFileSync'

         setup.readSetupToken (error, setupToken) ->
@@ -106,8 +106,8 @@
       {err,token} = {}

       before (done) ->
-        sinon.stub fs, 'readFileSync', ->
-          throw new Error()
+        sinon.stub(fs, 'readFileSync').callsFake( ->
+          throw new Error())
         sinon.stub fs, 'writeFileSync'

         setup.readSetupToken (error, setupToken) ->
@@ -133,9 +133,9 @@
       {err,token} = {}

       before (done) ->
-        sinon.stub fs, 'readFileSync', ->
+        sinon.stub(fs, 'readFileSync').callsFake( ->
           toString: ->
-            ''
+            '')
         sinon.stub fs, 'writeFileSync'

         setup.readSetupToken (error, setupToken) ->
@@ -161,9 +161,9 @@
       {err,token} = {}

       before (done) ->
-        sinon.stub fs, 'readFileSync', ->
+        sinon.stub(fs, 'readFileSync').callsFake( ->
           toString: ->
-            '        '
+            '        ')
         sinon.stub fs, 'writeFileSync'

         setup.readSetupToken (error, setupToken) ->


change query to index to match factories

--- lib/assets/javascripts/directives/ngrepeatlist.js.coffee
+++ lib/assets/javascripts/directives/ngrepeatlist.js.coffee
@@ -10,7 +10,7 @@
       list = element.injector().get(factory)
       context = {}
       context[attributes.ngContext + '_id'] = scope[attributes.ngContext].id if attributes.ngContext
-      list.query context, (data) ->
+      list.index context, (data) ->
         scope[factory] = data
         element.parent().removeClass('loading')
     template: (element, attributes) ->
@@ -29,7 +29,7 @@
       list = element.injector().get(factory)
       context = {}
       context[attributes.ngContext + '_id'] = scope[attributes.ngContext].id if attributes.ngContext
-      list.query context, (data) ->
+      list.index context, (data) ->
         scope[factory] = data
         element.parent().removeClass('loading')
     template: (element, attributes) ->


Add requirejs define snippet to atom

Add requirejs define snippet to atom

--- .config/atom/snippets.cson
+++ .config/atom/snippets.cson
@@ -20,6 +20,9 @@
   'console-log':
     'prefix': 'cl'
     'body': 'console.log($1);'
+  'define':
+    'prefix': 'define'
+    'body': 'define([$1], function() {\n  \'use strict\';\n\n  $2\n});'
   'describe':
     'prefix': 'describe'
     'body': 'describe(\'$1\', function() {\n  $2\n});'


fixed lightbox bug

fixed lightbox bug

--- public/dreamcatcher/controllers/entries/show_entry_controller.coffee
+++ public/dreamcatcher/controllers/entries/show_entry_controller.coffee
@@ -31,7 +31,7 @@
   activatePlugins: (el) ->
     el.linkify()
     el.videolink() #check if this is ok... might need to uncomment somewhere else
-    $('.lightbox', el).each -> $(this).lightBox {containerResizeSpeed: 0}
+    $('.lightbox a', el).each -> $(this).lightBox {containerResizeSpeed: 0}
     el.comments()

   showEntryElement: (entryEl) ->


remove works through the magic of James

remove works through the magic of James

--- public/scripts/backbone-schedule/views/schedule-sections-list.coffee
+++ public/scripts/backbone-schedule/views/schedule-sections-list.coffee
@@ -19,6 +19,7 @@
       # Delete a removed section from the list
       Shark.schedule.get('sections').bind 'remove', (section) =>
         section.listView.remove()
+        section.listView = 0
         section.resultView.reset_add_button()

       # Empty the list on reset ( triggered on load )


Hide hype button for beatmapset owner

Hide hype button for beatmapset owner

--- resources/assets/coffee/react/beatmap-discussions/nominations.coffee
+++ resources/assets/coffee/react/beatmap-discussions/nominations.coffee
@@ -148,7 +148,7 @@
                   "#{hypeRaw} / #{requiredHype}"
               @renderLights(hype, requiredHype)

-            if currentUser.id?
+            if currentUser.id? && currentUser.id != @props.beatmapset.user_id
               div className: "#{bn}__row-right",
                 el BigButton,
                   modifiers: ['full']


check for duplicates in putElement

check for duplicates in putElement

--- services/web/app/coffee/Features/Project/ProjectEntityHandler.coffee
+++ services/web/app/coffee/Features/Project/ProjectEntityHandler.coffee
@@ -170,7 +170,8 @@
 			if project_or_id._id? # project
 				return cb(null, project_or_id)
 			else # id
-				return ProjectGetter.getProjectWithOnlyFolders project_or_id, cb
+				# need to retrieve full project structure to check for duplicates
+				return ProjectGetter.getProject project_or_id, {}, cb
 		getProject (error, project) ->
 			if err?
 				logger.err project_id:project_id, err:err, "error getting project for add doc"
@@ -207,7 +208,7 @@
 			ProjectEntityHandler.addDoc project_id, null, name, lines, callback

 	addFileWithoutUpdatingHistory: (project_id, folder_id, fileName, path, userId, callback = (error, fileRef, folder_id, path, fileStoreUrl) ->)->
-		ProjectGetter.getProjectWithOnlyFolders project_id, (err, project) ->
+		ProjectGetter.getProject project_id, {}, (err, project) ->
 			if err?
 				logger.err project_id:project_id, err:err, "error getting project for add file"
 				return callback(err)
@@ -606,19 +607,32 @@
 				newPath =
 					fileSystem: "#{path.fileSystem}/#{element.name}"
 					mongo: path.mongo
-				id = element._id+''
-				element._id = require('mongoose').Types.ObjectId(id)
-				conditions = _id:project._id
-				mongopath = "#{path.mongo}.#{type}"
-				update = "$push":{}
-				update["$push"][mongopath] = element
-				logger.log project_id: project._id, element_id: element._id, fileType: type, folder_id: folder_id, mongopath:mongopath, "adding element to project"
-				Project.findOneAndUpdate conditions, update, {"new": true}, (err, project)->
-					if err?
-						logger.err err: err, project_id: project._id, 'error saving in putElement project'
-						return callback(err)
-					callback(err, {path:newPath}, project)
-
+				ProjectEntityHandler.checkElementName folder, element.name, (err) =>
+					return callback(err) if err?
+					id = element._id+''
+					element._id = require('mongoose').Types.ObjectId(id)
+					conditions = _id:project._id
+					mongopath = "#{path.mongo}.#{type}"
+					update = "$push":{}
+					update["$push"][mongopath] = element
+					logger.log project_id: project._id, element_id: element._id, fileType: type, folder_id: folder_id, mongopath:mongopath, "adding element to project"
+					Project.findOneAndUpdate conditions, update, {"new": true}, (err, project)->
+						if err?
+							logger.err err: err, project_id: project._id, 'error saving in putElement project'
+							return callback(err)
+						callback(err, {path:newPath}, project)
+
+	checkElementName: (folder, name, callback = (err) ->) ->
+		# check if the name is already taken by a doc, file or
+		# folder. If so, return an error "file already exists".
+		err = new Errors.InvalidNameError("file already exists")
+		for doc in folder?.docs or []
+			return callback(err) if doc.name is name
+		for file in folder?.fileRefs or []
+			return callback(err) if file.name is name
+		for folder in folder?.folders or []
+			return callback(err) if folder.name is name
+		callback()

 confirmFolder = (project, folder_id, callback)->
 	logger.log folder_id:folder_id, project_id:project._id, "confirming folder in project"


Add Spec T004-001-002: parse multiple label text

--- spec/src/coffee/label_category/models/t004_label_category_spec.coffee
+++ spec/src/coffee/label_category/models/t004_label_category_spec.coffee
@@ -1,27 +1,15 @@
 should = require "should"

 describe "T004: LabelCategory::Models::LabelCategory", ->
-  beforeEach (done)->
-    requirejs(
-      [
-        "app/label_category"
-        "app/label"
-      ]
-      (
-        LabelCategory
-        Label
-      )=>
-        @LabelCategory = LabelCategory
-        @Label = Label
+  beforeEach ->
+    @LabelCategory = requirejs "app/label_category"
+    @Label         = requirejs "app/label"

-        # set root node
-        @root = new @LabelCategory.Models.LabelCategory
-        @fake_label =
-          set: sinon.spy()
-          on: sinon.spy()
-
-        done()
-    )
+    # set root node
+    @root = new @LabelCategory.Models.LabelCategory
+    @fake_label =
+      set:  sinon.spy()
+      on:   sinon.spy()

   context "001: parsing", ->
     context "001: test1/test2/test3", ->
@@ -44,10 +32,26 @@
         should.strictEqual @root.get("childrens")["test1"].get("childrens")["test2"].get("label"), undefined
         should.strictEqual @root.get("childrens")["test1"].get("childrens")["test2"].get("childrens")["test3"].get("label"), @fake_label

+    context "002: multi test1/test*/test3", ->
+      beforeEach ->
+        _([3..200]).each (v)=>
+          @root.parse_labels_recursive_func "test1/test#{v}/test3", @fake_label
+
+      it "001: check name", ->
+        _([3..200]).each (v)=>
+          @root.get("childrens")["test1"].get("childrens")["test#{v}"].get("name").should.equal "test#{v}"
+
+      it "002: check childrens", ->
+        should.strictEqual @root.get("childrens")["test1"].get("childrens")["test1"], undefined
+        should.strictEqual @root.get("childrens")["test1"].get("childrens")["test2"], undefined
+        should.strictEqual @root.get("childrens")["test1"].get("childrens")["test201"], undefined
+        _(@root.get("childrens")["test1"].get("childrens")).keys().length.should.equal 200 - 2
+
   context "002: properties", ->
     context "001: root", ->
       beforeEach ->
         @root.set "name", "this is root"
+
       it "001 get name", ->
         @root.get("name").should.equal "this is root"


Simplify Gruntfile

Simplify Gruntfile

--- frontflow/front-template/Gruntfile.coffee
+++ frontflow/front-template/Gruntfile.coffee
@@ -21,7 +21,7 @@
           expand: true
           cwd: "src/coffee/"
           src: ["*.coffee"]
-          dest: "#{buildDir}/front/coffee/"
+          dest: "build/coffee/"
           ext: ".js"
         }]

@@ -34,7 +34,7 @@
           expand: true
           cwd: "src/sass/"
           src: ["*.sass"]
-          dest: "#{buildDir}/front/sass/"
+          dest: "build/sass/"
           ext: ".css"
         }]

@@ -47,23 +47,23 @@
           expand: true
           cwd: "src/less/"
           src: ["*.less"]
-          dest: "#{buildDir}/front/less/"
+          dest: "build/less/"
           ext: ".css"
         }]

     bower_concat:
       all:
-        dest: "#{buildDir}/front/bower/build.js"
-        cssDest: "#{buildDir}/front/bower/build.css"
+        dest: "build/bower.js"
+        cssDest: "build/bower.css"
         mainFiles:
           'bootstrap': [ "dist/css/bootstrap.css", "dist/js/bootstrap.js"]

     copy:
       bootstrapFonts:
         expand: true
-        cwd: "bower_components/bootstrap/dist/fonts/"
-        src: ["*"]
-        dest: "#{buildDir}/front/fonts"
+        cwd: "bower_components/bootstrap/dist"
+        src: ["fonts/*"]
+        dest: "#{buildDir}"

     #Assumes individual files are already minified (no further uglification/minification)
     concat:
@@ -71,31 +71,20 @@
         separator: ';'
         stripBanners: true

-      compiledjs:
-        src: [ "#{buildDir}/front/coffee/**/*.js" ]
-        dest: "#{buildDir}/front/compiled.js"
+      js:
+        src: [
+          "build/bower.js",
+          "build/coffee/**/*.js"
+        ]
+        dest: "#{buildDir}/js/front.js"

-      compiledcss:
+      css:
         src: [
-          "#{buildDir}/front/sass/*.css",
-          "#{buildDir}/front/less/*.css"
+          "build/bower.css",
+          "build/less/*.css",
+          "build/sass/*.css"
         ]
-        dest: "#{buildDir}/front/compiled.css"
-
-      alljs:
-        src: [
-          "#{buildDir}/front/bower/build.js",
-          "#{buildDir}/front/include/*.js",
-          "#{buildDir}/front/coffee/**/*.js"
-        ]
-        dest: "#{buildDir}/front/all.js"
-
-      allcss:
-        src: [
-          "#{buildDir}/front/bower/build.css",
-          "#{buildDir}/front/compiled.css"
-        ]
-        dest: "#{buildDir}/front/all.css"
+        dest: "#{buildDir}/css/front.css"

     #Published uglified version of compiled app.js
@@ -108,9 +97,9 @@
       front:
         files: [{
           expand: true
-          cwd: "#{buildDir}/front"
-          src: [ "compiled.js", "all.js" ]
-          dest: "#{buildDir}/front"
+          cwd: "#{buildDir}"
+          src: [ "js/front.js" ]
+          dest: "#{buildDir}"
           ext: ".min.js"
         }]

@@ -118,22 +107,22 @@
     watch:
       coffee:
         files: [ "src/coffee/**" ]
-        tasks: [ "coffee:front", "concat:compiledjs", "concat:alljs"]
+        tasks: [ "coffee:front", "concat:js" ]

       sass:
         files: [ "src/sass/**" ]
-        tasks: [ "sass:front", "concat:compiledcss", "concat:allcss" ]
+        tasks: [ "sass:front", "concat:css" ]

       less:
         files: [ "src/less/**" ]
-        tasks: [ "less:front", "concat:compiledcss", "concat:allcss" ]
+        tasks: [ "less:front", "concat:css" ]

-      alljs:
+      js:
         files: [ "#{buildDir}/**.js" ]
-        tasks: [ "concat:alljs", 'uglify:front']
+        tasks: [ "concat:js", 'uglify:front']

-      allcss:
+      css:
         files: [ "#{buildDir}/**.css" ]
-        tasks: [ "concat:allcss" ]
+        tasks: [ "concat:css" ]

   grunt.registerTask "default", ['coffee', 'sass', 'less', 'bower_concat', 'concat', 'uglify', 'copy']


use browserSync.watch instead of gulp.watch

--- generators/app/templates/_gulpfile.coffee
+++ generators/app/templates/_gulpfile.coffee
@@ -30,19 +30,21 @@

 gulp.task 'watchChanges', ->

+  bs = browserSync.create()
+
   deleteFileFromBuildDir = (event, path) ->
-    return  unless event is 'deleted'
+    return  unless event is 'unlink' or event is 'unlinkDir'
     # replacing app folder with build
-    path = path.replace '/app/', '/build/'
+    path = path.replace 'app/', 'build/'
     # deleting the file from build directory
     del [path], ->

   watchFiles = (path, gulpTask) ->

-    gulp.watch [path], (file) ->
+    bs.watch path, (event, file) ->
       gulp.start gulpTask
-      deleteFileFromBuildDir file.type, file.path
+      deleteFileFromBuildDir event, file

   watchFiles "#{paths.appAssets}/**",           'copyAssets'
   watchFiles "#{paths.appStyles}/**",           'copyStyles'


fix specs

fix specs

--- test/spec/controllers/web_map_merge_controller_spec.coffee
+++ test/spec/controllers/web_map_merge_controller_spec.coffee
@@ -15,6 +15,7 @@
     @scope.historyVersionSnippet = @olderSnippetModel
     @scope.modalState =
       isMerging: false
+    @scope.rightBeforeMerge = $.Callbacks('memory once')
     @scope.resetMarker = -> true
     @scope.modalContentReady = $.Callbacks('memory once')
     @scope.modalContentReady.fire()


Add a positive test for envVars.device.getAll()

--- tests/integration/models/environment-variables.spec.coffee
+++ tests/integration/models/environment-variables.spec.coffee
@@ -138,6 +138,14 @@
 					promise = resin.models.environmentVariables.device.getAll(@device.uuid)
 					m.chai.expect(promise).to.become([])

+				it "should return device's device environment variables if they exist", ->
+					resin.models.environmentVariables.device.create(@device.uuid, 'EDITOR', 'vim').then =>
+						resin.models.environmentVariables.device.getAll(@device.uuid)
+					.then (envs) ->
+						m.chai.expect(envs).to.have.length(1)
+						m.chai.expect(envs[0].name).to.equal('EDITOR')
+						m.chai.expect(envs[0].value).to.equal('vim')
+
 				it 'should be rejected if the device uuid does not exist', ->
 					promise = resin.models.environmentVariables.device.getAll('asdfghjkl')
 					m.chai.expect(promise).to.be.rejectedWith('Device not found: asdfghjkl')


Add color to inherited style attributes

Add color to inherited style attributes

--- vendor/assets/javascripts/mercury/regions/simple.js.coffee
+++ vendor/assets/javascripts/mercury/regions/simple.js.coffee
@@ -23,16 +23,17 @@
     @textarea = jQuery('<textarea>', @document).val(value)
     @textarea.attr('class', @element.attr('class')).addClass('mercury-textarea')
     @textarea.css
-      border: 0,
-      background: 'transparent',
-      display: 'block',
-      'overflow-y': 'hidden',
-      width: width,
-      height: height,
-      fontFamily: 'inherit',
-      fontSize: 'inherit',
-      fontWeight: 'inherit',
-      fontStyle: 'inherit',
+      border: 0
+      background: 'transparent'
+      display: 'block'
+      'overflow-y': 'hidden'
+      width: width
+      height: height
+      fontFamily: 'inherit'
+      fontSize: 'inherit'
+      fontWeight: 'inherit'
+      fontStyle: 'inherit'
+      color: 'inherit'
     @element.addClass(Mercury.config.regions.className)
     @element.empty().append(@textarea)


LEV-46 static cells added

LEV-46 static cells added

--- modules/levelcreator/app/assets/javascripts/level_creator/plugins/segment_importer.coffee
+++ modules/levelcreator/app/assets/javascripts/level_creator/plugins/segment_importer.coffee
@@ -105,7 +105,6 @@
               y: 0
             }
             display : true
-            staticDisplay : false
             randomColor : {
               r: 0
               g: 0


Add function documentation

Add function documentation

--- tapestry-core/src/main/coffeescript/META-INF/modules/core/spi.coffee
+++ tapestry-core/src/main/coffeescript/META-INF/modules/core/spi.coffee
@@ -24,6 +24,7 @@
   split = (str) ->
     _(str.split " ").reject (s) -> s is ""

+  # _internal_: Fires a native event; something that Prototype does not normally do.
   fireNativeEvent = (element, eventName) ->
     if document.createEventObject
       # IE support:


Fixed usage to twitter initials setting.

--- app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee
+++ app/assets/javascripts/app/controllers/ticket_zoom/article_new.coffee
@@ -151,7 +151,7 @@
         icon:              'twitter'
         attributes:        []
         internal:          false,
-        features:          ['body:limit', 'body:initials']
+        features:          attributes
         maxTextLength:     280
         warningTextLength: 30
       }
@@ -164,7 +164,7 @@
         icon:              'twitter'
         attributes:        ['to']
         internal:          false,
-        features:          ['body:limit', 'body:initials']
+        features:          attributes
         maxTextLength:     10000
         warningTextLength: 500
       }


Client: Activity: Updated renderAvatars method. It renders participant avatars by preview_count.

--- client/activity/lib/components/channelparticipantavatars/index.coffee
+++ client/activity/lib/components/channelparticipantavatars/index.coffee
@@ -15,20 +15,20 @@

   renderAvatars: ->
+
     return null  unless @props.participants

     { participants } = @props

-    count = if participants.size is MAX_PREVIEW_COUNT + 1
-    then MAX_PREVIEW_COUNT + 1
-    else MAX_PREVIEW_COUNT
+    PREVIEW_COUNT = @getPreviewCount()

-    participants.slice(0, count).toList().map (participant) ->
+    participants.slice(0, PREVIEW_COUNT).toList().map (participant) ->
       <div key={participant.get 'id'} className="ChannelParticipantAvatars-singleBox">
         <ProfileLinkContainer account={participant.toJS()}>
           <Avatar
             className="ChannelParticipantAvatars-avatar"
             width={30}
+            account={participant.toJS()}
             height={30} />
         </ProfileLinkContainer>
       </div>


toc.html => tos.html

toc.html => tos.html

--- client/app/Applications/Home.kdapplication/Views/homeintroview.coffee
+++ client/app/Applications/Home.kdapplication/Views/homeintroview.coffee
@@ -40,7 +40,7 @@
     @toc = new KDCustomHTMLView
       cssClass : 'toc'
       # partial  : 'By signing up, you agree to our privacy policy.'
-      partial  : 'By signing up, you agree to our terms of service and privacy policy.'
+      partial  : 'By signing up, you agree to our terms of service and privacy policy.'

     @twoMinsThumb = new KDCustomHTMLView


Added uglyify transform for bundle in production

--- app.coffee
+++ app.coffee
@@ -24,17 +24,16 @@
 Browserify transform
 - convert all coffee files to single js bundle
 ###
-browserify(__dirname + "/src/main.coffee")
-.transform ->
+b = browserify(__dirname + "/src/main.coffee")
+b.transform ->
   data = ""
   write = (buf) -> data += buf
   end = ->
     @queue(coffee.compile(data))
     @queue(null)
   return through(write, end)
-.bundle()
-.pipe(fs.createWriteStream(__dirname + "/static/build/bundle.js"))
-# TODO(svagis) uglyify transform
+b.transform {global: true}, 'uglifyify' if env is "development"
+b.bundle().pipe(fs.createWriteStream(__dirname + "/static/build/bundle.js"))

 ### Setup ###


Premiscious

Premiscious

--- app.coffee
+++ app.coffee
@@ -1,7 +1,7 @@
 express = require 'express'
 app = express()

-app.get '/api/cat-fact', (req, res) =>
+app.all '/api/cat-fact', (req, res) =>
 	res.send('hello world');

 app.listen(3005);


Don't send word clouds, nobody is using them

--- app.coffee
+++ app.coffee
@@ -132,7 +132,7 @@
     # TODO(sam): this is a hack to get the moderator interface to work we
     # should have moderators join like any player and notify only moderator
     # sockets
-    io.sockets.emit('wordcloud', wordCloudData())
+    #io.sockets.emit('wordcloud', wordCloudData())

   # when the user disconnects.. perform this
   socket.on 'disconnect', () ->


Bump to v1.0.0-beta2

Bump to v1.0.0-beta2

--- app.coffee
+++ app.coffee
@@ -1,4 +1,4 @@
-global.POI_VERSION = '1.0.0-beta'
+global.POI_VERSION = '1.0.0-beta2'

 app = require 'app'
 BrowserWindow = require 'browser-window'


GameObject: Fix clone recursive to different scene

--- engine/gameobject.coffee
+++ engine/gameobject.coffee
@@ -340,7 +340,7 @@
         # Adding children after ensures objects don't need to be sorted
         if recursive
             for child in @children
-                child = child.clone({options, new_parent: n})
+                child = child.clone({options..., new_parent: n})
                 child.parent = n
                 children.push child
         n.body.instance()


Refactor createScenario to use function

Refactor createScenario to use function

--- src/Witness/Scripts/witness/dsl/describe.coffee
+++ src/Witness/Scripts/witness/dsl/describe.coffee
@@ -15,10 +15,11 @@

 createScenario = (scenario) ->
-	givens   = (createAction definition for definition in ensureArray scenario.given)
-	whens    = (createAction definition for definition in ensureArray scenario.when)
-	thens    = (createAction definition for definition in ensureArray scenario.then)
-	disposes = (createAction definition for definition in ensureArray scenario.dispose)
+	createActions = (input) -> (createAction definition for definition in ensureArray input)
+	givens   = createActions scenario.given
+	whens    = createActions scenario.when
+	thens    = createActions scenario.then
+	disposes = createActions scenario.dispose

 	new Witness.Scenario givens, whens, thens, disposes


рашка красное, остальное - зеленое

рашка красное, остальное - зеленое

--- app/assets/javascripts/map.coffee
+++ app/assets/javascripts/map.coffee
@@ -32,15 +32,29 @@
         #TODO: сделать так, чтобы места появлялись на карте даже в случае отсутствия текущей геолокации
   color_countries: ->
     #окрашивает страны
-    CountryName = "Russia"

-    table_id = 420419
+    field_name = 'kml_4326'
+    table_id = '1uL8KJV0bMb7A8-SkrIe0ko2DMtSypHX52DatEE4'

-    FT_Query = "SELECT 'kml_4326' FROM #{table_id} WHERE 'name_0' = '#{CountryName}';"
-    FT_Options =
-      query: FT_Query
+    layer = new google.maps.FusionTablesLayer({
+      query: {
+        select: field_name,
+        from: table_id
+      },
+      styles: [{
+        polygonOptions: {
+          fillColor: '#00FF00',
+          fillOpacity: 0.3
+        }
+      }, {
+        where: "Name = 'Russia'",
+        polygonOptions: {
+          fillColor: '#B10909'
+        }
+      }]
+    })

-    layer = new google.maps.FusionTablesLayer(table_id, FT_Options)
+#    layer = new google.maps.FusionTablesLayer(table_id, FT_Options)
     layer.setMap app.google_map


Updated unit tests to use proper settings file

--- models/topicDataTest.coffee
+++ models/topicDataTest.coffee
@@ -7,15 +7,12 @@
 fs = require 'fs'
 {TopicData}  = require './topicData'
 {TestUtil}  = require '../util/testUtil'
+settings = require '../util/settings'

 verbose = true
 test = new TestUtil("topicDataTest", verbose)
-dataOptions = {
-  dataPath: __dirname + "/../data_test"
-  createDataFileIfNotFound: true,
-  showDrafts: true
-}
-
+dataOptions = settings.load 'settings.test.json', __dirname
+dataOptions.showDrafts = true

 # Delete the current data file (if any)
 dataFile = dataOptions.dataPath + '/blogs.json'


Move assignment up and comment reasoning

Since the @onPractice was removed by mistake earlier

--- src/components/learning-guide/weaker-panel.cjsx
+++ src/components/learning-guide/weaker-panel.cjsx
@@ -21,15 +21,17 @@
   render: ->
     # Do not render if we have no sections
     return null if @props.sections.length is 0
+    # Only show the practice button if practice is allowed and weakest sections exit
+    if @props.onPractice and LearningGuide.Helpers.canDisplayWeakest(@props) then practiceBtn =
+      <PracticeButton title='Practice All'
+        sections=LearningGuide.Helpers.weakestSections(@props.sections)
+        courseId={@props.courseId} />

         {@props.weakerTitle}
         {@props.weakerExplanation}
-        {if @props.onPractice and LearningGuide.Helpers.canDisplayWeakest(@props)
-          <PracticeButton title='Practice All'
-            sections=LearningGuide.Helpers.weakestSections(@props.sections)
-            courseId={@props.courseId} /> }
+        {practiceBtn}

       <WeakerSections {...@props} />


fixed bug in view

fixed bug in view

--- app/assets/javascripts/view.coffee
+++ app/assets/javascripts/view.coffee
@@ -80,7 +80,7 @@

 		#renders all geometries in geometry-array
 		totalNumberOfVertices = 0
-		#totalNumberOfVertices += drawTriangleplane()
+		totalNumberOfVertices += drawTriangleplane()

 		# first Mesh is always the coordinate axis mini-map
 		if meshes[0]


Social: add listPinnedMessages, pinMessages and unpinMessages function

--- workers/social/lib/social/models/socialapi/requests.coffee
+++ workers/social/lib/social/models/socialapi/requests.coffee
@@ -94,6 +94,24 @@
   url = "#{SOCIAL_API_URL}/popular/topics/weekly"
   get url, data, callback

+listPinnedMessages = (data, callback)->
+  url = "#{SOCIAL_API_URL}/activity/pin/list"
+  get url, data, callback
+
+pinMessage = (data, callback)->
+  if not data.accountId or not data.messageId or not data.groupName
+    return callback { message: "Request is not valid"}
+
+  url = "#{SOCIAL_API_URL}/activity/pin/add"
+  post url, data, callback
+
+unpinMessage = (data, callback)->
+  if not data.accountId or not data.messageId or not data.groupName
+    return callback { message: "Request is not valid"}
+
+  url = "#{SOCIAL_API_URL}/activity/pin/remove"
+  post url, data, callback
+
 post = (url, data, callback)->
   request
     url    : url
@@ -111,6 +129,9 @@
   , wrapCallback callback

 module.exports = {
+  listPinnedMessages
+  pinMessage
+  unpinMessage
   fetchPopularTopics
   addReply
   unlikeMessage


camelcase

camelcase

--- node_modules_koding/kite-amqp/lib/kite-amqp/index.coffee
+++ node_modules_koding/kite-amqp/lib/kite-amqp/index.coffee
@@ -86,16 +86,16 @@

     # sendCommand broadcasts, with this one, we first push to queue
     # then broadcast and one of them consumes
-    @callbackid++
+    @callbackId++
     data = {
-      cmd: cmd,
-      id: @callbackid,
+      cmd: cmd,
+      id: @callbackId,
       args: args,
       from: @getChannelNameForKite()
     }

-    if cb
-      @waitingReplies[@callbackid] = cb
+    if callback
+      @waitingReplies[@callbackId] = callback

     datastr = JSON.stringify(data)
     @mergenData.rpush channel, datastr, ()=>
@@ -104,18 +104,19 @@

   sendCommand: (channel, cmd, args, callback=null)->
     # this broadcasts command to the said channel
-    @callbackid++
+    @callbackId++
     data = {
       cmd: cmd,
-      id: @callbackid,
+      id: @callbackId,
       args: args,
       from: @getChannelNameForKite()
     }
-    if cb
-      @waitingReplies[@callbackid] = cb
+
+    if callback
+      @waitingReplies[@callbackId] = callback
     @mergenData.publish channel, JSON.stringify(data)

-  connectToMessageBus: (cb)=>
+  connectToMessageBus: (callback)=>

     # we have a second connection because, redis client in node doesnt send any commands
     # when it enters subscribe mode, though redis docs says you can publish if you are in subcribe
@@ -169,7 +170,7 @@
       if subscribeToChannelNames.length is 0
         clearInterval subscribeCheck
         startQueueChecker()
-        cb()
+        callback()
     , 10
     @connected = true


mircoemitter: style

mircoemitter: style

--- node_modules_koding/microemitter/src/eventemitter.coffee
+++ node_modules_koding/microemitter/src/eventemitter.coffee
@@ -16,7 +16,7 @@
     ###
     delete @listeners[listenerId]
     delete @targets[listenerId]
-    return @
+    return this

   defineProperty = Object.defineProperty ||
     (obj, prop, {value})-> obj[prop] = value
@@ -38,11 +38,7 @@
         # writable      : yes
       )

-  constructor:(obj)->
-    if obj?
-      mixin obj
-    else
-      obj = this
+  constructor:(obj)-> if obj? then mixin obj

   on:(evt, listener)->
     throw new Error 'Listener is required!'  unless listener?
@@ -63,7 +59,7 @@
     EventEmitter.listeners[lid] = \
     listeners[lid] = listener

-    EventEmitter.targets[lid] = @
+    EventEmitter.targets[lid] = this

     return this

@@ -72,8 +68,6 @@
       @off evt, wrappedListener
       listener.apply @, rest
     @on evt, wrappedListener
-
-  when:-> # TODO: implement

   off:(evt, listener)->
     init this


add hasRole user helper

add hasRole user helper

--- collections/users.coffee
+++ collections/users.coffee
@@ -83,3 +83,7 @@

 # Export schemas
 @StarterSchemas = Schemas
+
+Meteor.users.helpers
+  hasRole: (role) ->
+    @roles?.indexOf(role) > -1


Add a knockout binding with leadingZeros in it

--- js/libs/custom-bindings.coffee
+++ js/libs/custom-bindings.coffee
@@ -57,6 +57,27 @@
   update: (el, valueAccessor) =>
     setMoneyContent(el, valueAccessor())

+setLeadingZeroContent = (element, textContent) ->
+  value = ko.utils.unwrapObservable(textContent)
+  if not value?
+    value = ""
+  else if value >= 0 and value < 10
+    value = "0#{value}"
+
+  if 'innerText' in element
+    element.innerText = value
+  else
+    element.textContent = value
+
+  if (ieVersion >= 9)
+    element.style.display = element.style.display
+
+ko.bindingHandlers.leadingZero =
+  update: (el, valueAccessor) =>
+    setLeadingZeroContent(el, valueAccessor())
+
+
+
 ko.observableArray["fn"].setIndex = (index, newItem) ->
   @valueWillMutate()
   result = @()[index] = newItem


wrong ruler

wrong ruler

--- js/msa/menu/defaultmenu.coffee
+++ js/msa/menu/defaultmenu.coffee
@@ -24,8 +24,8 @@
           @msa.config.visibleElements.ruler = false
         else
           #$(this).children().first().text "Hide Marker"
-          @msa.visibleElements.ruler = true
-        @msa.redrawContainer()
+          @msa.config.visibleElements.ruler = true
+        @msa._draw()

       menuFile.addNode "Hide Labels", =>
         if @msa.config.visibleElements.labels is true
@@ -36,8 +36,8 @@
           #$(this).children().first().text "Hide Labels"
         @msa.redrawContainer()

-      menuFile.addNode "Hide Menu", =>
-        @deleteMenu()
+      #menuFile.addNode "Hide Menu", =>
+      #@deleteMenu()

       menuFile.buildDOM()

@@ -106,15 +106,19 @@
     _createOrderingMenu: ->
       menuOrdering = new MenuBuilder("Ordering")
       menuOrdering.addNode "ID", =>
-        @msa.ordering.setOrdering "numeric"
+        @msa.ordering.setType "numeric"
+        @msa.redrawContainer()

       menuOrdering.addNode "ID Desc", =>
-        @msa.ordering.setOrdering "reverse-numeric"
+        @msa.ordering.setType "reverse-numeric"
+        @msa.redrawContainer()

       menuOrdering.addNode "Label", =>
-        @msa.ordering.setOrdering "alphabetic"
+        @msa.ordering.setType "alphabetic"
+        @msa.redrawContainer()

       menuOrdering.addNode "Label Desc", =>
-        @msa.ordering.setOrdering "reverse-alphabetic"
+        @msa.ordering.setType "reverse-alphabetic"
+        @msa.redrawContainer()

       menuOrdering.buildDOM()


just spacing out some parameters as I read through this

--- web/scripts/gridmaker.coffee
+++ web/scripts/gridmaker.coffee
@@ -130,9 +130,9 @@

 		current: (anticker) ->
 			num = 0
-			if (anticker % (2*ar)) >= ar
+			if (anticker % (2 * ar)) >= ar
 				num = 1
-			num = num + (2*@dir)
+			num = num + (2 * @dir)
 			return @animarray[num]

 		dirFace: (dir) ->
@@ -148,9 +148,9 @@

 		ppo: () ->
 			if queue.length == 1
-				queue.splice(0,1,4)
+				queue.splice(0, 1, 4)
 			else
-				queue.splice(0,1)
+				queue.splice(0, 1)

 	getFrame: (config) ->
 		this.chckMv(config)


Reorder expectations in wordy test suite

This matches the jasmine conventions, and makes error messages less
confusing.

--- wordy/wordy_test.spec.coffee
+++ wordy/wordy_test.spec.coffee
@@ -4,59 +4,59 @@

   it 'add 1', ->
     problem = new WordProblem('What is 1 plus 1?')
-    expect(2).toEqual problem.answer()
+    expect(problem.answer()).toEqual 2

   xit 'add 2', ->
     problem = new WordProblem('What is 53 plus 2?')
-    expect(55).toEqual problem.answer()
+    expect(problem.answer()).toEqual 55

   xit 'add negative numbers', ->
     problem = new WordProblem('What is -1 plus -10?')
-    expect(-11).toEqual problem.answer()
+    expect(problem.answer()).toEqual -11

   xit 'add more digits', ->
     problem = new WordProblem('What is 123 plus 45678?')
-    expect(45801).toEqual problem.answer()
+    expect(problem.answer()).toEqual 45801

   xit 'subtract', ->
     problem = new WordProblem('What is 4 minus -12?')
-    expect(16).toEqual problem.answer()
+    expect(problem.answer()).toEqual 16

   xit 'multiply', ->
     problem = new WordProblem('What is -3 multiplied by 25?')
-    expect(-75).toEqual problem.answer()
+    expect(problem.answer()).toEqual -75

   xit 'divide', ->
     problem = new WordProblem('What is 33 divided by -3?')
-    expect(-11).toEqual problem.answer()
+    expect(problem.answer()).toEqual -11

   xit 'add twice', ->
     problem = new WordProblem('What is 1 plus 1 plus 1?')
-    expect(3).toEqual problem.answer()
+    expect(problem.answer()).toEqual 3

   xit 'add then subtract', ->
     problem = new WordProblem('What is 1 plus 5 minus -2?')
-    expect(8).toEqual problem.answer()
+    expect(problem.answer()).toEqual 8

   xit 'subtract twice', ->
     problem = new WordProblem('What is 20 minus 4 minus 13?')
-    expect(3).toEqual problem.answer()
+    expect(problem.answer()).toEqual 3

   xit 'subtract then add', ->
     problem = new WordProblem('What is 17 minus 6 plus 3?')
-    expect(14).toEqual problem.answer()
+    expect(problem.answer()).toEqual 14

   xit 'multiply twice', ->
     problem = new WordProblem('What is 2 multiplied by -2 multiplied by 3?')
-    expect(-12).toEqual problem.answer()
+    expect(problem.answer()).toEqual -12

   xit 'add then multiply', ->
     problem = new WordProblem('What is -3 plus 7 multiplied by -2?')
-    expect(-8).toEqual problem.answer()
+    expect(problem.answer()).toEqual -8

   xit 'divide twice', ->
     problem = new WordProblem('What is -12 divided by 2 divided by -3?')
-    expect(2).toEqual problem.answer()
+    expect(problem.answer()).toEqual 2

   xit 'too advanced', ->
     problem = new WordProblem('What is 53 cubed?')
@@ -65,4 +65,3 @@
   xit 'irrelevant', ->
     problem = new WordProblem('Who is the president of the United States?')
     expect(-> problem.answer()).toThrow(problem.ERROR.tooComplicated)
-


Refactoring JS tests and fixing issues with WebDriverElementsHelper.coffee

--- iterationplanningboard/IterationPlanningBoardBacklogColumnSpec.coffee
+++ iterationplanningboard/IterationPlanningBoardBacklogColumnSpec.coffee
@@ -82,7 +82,7 @@
     refreshStub = @stub(@column, 'refresh')

     @enterSearchText(searchText).then =>
-      @driver.findElement(By.css '.search-button').click().then =>
+      @click(className: 'search-button').then =>
         @assertSearch(refreshStub, searchText)

   it 'should clear search filter on enter in empty search box', ->
@@ -125,9 +125,7 @@
       expect(filter[0].value).toBeNull()

     enterSearchText: (text) ->
-      el = @driver.findElement(By.css '.search-text input')
-      el.click().then =>
-        el.sendKeys(text)
+      @click(css: '.search-text input').sendKeys text

     assertSearch: (refreshStub, searchText) ->
       sinon.assert.calledOnce(refreshStub)


activity: deprecate not used variable declaration

--- client/Social/Activity/views/comments/listviewcontroller.coffee
+++ client/Social/Activity/views/comments/listviewcontroller.coffee
@@ -11,7 +11,7 @@

     super options, data

-    {delegate} = options
+

   instantiateListItems: (items) ->


MachineSettingsDomainsView: Don't do anything if domain input is empty.

--- client/app/lib/providers/machinesettingsdomainsview.coffee
+++ client/app/lib/providers/machinesettingsdomainsview.coffee
@@ -58,13 +58,14 @@

   handleAddNew: ->

-    return  if @isInProgress
-
-    { computeController } = kd.singletons
-
-    value     = @addInputView.getValue().trim()
-    domain    = "#{htmlencode.XSSEncode value}#{@domainSuffix}"
-    machineId = @machine._id
+    domainName = @addInputView.getValue().trim()
+    machineId  = @machine._id
+    { computeController } = kd.singletons
+
+    return no  if @isInProgress
+    return @addNewButton.hideLoader()  if domainName is ''
+
+    domain = "#{htmlencode.XSSEncode domainName}#{@domainSuffix}"

     if @listController.getItemCount() >= 5
       warning = "It's not allowed to create more than 5 domains."


MachineSettings: make always on toggle visible for teams as well since we have the functionality now

--- client/app/lib/providers/machinesettingsgeneralview.coffee
+++ client/app/lib/providers/machinesettingsgeneralview.coffee
@@ -162,7 +162,7 @@
           label         : 'Keep VM always on'
           defaultValue  : @machine.alwaysOn
           itemClass     : KodingSwitch
-          cssClass      : if isManaged or not isKoding() then 'statustoggle hidden' else 'statustoggle'
+          cssClass      : if isManaged then 'statustoggle hidden' else 'statustoggle'
           disabled      : @machine.isPermanent()
           callback      : @bound 'handleAlwaysOnStateChanged'
         nickname        :


added changes to github instead of gitlab.. this time

--- scripts/repo-event-notifier/github/src/event-actions/all.coffee
+++ scripts/repo-event-notifier/github/src/event-actions/all.coffee
@@ -174,7 +174,7 @@
 			when "unlabeled"
 				msg += " #{sender.login} removed label: \"#{data.label.name}\" "
 			when "synchronize"
-				msg +=" synchronized by #{sender.login} "
+				msg +=" synchornized by #{sender.login} "

 		callback msg + "- #{pull_req.html_url}"

@@ -185,7 +185,7 @@
 		repo = data.repository
 		pusher = data.pusher

-		if data.created
+		if !data.deleted
 			callback "New Commit \"#{head_commit.message}\" to #{repo.full_name} by #{pusher.name}: #{head_commit.url}"

 	# Org level event
@@ -216,4 +216,4 @@
 		repo = data.repository
 		sender = data.sender

-		callback "#{repo.name} is now being watched by #{sender.login}"
+		callback "#{repo.full_name} is now being watched by #{sender.login} on GitHub"


auto save draft when the blur event is triggered

--- app/assets/javascripts/auto_save_draft.js.coffee
+++ app/assets/javascripts/auto_save_draft.js.coffee
@@ -1,4 +1,9 @@
 interval_id = 0
+
+save_draft_item = ->
+  key = $(this).attr('draft-key')
+  localStorage.setItem(key, $(this).val()) if key != '' and $(this).val() != ''
+  localStorage.removeItem(key) if $(this).val() == ''

 $(document).on 'page:change', ->
   if $('.need-save-draft').length
@@ -8,14 +13,6 @@

     $('.need-save-draft').each ->
       $(this).val(localStorage.getItem($(this).attr('draft-key')))
-
-    save_draft_item = ->
-      key = $(this).attr('draft-key')
-      localStorage.setItem(key, $(this).val()) if key != '' and $(this).val() != ''
-      localStorage.removeItem(key) if $(this).val() == ''
-
-    $('.need-save-draft').each ->
-      $(this).blur(save_draft_item)

     save_draft_func = ->
       if interval_id
@@ -29,3 +26,6 @@
   interval_id = 0
   $(this).parents('form').find('.need-save-draft').each ->
     localStorage.removeItem($(this).attr('draft-key'))
+
+$(document).on 'blur', '.need-save-draft', ->
+  $(this).blur(save_draft_item)


fix: revert to old create method and push object

--- app/components/create-team.coffee
+++ app/components/create-team.coffee
@@ -16,19 +16,19 @@
       teamName = @get "teamName"
       for inputValue in [teamName]
         return @get("notify").error "Please enter the team name" if isEmpty inputValue
-      team = @get('store').createRecord('team', { name: teamName})
       that = @
-      team.save()
-      .then ()->
+      data =
+        name: teamName
+      team = @get "team"
+      @get("ajax").post ENV.endpoints.teams, data: data
+      .then (data)->
+        that.store.pushPayload data
         that.get("notify").success "Team Created Successfully"
         that.set "teamName", ""
         that.set "showTeamModal", false
       .catch (error) ->
-        team.destroyRecord()
+        that.get("notify").error error.payload.error
         for error in error.errors
-          debugger
-          if error.status is "412"
-            that.get("notify").error "Team already exists"
           that.get("notify").error error.detail?.message


Pass className down to SVG icons

Pass className down to SVG icons

--- app/components/cropped-image.cjsx
+++ app/components/cropped-image.cjsx
@@ -40,7 +40,13 @@
     x = (@state.naturalWidth - width) / 2
     y = (@state.naturalHeight - height) / 2

-    <svg viewBox="#{x} #{y} #{width} #{height}" src={@props.src} width={@props.width} height={@props.height}>
+    <svg
+      viewBox="#{x} #{y} #{width} #{height}"
+      src={@props.src}
+      width={@props.width}
+      height={@props.height}
+      className={@props.className}
+      >
       <image ref="image" x="0" y="0" />
     </svg>


Video avatar ops has been removed from chat pane

--- client/ide/lib/views/chat/idechatmessagepane.coffee
+++ client/ide/lib/views/chat/idechatmessagepane.coffee
@@ -79,28 +79,21 @@

   setActiveParticipantAvatar: (account) ->

-    for own id, avatar of @participantMap
-      if id is account._id
-      then avatar.setClass 'is-activeParticipant'
-      else avatar.unsetClass 'is-activeParticipant'
+    @participantsModel.addVideoActiveParticipant account.profile.nickname

   setSelectedParticipantAvatar: (account) ->

-    for own id, avatar of @participantMap
-      # if account is null all avatars will receive `unsetClass` calls.
-      # `null` account means: "SELECT NO ONE!"
-      if id is account?._id
-      then avatar.setClass 'is-selectedParticipant'
-      else avatar.unsetClass 'is-selectedParticipant'
+    participant = account?.profile.nickname or null
+
+    @participantsModel.setVideoSelectedParticipant participant

   setAvatarTalkingState: (nickname, state) ->

-    for _, avatar of @participantMap when avatar.data.profile.nickname is nickname
-      if state
-      then avatar.setClass 'is-talkingParticipant'
-      else avatar.unsetClass 'is-talkingParticipant'
+    if state
+    then @participantsModel.addTalkingParticipant nickname
+    else @participantsModel.removeTalkingParticipant nickname

   glance: ->
@@ -156,7 +149,7 @@

     else

-      @newParticipantButton.destroy()
+      @participantHeads.newParticipantButton.destroy()

   handleOnboardingViewClick: (e) ->


Fix repost visibility: mentions.i.entity defaults to params.entity

fixes cupcake/bugs#33

--- lib/assets/javascripts/views/repost_visibility.js.coffee
+++ lib/assets/javascripts/views/repost_visibility.js.coffee
@@ -49,7 +49,7 @@
           if !profile && _profile_attrs = res.profiles[mention.entity]
             profile = new TentStatus.Models.MetaProfile(_profile_attrs)

-          @reposter_profile_cids[mention.entity] = profile?.cid
+          @reposter_profile_cids[mention.entity || params.entity] = profile?.cid

         @render() if Object.keys(@reposter_profile_cids).length


fix: delete member

fix: delete member

--- app/components/team-member.coffee
+++ app/components/team-member.coffee
@@ -3,26 +3,21 @@

 TeamMemberComponent = Ember.Component.extend
   team: null
-  user: null
   tagName: ["tr"]

   actions:

     removeMember: ->
-      teamMember = @get "user.username"
-
+      teamMember = @get "member"
       deletedMember = prompt "Enter the username which you want to delete ", ""
       if deletedMember is null
         return
       else if deletedMember isnt teamMember
         return @get("notify").error "Enter the right username to delete it"
       teamId = @get "team.id"
-      memberId = @get "user.id"
-      url = [ENV.endpoints.teams, teamId, ENV.endpoints.members, memberId].join '/'
+      url = [ENV.endpoints.teams, teamId, ENV.endpoints.members, teamMember].join '/'
       that = @
-      data =
-        identification: teamMember
-      @get("ajax").delete url, data: data
+      @get("ajax").delete url
       .then (data)->
         that.get("notify").success "Team member #{teamMember} will be deleted shortly"
       .catch (error) ->


Another typo

Another typo

--- app/assets/javascripts/main.coffee
+++ app/assets/javascripts/main.coffee
@@ -285,7 +285,7 @@
                         j.confirmed_location = true
                         setPinProp = true
                 if setPinProp
-                    j.needToCreatePin = true
+                    k.needToCreatePin = true
             self._infoWindow.close()
             self._createMarkersForBusinesses()


fixiing voting spam

fixiing voting spam

--- app/assets/javascripts/poll.coffee
+++ app/assets/javascripts/poll.coffee
@@ -14,6 +14,7 @@
         highlight: '#fdb45c'
     ]
     @setupChart(poll)
+    @voting = false

   initBindings: ->
     $('.option').on 'click', (event) =>
@@ -42,6 +43,8 @@
   vote: (optionId) ->
     $('.notice').remove()
     return @addError('You have to log in to vote, dawg.') unless $('.current-user').length > 0
+    return false if @voting
+    @voting = true
     Q( $.post "/polls/#{@id}/options/#{optionId}/vote")
     .then(
       (poll) =>
@@ -49,7 +52,7 @@
         $(".option[data-id=#{optionId}]").addClass('voted')
       ,
       (jqXHR, status, errorThrown) => @addError(jqXHR.responseJSON.error)
-    ).done()
+    ).done( => @voting = false )

   addError: (error) ->
     $('<div>')


handle a mouseup which occurs outside of the browser window

--- app/assets/javascripts/states/monitoring/helpers/pan_sync.js.coffee
+++ app/assets/javascripts/states/monitoring/helpers/pan_sync.js.coffee
@@ -18,7 +18,7 @@
   # @param [Hash] context               for holding special state flags
   setup_document_handlers: (graphs, context) ->
     $(document).on "mouseup", (e) ->
-      return if !context._last_click? || e.target.tagName.toUpperCase() == "CANVAS"
+      return if !context._last_click? || (e.target.tagName && e.target.tagName.toUpperCase() == "CANVAS")
       g = context._last_click
       g._bixby_pan_complete() if g?