dynamodb-local 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c1eae84b0408e8ca5226ce3ec9ba8d52c85bd99c
4
+ data.tar.gz: 5f7a1b4b783fc5483cecee7b7e7b9251a9d9b906
5
+ SHA512:
6
+ metadata.gz: 795b5b96ca8be4d6719a65ab2b85862fcd240c41093879903c8523f38ca106b39a525ef510dc288f3b995d5d58ca26021279d319dcdd136a3c01c5917860f302
7
+ data.tar.gz: 17d093b2db31bbaa609cd798b3746ca9d68d66584e09beafcdd34fbb843c15e91b43a27e5b12dfe3aa64824efbf746a62cfffcc057612cc675eb4cc2f998da22
@@ -0,0 +1,24 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ lib/dynamodb/local/ext
13
+ pkg
14
+ rdoc
15
+ spec/reports
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
19
+ *.bundle
20
+ *.so
21
+ *.o
22
+ *.a
23
+ mkmf.log
24
+ *.DS_Store
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in dynamodb-local.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Josh Huckabee
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ # Dynamodb::Local
2
+
3
+ This is a simple helper gem that automaticall installs the [DynamoDB local tool](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html) and provides a simple ruby wrapper binar that allows you start and stop the local DynamoDB server from the command line.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'dynamodb-local'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install dynamodb-local
18
+
19
+ ## Usage
20
+
21
+ Executing the `dynamodb-local` binary will start the DynamoDB local
22
+ server in the foreground. It currently passes all arguments through to
23
+ the underlying server. Those are:
24
+
25
+ <pre>
26
+ -dbPath <path> Specify the location of your database file. Default
27
+ is the current directory.
28
+ -help Display DynamoDB Local usage and options.
29
+ -inMemory When specified, DynamoDB Local will run in memory.
30
+ -port <port-no.> Specify a port number. Default is 8000
31
+ </pre>
32
+
33
+ ## Contributing
34
+
35
+ 1. Fork it ( https://github.com/[my-github-username]/dynamodb-local/fork )
36
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
37
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
38
+ 4. Push to the branch (`git push origin my-new-feature`)
39
+ 5. Create a new Pull Request
@@ -0,0 +1,25 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ task :default => :prepare
4
+
5
+ task :prepare do
6
+ require 'open-uri'
7
+
8
+ dynamodb_local_url = 'http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest'
9
+ ext_dir = 'lib/dynamodb/local/ext'
10
+ local_path = "#{ext_dir}/dynamodb_local.tar.gz"
11
+ jar_path = "#{ext_dir}/DynamoDBLocal.jar"
12
+
13
+ unless File.exists?(jar_path)
14
+ mkdir_p ext_dir
15
+ $stderr.print "Downloading DynamoDB local..."
16
+ File.open(local_path, 'w') do |f|
17
+ f.write(open(dynamodb_local_url).read)
18
+ end
19
+ `tar -xzf #{local_path} -C #{ext_dir}`
20
+ rm local_path
21
+ $stderr.puts 'done.'
22
+ end
23
+
24
+ end
25
+
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'dynamodb/local'
4
+
5
+ Dynamodb::Local::Server.start(ARGV)
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'dynamodb/local/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "dynamodb-local"
8
+ spec.version = Dynamodb::Local::VERSION
9
+ spec.authors = ["Josh Huckabee"]
10
+ spec.email = ["joshhuckabee@gmail.com"]
11
+ spec.summary = %q{Wrap AWS DynamoDB local tool}
12
+ spec.description = %q{Wrap AWS DynamoDB local tool}
13
+ spec.homepage = "https://github.com/jhuckabee/dynamodb-local"
14
+ spec.license = "MIT"
15
+ spec.extensions = ["Rakefile"]
16
+
17
+ spec.files = `git ls-files -z`.split("\x0")
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "rake"
24
+ end
@@ -0,0 +1,7 @@
1
+ require "dynamodb/local/server"
2
+ require "dynamodb/local/version"
3
+
4
+ module Dynamodb
5
+ module Local
6
+ end
7
+ end
@@ -0,0 +1,14 @@
1
+ module Dynamodb
2
+ module Local
3
+ class Server
4
+
5
+ DYNAMODB_LIB_DIR = File.join(File.dirname(__FILE__), 'ext/DynamoDBLocal_lib')
6
+ DYNAMODB_JAR_FILE = File.join(File.dirname(__FILE__), 'ext/DynamoDBLocal.jar')
7
+
8
+ def self.start(args)
9
+ exec "java -Djava.library.path=#{DYNAMODB_LIB_DIR} -jar #{DYNAMODB_JAR_FILE} #{ARGV.join(' ')}"
10
+ end
11
+
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ module Dynamodb
2
+ module Local
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dynamodb-local
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Josh Huckabee
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-03 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.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Wrap AWS DynamoDB local tool
42
+ email:
43
+ - joshhuckabee@gmail.com
44
+ executables:
45
+ - dynamodb-local
46
+ extensions:
47
+ - Rakefile
48
+ extra_rdoc_files: []
49
+ files:
50
+ - ".gitignore"
51
+ - Gemfile
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - bin/dynamodb-local
56
+ - dynamodb-local.gemspec
57
+ - lib/dynamodb/local.rb
58
+ - lib/dynamodb/local/server.rb
59
+ - lib/dynamodb/local/version.rb
60
+ homepage: https://github.com/jhuckabee/dynamodb-local
61
+ licenses:
62
+ - MIT
63
+ metadata: {}
64
+ post_install_message:
65
+ rdoc_options: []
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ requirements: []
79
+ rubyforge_project:
80
+ rubygems_version: 2.2.2
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Wrap AWS DynamoDB local tool
84
+ test_files: []
85
+ has_rdoc: