技術部・開発基盤グループの中村です。 この度、クックパッドが開発し、オープンソースとして公開しているRuby on Rails向けプロトタイプ開発用のプラグイン「Chanko」を再設計し、Ruby 2.0.0 への移行に引き続き Chanko 2.0.0 をリリースしました。Chanko 2.0.... 続きを読む
技術部・開発基盤グループの村田です。 クックパッドは本日から、本番環境を Ruby 2.0.0-p0 に移行しました。Ruby 2.0.0-p0 は 2013年2月24日にリリースされた Ruby の最新バージョンです。新しい Ruby を使って気持ち良く開発するために、できるだけ早く Ruby ... 続きを読む
Kernel#retryable, by Cheah Chu Yeow (http://is.gd/faW9), slightly enhanced and rebuilt as gem as a little Munich Hackday project. 続きを読む
$ pry [1] pry(main)> h = Hash.new([]) => {} [2] pry(main)> h[:a] << 1 => [1] [3] pry(main)> h[:b] += [1] => [1, 1] [4] pry(main)> h.keys => [:b] [5] pry(main)> h[:a] => [1] 続きを読む
Announcing Topaz: A New Ruby¶ I’m extraordinarily pleased to today announce Topaz, a project I started 10 months ago, to create a brand new implementation of the Ruby programming language (version 1.9.3). Topaz is written in Python on top of... 続きを読む
2013-01-21 ruby 2.0 でテストがすごく速くなるよ〜 某弊社のメインプロダクトが抱える spec ファイルの中から最も実行時間が大きい順に8個の spec ファイルを使って、(1) ree、(2) 1.9.3-p374、(3) 2.0.0dev r38890 の3つの ruby たちに速度を競ってもらったよ... 続きを読む
### SiriProxy-iRemoconって何? - [SiriProxy-iRemocon](https://github.com/katsuma/SiriProxy-iRemocon) ProxyProxyのプラグインの形で、Siriで家電を操作できるものを作りました。今のところ電気のON/OFFだけですが、こんな感じで - ライトを付けて - ライ... 続きを読む
2012-11-30 自分のコード綺麗って思ってんの? guideline.gem https://github.com/r7kamura/guideline 恐怖体験があって、震え上がり、少しでも綺麗なコードが書けるようなGemつくってる。複雑過ぎるメソッドや、使われていないメソッドが定義されていないかと... 続きを読む
README.md Kodama Kodama is a MySQL replication listener based on ruby-binlog. Kodama provides a simple DSL to easily write your own replication listener. Features Provides simple DSL for writing binlog event handlers Automatically restarts fr... 続きを読む
Nokogiri is unrelated, other than the fact that it gives you the link anchor to begin with. Use Ruby's URI library to manage paths: absolute_uri = URI.join( page_url, href ).to_s Seen in action: require 'uri' # The URL of the page with the li... 続きを読む
関西でもruby案件がチラホラ出て来ていると聞きました。嬉しい限りの今日この頃です。 会社の情報共有を兼ねて、使い方から導入方法まで。 Railsでの開発スピードをぐんぐんあげるプラグイン達です。 紹介するプラグインは以下の通りです。 vimでRuby / RoR を... 続きを読む
Got 15 minutes? Give Ruby a shot right now! Ruby is a programming language from Japan (available at ruby-lang.org) which is revolutionizing the web. The beauty of Ruby is found in its balance between simplicity and power. Try out Ruby code in... 続きを読む
スライドを SpeakerDeck に上げました。 続きを読む
ruby 1.9.2 :001 > "隣の客は良く柿食う客だ".each_char do |c| 1.9.2 :002 > if c =~ /\p{Han}/ 1.9.2 :003?> puts $& 1.9.2 :004?> end 1.9.2 :005?> end 隣 客 良 柿 食 客 => "隣の客は良く柿食う客だ" Ruby1.9では正規表現のエンジンがonigurumaに変更にな... 続きを読む
A few months back I released faye-websocket 0.4, my first gem that contained native code. After a few mis-step releases I got a working build for MRI and JRuby, but getting there was a little tricky. What follows is a quick how-to from someon... 続きを読む
MiniProfiler : A simple but effective mini-profiler for .NET and Ruby.Fork Me on GitHub Fork This Site MiniProfiler A simple but effective mini-profiler for .NET and Ruby. Download this project as a .zip file Download this project as a tar.gz... 続きを読む
MailCatcher MailCatcher runs a super simple SMTP server which catches any \ message sent to it to display in a web interface. Run mailcatcher, set your favourite app to deliver to smtp://127.0.0.1:1025 instead of your default... 続きを読む
Ruby Styleguide If you're visiting from the internet, feel free to learn from our style. This is a guide we use for our own ruby apps internally at GitHub. We encourage you to setup one that works for your own team. Much of this was taken fro... 続きを読む
bundle-exec(1) bundle-exec(1) NAME bundle-exec - Execute a command in the context of the bundle SYNOPSIS bundle exec command DESCRIPTION This command executes the command, making all gems specified in the Gemfile(5) available to require in Ru... 続きを読む
リクエストを複製し、2台のサーバ両方にリクエストを飛ばすし、片方のサーバのレスポンスを返却することで、2台のサーバどちらとも正常にリクエストを処理できるか、というテストに役立てることができる。 production (正常に動いている) サーバのレスポンスを... 続きを読む
Ruby bindings for LZ4. Installation gem install lz4-ruby Usage require 'rubygems' require 'lz4-ruby' # compress (fast) compressed = LZ4::compress("hello, world") # compress (high compression) compressed = LZ4::compressHC("hello, world") # unc... 続きを読む
Tried a few strategies, but this seems to be the fastest: DatabaseCleaner truncate_all: 0.8s This: 0.2s # fast truncation of all tables that need truncations (select is 10x faster then truncate) # http://grosser.it/2012/07/03/rubyactiverecord... 続きを読む
Ruby前フリ奥様、知ってらした?Rubyのcase式ってすっごくパワフルなんですって!単なる同値判定で振り分けるだけじゃなくて、例えばこんなこともできちゃうらしいんですのよ! case gets.chomp when /おはよう/ puts 'おはようございます、お目覚めはいかがで... 続きを読む
HTTP Git Read-Only This URL has Read+Write access 続きを読む
I was bouncing around the Rails API documentation yesterday, and I noticed a few rails console tricks I haven’t seen before. There’s been plenty of posts about irb and Rails before, but I’m hoping you’ll learn something new here. The foll... 続きを読む
Dismiss Octotip: You've activated the file finder by pressing t Start typing to filter the file list. Use ↑ and ↓ to navigate, enter to view files. 続きを読む
Tire provides rich and comfortable Ruby API for the ElasticSearch search engine/database. ElasticSearch is a scalable, distributed, cloud-ready, highly-available full-text search engine and database, communicating by JSON over RESTful HTTP, b... 続きを読む
README.mdMetriks Client This is an experiment in making a threadsafe, low impact library to measure aspects of your ruby. The library is very much a work-in-progress. It is being developed as I find needs while developing Papertrail. Installi... 続きを読む
Record your test suite's HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. 続きを読む
11月22-23日にSFC ORFというSFCの研究室の発表会があって、そこでデモするブツに使う部品としてBuffaloの赤外線学習リモコンのRubyラッパーを書きました。これで家に帰る前に暖房つけたりできてうれしいですね。 玄人志向のKURO-RSとBuffaloのPC-OP-RSを操作で... 続きを読む
最近クックパッドでは、アプリケーションサーバの大半が Rails 2.3 から Rails 3 に置き換わったのですが 3 移行はクックパッド規模になるとかなり大変でしたが、いろいろな面白いアプローチを試せたので、これはこれで何処かでお話ししたいですね">*1、リリー... 続きを読む
Ruby は 1.8 だとグリーンスレッドだし、1.9 でも Giant VM lock のためネイティブスレッドの実行は一つのため、マルチコアを生かした処理をかんたんに書くのがいささか面倒だったりしますね。 で、 parallel というライブラリを使うと fork を使って抽象化して... 続きを読む
https://rubygems.org/gems/bracecomphttps://bitbucket.org/winebarrel/bracecompまいどまいどのこまいライブラリのリリースです。 これは何?bashとかのブレース展開をするライブラリです。サンプルをみればやりたいことは分かると思います。 require 'bracec... 続きを読む
This is the API documentation for 'celluloid 0.0.1'. Classes/Modules Celluloid Celluloid::AbortError Celluloid::Actor Celluloid::Actor::ClassMethods Celluloid::Actor::InstanceMethods Celluloid::Actor::InternalMethods Celluloid::ActorProxy Cel... 続きを読む
Ruby Is Slow? She’s Fast Enough for You Jul 31st, 2011 For the past while, Twitter have been moving gradually from their legacy Ruby on Rails codebase to Java and the JVM. This has been greeted with the usual cries of ’Rails is slow!’, ’R... 続きを読む
Choose one of our top projects Ruby on Rails The open source web application framework for the Ruby programming language 20 imported versions - 213 notes - Browse - Search Ruby A dynamic, open source programming language with a focus on simpl... 続きを読む
Though as matz said at rubykaigi2011 ruby is a quite good language, many people hate a long sequence of `end' like this: module MyModule class MyClass def my_method 10.times do if rand it works badly with > * tab/space mixture > * templates, ... 続きを読む
技術部開発基盤グループの森田です 昨日の2011年7月14日、「Ruby Recipes and Japanese Cooking At Cookpad」におきまして、「どんどん使う」と題し、弊社で開発/運用しているExtension Frameworkの紹介をさせて頂きました。その際に利用したスライドを公開致し... 続きを読む
rec 視聴数: 4 2011/07/18 10:23 18S01 rec 視聴数: 1 2011/07/18 09:50 17S10 rec 視聴数: 20 2011/07/17 16:45 17S09 rec 視聴数: 11 2011/07/17 16:11 17S08 rec 視聴数: 14 2011/07/17 15:14 17S07 rec 視聴数: 8 2011/07/17 14:41 17S06 rec 視聴数... 続きを読む
Phusion Passenger is an Nginx module, which makes deploying Ruby and Ruby on Rails applications on Nginx a breeze. It follows the usual Ruby on Rails conventions, such as "Don’t-Repeat-Yourself" and ease of setup, while at the same time prov... 続きを読む