2006-07-23
eBay4R(0.7.0)
事前作業
- ebay Developers Program に参加 http://developer.ebay.com/common/api/ 各種 KEY を得る
- Developer Zone にログイン後、tools の Authentication Token でトークンを作成する
- これらのデータを examples/myCredentials.rb の形式記述し、myCredentials.rb を $LOAD_PATH に置く
たぶんクレジットカード登録していないのでエラーになっているが、そこまでする気はないのでとりあえずここまで。
date@assam ebay-0.7.0 $ ruby-yarv test/tc_hello_world.rb
Loaded suite test/tc_hello_world
Started
.
Finished in 0.812929 seconds.
1 tests, 4 assertions, 0 failures, 0 errors
date@assam ebay-0.7.0 $ ruby-yarv test/tc_items.rb
Loaded suite test/tc_items
Started
E.E
Finished in 1.718832 seconds.
1) Error:
test_add_item(TestItems):
EBay::Error::ApplicationError: AddItem Call Failed: Credit card not found.
test/tc_items.rb:41:in `test_add_item'
2) Error:
test_get_item(TestItems):
NameError: uninitialized class variable @@item_id in TestItems
test/tc_items.rb:69:in `test_get_item'
3 tests, 1 assertions, 0 failures, 2 errors
date@assam ebay-0.7.0 $ ruby-yarv test/tc_routing.rb
Loaded suite test/tc_routing
Started
.
Finished in 1.110101 seconds.
1 tests, 4 assertions, 0 failures, 0 errors
EVDB Ruby API(2.0)
リモートからインストールしようとすると 404 といわれるので、gem ファイルをダウンロードしてローカルインストール。
テストなし。コードを眺めた感じでは問題なさそう。
Ruby/EventMachine(0.5.3)
これ面白い。スケーラブルなネットワークプログラムを簡単に書けることを目標にしたライブラリ。
ステートマシーンを簡単に書けるライブラリとデーモン化ライブラリを組み合わせれば、特定用途のデーモンをさくっと書いて仕事をさせて使い捨てるというようなことができそう。
まあ、使い捨てなくても良いけど。
これ単体は通信に特化しているので、HTTP とか well-known なプロトコルのロジックを実装したガワが用意されると注目されると思う。
テストなし。yarv ではサンプルの echo サーバと簡易 HTTP クライアントは動いた。高負荷時の動きはどうだろう。
ezcrypto(0.5)
1 ERROR だけど、これテストコードが変だと思う。しかし、これが動くということは activerecord も動くのか。
date@assam ezcrypto-0.5 $ /usr/local/yarv/bin/rake
(in /home/date/tmp/ezcrypto-0.5)
/usr/local/yarv/bin/ruby-yarv -Ilib:test "/usr/local/yarv/lib/ruby/gems/2.0/gems/rake-0.7.1/lib/rake/rake_test_loader.rb" "test/active_crypto_test.rb" "test/association_key_holder_test.rb" "test/encrypt_test.rb" "test/ezcrypto_test.rb" "test/key_holder_test.rb"
Loaded suite /usr/local/yarv/lib/ruby/gems/2.0/gems/rake-0.7.1/lib/rake/rake_test_loader
Started
.................E..........
Finished in 3.673705 seconds.
1) Error:
test_encoded(EzCryptoTest):
TypeError: can't convert Symbol into Integer
/home/date/tmp/ezcrypto-0.5/lib/ezcrypto.rb:77:in `[]'
/home/date/tmp/ezcrypto-0.5/lib/ezcrypto.rb:77:in `generate'
./test/ezcrypto_test.rb:179:in `assert_encoded_keys'
./test/ezcrypto_test.rb:44:in `block in test_encoded'
./test/ezcrypto_test.rb:43:in `each'
./test/ezcrypto_test.rb:43:in `upto'
./test/ezcrypto_test.rb:43:in `test_encoded'
28 tests, 11736 assertions, 0 failures, 1 errors
rake aborted!
Command failed with status (1): [/usr/local/yarv/bin/ruby-yarv -Ilib:test "...]
(See full trace by running task with --trace)