和田 卓人(@t_wada) 作『RSpec の入門とその一歩先へ』はクリエイティブ・コモンズ 表示 - 継承 4.0 国際 ライセンスで提供されています。 東京 Ruby 会議 03 の RSpec ワークショップの資料です。このワークショップでは参加者の方に「写経」(コードを書き写すこと)をして貰い、TDD/BDD と RSpec を同時に学べるように都度説明を入れるかたちで行いました。 第2イテレーションも書きました。続きに興味ある方はご覧下さい (更新) 第3イテレーションも書きました。続きに興味ある方はご覧下さい 1st iteration favotter の みたいな NG ワードのフィルタリング機能を RSpec で作りましょう。まずは NG ワードの検出機能を作成します。 このイテレーションでは最初ベタな形のテストコードと実装を書き、だんだんとそのコードを洗練させてゆきま
WEBrickが起動しなくなったりしてアレなsinatra。でももっと痛いのがファイルを編集しても自動で再読み込みされなくなったこと。 catalystやrailsで言えば、ファイル編集する度に毎回server.plやserverを手動で停止>実行してるに等しい。発狂するわ。 CHANGESにちゃんと書いてた。 = 0.9.2 / unreleased * Development mode source file reloading has been removed. The "shotgun" (http://rtomayko.github.com/shotgun/) program can be used to achieve the same basic functionality in most situations. Passenger users should use the
It’s almost the end of 2009, and I have to ask: are we through dealing with XML yet? Although many of us wish we could consume the web through a magic programmer portal that shields us and our code from all the pointy angle brackets, the reality that is the legacy of HTML, Atom and RSS on the web leaves us little choice but to soldier on. So let’s take a look at what Ruby-colored armor is availabl
In math, a unary operation is an operation with a single input. In Ruby, a unary operator is an operator which only takes a single ‘argument’ in the form of a receiver. For example, the – on -5 or ! on !true. In contrast, a binary operator, such as in 2 + 3, deals with two arguments. Here, 2 and 3 (which become one receiver and one argument in a method call to +). Ruby only has a handful of unary
RubyStationとは RubyにはたくさんのWebフレームワークがあります。Rails, Sinatra, Merb, Ramaze, などなど。これらを使って、Webアプリを作ったことがあるかも 知れません。では、デスクトップアプリが作れることは ご存じでしたか? Railsを使ってデスクトップアプリを作るには、 以下のようにします。 Railsで普通にアプリケーションを作ります。 ファイルをzipに固めます。 ユーザはそれをダウンロードし、展開して、./script/server を実行します。 localhost:3000でアプリケーションが起動しました。 ほら、どう見てもデスクトップアプリでしょう?:-) RubyStationは、そんなアプリケーションを管理するためのソフトウェア です。各アプリにポート番号を自動で割り当てるので、リンクを クリックするだけでアプリを起動する
R18n – internationalize and localize your Merb/desktop Ruby applicationTool to internationalize and localize your Merb/desktop Ruby application. R18n was developed by Andrey “A.I.” Sitnik and was licensed under GNU LGPL 3. Features R18n isn’t a only Rails plugin. It is a core gem with plugins for Merb framework and desktop applications. If there isn’t translation in user locale, it will be found i
In math, a unary operation is an operation with a single input. In Ruby, a unary operator is an operator which only takes a single ‘argument’ in the form of a receiver. For example, the – on -5 or ! on !true. In contrast, a binary operator, such as in 2 + 3, deals with two arguments. Here, 2 and 3 (which become one receiver and one argument in a method call to +). Ruby only has a handful of unary
Rubyは主に1.8.6と1.8.7、そして1.9.1がある。さらにJRubyも最新注目されている。1.9.1を使ってみたいと思いつつも、ライブラリが対応していないと切り替えられずにいる人も多いはずだ。また、その不安のために1.9.1を試せないという人もいるのではないだろうか。 コマンド一つでRuby環境を切り替えられる 複数のRubyを入れたとしても、パスや設定を変えれば使えるだろうが面倒だ。そうした目的のために使うのがrvmだ。 今回紹介するオープンソース・ソフトウェアはrvm、Rubyバージョン管理ツールだ。 rvmは個人のホームディレクトリ以下に設置するソフトウェアで、rvmというコマンドで動作するのでパスを通しておく必要がある。そしてrvm install 1.9.1のようにコマンドを打つと、Ruby 1.9.1がインストールされる。さらにrvm use 1.9.1と打てばパスが
Find actively maintained & popular open source software libraries for the Ruby programming languageThe Ruby Toolbox is a catalog of all Rubygems that keeps track of popularity and health metrics to help you choose a reliable library CategoriesTo give you an overview of what open source libraries are available for a given task we group projects for common problems into categories. The catalog itsel
In math, a unary operation is an operation with a single input. In Ruby, a unary operator is an operator which only takes a single ‘argument’ in the form of a receiver. For example, the – on -5 or ! on !true. In contrast, a binary operator, such as in 2 + 3, deals with two arguments. Here, 2 and 3 (which become one receiver and one argument in a method call to +). Ruby only has a handful of unary
DP版ユーザーとして先走って3ヶ月前から使っていました。たぶん修正されないであろう問題があったので、ここに書いておきます。 MacPortsやRubygemsが怪しい挙動を示すんですね。MacPortsが依存を解決せずに中断したり、gems が モノによっちゃrequireできなかったり・・・。この二つ、開発者にとっちゃ致命的な問題。MacPortsはpkgのバージョンチェックでこけたので自分でビルドしたんですが、それが悪いのかと思って調べていたところ、海外の方に既に報告されていました。(日本だと全く情報がありませんでした) 参考 evolution - Snow Leopard with legacy macports and rubygems 超訳 LeopardのユーザーはおそらくOSに載っている標準のRubyを使っていて、既に大量のmacportsとrubygemsがあることだと思
Category Topics Ai 20 Best Iphone Cleaner Apps 15 Alternative Apps 2 Apple & Apps 1 Android 3 Video Repair 3 Iphone Tips & Software 3 Mac 26 Data Recovery 8 Software 35 Iphone 3 Wifi 7 Remote Desktop 6 Screen Mirroring 7 General 52 Ruby on Rails 38 French Forum 0 Polish Forum 0 German Forum 0 Norwegian Forum 0 Japanese Forum 0 Italian Forum 0 Spanish Forum 0 Chinese Forum 0 Korean Forum 0 Swedish
Rails勉強会@東京第42回に行ってきました。 RSpec 前半はまだあまり慣れていないRSpecののセッションに参加しました! 概要 Rubyで、Specification(仕様)を先に書く開発手法だからRSpecという名前なのかな。 RSpecを一言でいえば「printlnの代わり」。 動作確認するときにprintlnの代わりにRSpec使うと便利という意味。 Rails開発では、controllerのロジックは薄く、modelに機能を集約するのがよいので、RSpecはmodelだけに使うのがよいとのこと。 コード 後半は id:moro さんに、Skip Wikiのspecファイルのnote_spec.rbのソースコードを見せて頂きながら、説明して頂きました。 RSpecは自明な部分とか全部をテストするときりがないので、キモになる部分をテストする。 id:moro もろはしさんのキ
PDFを作成するライブラリは数多く存在する。Webシステムであってもずいぶん手軽にはなってきた。だが、テンプレートのメンテナンス性の良さと使い勝手の良さを兼ね備えたPDF作成ライブラリとなるとまだまだ数は少ないのが実情だ。 GhostScriptを使ったPDF作成ライブラリ RailsをはじめとしたRubyによるPDF出力を行うならば、RGhostを使うのが良さそうだ。 今回紹介するオープンソース・ソフトウェアはRGhost、PDFや画像を生成するRubyライブラリだ。 RGhostはRubyGemsからインストールできるライブラリで、スクリプトからPDFを生成する他、PostScript、PNG、TIF、JPEGといった画像への変換もできる。オブジェクト指向らしい値の埋め込みによってPDFが生成できるので、使い勝手は良さそうだ。 EPSをテンプレートにしたPDF生成も可能 TrueTyp
== Introduction RSRuby is a bridge library for Ruby giving Ruby developers access to the full R statistical programming environment. RSRuby embeds a full R interpreter inside the running Ruby script, allowing R methods to be called and data passed between the Ruby script and the R interpreter. Most data conversion is handled automatically, but user-definable conversion routines can also be written
In Ruby, you don’t have to specify an explicit return value from a method. A Ruby will just return the last evaluated statement. Similarly, if an explicit return statement will make itself the last evaluated statement – i.e return control to the caller with the specified return value. However, I’m not a big fan of explicit return statements. In my experience, the only place where they make sense i
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く