// Place all the styles related to the tasks controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
table.tasks {
width: 560px;
margin: 5px auto;
background-color: #eee;
border-collapse: collapse;
border-spacing: 0;
tr {
border: solid 1px #ccc;
}
td {
padding: 5px;
}
col.name {
width: 320px;
}
col.due_date {
background-color: #ddd;
}
}
Started GET "/tasks" for 127.0.0.1 at 2011-08-09 14:10:51 +0900
Processing by TasksController#index as HTML
MONGODB hinagiku_development['tasks'].find({:done=>false})
Rendered tasks/index.html.erb within layouts/application (616.2ms)
Completed 200 OK in 678ms (Views: 677.1ms)
Started GET "/assets/application.css" for 127.0.0.1 at 2011-08-09 14:10:52 +0900
Compiled ~/develop/ruby/mongo_rails3_test/hinagiku/app/assets/stylesheets/tasks.css.scss (45ms) (pid 85886)
Compiled ~/develop/ruby/mongo_rails3_test/hinagiku/app/assets/stylesheets/application.css (1ms) (pid 85886)
Compiled ~/develop/ruby/mongo_rails3_test/hinagiku/app/assets/stylesheets/application.css (0ms) (pid 85886)
Served asset /application.css - 304 Not Modified (96ms)
Started GET "/assets/application.js" for 127.0.0.1 at 2011-08-09 14:10:52 +0900
Served asset /application.js - 304 Not Modified (19ms)
ここで、Compiledという文字があるとおり、コンパイルをしているということになります。
実際に出力されるCSSは以下のようになります。
/*
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
*/
/* line 5, /Users/btm/develop/ruby/mongo_rails3_test/hinagiku/app/assets/stylesheets/tasks.css.scss */
table.tasks {
width: 560px;
margin: 5px auto;
background-color: #eee;
border-collapse: collapse;
border-spacing: 0;
}
/* line 12, /Users/btm/develop/ruby/mongo_rails3_test/hinagiku/app/assets/stylesheets/tasks.css.scss */
table.tasks tr {
border: solid 1px #ccc;
}
/* line 16, /Users/btm/develop/ruby/mongo_rails3_test/hinagiku/app/assets/stylesheets/tasks.css.scss */
table.tasks td {
padding: 5px;
}
/* line 20, /Users/btm/develop/ruby/mongo_rails3_test/hinagiku/app/assets/stylesheets/tasks.css.scss */
table.tasks col.name {
width: 320px;
}
/* line 24, /Users/btm/develop/ruby/mongo_rails3_test/hinagiku/app/assets/stylesheets/tasks.css.scss */
table.tasks col.due_date {
background-color: #ddd;
}
// Place all the styles related to the tasks controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
cd ~/gnu/GCALDaemon/bin
./password-encoder.sh
Your Google password: Googleアカウントのパスワードを入力します
Original password: 上で入力したパスワードが表示されます
Encoded password: xxxxxxxxxx ここで出てきた文字列を後ほど利用します
Sample configuration options for GCALDaemon:
file.google.password=xxxxxxxxxx
ldap.google.password=xxxxxxxxxx
notifier.google.password=xxxxxxxxxx
sendmail.google.password=xxxxxxxxxx
mailterm.google.password=xxxxxxxxxx
require 'spec_helper'
describe TestController do
describe "referer" do
it "google 検索からの流入かどうか判別するテスト" do
request.env["HTTP_REFERER"] = "http://www.google.co.jp/search?q=test"
get "referer"
response.should be_success
assigns[:engine].should == "google"
end
it "yahoo 検索からの流入かどうか判別するテスト" do
request.env["HTTP_REFERER"] = "http://search.yahoo.co.jp/search?p=test"
get "referer"
response.should be_success
assigns[:engine].should == "yahoo"
end
end
describe "ua" do
it "firefox を使っているかどうか判別するテスト" do
request.env["HTTP_USER_AGENT"] = "Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.0.17) Gecko/2009122116 Firefox/3.0.17 GTB6 (.NET CLR 3.5.30729)"
get "ua"
response.should be_success
assigns[:browser].should == "firefox"
end
it "IE を使っているかどうか判別するテスト" do
request.env["HTTP_USER_AGENT"] = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
get "ua"
response.should be_success
assigns[:browser].should == "ie"
end
end
end
Wisp:~ btm$ port variants perl5
perl5 has the variants:
perl5_10: use perl 5.10 instead of perl 5.8 or perl 5.12
* conflicts with perl5_12 perl5_8
[+]perl5_12: use perl 5.12 instead of perl 5.8 or perl 5.10
* conflicts with perl5_10 perl5_8
perl5_8: use perl 5.8 instead of perl 5.10 or perl 5.12
* conflicts with perl5_10 perl5_12
ajax 通信における post(本番) と get(開発時) の使い分け with firebugs
rfc には含まれていないのですが、IE系では get で指定できるURLの長さは2083文字という制限があります。たしかにそれくらいの長さになるドメインやディレクトリはとても考えづらく、それくらい長いパラメータをつけるならpostにしろよ、というのは極々当たり前の常識的な判断ですので、特に疑問や憤りを覚えず他のブラウザの場合でも素直に従うべきでしょう。