neo4j-advanced 1.6.0.alpha.3-java

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,20 @@
1
+ # ignore netbeans specific stuff
2
+ nbproject
3
+
4
+ # ignore Rubymine
5
+ .idea
6
+
7
+ .rvmrc
8
+ .bundle
9
+ tmp
10
+ db/
11
+
12
+ # jedit
13
+ *~
14
+
15
+ # vim
16
+ .*.sw[a-z]
17
+
18
+ Gemfile.lock
19
+ coverage
20
+
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in neo4j-community.gemspec
4
+ gemspec
5
+
6
+ group 'test' do
7
+ gem "rspec", "= 2.6.0"
8
+ gem "neo4j"
9
+ end
data/README.md ADDED
@@ -0,0 +1,27 @@
1
+ JAR files for the neo4j Graph Database
2
+ ==================================================
3
+
4
+ This gem provides a set of jar files of the Neo4j Graph Database.
5
+
6
+ To use it: `require 'neo4j-jars'`
7
+
8
+ It can be used directly but the intention is to use it with [neo4j.rb](https://github.com/andreasronge/neo4j).
9
+
10
+ Versioning
11
+ ==================================================
12
+
13
+ The major and minor versions of the gem correspond to the version of the database.
14
+ The patch version is different.
15
+
16
+ That means:
17
+
18
+ - if you need `1.6`, use `~> 1.6.0` in the Gemfile. It will always update to the latest version of 1.6 of the database.
19
+ - if you need `1.6.M02`, then you will need to find the appropriate gem version on the [RubyGems](http://rubygems.org) and lock it (using `= 1.6.25` for example). But it will always be `1.6.xxx`.
20
+
21
+ License
22
+ ==================================================
23
+
24
+ This gem is MIT licensed.
25
+
26
+ However the jars included are licensed by [Neo4j](http://neo4j.orb).
27
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,21 @@
1
+ require "neo4j-advanced/version"
2
+
3
+
4
+ module Neo4j
5
+ module Advanced
6
+
7
+ def self.jars_root
8
+ "#{File.dirname(__FILE__)}/neo4j-advanced/jars"
9
+ end
10
+
11
+ def self.load_jars!
12
+ require 'java'
13
+ require 'neo4j-community'
14
+ Dir["#{jars_root}/*.jar"].each {|jar| require jar }
15
+ end
16
+
17
+ end
18
+ end
19
+
20
+ Neo4j::Advanced.load_jars!
21
+
@@ -0,0 +1,6 @@
1
+ module Neo4j
2
+ module Advanced
3
+ VERSION = "1.6.0.alpha.3"
4
+ NEO_VERSION = "1.6.M02"
5
+ end
6
+ end
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "neo4j-advanced/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "neo4j-advanced"
7
+ s.version = Neo4j::Advanced::VERSION
8
+ s.authors = ["Dmytrii Nagirniak", "Andreas Ronge"]
9
+ s.email = ["dnagir@gmail.com", "andreas.ronge@gmail.com"]
10
+ s.homepage = "https://github.com/dnagir/neo4j-advanced"
11
+ s.summary = "The neo4j Advanced edition v#{Neo4j::Advanced::NEO_VERSION} JAR files"
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
+
14
+ s.rubyforge_project = "neo4j-advanced"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.platform = 'java'
22
+ s.add_runtime_dependency "neo4j-community", "~> 1.6.0"
23
+
24
+ # specify any dependencies here; for example:
25
+ # s.add_development_dependency "rspec"
26
+ # s.add_runtime_dependency "rest-client"
27
+ end
@@ -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 ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: neo4j-advanced
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.6.0.alpha.3
5
+ prerelease: 6
6
+ platform: java
7
+ authors:
8
+ - Dmytrii Nagirniak
9
+ - Andreas Ronge
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2012-01-11 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: neo4j-community
17
+ requirement: &70180923616280 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 1.6.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *70180923616280
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/ '
28
+ email:
29
+ - dnagir@gmail.com
30
+ - andreas.ronge@gmail.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - .gitignore
36
+ - Gemfile
37
+ - README.md
38
+ - Rakefile
39
+ - lib/neo4j-advanced.rb
40
+ - lib/neo4j-advanced/jars/neo4j-advanced-1.6.M02.jar
41
+ - lib/neo4j-advanced/jars/neo4j-management-1.6.M02.jar
42
+ - lib/neo4j-advanced/version.rb
43
+ - neo4j-advanced.gemspec
44
+ - spec/neo4j_spec.rb
45
+ - spec/spec_helper.rb
46
+ homepage: https://github.com/dnagir/neo4j-advanced
47
+ licenses: []
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ! '>'
62
+ - !ruby/object:Gem::Version
63
+ version: 1.3.1
64
+ requirements: []
65
+ rubyforge_project: neo4j-advanced
66
+ rubygems_version: 1.8.10
67
+ signing_key:
68
+ specification_version: 3
69
+ summary: The neo4j Advanced edition v1.6.M02 JAR files
70
+ test_files:
71
+ - spec/neo4j_spec.rb
72
+ - spec/spec_helper.rb
73
+ has_rdoc: