NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
| # blog post: http://blog.slashpoundbang.com/post/2613268281/changing-from-tz-database-identifiers-to-rails-friendly | |
| { | |
| "Australia/Adelaide" => "Adelaide", | |
| "Australia/Broken_Hill" => "Adelaide", | |
| "America/Anchorage" => "Alaska", | |
| "America/Juneau" => "Alaska", | |
| "America/Nome" => "Alaska", | |
| "America/Yakutat" => "Alaska", | |
| "Pacific/Gambier" => "Alaska", | |
| "Asia/Almaty" => "Almaty", |
| # in spec/support/omniauth_macros.rb | |
| module OmniauthMacros | |
| def mock_auth_hash | |
| # The mock_auth configuration allows you to set per-provider (or default) | |
| # authentication hashes to return during integration testing. | |
| OmniAuth.config.mock_auth[:twitter] = { | |
| 'provider' => 'twitter', | |
| 'uid' => '123545', | |
| 'user_info' => { | |
| 'name' => 'mockuser', |
| package com.paddypower.financials.market.management.rest.logging; | |
| import java.io.BufferedReader; | |
| import java.io.ByteArrayInputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; | |
| import javax.servlet.Filter; | |
| import javax.servlet.FilterChain; |
| #Session controller provides a token | |
| #/controllers/api/sessions_controller.rb | |
| class Api::SessionsController < Devise::SessionsController | |
| before_filter :authenticate_user!, :except => [:create] | |
| before_filter :ensure_params_exist, :except => [:destroy] | |
| respond_to :json | |
| def create | |
| resource = User.find_for_database_authentication(:email => params[:user_login][:email]) | |
| return invalid_login_attempt unless resource |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
I struggled with with the jar MANIFEST file built with Gradle containing an empty Class-Path. I traced down the problem to the order of the dependencies and jar blocks in the build.gradle file:
Wrong (jar before dependencies):
jar {
manifest.attributes(| # Simple Recommendation Engine in Ruby | |
| # Visit: http://otobrglez.opalab.com | |
| # Author: Oto Brglez <[email protected]> | |
| class Book < Struct.new(:title) | |
| def words | |
| @words ||= self.title.gsub(/[a-zA-Z]{3,}/).map(&:downcase).uniq.sort | |
| end |
| .git | |
| .gitignore | |
| /doc | |
| .yardoc | |
| coverage | |
| jsdoc | |
| /tmp | |
| /log | |
| Dockerfile | |
| Dockerfile.prod |