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 ApplicationController < ActionController::Base | |
before_filter :ensure_proper_protocol | |
protected | |
def ssl_allowed_action? | |
(params[:controller] == 'users/sessions' && ['new', 'create'].include?(params[:action])) || | |
(params[:controller] == 'users/registrations' && ['new', 'create', 'edit', 'update'].include?(params[:action])) || | |
(params[:controller] == 'users/omniauth_callbacks') | |
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
84091/0x9c28d: 29323312 20 7 mmap(0x0, 0x82000, 0x3, 0x1002, 0x3000000, 0x100000001) = 0x7760000 0 | |
libSystem.B.dylib`__mmap+0xa | |
libSystem.B.dylib`large_malloc+0x471 | |
libSystem.B.dylib`szone_malloc_should_clear+0xd3e | |
libSystem.B.dylib`szone_realloc+0x844 | |
libSystem.B.dylib`malloc_zone_realloc+0x5c | |
libSystem.B.dylib`realloc+0xa9 | |
ruby`ruby_xrealloc+0x86 | |
ruby`str_buf_cat+0xcf |
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
[andrey-mbp ~/projects/rails/alt12-site rails3]$ rails s | |
WARNING: Nokogiri was built against LibXML version 2.7.7, but has dynamically loaded 2.7.3 | |
=> Booting Mongrel | |
=> Rails 3.1.0.rc2 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
Exiting | |
/Users/akhkharu/.rvm/gems/ruby-1.9.2-head@alt12/gems/actionpack-3.1.0.rc2/lib/action_dispatch/testing/assertions.rb:14:in `<module:Assertions>': uninitialized constant ActionDispatch::Assertions::SelectorAssertions (NameError) | |
from /Users/akhkharu/.rvm/gems/ruby-1.9.2-head@alt12/gems/actionpack-3.1.0.rc2/lib/action_dispatch/testing/assertions.rb:2:in `<module:ActionDispatch>' | |
from /Users/akhkharu/.rvm/gems/ruby-1.9.2-head@alt12/gems/actionpack-3.1.0.rc2/lib/action_dispatch/testing/assertions.rb:1:in `<top (required)>' |
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
[andrey-mbp ~/projects/rails/alt12-site rails3]$ rake ts:config --trace | |
WARNING: Nokogiri was built against LibXML version 2.7.7, but has dynamically loaded 2.7.3 | |
** Invoke ts:config (first_time) | |
** Invoke thinking_sphinx:configure (first_time) | |
** Invoke thinking_sphinx:app_env (first_time) | |
** Execute thinking_sphinx:app_env | |
** Execute thinking_sphinx:configure | |
Generating Configuration to /Users/akhkharu/projects/rails/alt12-site/config/development.sphinx.conf | |
rake aborted! | |
Association named 'applications_forums' was not found; perhaps you misspelled it? |
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
# Configure whenever | |
set :whenever_environment, rails_env | |
set :whenever_output, '/var/www/apps/alt12/current/log/crontab.log' | |
set :whenever_update_flags, "--update-crontab #{whenever_identifier} --set environment=#{whenever_environment}\\&output=#{whenever_output}" # notice the escaping \& passed to the shell |
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
# jobs deletion has been permanently disabled by Zencoder | |
Zencoder::Job.list.body.map {|j| Zencoder::Job.cancel(j['job']['id'].to_i)} |
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 mongo=(server) | |
case server | |
when String | |
host, port = server.split(':') | |
@con = Mongo::Connection.new(host, port) | |
@db = @con.db('monque') | |
@mongo = @db.collection('monque') | |
@workers = @db.collection('workers') | |
@failures = @db.collection('failures') | |
@stats = @db.collection('stats') |
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
IndieAisle::Application.routes.draw do | |
resource :cart do | |
member do | |
put 'add_subscription' | |
put 'remove_subscription' | |
get 'leave' | |
end | |
end | |
resource :order | |
match '/checkout' => 'orders#checkout' |
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
add_subscription_cart PUT /cart/add_subscription(.:format) {:controller=>"carts", :action=>"add_subscription"} | |
remove_subscription_cart PUT /cart/remove_subscription(.:format) {:controller=>"carts", :action=>"remove_subscription"} | |
leave_cart GET /cart/leave(.:format) {:controller=>"carts", :action=>"leave"} | |
cart POST /cart(.:format) {:controller=>"carts", :action=>"create"} | |
new_cart GET /cart/new(.:format) {:controller=>"carts", :action=>"new"} | |
edit_cart GET /cart/edit(.:format) {:controller=>"carts", :action=>"edit"} | |
cart GET /cart(.:format) {:controller=>"carts", :action=>"show"} | |
cart PUT /cart(.:format) |