neo4j-advanced 1.6.0.alpha-java → 1.6.1.alpha.1-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -1,5 +1,20 @@
1
- *.gem
2
- *.swp
1
+ # ignore netbeans specific stuff
2
+ nbproject
3
+
4
+ # ignore Rubymine
5
+ .idea
6
+
7
+ .rvmrc
3
8
  .bundle
9
+ tmp
10
+ db/
11
+
12
+ # jedit
13
+ *~
14
+
15
+ # vim
16
+ .*.sw[a-z]
17
+
4
18
  Gemfile.lock
5
- pkg/*
19
+ coverage
20
+
data/Gemfile CHANGED
@@ -2,3 +2,8 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in neo4j-community.gemspec
4
4
  gemspec
5
+
6
+ group 'test' do
7
+ gem "rspec", "= 2.6.0"
8
+ gem "neo4j"
9
+ end
data/Rakefile CHANGED
@@ -1 +1,40 @@
1
1
  require "bundler/gem_tasks"
2
+
3
+ def source_file
4
+ gz_file = Dir.new('tmp').entries.find { |x| x =~ /gz$/ }
5
+ File.expand_path("./tmp/#{gz_file}")
6
+ end
7
+
8
+ def unpack_lib_dir
9
+ gz_file = Dir.new('tmp').entries.find { |x| x =~ /gz$/ }
10
+ dir = gz_file.gsub('-unix.tar.gz', '')
11
+ File.expand_path("./tmp/#{dir}/lib")
12
+ end
13
+
14
+ def jar_files_to_copy
15
+ Dir.new(unpack_lib_dir).entries.find_all {|x| x =~ /\.jar/}
16
+ end
17
+
18
+ desc "Delete old Jar files"
19
+ task :delete_old_jar do
20
+ root = File.expand_path("./lib/neo4j-advanced/jars")
21
+ files = Dir.new(root).entries.find_all{|f| f =~ /\.jar/}
22
+ files.each do |file|
23
+ system "rm #{root}/#{file}"
24
+ end
25
+ end
26
+
27
+ def include_jar?(file)
28
+ include_only = %w[neo4j-advanced neo4j-management]
29
+ include_only.each do |i|
30
+ return true if file.start_with?(i)
31
+ end
32
+ false
33
+ end
34
+
35
+ desc "Upgrade using downloaded ...tar.gz file in ./tmp"
36
+ task :upgrade => [:delete_old_jar] do
37
+ system "cd tmp; tar xf #{source_file}"
38
+ jars = File.expand_path("./lib/neo4j-advanced/jars")
39
+ jar_files_to_copy.each {|f| system "cp #{unpack_lib_dir}/#{f} #{jars}" if include_jar?(f)}
40
+ end
@@ -1,6 +1,6 @@
1
1
  module Neo4j
2
2
  module Advanced
3
- VERSION = "1.6.0.alpha"
4
- NEO_VERSION = "1.6.M02"
3
+ VERSION = "1.6.1.alpha.1"
4
+ NEO_VERSION = "1.6.1"
5
5
  end
6
6
  end
@@ -5,12 +5,13 @@ module Neo4j
5
5
  module Advanced
6
6
 
7
7
  def self.jars_root
8
- "#{File.dirname(__FILE__)}/neo4j-advanced/jars"
8
+ File.join("#{File.dirname(__FILE__)}", "neo4j-advanced", "jars")
9
9
  end
10
10
 
11
11
  def self.load_jars!
12
12
  require 'java'
13
- puts jars_root
13
+ require 'neo4j-community'
14
+ ::Neo4j::Community.ensure_version!(Advanced::NEO_VERSION, 'advanced')
14
15
  Dir["#{jars_root}/*.jar"].each {|jar| require jar }
15
16
  end
16
17
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
9
9
  s.email = ["dnagir@gmail.com", "andreas.ronge@gmail.com"]
10
10
  s.homepage = "https://github.com/dnagir/neo4j-advanced"
11
11
  s.summary = "The neo4j Advanced edition v#{Neo4j::Advanced::NEO_VERSION} JAR files"
12
- s.description = s.summary
12
+ s.description = "The Java Jar files for the Neo4j Advanced edition, adding advanced monitoring – licensed under the AGPL, see http://neo4j.org/licensing-guide/ "
13
13
 
14
14
  s.rubyforge_project = "neo4j-advanced"
15
15
 
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  s.platform = 'java'
22
+ s.add_runtime_dependency "neo4j-community", "~> 1.6.0.alpha.9"
22
23
 
23
24
  # specify any dependencies here; for example:
24
25
  # s.add_development_dependency "rspec"
@@ -0,0 +1,10 @@
1
+ require File.join(File.dirname(__FILE__), 'spec_helper')
2
+
3
+ describe Neo4j, :type => :transactional do
4
+
5
+ after(:each) { Neo4j.threadlocal_ref_node = nil }
6
+
7
+ it "#management returns by default a management for Primitives" do
8
+ (Neo4j.management.get_number_of_node_ids_in_use > 0).should be true
9
+ end
10
+ end
@@ -0,0 +1,82 @@
1
+ require 'rubygems'
2
+ require "bundler/setup"
3
+ require 'rspec'
4
+ require 'fileutils'
5
+ require 'tmpdir'
6
+
7
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), "..", "lib")
8
+
9
+ require 'neo4j'
10
+ require 'neo4j-advanced'
11
+
12
+ require 'logger'
13
+ Neo4j::Config[:logger_level] = Logger::ERROR
14
+ Neo4j::Config[:storage_path] = File.join(Dir.tmpdir, "neo4j-rspec-db")
15
+ Neo4j::Config[:debug_java] = true
16
+
17
+ Neo4j::Config[:identity_map] = (ENV['IDENTITY_MAP'] == "true") # faster tests
18
+ Neo4j::IdentityMap.enabled = (ENV['IDENTITY_MAP'] == "true") # this is normally set in the rails rack middleware
19
+
20
+ def rm_db_storage
21
+ FileUtils.rm_rf Neo4j::Config[:storage_path]
22
+ raise "Can't delete db" if File.exist?(Neo4j::Config[:storage_path])
23
+ end
24
+
25
+ def finish_tx
26
+ return unless @tx
27
+ @tx.success
28
+ @tx.finish
29
+ @tx = nil
30
+ end
31
+
32
+ def new_tx
33
+ finish_tx if @tx
34
+ @tx = Neo4j::Transaction.new
35
+ end
36
+
37
+ # ensure the translations get picked up for tests
38
+ I18n.load_path += Dir[File.join(File.dirname(__FILE__), '..', 'config', 'locales', '*.{rb,yml}')]
39
+
40
+ # Requires supporting ruby files with custom matchers and macros, etc,
41
+ # in spec/support/ and its subdirectories.
42
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
43
+
44
+ # load all fixture classes
45
+ Dir["#{File.dirname(__FILE__)}/fixture/**/*.rb"].each {|f| require f}
46
+
47
+ # set database storage location
48
+ Neo4j::Config[:storage_path] = File.join(Dir.tmpdir, 'neo4j-rspec-tests')
49
+
50
+ RSpec.configure do |c|
51
+ $name_counter = 0
52
+
53
+ c.filter_run_excluding :identity_map => true if not Neo4j::IdentityMap.enabled
54
+
55
+ c.before(:each, :type => :transactional) do
56
+ new_tx
57
+ end
58
+
59
+ c.after(:each, :type => :transactional) do
60
+ finish_tx
61
+ Neo4j::Rails::Model.close_lucene_connections
62
+ end
63
+
64
+ c.after(:each) do
65
+ finish_tx
66
+ Neo4j::Rails::Model.close_lucene_connections
67
+ Neo4j::Transaction.run do
68
+ Neo4j::Index::IndexerRegistry.delete_all_indexes
69
+ end
70
+ Neo4j::Transaction.run do
71
+ Neo4j.threadlocal_ref_node = Neo4j::Node.new :name => "ref_#{$name_counter}"
72
+ $name_counter += 1
73
+ end
74
+ end
75
+
76
+ c.before(:all) do
77
+ rm_db_storage unless Neo4j.running?
78
+ end
79
+
80
+ end
81
+
82
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-advanced
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0.alpha
4
+ version: 1.6.1.alpha.1
5
5
  prerelease: 6
