This file contains 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
Index: vendor/gems/delayed_job-1.8.4/lib/delayed/command.rb | |
=================================================================== | |
--- vendor/gems/delayed_job-1.8.4/lib/delayed/command.rb (revision 162) | |
+++ vendor/gems/delayed_job-1.8.4/lib/delayed/command.rb (working copy) | |
@@ -54,7 +54,7 @@ | |
# Re-open file handles | |
@files_to_reopen.each do |file| | |
begin | |
- file.reopen File.join(RAILS_ROOT, 'log', 'delayed_job.log'), 'w+' | |
+ file.reopen File.join(RAILS_ROOT, 'log', 'delayed_job.log'), 'a' |
This file contains 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
index 3207690..3ce624e 100644 | |
--- a/lib/railroad/rails_framework.rb | |
+++ b/lib/railroad/rails_framework.rb | |
@@ -10,6 +10,10 @@ class RailsFramework | |
require "config/environment" | |
@name = 'Rails' | |
@migration_version = ActiveRecord::Migrator.current_version | |
+ | |
+ ActiveSupport::Inflector.inflections do |inflect| | |
+ inflect.singular(/ess$/i, 'ess') |
This file contains 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 | |
# | |
# I deliberately didn't DRY /usr/local references into a variable as this | |
# script will not "just work" if you change the destination directory. However | |
# please feel free to fork it and make that possible. | |
# | |
# If you do fork ensure you add a comment here that explains what the changes | |
# are intended to do and how well you tested them. | |
# |
This file contains 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
before_filter :only => [:create, :update, :destroy] do |c| | |
c.send :my_method, :arg | |
end |
This file contains 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 case you have multiple versions on your box | |
rake rails:freeze:gems VERSION=2.3.2 |
This file contains 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
[root@localhost ~]# cat /etc/redhat-release | |
Fedora release 11 (Leonidas) | |
[root@localhost ~]# passwd -S root | |
root PS 2010-08-13 0 99999 7 -1 (Password set, MD5 crypt.) | |
[root@localhost ~]# echo $? | |
0 | |
[root@localhost ~]# | |
This file contains 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
begin | |
res = @http.request(req) | |
unless res.kind_of?(Net::HTTPSuccess) | |
res.error! | |
end | |
rescue Timeout::Error, Errno::EINVAL, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::ETIMEDOUT, NoMethodError => e | |
# http://redmine.ruby-lang.org/issues/show/2708 | |
# http://redmine.ruby-lang.org/issues/show/2758 | |
if e.to_s =~ /#{Regexp.escape(%q|undefined method 'closed?' for nil:NilClass|)}/ | |
Chef::Log.fatal("POST to Solr encountered exception Errno::ECONNREFUSED: net/http undefined method closed?") |
This file contains 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
top_dir = "/data/realtime" | |
["", "fetched", "fetched/radar"].each do d | |
directory "#{top_dir}/#{d}" | |
action :create | |
owner "ldm" | |
group "ldm" | |
mode "777" | |
recursive true | |
end | |
end |
This file contains 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 with_gem_sources(*sources) | |
sources.compact! | |
original_sources = Gem.sources | |
# Gem.sources = sources unless sources.empty? | |
unless sources.empty? | |
if Gem.respond_to?(:sources=) | |
Gem.sources = sources | |
else | |
Gem.instance_variable_set(:@sources, sources) | |
end |
This file contains 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
[["rubygems-updateU:Gem::Version[" | |
1.3.6" ruby |
OlderNewer