Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Oct 10, 2012
Scott Wheeler scotchi Move copyright header up above requires eab1af6
Scott Wheeler scotchi Rename to 'directededge', bump version 819e506
Scott Wheeler scotchi Start the rewrite: add XML parser / generator and Link class 70cc369
Scott Wheeler scotchi Start working in a database and item skeleton 9d340da
Scott Wheeler scotchi Move most of the tricky logic for Items into the ContainerProxy 8d50c63
Scott Wheeler scotchi Start laying down the framework for saving 43de91b
Scott Wheeler scotchi Add in our own Resource subclass to handle parameter formatting 2f53f27
Scott Wheeler scotchi Get saving working 29b0632
Scott Wheeler scotchi Return self from load d8c1cfe
Scott Wheeler scotchi Combine the logic of these two methods into a single private method bf4164c
Scott Wheeler scotchi Make sure to convert hash values to strings 3a9f7c2
Scott Wheeler scotchi Add in preselected and blacklisted to the working set 3d54235
Scott Wheeler scotchi Add in working UpdateJob
Compared to the old one, this creates temp files automatically without
bothering the API user with such and also has a much more Ruby-ish API.
2b52afd
Scott Wheeler scotchi Formatting f85ced4
Scott Wheeler scotchi Update to latest Jeweler, regenerate gem spec
The current version of Jeweler now uses Gemfiles a la Bundler.  One tricky
thing to note for the future is that 'rake gemspec' totally fails if the
gem's root directory isn't the same as the git root directory, so we have to
copy the dir to another place (e.g. /tmp) to create the specfile.
0088d3b
Scott Wheeler scotchi Just work with the first item instead of a list
This was originally done as a list just in case that was ever useful, but,
well, it seems silly to have code for a case that's never used.
0ad066a
Scott Wheeler scotchi Get related and recommended queries working 77ebea3
Scott Wheeler scotchi Make it so that you don't have to pass in an object to create a link
Now you can use:

item.links.add 'product5', :weight => 2

Instead of:

item.links.add DirectedEdge::Link.new('product5', :weight => 2)
106242a
Scott Wheeler scotchi Rename file to match class name 08fffcd
Scott Wheeler scotchi Add a method to import from a file d8a38ec
Scott Wheeler scotchi Add function to export the database to a file f4eeb89
Scott Wheeler scotchi The export / import methods make more sense as part of the database 8939c3f
Scott Wheeler scotchi Extend parsed strings to include attributes available in the XML
This is useful with the :include_properties = true option to
related and recommended.
8fa4835
Scott Wheeler scotchi Add convenience methods for setting / fetching properties 350c677
Scott Wheeler scotchi Make sure that link properties are converted to the right type on the…
… way in
178ecff
Scott Wheeler scotchi Formatting 270fe58
Scott Wheeler scotchi Add group related ad96d91
Scott Wheeler scotchi Rename these to simply import and export c4cb859
Scott Wheeler scotchi Convert Items to Links as well b59e96f
Scott Wheeler scotchi Don't require a block to be passed for creating raw items faeadfb
Scott Wheeler scotchi We need to create raw items even if there's no queued data 12bf85e
Scott Wheeler scotchi The source member was removed in an earlier revision f4011c1
Scott Wheeler scotchi Make sure that a comparison between links and strings works 67e5818
Scott Wheeler scotchi Port and get working the Exporter (now UpdateJob) test 895e243
Scott Wheeler scotchi Port test bd2a2a9
Scott Wheeler scotchi There's a better test_tags later on 023b0e6
Scott Wheeler scotchi We need to be able to compare between Link and Item objects as well 4a699f8
Scott Wheeler scotchi Define a 'to_s' method for items ce5edf4
Scott Wheeler scotchi Recommended queries should use exclude_linked by default c317717
Scott Wheeler scotchi Clear the query cache on save e3b8943
Scott Wheeler scotchi Add a destroy method 3278d40
Scott Wheeler scotchi Port the item tests to the new bindings e0054e5
Scott Wheeler scotchi Port tags and properties tests 396e5d3
Scott Wheeler scotchi Port link types and load test 14772d3
Scott Wheeler scotchi 'reset' is a better approximation of the old 'reload' b627f97
Scott Wheeler scotchi Make it possible to look up links by target / type 9d9b426
Scott Wheeler scotchi Leave the error checking for this on the server a49d5e9
Scott Wheeler scotchi Port ranking test c546f66
Scott Wheeler scotchi Port group related test 864df21
Scott Wheeler scotchi URI.encode is deprecated and broken; use CGI.escape 7e075a4
Scott Wheeler scotchi Port bad links and query parameters tests 2421c2b
Scott Wheeler scotchi Make it possible to look up list values by value as well 9501ca0
Scott Wheeler scotchi Port properties test 1444dec
Scott Wheeler scotchi Port include_tags test efe1a47
Scott Wheeler scotchi Fix typo 8ecb9ca
Scott Wheeler scotchi Port preselected test ad2dd4a
Scott Wheeler scotchi save calls reset, so doing such explicitly isn't needed 07346d1
Scott Wheeler scotchi Port blacklisted test 10bb803
Scott Wheeler scotchi Remove timeout test since it's been unused for ages dc516a9
Scott Wheeler scotchi Finish porting include_properties test a3e64de
Scott Wheeler scotchi Minor updates to README
This should later probably evolve into more of a tutorial, but this
fixes the syntax errors that are based on the old API
972025f
Scott Wheeler scotchi Organize imports 0d8bc51
Scott Wheeler scotchi Don't send over values that == 0 601066b
Scott Wheeler scotchi Add a method to run an import job as a block 841f042
Scott Wheeler scotchi Add tests for new UpdateJob methods 1042888
lucijan lucijan convert method to symbol before looking it up e7f6809
Scott Wheeler scotchi Don't throw exceptions when accessing an item that hasn't been create…
…d yet

