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
@auto_generated_files = [ | |
"xsl/fo.xml" | |
] | |
watch("(.*.[xml|xsl])") {|m| rebuild(m[1]) unless @auto_generated_files.include?(m[1]) } | |
def rebuild(file_change) | |
puts "[watchr] Rebuilding because #{file_change} changed" | |
system("rake") | |
puts "[watchr] Waiting for changes" |
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 "bundler/capistrano" | |
set :application, "chiliproject" | |
set :repository, "[email protected]" | |
set :scm, :git | |
set :git_enable_submodules,1 | |
# fast_remote_cache is better but requires a plugin | |
set :deploy_via, :remote_cache | |
# set :deploy_via, :fast_remote_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
def validate_status_changes | |
return if changes.keys == ["status"] | |
return if changes["status"].present? && changes["status"].second == "open" | |
return if changes["status"].present? && changes["status"].first == "open" | |
errors.add_to_base(:cant_update_locked_deliverable) if locked? | |
errors.add_to_base(:cant_update_closed_deliverable) if closed? | |
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
#!/usr/bin/env ruby | |
system ARGV.join(' ') |
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
# Append the user's .railsrc.rb to the load modules, that way it's loaded | |
# after the rails ENV and everything else... | |
if $0 == 'irb' && ENV['RAILS_ENV'] | |
IRB.conf[:LOAD_MODULES] << File.dirname(__FILE__) + '/.railsrc' # ~/.railsrc.rb, requires .rb | |
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
desc "Send a test email to the user with the provided login name" | |
task :test, :login, :needs => :environment do |task, args| | |
# uses args[:login] | |
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
diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb | |
index 12e7707..8326310 100644 | |
--- a/app/models/mail_handler.rb | |
+++ b/app/models/mail_handler.rb | |
@@ -339,8 +339,16 @@ class MailHandler < ActionMailer::Base | |
user.lastname = '-' if user.lastname.blank? | |
user.login = user.mail | |
- user.password = ActiveSupport::SecureRandom.hex(5) | |
+ password = ActiveSupport::SecureRandom.hex(5) |
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
<?xml version="1.0" encoding="UTF-8"?><issues type="array" limit="25" total_count="678" offset="0"><issue><id>1000</id><project name="Optimized modular data-warehou" id="2"/><tracker name="Bug" id="1"/><status name="New" id="1"/><priority name="Normal" id="4"/><author name="Tony Stark" id="24"/><assigned_to name="Minerva Zieme" id="16"/><parent id="834"/><subject>Grass-roots leading edge utilisation</subject><description>Maybe tomorrow I'll want to settle down - until tomorrow I'll just keep moving on. Ulysses, fighting evil and tyranny with all his power and with all of his might. Rolling down to Dallas - who is providin' my palace?. | |
Every stop I make I make a new friend; Can't stay for long just turn around and I'm gone again. Hong Kong Phooey number one super guy, Hong Kong Phooey quicker than the human eye. I've gotten burned over Cheryl Tiegs and blown up for Raquel Welch, but when I end up in the hay it's only hay, hey hey. Every stop I make I make a new friend; Can't stay for long just turn around |
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 ActionController | |
module RequestForgeryProtection | |
def verify_authenticity_token | |
verified_request? || handle_unverified_request | |
end | |
def handle_unverified_request | |
reset_session | |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'active_support' | |
(3..6).each do |b| | |
puts ActiveSupport::SecureRandom.hex(b) | |
end |