diff --git a/Gemfile.lock b/Gemfile.lock index c473997..bf8c926 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - architect4r (0.3) + architect4r (0.3.2) activemodel (~> 3.0) json (~> 1.5) typhoeus (~> 0.2) @@ -24,7 +24,7 @@ GEM guard (>= 0.8.4) i18n (0.6.0) json (1.6.1) - mime-types (1.16) + mime-types (1.17.1) multi_json (1.0.3) rake (0.9.2) rb-fsevent (0.4.3.1) diff --git a/License b/License new file mode 100644 index 0000000..08734a1 --- /dev/null +++ b/License @@ -0,0 +1,20 @@ +Copyright (c) 2011 Maximilian Schulz + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index a68c53a..c2eb2b0 100644 --- a/README.md +++ b/README.md @@ -40,72 +40,20 @@ Quick Start instrument.valid? instrument.save + # Updating attributes + instrument.update_attributes(params[:instrument]) + + # Finding records + Instrument.find_by_id(123) + class Fanship < Architect4r::Model::Relationship - # All relationships need a unique descriptor - descriptor 'fanship' # if not set it is derived from the class name - # Properties property :created_at, :cast_to => DateTime property :reason, :cast_to => String end # Init a class based relationship - Fanship.new( @user, @instrument, { :reason => 'Because I like you' }) - - # Filter associations by relationship type (:incoming, :outgoing, :all) - instrument.links(:outgoing) - - # Query by model or type - @user.links(:all, Fanship, 'studies') - - # Create a custom relationship - relationship = Architect4r::Model::Relationship.create(start_node, end_note, 'CustomType', { :active => true }) - # or - instrument.links(:incoming).create(:category, @other_node, { :created_at => DateTime.new, :active => true }) - instrument.links(:incoming).create(CategoryRelation, @other_node, { :created_at => DateTime.new, :active => true }) - - - # Updating attributes - instrument.update_attributes(params[:instrument]) - - # Finding records - Instrument.all - Instrument.find_by_id(123) - Instrument.find_by_name("Piano") - Instrument.find_by_name("Klavier", :de) - Instrument.find_by_cypher("start cat=(123) match (cat)--(x) return x limit 2") - -Roadmap / Next Steps --------------------- - -Check the release notes for info on previous versions - -_Currectly working on_ - -* Add relationships -* Auto add class related nodes to a class root node for easy queries - -_Planned upcoming features_ -* Add node indexes -* Add relationship indexes -* Add auto indexing of node properties / nodes (not neo4j auto indexing) -* Add more node finders by using indexes -* Create a ORM (ActiveRecord) synced node -* Give the cypher plugin some more love -* Add more default queries -* Rake tasks for installing neo4j -* Rake tasks for test setup -* Make it compatible to paperclip and carrierwave -* Make it compatible to sunspot search -* Add basic authentication -* Add digest authentication -* Improve test case -* Versioning of nodes (update node but create a linked node with the old properties) -* Optimize, optimize, optimize - -_sometime in the future_ - -* Allow batch execution by facilitating hydra's concurrency model + Fanship.new(@user, @instrument, { :reason => 'Because I like you' }) License ------- diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 4298ad7..31e091d 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,11 +1,28 @@ # Release Notes +## v0.3.2 + +* Support for carrierwave file upload mechanism + +## v0.3.1 + +* Sync with ActiveModel records + + In order to use neo4j in combination with other databases, we provide a + small extension which allows you to keep a node in sync with another's + datastore record. + ## v0.3 This release marks the first public release. So I wont get into length with its changes and new features. Let's just say it allows you to create nodes and relationships between nodes. That's it! +* Nodes (create, update, destroy) +* Relationships (create, update, destroy) +* Querying neo4j by using cypher query language +* Callbacks and validations for nodes and relationships + ## v0.2 Another internal release which was not ready for development or production. diff --git a/Roadmap.md b/Roadmap.md new file mode 100644 index 0000000..6e6bc13 --- /dev/null +++ b/Roadmap.md @@ -0,0 +1,31 @@ +# Roadmap + +_Check the release notes for info on previous versions_ + + +There is no real roadmap for architect4r, as this project is only used in +a single project so far. If there is anything you miss, either fork the +project, implement the feature and send a pull request, or submit an issue. + +The following items are kinda planned to be integrated in the future: + +* Give the cypher plugin some more love +* Add more default queries +* Add tracking of dirty attributes +* Make it compatible to file uploaders such as paperclip and carrierwave +* Make it compatible to search engines such as sunspot, elastic search, sphinx, … +* Rake tasks for installing neo4j +* Rake tasks for test setup +* Versioning of nodes (update node but create a linked node with the old properties) +* Improve documentation +* Improve test cases + +And there are a few features which might be integrated, but are not yet really planned: + +* Accessible relationships as you know it from active record +* Support for indexes (nodes and relations) +* Add more finders by using indexes +* Add auto indexing of node properties / nodes (not neo4j auto indexing) +* Add basic authentication +* Add digest authentication +* Facilitate hydra's concurrency model \ No newline at end of file diff --git a/Specs.md b/Specs.md new file mode 100644 index 0000000..0e17b02 --- /dev/null +++ b/Specs.md @@ -0,0 +1,21 @@ +# Specs + +Some code which might define the future interface of the gem. + + # Finding records + Instrument.all + Instrument.find_by_name("Piano") + Instrument.find_by_name("Klavier", :de) + Instrument.find_by_cypher("start cat=(123) match (cat)--(x) return x limit 2") + + # Filter associations by relationship type (:incoming, :outgoing, :all) + instrument.links(:outgoing) + + # Query by model or type + @user.links(:all, Fanship, 'studies') + + # Create a custom relationship + relationship = Architect4r::Model::Relationship.create(start_node, end_note, 'CustomType', { :active => true }) + # or + instrument.links(:incoming).create(:category, @other_node, { :created_at => DateTime.new, :active => true }) + instrument.links(:incoming).create(CategoryRelation, @other_node, { :created_at => DateTime.new, :active => true }) \ No newline at end of file diff --git a/architect4r.gemspec b/architect4r.gemspec index 5baace4..ab56a02 100644 --- a/architect4r.gemspec +++ b/architect4r.gemspec @@ -6,8 +6,8 @@ Gem::Specification.new do |s| s.name = "architect4r" s.version = Architect4r::VERSION s.authors = ["Maximilian Schulz"] - s.email = ["max@jungeelite.de"] - s.homepage = "http://max.jungeelite.de/" + s.email = ["m.schulz@kulturfluss.de"] + s.homepage = "http://www.kulturfluss.de/" s.summary = %q{A gem for working with the neo4j REST interface.} s.description = %q{This gem is intended for making a neo4j graph db accessible by providing a ruby wrapper for the REST API.}