This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git b/cucumber/feature-mode.el a/cucumber/feature-mode.el | |
index 06b5667..9f37685 100644 | |
--- b/cucumber/feature-mode.el | |
+++ a/cucumber/feature-mode.el | |
@@ -57,7 +57,7 @@ | |
(list | |
'("^ *Feature:" (0 font-lock-keyword-face) (".*" nil nil (0 font-lock-type-face t))) | |
'("^ *Background:$" (0 font-lock-keyword-face)) | |
- '("^ *Scenario\\(?: Outline\\)?:" (0 font-lock-keyword-face) (".*" nil nil (0 font-lock-function-name-face t))) | |
+ '("^ *Scenarios?\\(?: Outline\\)?:" (0 font-lock-keyword-face) (".*" nil nil (0 font-lock-function-name-face t))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; C-x c calls jslint and outputs to the *compilation* buffer. | |
(setq jslint-wrapper (concat "java -jar " (substitute-in-file-name "$HOME") "/bin/jslint4java-1.4.4.jar ")) | |
(require 'compile) | |
(add-hook 'javascript-mode-hook | |
(lambda () | |
(set (make-local-variable 'compilation-read-command) nil) | |
(set (make-local-variable 'compile-command) | |
(concat jslint-wrapper buffer-file-name)) | |
(local-set-key (kbd "C-x c") 'compile))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'action_view' | |
module ActionView | |
module Template::Handlers | |
class NokogiriBuilder | |
class_attribute :default_format | |
self.default_format = Mime::XML | |
def call(template) | |
require 'nokogiri' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put this file in lib/ | |
require 'sprockets/eco_template' | |
class CleanEcoTemplate < Sprockets::EcoTemplate | |
FROM = " (function() {" | |
TO = "}).call(__obj);" | |
def evaluate(scope, locals, &block) | |
content = Eco.compile(data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In Controller such as comments_controller.rb | |
observer :comment_observer, only: [:create, :destroy] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So the model object can bind the event "change:#{field} to trigger event when the field value is changed. | |
By default it's off and if need this feature, the model should extend Spine.Model.Dirty. | |
A sample case. | |
class User extends Spine.Model | |
@extend Spine.Model.Dirty | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Notifier | |
constructor: -> | |
@enableNotification = false | |
@checkOrRequirePermission() | |
hasSupport: -> | |
window.webkitNotifications? | |
requestPermission: (cb) -> | |
window.webkitNotifications.requestPermission (cb) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
├── app | |
│ ├── controllers | |
│ │ ├── center | |
│ │ │ ├── filter_controller.js.coffee | |
│ │ │ └── tickets_controller.js.coffee | |
│ │ ├── center_content_controller.coffee | |
│ │ ├── comments_controller.js.coffee | |
│ │ ├── header | |
│ │ │ └── project_nav_controller.js.coffee | |
│ │ ├── header_controller.coffee |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App.LeftIterationController extends Spine.Controller | |
el: '.sidebar #iterations' | |
elements: | |
'ul.list': 'list' | |
constructor: -> | |
super | |
App.Iteration.bind 'create', @addIteration | |
App.Iteration.bind 'refresh', @refreshIterations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App.TicketsController extends Spine.Controller | |
constructor: -> | |
super | |
@routes | |
"/tickets": @index | |
"/tickets/:id" : (params) -> | |
@show(params.id) | |
index: -> | |
tickets = App.Ticket.all() |
OlderNewer