CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Tue, 02 Sep 2025 06:09:38 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20081004192722
location: https://web.archive.org/web/20081004192722/https://github.com/nullstyle/fixture_builder/tree
server-timing: captures_list;dur=1.705960, exclusion.robots;dur=0.022915, exclusion.robots.policy;dur=0.013704, esindex;dur=0.009180, cdx.remote;dur=11.055590, LoadShardBlock;dur=451.494961, PetaboxLoader3.datanode;dur=125.063978, PetaboxLoader3.resolve;dur=158.512387
x-app-server: wwwb-app202
x-ts: 302
x-tr: 486
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app202; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 302
server: nginx
date: Tue, 02 Sep 2025 06:09:39 GMT
content-type: text/html; charset=utf-8
content-length: 121
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Sat, 04 Oct 2008 19:27:20 GMT
x-archive-orig-connection: close
x-archive-orig-status: 302 Found
location: https://web.archive.org/web/20081004192722/https://github.com/nullstyle/fixture_builder/tree/master
x-archive-orig-x-runtime: 0.14216
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 121
cache-control: max-age=1800
memento-datetime: Sat, 04 Oct 2008 19:27:22 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sat, 04 Oct 2008 19:27:22 GMT", ; rel="memento"; datetime="Sat, 04 Oct 2008 19:27:22 GMT", ; rel="next memento"; datetime="Mon, 06 Oct 2008 20:50:10 GMT", ; rel="last memento"; datetime="Mon, 06 Oct 2008 20:50:10 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 50_6_20081004072059_crawl108-c/50_6_20081004191727_crawl103.arc.gz
server-timing: captures_list;dur=0.471684, exclusion.robots;dur=0.021417, exclusion.robots.policy;dur=0.013235, esindex;dur=0.009322, cdx.remote;dur=22.091345, LoadShardBlock;dur=359.368971, PetaboxLoader3.datanode;dur=145.859039, PetaboxLoader3.resolve;dur=106.188386, load_resource;dur=187.337845
x-app-server: wwwb-app202
x-ts: 302
x-tr: 600
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Tue, 02 Sep 2025 06:09:40 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Sat, 04 Oct 2008 19:27:22 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 1.16441
x-archive-orig-etag: "8096880d72db39c33a507ffe7d05f253"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 17919
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sat, 04 Oct 2008 19:27:22 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sat, 02 Aug 2008 06:11:22 GMT", ; rel="prev memento"; datetime="Sat, 02 Aug 2008 06:11:22 GMT", ; rel="memento"; datetime="Sat, 04 Oct 2008 19:27:22 GMT", ; rel="last memento"; datetime="Sat, 04 Oct 2008 19:27:22 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 50_6_20081004072059_crawl108-c/50_6_20081004191727_crawl103.arc.gz
server-timing: captures_list;dur=0.570733, exclusion.robots;dur=0.024599, exclusion.robots.policy;dur=0.014477, esindex;dur=0.011446, cdx.remote;dur=55.034329, LoadShardBlock;dur=261.045408, PetaboxLoader3.datanode;dur=176.988708, PetaboxLoader3.resolve;dur=169.583487, load_resource;dur=107.423406
x-app-server: wwwb-app202
x-ts: 200
x-tr: 499
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
nullstyle's fixture_builder at master — GitHub
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Description: | Forked from fixture_scenarios_builder, gives awesomeness for those who don't want scenarios |
Clone URL: |
git://github.com/nullstyle/fixture_builder.git
Give this clone URL to anyone.
git clone git://github.com/nullstyle/fixture_builder.git
|
name | age | message | |
---|---|---|---|
![]() |
LICENSE | Mon Jul 23 05:07:48 -0700 2007 | shuffle, fixture_scenarios_with_scenario_builde... [defunkt] |
![]() |
README | Thu Dec 27 14:40:32 -0800 2007 | fixture_scenarios_builder: custom names [Paul C... [defunkt] |
![]() |
init.rb | Sat May 03 17:04:33 -0700 2008 | re-fit scenario builder to work without scenarious [nullstyle] |
![]() |
install.rb | Sat May 03 17:04:33 -0700 2008 | re-fit scenario builder to work without scenarious [nullstyle] |
![]() |
lib/ | Sat May 03 17:11:59 -0700 2008 | wierd, a line break was on the filename [nullstyle] |
![]() |
tasks/ | Sat May 03 17:05:41 -0700 2008 | rename files [nullstyle] |
README
FixtureScenariosBuilder ======================= This plugin is an add-on to the FixtureScenarios plugin by Tom Preston-Werner. FixtureScenarios is required for this plugin to work. FixtureScenarios Info: https://code.google.com/p/fixture-scenarios/ SVN : https://fixture-scenarios.googlecode.com/svn/trunk/fixture_scenarios This plugin Info: https://errtheblog.com/post/7708 SVN : svn://errtheblog.com/svn/plugins/fixture_scenarios_builder Bugs: https://err.lighthouseapp.com/projects/466-plugins/tickets/new == The Setup You may, from time to time, wish to build your fixtures entirely in Ruby. Doing so has its advantages, such as automatically created join tables and default attributes. YAML files, however, bring with them some real nice features in Rails which are difficult to abandon: transactional fixtures, table_name(:key) helpers, and auto-clearing between tests. How does one get the best of both worlds? == The Download Using the +scenario+ method within <tt>scenarios.rb</tt> file, FixtureScenariosBuilder can create your YAML fixture scenarios automatically at run time from Ruby-created fixtures. Create a <tt>scenarios.rb</tt> file and place it in the root "fixtures" directory: [RAILS_ROOT] +-test/ +-fixtures/ +-scenarios.rb Now build your scenarios in this file, wrapping scenarios in the +scenario+ method and providing it with the name of your scenario. A brief example of a complete <tt>scenarios.rb</tt> file: scenario :banned_users do %w( Tom Chris Kevin ).each_with_index do |user, index| User.create(:name => user, :banned => index.odd?) end end Assuming +banned+ is a boolean field, this will create for us (when our tests are first run) the following: [RAILS_ROOT] +-test/ +-fixtures/ +-banned_users/ +-users.yml Our generated <tt>users.yml</tt> file will look something like this: chris: name: Chris id: "2" banned: "1" updated_at: 2007-05-09 09:08:04 created_at: 2007-05-09 09:08:04 kevin: name: Kevin id: "3" banned: "0" updated_at: 2007-05-09 09:08:04 created_at: 2007-05-09 09:08:04 tom: name: Tom id: "1" banned: "0" updated_at: 2007-05-09 09:08:04 created_at: 2007-05-09 09:08:04 Notice how the keys correspond to the user names. FixtureScenariosBuilder will try, to an extent, to guess the name of your key. If it can't figure it out, keys will be the standard user_001, user_002, etc format. Thanks to Paul Cantrell's handywork, custom key names are supported. Simply use the +name+ method: scenario :foo do name "small_red_widget", Widget.create(:size => 'small', :color => 'red') name "big_blue_widget", Widget.create(:size => 'big', :color => 'blue') end Another option is to assign your records to instance variables, then call +names_from_ivars+ at the conclusion of your +scenario+ block. scenario :foo do @small_red_widget = Widget.create(:size => 'small', :color => 'red') @big_blue_widget = Widget.create(:size => 'big', :color => 'blue') names_from_ivars! end The above produces the following YAML: small_red_widget: size: small color: red updated_at: 2007-12-27 10:09:05 created_at: 2007-12-27 10:09:05 big_blue_widget: size: big color: blue updated_at: 2007-12-27 10:19:23 created_at: 2007-12-27 10:19:23 On subsequent test runs this YAML file will not be needlessly re-created. YAML files will only be re-generated when the <tt>scenarios.rb</tt> file is modified. If you for some reason need to force your scenarios to rebuild, pass in the REBUILD_FIXTURES environment variables: $ rake test:units REBUILD_FIXTURES=true Scenarios can also be nested using the familiar Rake-style dependency declaration. scenario :users do %w( Tom Chris ).each do |user| User.create(:name => user) end end scenario :banned_users => :users do User.create(:name => 'Kevin', :banned => true) end == Rake FixtureScenariosBuilder comes with one Rake task, `db:scenario:build' -- use it to attempt to build your scenarios on demand. == Bugs! Please report bugs here: https://err.lighthouseapp.com/projects/466-plugins/tickets >> Chris Wanstrath => chris[at]ozmm[dot]org
This feature is coming soon. Sit tight!