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 'date' | |
| class Month | |
| attr_accessor :year, :month | |
| def initialize(year, month) | |
| self.year = year | |
| self.month = month | |
| 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
| cache |
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
| module AuthenticationMatcher | |
| class RequireAuthentication | |
| def initialize(method, action, params, context) | |
| @method = method | |
| @action = action | |
| @params = params | |
| @context = context | |
| end | |
| def matches?(controller) |
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
| ENV["WATCHR"] = "1" | |
| system 'clear' | |
| def growl(message) | |
| growlnotify = `which growlnotify`.chomp | |
| title = "Watchr Test Results" | |
| message.gsub! /\[[0-9]+?m/, '' | |
| image = message.include?('0 failures, 0 errors') ? "~/.watchr_images/pass.png" : "~/.watchr_images/fail.png" | |
| options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'" | |
| system %(#{growlnotify} #{options} &) |