This also adds an exists? method for testing if an object exists in the database
already.
4c1d285
Scott Wheeler scotchi Don't send (empty) add / remove requests in addition to the main PUT
If we're doing wholesale replacement of a cached item, we don't need to bother
with the POST to add / remove the additional info since the info for the PUT
request should be totally self-contained.
286fe48
Scott Wheeler scotchi Require Rake 0.8.7 3bf78a9
Scott Wheeler scotchi Add test for 'constness' in things coming out of the ContainerProxy b248448
Scott Wheeler scotchi Don't check here unless we're on nginx
We already know that this fails on Apache.  We don't need to be reminded
of such every time we run the tests on localhost.
5e3336f
Scott Wheeler scotchi Specify the path in the require
This allows single tests to be run, i.e. not using rake
57211cf
Scott Wheeler scotchi Formatting bcac426
Scott Wheeler scotchi Get history entries basically working eafb7f8
Scott Wheeler scotchi Switch to using the /items/ prefix for item IDs 6241401
Scott Wheeler scotchi Start adding in a History class to manipulate the list of histories 5d7f6df
Scott Wheeler scotchi Make it possible to add and remove histories 7673211
Scott Wheeler scotchi Make it possible to completely replace the histories list c554807
Scott Wheeler scotchi Read these out of the History object 4dba031
Scott Wheeler scotchi Add an equality operator ad0721f
Scott Wheeler scotchi Add tests for adding and removing histories 0a45711
Scott Wheeler scotchi nil.to_i returns 0, which evaluates to true; use a turnery operator i…
…nstead
6dfdd81
Scott Wheeler scotchi Add test for history entries
Removing individual history entries is still not supported (short of doing
a "set" on the entire set of entries).
aceed00
Scott Wheeler scotchi Add in support in the bindings for fetching properties of history items.
This slightly changes the API for creating HistoryEntry objects from:

HistoryEntry.new('target', :history => history)

to:

HistoryEntry.new(history, 'target')

Also, now, to trigger loading of history properties, the item must be passed
the :include_properties option, e.g.:

Item.new(db, 'item1', :include_properties => true)
83f2b2e
Scott Wheeler scotchi We need an accessor for the properties 1ff6fa6