neo4j-test 1.9-java

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ *.gem
2
+ *.swp
3
+ Gemfile.lock
4
+ .DS_Store
5
+ *.rbc
6
+ .bundle
7
+ .config
8
+ coverage
9
+ InstalledFiles
10
+ lib/bundler/man
11
+ pkg
12
+ rdoc
13
+ spec/reports
14
+ test/tmp
15
+ test/version_tmp
16
+ tmp
17
+
18
+ # YARD artifacts
19
+ .yardoc
20
+ _yardoc
21
+ doc/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in neo4j-community.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,16 @@
1
+ JAR files for the neo4j Graph Database
2
+ ==================================================
3
+
4
+ This gem provides a set of jar files for the Neo4j Graph Database.
5
+
6
+ To use it: `require 'neo4j-test'`
7
+
8
+ It can be used directly but the intention is to use it with [neo4j.rb](https://github.com/andreasronge/neo4j).
9
+
10
+
11
+ License
12
+ ==================================================
13
+
14
+ This gem is MIT licensed.
15
+
16
+ However the jars included are licensed by [Neo4j](http://neo4j.orb).
data/Rakefile ADDED
@@ -0,0 +1,63 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ def download_folder
4
+ abort "Please create a #{File.expand_path('tmp')} folder and copy the neo4j community gz/tar file downloaded from http://neo4j.org/download" unless File.directory?('tmp')
5
+ Dir.new('tmp')
6
+ end
7
+
8
+ def tar_file
9
+ download_folder.entries.find { |x| x =~ /gz$/ || x =~ /tar$/}.tap do |f|
10
+ abort "expected a neo4j .gz/.tar file in folder #{File.expand_path(download_folder.path)}" unless f
11
+ end
12
+ end
13
+
14
+ def source_file
15
+ File.expand_path("./tmp/#{tar_file}")
16
+ end
17
+
18
+ def unpack_lib_dir
19
+ dir = tar_file.gsub('-unix.tar.gz', '')
20
+ dir = dir.gsub('-unix.tar', '')
21
+ File.expand_path("./tmp/#{dir}/lib")
22
+ end
23
+
24
+ def jar_files_to_copy
25
+ Dir.new(unpack_lib_dir).entries.find_all {|x| x =~ /\.jar/}
26
+ end
27
+
28
+ def system_unpack_lib_dir
29
+ dir = tar_file.gsub('-unix.tar.gz', '')
30
+ dir = dir.gsub('-unix.tar', '')
31
+ File.expand_path("./tmp/#{dir}/system/lib")
32
+ end
33
+
34
+ def system_jars
35
+ Dir.new(system_unpack_lib_dir).entries.find_all {|x| x =~ /concurrentlinkedhashmap-lru/}
36
+ end
37
+
38
+ desc "List System Jars"
39
+ task :list do
40
+ puts system_jars.inspect
41
+ end
42
+
43
+
44
+ desc "Delete old Jar files"
45
+ task :delete_old_jar do
46
+ root = File.expand_path("./lib/neo4j-community/jars")
47
+ files = Dir.new(root).entries.find_all{|f| f =~ /\.jar/}
48
+ files.each do |file|
49
+ system "git rm #{root}/#{file}"
50
+ end
51
+ end
52
+
53
+ desc "Upgrade using downloaded ...tar.gz file in ./tmp"
54
+ task :upgrade => [:delete_old_jar] do
55
+ system "cd tmp; tar xf #{source_file}"
56
+ jars = File.expand_path("./lib/neo4j-community/jars")
57
+ puts "Jar dir #{jars}"
58
+ FileUtils.mkdir_p(jars)
59
+ test_jars = File.expand_path("./lib/neo4j-community/test-jars")
60
+ jar_files_to_copy.each {|f| system "cp #{unpack_lib_dir}/#{f} #{jars}; git add #{jars}/#{f}" unless f =~ /tests/}
61
+ system_jars.each {|f| system "cp #{system_unpack_lib_dir}/#{f} #{jars}; git add #{jars}/#{f}" unless f =~ /tests/}
62
+ jar_files_to_copy.each {|f| system "cp #{unpack_lib_dir}/#{f} #{test_jars}" if f =~ /tests/}
63
+ end
data/lib/neo4j-jars.rb ADDED
@@ -0,0 +1 @@
1
+ require "neo4j-test"
@@ -0,0 +1,6 @@
1
+ module Neo4j
2
+ module Test
3
+ VERSION = "1.9"
4
+ NEO_VERSION = "1.9"
5
+ end
6
+ end
data/lib/neo4j-test.rb ADDED
@@ -0,0 +1,26 @@
1
+ require "neo4j-test/version"
2
+
3
+
4
+ module Neo4j
5
+ module Test
6
+
7
+ def self.jars_root
8
+ File.join("#{File.dirname(__FILE__)}", "neo4j-test", "jars")
9
+ end
10
+
11
+ def self.load_jars!
12
+ require 'java'
13
+ Dir["#{jars_root}/*.jar"].each {|jar| require jar }
14
+ end
15
+
16
+ # This can be used by dependent gems to verify the Database versions have no mismatch.
17
+ def self.ensure_version!(other, edition)
18
+ return if ::Neo4j::Test::NEO_VERSION == other
19
+ raise "Mismatch of Neo4j JAR versions. Already loaded neo4j-community JAR files '#{::Neo4j::Test::NEO_VERSION}' but neo4j-#{edition}: '#{other}'."
20
+ end
21
+
22
+ end
23
+ end
24
+
25
+ Neo4j::Test.load_jars!
26
+
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "neo4j-test/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "neo4j-test"
7
+ s.version = Neo4j::Test::VERSION
8
+ s.authors = ["Volker Pacher"]
9
+ s.email = ["volker.pacher@gmail.com"]
10
+ s.homepage = "https://github.com/vpacher/neo4j-test"
11
+ s.summary = "The neo4j jar files for the impermanent database v#{Neo4j::Test::NEO_VERSION}"
12
+ s.description = "The Java Jar files for the Neo4j Impermanent graph database "
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.require_paths = ["lib"]
18
+
19
+ s.platform = 'java'
20
+
21
+ # specify any dependencies here; for example:
22
+ s.add_development_dependency "rake"
23
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: neo4j-test
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.9'
5
+ prerelease:
6
+ platform: java
7
+ authors:
8
+ - Volker Pacher
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-07-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ none: false
22
+ requirement: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ none: false
28
+ prerelease: false
29
+ type: :development
30
+ description: 'The Java Jar files for the Neo4j Impermanent graph database '
31
+ email:
32
+ - volker.pacher@gmail.com
33
+ executables: []
34
+ extensions: []
35
+ extra_rdoc_files: []
36
+ files:
37
+ - .gitignore
38
+ - Gemfile
39
+ - README.md
40
+ - Rakefile
41
+ - lib/neo4j-jars.rb
42
+ - lib/neo4j-test.rb
43
+ - lib/neo4j-test/jars/concurrentlinkedhashmap-lru-1.3.1.jar
44
+ - lib/neo4j-test/jars/geronimo-jta_1.1_spec-1.1.1.jar
45
+ - lib/neo4j-test/jars/lucene-core-3.6.2.jar
46
+ - lib/neo4j-test/jars/neo4j-community-1.9-tests.jar
47
+ - lib/neo4j-test/jars/neo4j-cypher-1.9.jar
48
+ - lib/neo4j-test/jars/neo4j-graph-algo-1.9.jar
49
+ - lib/neo4j-test/jars/neo4j-graph-matching-1.9.jar
50
+ - lib/neo4j-test/jars/neo4j-jmx-1.9.jar
51
+ - lib/neo4j-test/jars/neo4j-kernel-1.9-tests.jar
52
+ - lib/neo4j-test/jars/neo4j-lucene-index-1.9.jar
53
+ - lib/neo4j-test/jars/neo4j-shell-1.9.jar
54
+ - lib/neo4j-test/jars/neo4j-udc-1.9.jar
55
+ - lib/neo4j-test/jars/org.apache.servicemix.bundles.jline-0.9.94_1.jar
56
+ - lib/neo4j-test/jars/scala-library-2.10.0.jar
57
+ - lib/neo4j-test/jars/server-api-1.9.jar
58
+ - lib/neo4j-test/version.rb
59
+ - neo4j-test.gemspec
60
+ homepage: https://github.com/vpacher/neo4j-test
61
+ licenses: []
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '>='
69
+ - !ruby/object:Gem::Version
70
+ segments:
71
+ - 0
72
+ version: '0'
73
+ hash: 2
74
+ none: false
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - '>='
78
+ - !ruby/object:Gem::Version
79
+ segments:
80
+ - 0
81
+ version: '0'
82
+ hash: 2
83
+ none: false
84
+ requirements: []
85
+ rubyforge_project:
86
+ rubygems_version: 1.8.24
87
+ signing_key:
88
+ specification_version: 3
89
+ summary: The neo4j jar files for the impermanent database v1.9
90
+ test_files: []