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
From 81489f460de836707689f235e27364e05a191f9f Mon Sep 17 00:00:00 2001 | |
From: Santiago Pastorino <[email protected]> | |
Date: Thu, 9 Jan 2014 12:24:58 -0200 | |
Subject: [PATCH] Use ActiveModel::Serializers 0.9.0.alpha1 | |
--- | |
Gemfile | 2 +- | |
Gemfile_rails4.lock | 6 +++--- | |
app/models/discourse_version_check.rb | 4 +++- | |
app/serializers/application_serializer.rb | 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
~ curl -s https://gist.github.com/lmarburger/6537333/raw/time.sh | bash | |
== Fastly == | |
DNS: 0.520 CONNECT: 0.695 REQSENT: 2.299 STARTTX: 4.560 TOTAL: 7.163 | |
X-Served-By: cache-v44-ASH | |
X-Cache: MISS | |
DNS: 0.001 CONNECT: 0.184 REQSENT: 0.571 STARTTX: 2.878 TOTAL: 5.633 | |
X-Served-By: cache-v36-ASH, cache-ny57-NYC | |
X-Cache: MISS, MISS |
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
require 'formula' | |
class Kindlegen < Formula | |
url 'http://kindlegen.s3.amazonaws.com/KindleGen_Mac_i386_v2_9.zip' | |
homepage 'http://www.amazon.com/gp/feature.html?docId=1000234621' | |
sha1 '851064ef18687edaf93abd781f9711a2cb293f7d' | |
version '2.9' | |
skip_clean 'bin' |
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
require 'formula' | |
class Kindlegen < Formula | |
url 'http://s3.amazonaws.com/kindlegen/KindleGen_Mac_i386_v2_8.zip' | |
homepage 'http://www.amazon.com/gp/feature.html?docId=1000234621' | |
sha1 '08207c7a283d9956a040d87e793f3c00ce66555f' | |
version '2.8' | |
skip_clean 'bin' |
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
require 'formula' | |
class Vim < Formula | |
homepage 'http://www.vim.org/' | |
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2' | |
head 'https://vim.googlecode.com/hg/' | |
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d' | |
version '7.3.591' | |
def features; %w(tiny small normal big huge) 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
require 'action_controller/railtie' | |
class HelloController < ActionController::Metal | |
def world | |
self.response_body = 'Hello World!' | |
end | |
end | |
Rack::Handler::WEBrick.run HelloController.action(:world), :Port => 3000 |
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
require 'action_controller/railtie' | |
module Myapp | |
class Application < Rails::Application | |
config.secret_token = 'd38ad04f101b78570a76ecd1d4664e2b' | |
routes.append do | |
get '/' => 'myapp/hello#world' | |
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
diff --git a/test/context_test.rb b/test/context_test.rb | |
index 36e7022..aefe2b9 100644 | |
--- a/test/context_test.rb | |
+++ b/test/context_test.rb | |
@@ -913,4 +913,19 @@ describe 'Rack::Cache::Context' do | |
response.body.should.equal 'Hello World' | |
cache.trace.should.include :pass | |
end | |
+ | |
+ it 'logs to rack.logger if available' do |
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
require 'thread' | |
mutex = Mutex.new | |
i = 0 | |
t1 = Thread.new do | |
1_000_000.times do | |
mutex.synchronize do | |
i += 1 | |
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
➜ dist gem install * | |
Successfully installed activesupport-3.1.0 | |
Successfully installed activemodel-3.1.0 | |
Successfully installed actionpack-3.1.0 | |
Successfully installed actionmailer-3.1.0 | |
Successfully installed actionpack-3.1.0 | |
Successfully installed activemodel-3.1.0 | |
Successfully installed activerecord-3.1.0 | |
Successfully installed activeresource-3.1.0 | |
Successfully installed activesupport-3.1.0 |