CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 23 Jul 2025 16:35:24 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20081228040711
location: https://web.archive.org/web/20081228040711/https://github.com/github/simply_versioned/tree
server-timing: captures_list;dur=0.507003, exclusion.robots;dur=0.019062, exclusion.robots.policy;dur=0.008892, esindex;dur=0.012005, cdx.remote;dur=219.606295, LoadShardBlock;dur=795.105461, PetaboxLoader3.datanode;dur=310.336182, PetaboxLoader3.resolve;dur=240.416355
x-app-server: wwwb-app217
x-ts: 302
x-tr: 1061
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app217; 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 301
server: nginx
date: Wed, 23 Jul 2025 16:35:25 GMT
content-type: text/html; charset=utf-8
content-length: 119
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Sun, 28 Dec 2008 04:07:07 GMT
x-archive-orig-connection: close
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20081228040711/https://github.com/github/simply_versioned/tree/master
x-archive-orig-x-runtime: 772ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 119
cache-control: max-age=1800
memento-datetime: Sun, 28 Dec 2008 04:07:11 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Wed, 09 Jul 2008 02:21:55 GMT", ; rel="prev memento"; datetime="Wed, 09 Jul 2008 02:21:55 GMT", ; rel="memento"; datetime="Sun, 28 Dec 2008 04:07:11 GMT", ; rel="last memento"; datetime="Sun, 28 Dec 2008 04:07:11 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: 52_7_20081228034459_crawl106-c/52_7_20081228034711_crawl103.arc.gz
server-timing: captures_list;dur=0.438845, exclusion.robots;dur=0.015697, exclusion.robots.policy;dur=0.007188, esindex;dur=0.010515, cdx.remote;dur=23.710893, LoadShardBlock;dur=503.006734, PetaboxLoader3.datanode;dur=199.718995, PetaboxLoader3.resolve;dur=544.971811, load_resource;dur=514.920158
x-app-server: wwwb-app217
x-ts: 301
x-tr: 1070
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=()
HTTP/2 200
server: nginx
date: Wed, 23 Jul 2025 16:35:27 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Sun, 28 Dec 2008 04:07:11 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 2032ms
x-archive-orig-etag: "c0181966aa1ca729de9ff949b159e478"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 22738
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 28 Dec 2008 04:07:11 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sun, 28 Dec 2008 04:07:11 GMT", ; rel="memento"; datetime="Sun, 28 Dec 2008 04:07:11 GMT", ; rel="next memento"; datetime="Mon, 29 Dec 2008 08:02:41 GMT", ; rel="last memento"; datetime="Mon, 08 Feb 2016 22:40:54 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: 52_7_20081228034459_crawl106-c/52_7_20081228034711_crawl103.arc.gz
server-timing: captures_list;dur=2.943533, exclusion.robots;dur=0.028124, exclusion.robots.policy;dur=0.012642, esindex;dur=0.016084, cdx.remote;dur=25.212036, LoadShardBlock;dur=349.026281, PetaboxLoader3.datanode;dur=240.125721, PetaboxLoader3.resolve;dur=1432.585113, load_resource;dur=1382.377584
x-app-server: wwwb-app217
x-ts: 200
x-tr: 1858
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=()
content-encoding: gzip
github's simply_versioned 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 (

Fork of mmower/simply_versioned | |
Description: | A simple, non-invasive, approach to versioning ActiveRecord models |
Homepage: | https://softwareheretics.com/plugins/simply_versioned |
Clone URL: |
git://github.com/github/simply_versioned.git
Give this clone URL to anyone.
git clone git://github.com/github/simply_versioned.git
|
README
SimplyVersioned =============== Release: 1.0.0 Date: 28-01-2008 Author: Matt Mower <self@mattmower.com> SimplyVersioned is a simple, non-invasive, approach to versioning ActiveRecord models. SimplyVersioned does not require any structural change to the models to be versioned and requires only one versions table to be created (a migration generator is supplied with the plugin) for the application, regardless of the number of models being versioned. The plugin introduces a 'Version' ActiveRecord model (that reflects changes to model attributes) to which versioned models are polymorphically associated. Version records store the model information as a YAML hash. SimplyVersioned meets a simple need for model versioning. If your needs are more complex maybe try Rick Olsen's acts_as_versioned (https://svn.techno-weenie.net/projects/plugins/acts_as_versioned/). SimplyVersioned is (so far) actively tested with Rails 2.0.2 and Ruby 1.8.6 Usage ===== 1. Install the plugin ./script/plugin install https://rubymatt.rubyforge.org/svn/simply_versioned 2. Generate the migration ./script/generate simply_versioned_migration Note that the migration defaults to storing the version info in a TEXT field. On MySQL this will default to a limit of 64K. If you are versioning particularly large models you will want to modify the migration to include a :limit => n condition to promote the yaml column to a MEDIUMTEXT or (god forbid) a LONGTEXT. 3. Create the versions table rake db:migrate 4. Annotate the models you want to version specifying how many versions to keep class Thing < ActiveRecord::Base simply_versioned :keep => 10 end If you do not specify a limit then old versions are never automatically deleted. You can manually delete them like this: thing.versions.purge( 10 ) which would delete all the but the last ten versions. If you want fine-grained control over when versions are created you can use: class Thing < ActiveRecord::Base simply_versioned :automatic => false end and new versions will no longer be created by default. You will then need to use the with_versioning method to create a version. Lastly you can control which columns will be versioned by specifying an exclude parameter. class Thing < ActiveRecord::Base simply_versioned :exclude => :awkward_column end or class Thing < ActiveRecord::Base simply_versioned :exclude => [:first_awkward_column,:second_awkward_column,...] end This may be helpful if you run into conflicts with other plugins which try to manage columns. 5. Create versions thing = Thing.create!( :foo => bar ) # creates v1 thing.foo = baz thing.save! # creates v2 If you need to control whether a version is created or not, use #with_versioning. For example: thing.with_versioning( false ) do |t| t.save! end or, using the "magic pen" (https://dablog.rubypal.com/2007/2/18/the-magic-pens-of-ruby thanks hmj): thing.with_versioning( false, &:save! ) 6. Find versions thing.versions.each do |version| ... end render :partial => 'thing_version', :collection => thing.versions thing.versions.current thing.versions.first thing.versions.get( 3 ) To find a version number: thing.version_number 7. Revert to a previous version thing.revert_to_version( 5 ) If a specific reversion needs to avoid overwriting some column values pass an :except option, e.g. thing.revert_to_version( 1, :except => [:name,:age] ) The revert_to_version method also takes an existing Version instance, e.g. version = thing.versions.find( ... ) thing.revert_to_version( version ) 8. Traverse versions thing.versions.current.previous thing.versions.first.next 9. Obtain a copy of a previous versioned model thing.versions.first.model # => Instantiated Thing with versioned values Thanks to: Chris Wanstrath (https://ozmm.org/) for useful feedback and GitHub Josh Susser (https://blog.hasmanythrough.com/) for useful suggestions and feedback Rick Olson (https://techno-weenie.net/) for all the many plugins whose code i've read Copyright (c) 2007 Matt Mower <self@mattmower.com> and released under the MIT license
This feature is coming soon. Sit tight!