This is a basic restful authentication generator for rails, taken from acts as authenticated. Currently it requires Rails 1.2 (or edge). To use: ./script/generate authenticated user sessions The first parameter specifies the model that gets created in signup (typically a user or account model). A model with migration is created, as well as a basic controller with the create method. The second para
Rails has dropped the formatted_* routes in favor of passing in a :format option, so we need to update the generated tests/specs for Restful Authentication to use this new format. http://rails.lighthouseapp.com/p... http://github.com/rails/rails/co... On a fresh install, running off of the latest edge rails (ce706b4b9be03a3f2e7d11438e6550d64c5f4461), three specs fail: 1) NoMethodError in 'UsersCon
Developing a Rails model using BDD and RSpec, Part 1 Writing Rails testing articles seems to be quite popular at the moment; seeing as I’m often quite vocal about testing on the #caboose and #rubyonrails IRC rooms I felt it was about time I posted one of my own. I have a large series of articles on testing with Rails in the pipeline, but until that is done, here is a nice and simple tutorial for n
I'm building a sample application that uses restful-authentication. I've installed the plugin the following way: ruby script/plugin install git://github.com/technoweenie/restful-authentication.git then run the generator: ruby script/generate authenticated user sessions --rspec and rake db:migrate After running rake spec i get the following errors. I'm using rails 2.3 and rspec 1.2.2, and using the
After cloning the latest stable versions of rails (2.3.2), rspec (1.2.2), cucumber (0.2.0.4...came out 2009-03-24), rspec-rails (1.2.2), restful-authentication (fixed formatted_user_path and a few other problems), webrat, rubyist-aasm (and a few others) into a clean rails application, and following (what I believe are) all the instructions for each plugin, cucumber stories still are failing :-(. H
概要 Machinistは定義された条件下でテストデータを生成するプラグイン・gem。 DatasetはRubyのコードで記述したテストデータをDBに読み込むプラグイン・gem。 この2つを組み合わせることで(比較的)メンテナンスのしやすいfixtureの代替を構築することが可能になる。 流れとしては、Dataset上でMachinistを呼び出して複数のデータを生成して、それをDBに流し込むという感じ。 メリットは、 条件下でランダムなデータを生成してくれる(「特定のデータをfixture上に作って読み込む」というようなことも可能) リレーション先のデータも適宜生成してくれる(素敵!)。 デメリットは、 データがランダムなので、全条件を必ずカバーするのは苦手&毎回同じデータが入ってくるとは限らない(回避できるかなぁ) fixtureに依存した書き方をしていると大幅な書き換えが必要かもしれ
来年も作りたい!ふきのとう料理を満喫した 2024年春の記録 春は自炊が楽しい季節 1年の中で最も自炊が楽しい季節は春だと思う。スーパーの棚にやわらかな色合いの野菜が並ぶと自然とこころが弾む。 中でもときめくのは山菜だ。早いと2月下旬ごろから並び始めるそれは、タラの芽、ふきのとうと続き、桜の頃にはうるい、ウド、こ…
What Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc. The port was motivated by a need for a bunch of fake data to make good-looking screenshots for Catch the Best. :) Installing sudo gem install faker Usage Faker::Name.name => “Bob Hope” Read the docs Forum http://groups.google.com/group/ruby-faker How to submit patches Read the 8
fixtureの代換となるプラグインMachinistの使い方のメモ。下記URLのREADMEの意訳です。 notahat's machinist at master - GitHub インストール sudo gem install machinist --source http://gemcutter.org セットアップ spec/blueprints.rbに下記のように書きます。下記ではactive_record用のファイルをrequireしていますが、data_mapperやsequelなんかも使えるようです。 require 'machinist/active_record' require 'sham' spec_helper.rbに下記のように書きます。(test_helper.rbの場合は省略) require File.expand_path(File.dirname(_
9/05/08: Alpha release Full featured restful authentication starter app from http://railsforum.com/viewtopic.php?id=14216 combining role requirement, open id authentication, recaptcha, ui, debugging, and security plugins. This is a preliminary release and has not been tested or audited. Please feel free to fork and improve, or message me with any feature requests, suggestions, bugs, fixes for the
インストール † 次のコマンドを実行 script/plugin install git://github.com/technoweenie/restful-authentication.git script/plugin install git://github.com/timcharper/role_requirement.git ↑ セットアップ † 次のコマンドを実行 ./script/generate authenticated user sessions ./script/generate roles Role User Userは、authenticatedに指定したモデルクラス名 Roleは、権限をあらわすモデル名 次のファイルが作らる test/fixtures/users.yml test/fixtures/roles.yml app/models/role.rb li
Railsでモデルのバージョン管理を行うというと、 acts_as_versionedを使うのが一般的でしたが、 しばらくメンテナンスされていないのと、githubでforkがカオス状態になっていて、公式ドキュメントと実装が一致しなくなっているなど、ちょっと使いにくい状況になっているようなので、それ以外の選択肢を調べてみました。 version_fu かなりシンプルな作り。ソースは100行程度。そのぶん、Versionedテーブルの作成などは自動でやってくれない。 SimplyVersioned こちらもシンプル路線。Versionedテーブルを使わずに、1つのテーブルでhas_manyアソシエーションを使って管理するタイプ。validates_uniqueness_ofとかを使っていないならこれでも良いかな。 acts_as_versioned_association aavでassoc
The simplicity, advanced features and strong support are common arguments for developers preferring jQuery against other JavaScript-frameworks. In fact, jQuery is one of the most popular JavaScript frameworks, with powerful tools that can significantly improve the user’s interaction with Web applications. jQuery has an additional advantage in that it allows developers to select elements on a page
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く