Skip to content
Browse files

Modified for neo4j.rb 2.0 andreasronge/neo4j #135

  • Loading branch information...
1 parent 9d12b47 commit 1fa76ed31ae43b77e6ac8c04ab430202a2b59c80 @andreasronge committed May 2, 2012
View
125 Gemfile.lock 100755 → 100644
@@ -2,76 +2,86 @@ PATH
remote: .
specs:
devise-neo4j (1.1.0)
- devise (~> 1.3)
+ devise
neo4j
oa-oauth (~> 0.2.0)
oa-openid (~> 0.2.0)
+PATH
+ remote: /home/andreas/projects/neo4j
+ specs:
+ neo4j (2.0.0.alpha.9-java)
+ activemodel (>= 3.0.0, < 3.3)
+ neo4j-wrapper (= 0.0.11)
+ orm_adapter (>= 0.0.3)
+ railties (>= 3.0.0, < 3.3)
+
GEM
remote: http://rubygems.org/
specs:
- actionmailer (3.1.0)
- actionpack (= 3.1.0)
- mail (~> 2.3.0)
- actionpack (3.1.0)
- activemodel (= 3.1.0)
- activesupport (= 3.1.0)
+ actionmailer (3.2.3)
+ actionpack (= 3.2.3)
+ mail (~> 2.4.4)
+ actionpack (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- i18n (~> 0.6)
- rack (~> 1.3.2)
- rack-cache (~> 1.0.3)
- rack-mount (~> 0.8.2)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
rack-test (~> 0.6.1)
- sprockets (~> 2.0.0)
- activemodel (3.1.0)
- activesupport (= 3.1.0)
- bcrypt-ruby (~> 3.0.0)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.3)
+ activesupport (= 3.2.3)
builder (~> 3.0.0)
- i18n (~> 0.6)
- activerecord (3.1.0)
- activemodel (= 3.1.0)
- activesupport (= 3.1.0)
- arel (~> 2.2.1)
+ activerecord (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.1.0)
- activemodel (= 3.1.0)
- activesupport (= 3.1.0)
- activesupport (3.1.0)
+ activeresource (3.2.3)
+ activemodel (= 3.2.3)
+ activesupport (= 3.2.3)
+ activesupport (3.2.3)
+ i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.7)
- arel (2.2.1)
+ arel (3.0.2)
bcrypt-ruby (3.0.1-java)
builder (3.0.0)
- columnize (0.3.4)
- devise (1.5.3)
+ columnize (0.3.6)
+ devise (2.0.4)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
- warden (~> 1.1)
+ railties (~> 3.1)
+ warden (~> 1.1.1)
erubis (2.7.0)
faraday (0.6.1)
addressable (~> 2.2.4)
multipart-post (~> 1.1.0)
rack (>= 1.1.0, < 2)
hike (1.2.1)
i18n (0.6.0)
- mail (2.3.0)
+ journey (1.0.3)
+ json (1.7.0-java)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.1)
- mime-types (1.16)
- mocha (0.10.0)
+ mime-types (1.18)
+ mocha (0.11.3)
metaclass (~> 0.0.1)
- multi_json (1.0.3)
+ multi_json (1.0.4)
multi_xml (0.2.2)
multipart-post (1.1.5)
- neo4j (1.3.1-java)
- activemodel (>= 3.0.0)
- orm_adapter (>= 0.0.3)
- railties (>= 3.0.0)
- will_paginate (= 3.0.pre4)
- nokogiri (1.5.0-java)
+ neo4j-community (1.7.0-java)
+ neo4j-core (0.0.15-java)
+ neo4j-community (>= 1.7.0)
+ neo4j-wrapper (0.0.11-java)
+ neo4j-core (= 0.0.15)
+ nokogiri (1.5.2-java)
oa-core (0.2.6)
oa-oauth (0.2.6)
faraday (~> 0.6.1)
@@ -89,44 +99,43 @@ GEM
faraday (~> 0.6.1)
multi_json (>= 0.0.5)
orm_adapter (0.0.7)
- polyglot (0.3.2)
- rack (1.3.3)
- rack-cache (1.0.3)
+ polyglot (0.3.3)
+ rack (1.4.1)
+ rack-cache (1.2)
rack (>= 0.4)
- rack-mount (0.8.3)
- rack (>= 1.0.0)
rack-openid (1.3.1)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
- rails (3.1.0)
- actionmailer (= 3.1.0)
- actionpack (= 3.1.0)
- activerecord (= 3.1.0)
- activeresource (= 3.1.0)
- activesupport (= 3.1.0)
+ rails (3.2.3)
+ actionmailer (= 3.2.3)
+ actionpack (= 3.2.3)
+ activerecord (= 3.2.3)
+ activeresource (= 3.2.3)
+ activesupport (= 3.2.3)
bundler (~> 1.0)
- railties (= 3.1.0)
- railties (3.1.0)
- actionpack (= 3.1.0)
- activesupport (= 3.1.0)
+ railties (= 3.2.3)
+ railties (3.2.3)
+ actionpack (= 3.2.3)
+ activesupport (= 3.2.3)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
- rake (0.9.2)
- rdoc (3.9.4)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
ruby-debug (0.10.4)
columnize (>= 0.1)
ruby-debug-base (~> 0.10.4.0)
ruby-debug-base (0.10.4-java)
ruby-openid (2.1.8)
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)
- sprockets (2.0.0)
+ sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
@@ -135,21 +144,21 @@ GEM
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.29)
+ tzinfo (0.3.33)
warden (1.1.1)
rack (>= 1.0)
webrat (0.7.2)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)
- will_paginate (3.0.pre4)
PLATFORMS
java
DEPENDENCIES
devise-neo4j!
mocha
+ neo4j!
rails (~> 3.0)
rake
ruby-debug (>= 0.10.3)
View
2 README.rdoc
@@ -11,7 +11,7 @@ Devise: https://github.com/plataformatec/devise
Add the neo4j and devise-neo4j gems to your Gemfile:
- gem "neo4j", "~> 1.2"
+ gem "neo4j"
gem "devise-neo4j"
Run the bundle install command:
View
2 lib/devise/orm/neo4j/hook.rb
@@ -14,7 +14,7 @@ def devise_modules_hook!
# Overwrite the devise method to control indexation dependent on the specified modules
def devise(*modules)
# hack to get around Neo4j's requirement to index before uniqueness validation
- index :email, :type => :fulltext if modules.include?(:validatable) && !index?('email')
+ property :email, :index => :exact if modules.include?(:validatable) && !index?('email')
super
end
end
View
7 lib/devise/orm/neo4j/schema.rb
@@ -8,7 +8,6 @@ module Schema
# Tell how to apply schema methods
def apply_devise_schema(name, type, options={})
- index name, :type => :exact if INDEXED_PROPERTIES.include?(name)
create_property(name, type, options)
end
@@ -19,8 +18,10 @@ def create_property(name, type, options)
# If the property is required, its presence should be checked anyway
options.delete(:null)
-
- property name, { :type => map_type(type) }.merge!(options)
+ prop_conf = { :type => map_type(type) }
+ prop_conf[:index] = :exact if INDEXED_PROPERTIES.include?(name)
+ prop_conf.merge!(options)
+ property name, prop_conf
end
# map the Java type to the right Ruby type
View
2 lib/generators/neo4j/devise_generator.rb
@@ -17,4 +17,4 @@ def inject_devise_content
end
end
end
-end
+end
View
3 test/rails_app/app/neo4j/admin.rb
@@ -4,6 +4,5 @@ class Admin < Neo4j::Rails::Model
include Shim
include SharedAdmin
- index :remember_token
- property :remember_token
+ property :remember_token, :index => :exact
end
View
3 test/rails_app/app/neo4j/user.rb
@@ -4,8 +4,7 @@ class User < Neo4j::Rails::Model
include Shim
include SharedUser
- index :username
- property :username
+ property :username, :index => :exact
attr_accessible :username, :email, :password, :password_confirmation, :remember_me
end

0 comments on commit 1fa76ed

Please sign in to comment.
Something went wrong with that request. Please try again.