GAE on jRuby with Sinatra でやってみるよ 元ネタは Users Java API の概要 - Google App Engine — Google Developers で、こいつを jRuby 上で sinatra を使った場合どうやるのか? という話。 ポイントは 2点 Java のスタティッククラスを使う場合は import 文を使う Java の HttpServletRequest オブジェクトを取得する場合は、 sinatra の request オブジェクトの Hash に格納されている この二つを踏まえればあとはそのまま移植すれば良い。 Java のスタティッククラスを使うためには import する。そして、import の前に java を include する。あまり詳しく読んでいないので、おまじないとして考えておくw include Jav
2009年09月27日 Google App Engine からメールを送る appengine-jrubyを利用してのメールの送信は拍子抜けするくらい簡単だった。 GAEでWebアプリを動かすための設定に加えてメール用に追加が必要な宣言は require 'appengine-apis/mail' だけ。あとはメソッド一発で送信できてしまう。 AppEngine::Mail.send( 'FROMアドレス文字列', 'TOアドレスの文字列かTOアドレスの配列', 'タイトル文字列', '本文文字列(HTMLメールの場合はnil)', {送信オプション} ) appengine-apisのリファレンスによると送信オプションで使用できるのは下記の通り。 :atttachments メッセージと共に送信する添付ファイル。{“ファイル名” => “データ”} というハッシュか、 [[“ファイル名
織田信長 ぼちぼち、元気にやっています。少し薬にも慣れた...んかなぁ。相変わらず食べられないけど。朝、指がこわばって文字なんて入力できなかったけど、それはほぼなくなった。関節もどこも痛くない。薬効いてきたんやろな。 で、ブログを書こうと言う気がまた起きてきた。 …
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く