neo4j 1.0.0.beta.30-java → 1.0.0.beta.31-java

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'neo4j'
4
+
5
+ if ARGV.length == 0
6
+ puts <<TEXT
7
+ A tool for copying jar files needed by the application server, like trinidad
8
+ It copies the jar files to the lib folder of the current directory
9
+ Usage: neo4j-jars [-ha|-backup]
10
+ -ha copies the High Available cluster Jars
11
+ -backup copies the online backup jars
12
+ -local copies only the jars for running a local neo4j db
13
+ TEXT
14
+ exit
15
+ end
16
+
17
+ Neo4j.load_online_backup if ARGV.include?('-backup')
18
+ Neo4j.load_ha_jars if ARGV.include?('-ha')
19
+
20
+ lib_dir = File.join(Dir.pwd, 'lib')
21
+ raise "Expected a lib folder where to copy the jars file, mkdir #{lib_dir}? " unless File.exist?(lib_dir)
22
+
23
+ files = $CLASSPATH.find_all{|x| x =~ /neo4j\/jars/}.collect{|y| y.sub('file:', '')}
24
+ files.each {|file| FileUtils.cp(file, lib_dir)}
25
+
26
+ puts "copied #{files.size} files to #{lib_dir}"
@@ -183,9 +183,9 @@ module Neo4j
183
183
  #
184
184
  def add_index(entity, field, value)
185
185
  return false unless @field_types.has_key?(field)
186
- value = indexed_value_for(field, value)
186
+ conv_value = indexed_value_for(field, value)
187
187
  index = index_for_field(field.to_s)
188
- index.add(entity, field, value)
188
+ index.add(entity, field, conv_value)
189
189
  @parent_indexers.each { |i| i.add_index(entity, field, value) }
190
190
  end
191
191
 
@@ -52,7 +52,6 @@ module Neo4j
52
52
  props.each do |prop|
53
53
  pname = prop.to_sym
54
54
  _decl_props[pname] ||= {}
55
- _decl_props[pname][:defined] = true
56
55
 
57
56
  define_method(pname) do
58
57
  Neo4j::TypeConverters.to_ruby(self.class, pname, self[pname])
@@ -77,7 +76,7 @@ module Neo4j
77
76
  #
78
77
  def property?(prop_name)
79
78
  return false if _decl_props[prop_name.to_sym].nil?
80
- _decl_props[prop_name.to_sym][:defined] == true
79
+ !_decl_props[prop_name.to_sym].nil?
81
80
  end
82
81
  end
83
82
  end
@@ -23,7 +23,6 @@ module Neo4j
23
23
  _decl_props[property] = options
24
24
  handle_property_options_for(property, options)
25
25
  define_property_methods_for(property, options)
26
- _decl_props[property][:defined] = true # TODO is this needed ?
27
26
  end
28
27
 
29
28
  def handle_property_options_for(property, options)
@@ -46,7 +46,7 @@ module Neo4j
46
46
  when "Time"
47
47
  Time.now
48
48
  end
49
-
49
+
50
50
  send("#{attribute}=", value)
51
51
  end
52
52
 
@@ -56,7 +56,7 @@ module Neo4j
56
56
 
57
57
  # ensure there's always a type on the timestamp properties
58
58
  if Neo4j::Config[:timestamps] && TIMESTAMP_PROPERTIES.include?(property)
59
- _decl_props[property][:type] = Time
59
+ _decl_props[property][:type] ||= Time
60
60
  end
61
61
  end
62
62
  end
@@ -1,3 +1,3 @@
1
1
  module Neo4j
2
- VERSION = "1.0.0.beta.30"
2
+ VERSION = "1.0.0.beta.31"
3
3
  end
@@ -23,7 +23,7 @@ It comes included with the Apache Lucene document database.
23
23
 
24
24
  s.require_path = 'lib'
25
25
  s.files = Dir.glob("{bin,lib,config}/**/*") + %w(README.rdoc CHANGELOG CONTRIBUTORS Gemfile neo4j.gemspec)
26
- s.executables = 'neo4j-shell'
26
+ s.executables = ['neo4j-shell', 'neo4j-jars']
27
27
  s.has_rdoc = true
28
28
  s.extra_rdoc_files = %w( README.rdoc )
29
29
  s.rdoc_options = ["--quiet", "--title", "Neo4j.rb", "--line-numbers", "--main", "README.rdoc", "--inline-source"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: neo4j
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 1.0.0.beta.30
5
+ version: 1.0.0.beta.31
6
6
  platform: java
7
7
  authors:
8
8
  - Andreas Ronge
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-16 00:00:00 +01:00
13
+ date: 2011-02-17 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -63,11 +63,13 @@ description: "You can think of Neo4j as a high-performance graph engine with all
63
63
  email: andreas.ronge@gmail.com
64
64
  executables:
65
65
  - neo4j-shell
66
+ - neo4j-jars
66
67
  extensions: []
67
68
 
68
69
  extra_rdoc_files:
69
70
  - README.rdoc
70
71
  files:
72
+ - bin/neo4j-jars
71
73
  - bin/neo4j-shell
72
74
  - bin/neo4j-shell~
73
75
  - lib/neo4j.rb
@@ -210,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
212
  requirements: []
211
213
 
212
214
  rubyforge_project: neo4j
213
- rubygems_version: 1.4.2
215
+ rubygems_version: 1.5.0
214
216
  signing_key:
215
217
  specification_version: 3
216
218
  summary: A graph database for JRuby