neptune-local 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4030c25e48ac46de42e661538237d3201d89e874ab744218d71afaeceaea46aa
4
+ data.tar.gz: 2b74a8e7ccb230ff7fb999461f2e9c542ce17ca60b53f8c864055f31fe76d4cb
5
+ SHA512:
6
+ metadata.gz: 79efc1df7d5b3414a455c7ccfaddacb35cfa2c7f834bdf2aa42991c5fd871409a6bba1671a883e48f2a755852e570830daaf25b1f28198c74dd3cd3ffd3611ef
7
+ data.tar.gz: e6a0d771accb3b69eae3573c1e364de8b893bd271c3f010a8de60accb07bb6c46f0ed47d71f8e1e5b7ef9265886e72c0c86ff56788f3df6a3d96e0b8c1b5ce38
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ *.gem
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in neptune-local.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Gary Macindoe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # Neptune::Local
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/neptune/local`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'neptune-local'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install neptune-local
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/neptune-local.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,23 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ task :default => :prepare
4
+
5
+ task :prepare do
6
+ require 'open-uri'
7
+
8
+ gremlin_server_url = 'https://archive.apache.org/dist/tinkerpop/3.3.2/apache-tinkerpop-gremlin-server-3.3.2-bin.zip'
9
+ ext_dir = 'lib/neptune/local/ext'
10
+ local_path = "#{ext_dir}/apache-tinkerpop-gremlin-server-3.3.2-bin.zip"
11
+ unpack_path = "#{ext_dir}/apache-tinkerpop-gremlin-server-3.3.2"
12
+
13
+ unless Dir.exists?(unpack_path)
14
+ mkdir_p ext_dir
15
+ $stderr.print "Downloading Apache Tinkerpop Gremlin Server 3.3.2..."
16
+ File.open(local_path, 'w') do |f|
17
+ f.write(open(gremlin_server_url).read)
18
+ end
19
+ `unzip #{local_path} -d #{ext_dir}`
20
+ rm local_path
21
+ $stderr.puts 'done.'
22
+ end
23
+ end
@@ -0,0 +1,7 @@
1
+ require "neptune/local/server"
2
+ require "neptune/local/version"
3
+
4
+ module Neptune
5
+ module Local
6
+ end
7
+ end
@@ -0,0 +1,21 @@
1
+ module Neptune
2
+ module Local
3
+ class Server
4
+
5
+ GREMLIN_SERVER_DIR = File.join(File.dirname(__FILE__), 'ext/apache-tinkerpop-gremlin-server-3.3.2')
6
+
7
+ def self.start
8
+ Dir.chdir(GREMLIN_SERVER_DIR) do
9
+ system 'bin/gremlin-server.sh start'
10
+ end
11
+ end
12
+
13
+ def self.stop
14
+ Dir.chdir(GREMLIN_SERVER_DIR) do
15
+ system 'bin/gremlin-server.sh stop'
16
+ end
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,5 @@
1
+ module Neptune
2
+ module Local
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,25 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "neptune/local/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "neptune-local"
8
+ spec.version = Neptune::Local::VERSION
9
+ spec.authors = ["Gary Macindoe"]
10
+ spec.email = ["gary@garymacindoe.co.uk"]
11
+
12
+ spec.summary = %q{Wraps installation and usage of the Apache Tinkerpop Gremlin Server version 3.3.2 (upon which AWS Neptune is based)}
13
+ spec.homepage = "https://github.com/garymacindoe/neptune-local"
14
+ spec.license = "MIT"
15
+ spec.extensions = ['Rakefile']
16
+
17
+ # Specify which files should be added to the gem when it is released.
18
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
+ spec.files = `git ls-files -z`.split("\x0")
20
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.16"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ end
metadata ADDED
@@ -0,0 +1,83 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: neptune-local
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Gary Macindoe
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-06-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.16'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.16'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ description:
42
+ email:
43
+ - gary@garymacindoe.co.uk
44
+ executables: []
45
+ extensions:
46
+ - Rakefile
47
+ extra_rdoc_files: []
48
+ files:
49
+ - ".gitignore"
50
+ - Gemfile
51
+ - LICENSE.txt
52
+ - README.md
53
+ - Rakefile
54
+ - lib/neptune/local.rb
55
+ - lib/neptune/local/server.rb
56
+ - lib/neptune/local/version.rb
57
+ - neptune-local.gemspec
58
+ homepage: https://github.com/garymacindoe/neptune-local
59
+ licenses:
60
+ - MIT
61
+ metadata: {}
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
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.7.3
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Wraps installation and usage of the Apache Tinkerpop Gremlin Server version
82
+ 3.3.2 (upon which AWS Neptune is based)
83
+ test_files: []