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/env ruby | |
require 'logger' | |
$LOAD_PATH.unshift ::File.expand_path(::File.dirname(__FILE__) + '/lib') | |
require 'resque/server' | |
# Set the RESQUECONFIG env variable if you've a `resque.rb` or similar | |
# config file you want loaded on boot. | |
if ENV['RESQUECONFIG'] && ::File.exists?(::File.expand_path(ENV['RESQUECONFIG'])) | |
load ::File.expand_path(ENV['RESQUECONFIG']) |
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
worker_processes 2 | |
working_directory "/u/apps/www.etagwerker.com/current/config/resque-web" | |
listen "/tmp/resque.etagwerker.com.sock", :backlog => 64 | |
listen 9292, :tcp_nopush => true | |
timeout 15 | |
user 'deployer', 'deployer' | |
shared_path = "/u/apps/www.etagwerker.com/shared" |
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
upstream resqueweb { | |
server unix:/tmp/resque.etagwerker.com.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name resque.etagwerker.com; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; |
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
ActionController::Base.asset_host = Proc.new { |source, request| | |
if request.env["REQUEST_PATH"] && request.env["REQUEST_PATH"].include?(".pdf") | |
"file://#{Rails.root.join('public')}" | |
else | |
"#{request.protocol}#{request.host_with_port}" | |
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
find features/*.feature -type f -print0 | xargs -0 sed -i -f 's/And I press "Actualizar"/And I press "Guardar"/g' |
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
[etagwerker@gesell censo2010]$ gem list | |
*** LOCAL GEMS *** | |
addressable (2.2.6) | |
archive-tar-minitar (0.5.2) | |
bcrypt-ruby (2.1.4) | |
capybara (0.4.1.2) | |
celerity (0.8.9) | |
childprocess (0.1.9) |
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
class Category < ActiveRecord::Base | |
include Liquid::Category | |
extend FriendlyId | |
friendly_id :name, :use => :slugged, :slug_column => 'permalink',:slug_generator_class => CategorySlugGenerator | |
acts_as_nested_set :dependent => :destroy | |
... |
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
1) Error: | |
test: A multipage PDF being thumbnailed at 100x100 with cropping should create the thumbnail when sent #make. (ThumbnailTest): | |
Paperclip::NotIdentifiedByImageMagickError: /Users/etagwerker/Projects/paperclip/test/fixtures/twopage.pdf is not recognized by the 'identify' command. | |
/Users/etagwerker/Projects/paperclip/lib/paperclip/geometry.rb:29:in `from_file' | |
/Users/etagwerker/Projects/paperclip/lib/paperclip/thumbnail.rb:35:in `initialize' | |
/Users/etagwerker/Projects/paperclip/test/thumbnail_test.rb:290:in `new' | |
/Users/etagwerker/Projects/paperclip/test/thumbnail_test.rb:290:in `block (3 levels) in <class:ThumbnailTest>' | |
/Users/etagwerker/.rvm/gems/ruby-1.9.2-p290@paperclip/gems/shoulda-2.11.3/lib/shoulda/context.rb:400:in `call' | |
/Users/etagwerker/.rvm/gems/ruby-1.9.2-p290@paperclip/gems/shoulda-2.11.3/lib/shoulda/context.rb:400:in `block in run_current_setup_blocks' | |
/Users/etagwerker/.rvm/gems/ruby-1.9.2-p290@paperclip/gems/shoulda-2.11.3/lib/shoulda/context.rb:399:in `ea |
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
Failing Scenarios: | |
cucumber features/basic_integration.feature:11 # Scenario: Filesystem integration test | |
cucumber features/rake_tasks.feature:14 # Scenario: Paperclip refresh thumbnails task | |
Because of this: | |
Feature: Rake tasks | |
Background: # features/rake_tasks.feature:3 | |
Given I generate a new rails application # features/step_definitions/rails_steps.rb:1 |
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
# I'd like an in-memory database to do this | |
ISO4217.create(:code => 'BBD', :num => '052', :separator_digits => '2', :currency => 'Barbados dollar', :locations => ['Barbados']) | |
ISO4217.find(:locations => 'Barbados') | |
=> #<ISO4217:0x007ff62a989b80 @code="BBD" @currency="Barbados dollar"> | |