ある単語Xが出てくる場所の前後5行以内に別な単語Yが出現する場所を探したい。

たまにはそんなこともありますね。

-A -B -C オプションが実装されている
Rak
やgrepを使えば簡単。

shell>>
% rak X -C 5 | rak Y
<<--

-A nは後方n行、-B nは前方n行、-C nは前後n行を
含めて表示するので、それをパイプして前後の文脈の
中からさらに検索してあげればOK。

posted by genki genki on Fri 21 Dec 2007 at 12:46 with 0 comments

一時動かなくなっていた
restful_open_id_authenticationプラグイン
ですが、
ひとまず手元の環境で動く状態になったので、こちらに置いておきます。

http://svn.s21g.com/public/rails/plugins/restful_open_id_authentication_redux/

ruby-openid-2.0.1
のexamplesのコードが非常に参考になりました。

プラグイン中のmigrationジェネレータは、何も無い状態から
DBを作るためのマイグレーションになっています。

すでにrestful_open_id_authenticationプラグインを
使っている状態からアップグレードする場合は、下記
[2]に掲載したmigrationコードをご利用ください。

Enter at your own risk!

See Also

  1. restful_open_id_authenticationプラグインの更新に着手
  2. rescful_open_id_authenticationプラグインの更新#2
posted by genki genki on Fri 21 Dec 2007 at 08:09 with 0 comments

restful_open_id_authenticationプラグイン
でOpenIDストアに使用していたDBを
ruby-openid 2.0に移行させるためのマイグレーション。
ruby-openid 2.0のexamplesから抜粋。

rails>>

Use this migration to upgrade the old 1.1 ActiveRecord store schema

to the new 2.0 schema.

class UpgradeOpenIdStore < ActiveRecord::Migration
def self.up
drop_table "open_id_settings"
drop_table "open_id_nonces"
create_table "open_id_nonces", :force => true do |t|
t.column :server_url, :string, :null => false
t.column :timestamp, :integer, :null => false
t.column :salt, :string, :null => false
end
end

def self.down
drop_table "open_id_nonces"
create_table "open_id_nonces", :force => true do |t|
t.column "nonce", :string
t.column "created", :integer
end

create_table "open_id_settings", :force => true do |t|
  t.column "setting", :string
  t.column "value", :binary
end

end
end
<<--

ちなみにオリジナルのプラグインが生成したマイグレーションコードはこちら。

rails>>
create_table :open_id_associations, :force => true do |t|
t.column :server_url, :binary
t.column :handle, :string
t.column :secret, :binary
t.column :issued, :integer
t.column :lifetime, :integer
t.column :assoc_type, :string
end

create_table :open_id_nonces, :force => true do |t|
  t.column :nonce,        :string
  t.column :created,      :integer
end

create_table :open_id_settings, :force => true do |t|
  t.column :setting,      :string
  t.column :value,        :binary
end

<<--

open_id_settingsは不要になって、open_id_nounces
内容が変わります。

posted by genki genki on Fri 21 Dec 2007 at 06:34 with 0 comments

昨日RubyGemsを1.0.0にアップデートしたところ、
require_gemが使えなくなってしまったため、
内部でrequire_gemを使っているGemが使えなくなりました。

かなり前から移行措置が取られていたため、
使えなくなったGemはほとんど無かったのですが、
一個だけ、ruby-openidの1.x.x系列が使えなくなっていました。

その結果、愛用していた
restful_open_id_authenticationプラグインが
動かなくなってしまいました。
結構いろんなプロダクトで使っていたので影響大です。

ruby-openidの2.x.x系列は、require_gemを使わないようなコードに
なっているのですが、インターフェイスが大分変わっているため、
すんなりとアップグレードが出来ない感じですね。

しかし、アップグレードしないわけにもいかないので、
restful_open_id_authenticationプラグインの
ruby-openid 2.x.x系対応に着手します。

すでに同じ問題に取り組んでいる方がいらっしゃいましたら、
喜んでご協力いたしますのでご連絡いただけるとありがたいです。

連絡先

posted by genki genki on Fri 21 Dec 2007 at 06:23 with 0 comments

遂にリリースされましたね。

Ruby-1.9.1(12/25リリース予定の)にバンドルされる見通しのRubyGemsですが、
それに先立ってバージョン1.0.0がリリースされました。

RubyGems 1.0.0

Release 1.0.0 fixes several bugs.

RubyGemsのバージョンアップを行うためには、
通常のGemパッケージとは違い、以下のような
コマンドを実行する必要があります。

shell>>
% sudo gem update --system
<<--

今年の年末はいろいろと新しくなって、ユーザとしては楽しいですね。
開発者の皆様、お疲れ様です。

posted by genki genki on Thu 20 Dec 2007 at 21:53 with 0 comments

本日、DNSサーバの設定の問題により、本ブログにアクセスできなくなる
障害が発生しておりました。

現在は復旧しておりますが、設定が反映されるまで
今しばらくアクセスが出来ない状態が続く可能性があります。

ご迷惑をおかけいたしますが、
もうしばらくお待ちいただけますと幸いです。

よろしくお願いいたします。

posted by genki genki on Thu 20 Dec 2007 at 21:14 with 0 comments
Contents rssrss
光ファイバーを二次元振動させて走査するAR用ディスプレイ
因果の取り違え
Swift2's defer for CoffeeScript
mongodb-3.0からcreateIndexのdropDupsが無くなったらしい
mongodb-3.0以降のWiredTigerの設定を動的に変更する方法
一般楕円の高速生成アルゴリズムへの道標
farro mantecatoのレシピ
Droonga関連の記事のまとめ
RuntimeErrorの特定のメッセージに限定してrescueする方法
jQueryでscriptタグを実行せずにappendする
Tags
gemopenidpluginrailsrubyお知らせcommanddnsmemonewstipsトラブル報告進捗障害情報
Comments rssrss
https://linkora.ai/forums/users/paulinaimp/ https://linkora.ai/forums/users/paulinaimp/: Hello luxury cаr lovers, stumbled օn a amazing [Be... 05/17 02:41
http://blspt.net http://blspt.net: Greate pieces. Keep posting such kind of informati... 05/17 00:11
https://fancybox.qa/2026/04/25/discover-sheng-siong-promotions-and-deals-in-singapore-on-kaizenaire-com-33/ https://fancybox.qa/2026/04/25/discover-sheng-siong-promotions-and-deals-in-singapore-on-kaizenaire-com-33/: Kaizenaire.ϲom is yoսr Ƅest source іn Singapore fo... 05/16 21:48
http://rlu.ru/5cfBn http://rlu.ru/5cfBn: Greetings auto enthusiasts, gotta share а amazing ... 05/16 18:38
https://xn--9m1bj7w5fr3e8te72a7k351ewff.kr/bbs/board.php?bo_table=free&wr_id=201227 https://xn--9m1bj7w5fr3e8te72a7k351ewff.kr/bbs/board.php?bo_table=free&wr_id=201227: Unlock Singapore's shoppng secrets at Kaizenaire.ⅽ... 05/16 17:50
https://alexander-tech.org/ https://alexander-tech.org/: I need to to thank you for this excellent read!! ... 05/16 11:56
https://unosport.pl/ https://unosport.pl/: Hmm is anyone else experiencing problems with the ... 05/16 10:37
https://strategyreviewer.com/ https://strategyreviewer.com/: Marvelous, what a web site it is! This blog presen... 05/16 10:01