MessagePack for Ruby の新版をリリースしました!
- さらなる高速化
- APIの追加
- 新しいAPIリファレンス
すべてのコードをゼロから再設計し、 シリアライズの大幅な高速化 を達成しました。 ruby-serializers を使って過去のバージョン(v4)と比較したところ、Twitter, 画像, 整数列, 地理データ, 3Dモデル のすべてのデータセットで高速化しました。
MessagePack for Ruby の新版をリリースしました!
すべてのコードをゼロから再設計し、 シリアライズの大幅な高速化 を達成しました。 ruby-serializers を使って過去のバージョン(v4)と比較したところ、Twitter, 画像, 整数列, 地理データ, 3Dモデル のすべてのデータセットで高速化しました。
class Color | |
@regex: /(?:#([0-9a-f]{3,6})|rgba?\(([^)]+)\))/i | |
@fromHex: (hex) -> | |
if hex[0] is '#' | |
hex = hex.substring(1, 7) | |
if hex.length is 3 | |
hex = hex.charAt(0) + hex.charAt(0) + | |
hex.charAt(1) + hex.charAt(1) + |
--colour | |
-I app |
module History | |
module Shell | |
def zsh_history_file | |
@zsh_history_file ||= File.expand_path('~/.zsh_history') | |
end | |
def zsh_history | |
@zsh_history ||= File.read(zsh_history_file) | |
end |
# Requirements: | |
# https://github.com/vigetlabs/capistrano_rsync_with_remote_cache | |
# https://github.com/ndbroadbent/turbo-sprockets-rails3 | |
require 'capistrano/recipes/deploy/strategy/rsync_with_remote_cache' | |
Capistrano::Deploy::Strategy::RsyncWithRemoteCache.class_eval do | |
def deploy! | |
update_local_cache | |
prepare_assets | |
update_remote_cache | |
finalize_assets |
# do not shallow_clone from Git repo | |
namespace :deploy do | |
namespace :assets do | |
# perform precompile only when any of the asset files has changed since the last deploy | |
task :precompile, :roles => :web, :except => {:no_release => true} do | |
from = source.next_revision(current_revision) | |
asset_changing_files = ['vendor/assets/', 'app/assets/', 'lib/assets', 'Gemfile', 'Gemfile.lock'].select {|f| File.exists? f} | |
if capture("cd #{latest_release} && #{source.local.log(from)} #{asset_changing_files.join(' ')} | wc -l").to_i > 0 |
class ApplicationController < ActionController::Base | |
# see also: http://stackoverflow.com/questions/2385799/how-to-redirect-to-a-404-in-rails | |
def not_found! | |
raise ActionController::RoutingError.new('Not Found') | |
end | |
end |