-
新しいrakeタスク assets:clean はプリコンパイルされたアセットを削除する。
-
--skip-gemfile
や--skip-bundle
なしでの、アプリケーションとプラグインのソース生成は、bundle installを走らせる -
jdbc*アダプターにとってのデータベースタスクを修正した
-
jdbcpostgresqlにとってのテンプレート生成
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
net = require 'net' | |
sockets = [] | |
server = net.createServer (socket) -> | |
sockets.push socket | |
socket.on 'data', (d) -> | |
s.write d for s in sockets |
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
#!/bin/sh | |
# railsプロジェクト作成して移動する | |
rails new "$1" -T -J | |
cd "$1" | |
# Gemfileに必要なgemを追記する | |
cat << HERE >> Gemfile | |
gem 'jquery-rails' |
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
■事前準備 | |
# useradd -s /bin/false -d /usr/nginx nginx | |
# yum -y install libevent-devel pcre-devel zlib-devel openssl-devel | |
■インストール | |
# export NGINX=nginx-1.0.5 | |
# wget http://www.nginx.org/download/"$NGINX".tar.gz | |
# tar zxvf "$NGINX".tar.gz | |
# cd $NGINX |
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
jruby -J-verbose:gc -S irb |
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
#!/bin/sh | |
# railsプロジェクト作成して移動する | |
rails new "$1" -T | |
cd "$1" | |
# Gemfileに必要なgemを追記する | |
cat << HERE >> Gemfile | |
gem 'rails-backbone' |
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 * -type f -exec sed 's/[ \t]*$//' -i {} \; | |
from https://github.com/rails/rails/commit/b451de0d6de4df6bc66b274cec73b919f823d5ae#activesupport/lib/active_support/cache.rb |
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
ruby-1.9.2-p180 :019 > a = "x = 'a.\\'b.c' and y = 'b.d.e'" | |
=> "x = 'a.\\'b.c' and y = 'b.d.e'" | |
ruby-1.9.2-p180 :020 > a.gsub(/'([^'\\]|\\\\|\\')*?'/, "") | |
=> "x = and y = " |
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 . -name "*.rb" -print | xargs grep " and " | grep -v "# " | grep -v "_test.rb:" | |
./actionpack/lib/action_view/helpers/form_helper.rb: if object ||= @template.instance_variable_get("@#{Regexp.last_match.pre_match}") and object.respond_to?(:to_param) | |
./actionpack/lib/action_view/helpers/number_helper.rb: if significant and precision > 0 | |
./actionpack/lib/action_view/helpers/capture_helper.rb: if string = buffer.presence || value and string.is_a?(String) | |
./actionpack/lib/action_controller/caching/sweeping.rb: ActiveRecord::Base.observers << sweeper if defined?(ActiveRecord) and defined?(ActiveRecord::Base) | |
./actionpack/lib/action_controller/caching/sweeping.rb: if defined?(ActiveRecord) and defined?(ActiveRecord::Observer) | |
./actionpack/lib/action_controller/caching/actions.rb: path << ".#{extension}" if extension and !path.split('?').first.ends_with?(".#{extension}") | |
./actionpack/lib/action_controller/vendor/html-scanner/html/node.rb: (c.kind_of?(HTML:: |
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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
actionmailer (3.2.1) | |
actionpack (= 3.2.1) | |
mail (~> 2.4.0) | |
actionpack (3.2.1) | |
activemodel (= 3.2.1) | |
activesupport (= 3.2.1) | |
builder (~> 3.0.0) |
OlderNewer