6
6
  platform: java
7
7
  authors:
@@ -10,9 +10,21 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-01-10 00:00:00.000000000 Z
14
- dependencies: []
15
- description: The neo4j Advanced edition v1.6.M02 JAR files
13
+ date: 2012-02-27 00:00:00.000000000Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: neo4j-community
17
+ requirement: &24220380 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 1.6.0.alpha.9
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *24220380
26
+ description: ! 'The Java Jar files for the Neo4j Advanced edition, adding advanced
27
+ monitoring – licensed under the AGPL, see http://neo4j.org/licensing-guide/ '
16
28
  email:
17
29
  - dnagir@gmail.com
18
30
  - andreas.ronge@gmail.com
@@ -25,25 +37,12 @@ files:
25
37
  - README.md
26
38
  - Rakefile
27
39
  - lib/neo4j-advanced.rb
28
- - lib/neo4j-advanced/jars/geronimo-jta_1.1_spec-1.1.1.jar
29
- - lib/neo4j-advanced/jars/lucene-core-3.1.0.jar
30
- - lib/neo4j-advanced/jars/neo4j-advanced-1.6.M02.jar
31
- - lib/neo4j-advanced/jars/neo4j-community-1.6.M02.jar
32
- - lib/neo4j-advanced/jars/neo4j-cypher-1.6.M02.jar
33
- - lib/neo4j-advanced/jars/neo4j-graph-algo-1.6.M02.jar
34
- - lib/neo4j-advanced/jars/neo4j-graph-matching-1.6.M02.jar
35
- - lib/neo4j-advanced/jars/neo4j-jmx-1.6.M02.jar
36
- - lib/neo4j-advanced/jars/neo4j-kernel-1.6.M02.jar
37
- - lib/neo4j-advanced/jars/neo4j-lucene-index-1.6.M02.jar
38
- - lib/neo4j-advanced/jars/neo4j-management-1.6.M02.jar
39
- - lib/neo4j-advanced/jars/neo4j-shell-1.6.M02.jar
40
- - lib/neo4j-advanced/jars/neo4j-udc-1.6.M02.jar
41
- - lib/neo4j-advanced/jars/org.apache.servicemix.bundles.jline-0.9.94_1.jar
42
- - lib/neo4j-advanced/jars/scala-library-2.9.0-1.jar
43
- - lib/neo4j-advanced/jars/server-api-1.6.M02.jar
40
+ - lib/neo4j-advanced/jars/neo4j-advanced-1.6.1.jar
41
+ - lib/neo4j-advanced/jars/neo4j-management-1.6.1.jar
44
42
  - lib/neo4j-advanced/version.rb
45
- - lib/neo4j-jars.rb
46
43
  - neo4j-advanced.gemspec
44
+ - spec/neo4j_spec.rb
45
+ - spec/spec_helper.rb
47
46
  homepage: https://github.com/dnagir/neo4j-advanced
48
47
  licenses: []
49
48
  post_install_message:
@@ -67,6 +66,5 @@ rubyforge_project: neo4j-advanced
67
66
  rubygems_version: 1.8.10
68
67
  signing_key:
69
68
  specification_version: 3
70
- summary: The neo4j Advanced edition v1.6.M02 JAR files
69
+ summary: The neo4j Advanced edition v1.6.1 JAR files
71
70
  test_files: []
72
- has_rdoc:
data/lib/neo4j-jars.rb DELETED
@@ -1 +0,0 @@
1
- require "neo4j-advanced"