dynamo-local-ruby 0.1.1 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d88cfeb4d699b0b86c215120b9271c36bdea10eb
4
- data.tar.gz: 7c90f7cf23759d34b451d5f0b3b09cdf559f8e60
3
+ metadata.gz: 8ff0dea67352a108d24b8c60217f71e6b9c2f033
4
+ data.tar.gz: d408f0021712ad03269083e3d7f2f2a498ff8186
5
5
  SHA512:
6
- metadata.gz: ad4e37aa7c504f170b0f48b4031a045fd811d61e8250d66e5d2f7afa48a741e39485dcbac8c17e066a3653cb470c4185bd21543c368e78dfdf2652a8fc7374c8
7
- data.tar.gz: 5d3650733ef2f4b1e81d636e8dc56adbb7e3722854322021e5b8f5c4aba11279968daa093b05600c815ddf578538166f2a541e47a36ec026c5ab0b47b7415616
6
+ metadata.gz: 5684f947ace89339876e05e372b59c51e2cc1495a4abec07b391ccfc6c5c5a91ca8bc8eafd156406eccf716e519bf88f3cbb5da69c7a26beaba0c97961657fa8
7
+ data.tar.gz: fd72e485d6ccfda23c2e12e593fe728461a8c7cc754aeacf8106b2d7a292ccce3e72dd8657df2a9f90efd3c1c87e0195cc777acc5a11627b236186e7f608ef3c
data/.gitignore CHANGED
@@ -13,3 +13,4 @@
13
13
  *.o
14
14
  *.a
15
15
  mkmf.log
16
+ /lib/jars/
data/README.md CHANGED
@@ -24,9 +24,9 @@ In your application code, initialize Dynamo clients with
24
24
 
25
25
  Aws::DynamoDB::Client.new(endpoint: DynamoLocalRuby::DynamoDBLocal::ENDPOINT)
26
26
 
27
- Before the test suite starts (for instance in RSpec's `config.before(:suite)`). Where `<build directory>` is accessible path in your project's path for build process artifacts.
27
+ Before the test suite starts (for instance in RSpec's `config.before(:suite)`).
28
28
 
29
- DynamoLocalRuby::DynamoDBLocal.up(<build_directory>)
29
+ DynamoLocalRuby::DynamoDBLocal.up
30
30
 
31
31
  When cleaning up test suite (for instance in RSpec's `config.after(:suite)`)
32
32
 
data/Rakefile CHANGED
@@ -4,4 +4,18 @@ require 'rubocop/rake_task'
4
4
 
5
5
  RuboCop::RakeTask.new
6
6
 
7
+ task :download_dynamodb_local do
8
+ local_path = File.expand_path('../lib/jars/dynamodb_local', __FILE__)
9
+ `mkdir -p #{local_path}`
10
+ return if File.exist?(File.join(local_path, 'DynamoDBLocal.jar'))
11
+ latest = File.join(local_path, 'dynamodb_local_latest.tar.gz')
12
+ LATEST_WEB_TGZ = 'http://dynamodb-local.s3-website-us-west-2.amazonaws.com'\
13
+ '/dynamodb_local_latest.tar.gz'
14
+ `wget #{LATEST_WEB_TGZ} -O #{latest}` unless File.exist?(latest)
15
+ `tar xzf #{latest} -C #{local_path}`
16
+ `rm #{latest}`
17
+ end
18
+
7
19
  task default: :rubocop
20
+
21
+ task build: :download_dynamodb_local
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'dynamo-local-ruby'
4
+ require 'dynamo-local-ruby/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'dynamo-local-ruby'
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = 'https://github.com/peakxu/dynamo-local-ruby'
14
14
  spec.license = 'MIT'
15
15
 
16
- spec.files = `git ls-files -z`.split("\x0")
16
+ spec.files = `git ls-files -z`.split("\x0") + Dir.glob('lib/jars/**/*')
17
17
  spec.executables = spec.files.grep(/^bin/) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(/^(test|spec|features)/)
19
19
  spec.require_paths = ['lib']
@@ -5,26 +5,15 @@ module DynamoLocalRuby
5
5
  class DynamoDBLocal
6
6
  PORT = 9389
7
7
  ENDPOINT = "http://localhost:#{PORT}"
8
- LATEST_WEB_TGZ = 'http://dynamodb-local.s3-website-us-west-2.amazonaws.com'\
9
- '/dynamodb_local_latest.tar.gz'
10
8
 
11
9
  def initialize(pid)
12
10
  @pid = pid
13
11
  end
14
12
 
15
13
  class << self
16
- def ensure_dynamo_local_exists(local_path)
17
- jar_path = File.join(local_path, 'DynamoDBLocal.jar')
18
- return if File.exist?(jar_path)
19
- `mkdir -p #{local_path}`
20
- latest = File.join(local_path, 'dynamodb_local_latest.tar.gz')
21
- `wget #{LATEST_WEB_TGZ} -o #{latest}` unless File.exist?(latest)
22
- `tar xzf #{latest} -C #{local_path}`
23
- end
24
-
25
- def up(build_path)
26
- local_path = File.join(build_path, 'dynamo_db_local')
27
- ensure_dynamo_local_exists(local_path)
14
+ def up
15
+ local_path = File.expand_path('../../../lib/jars/dynamodb_local',
16
+ __FILE__)
28
17
  lib_path = File.join(local_path, 'DynamoDBLocal_lib')
29
18
  jar_path = File.join(local_path, 'DynamoDBLocal.jar')
30
19
  pid = spawn("java -Djava.library.path=#{lib_path} -jar #{jar_path} "\
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Dynamo local ruby namespace
4
4
  module DynamoLocalRuby
5
- VERSION = '0.1.1'
5
+ VERSION = '0.2.3'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamo-local-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peak Xu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-19 00:00:00.000000000 Z
11
+ date: 2015-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -84,6 +84,74 @@ files:
84
84
  - lib/dynamo-local-ruby/dynamo_db_local.rb
85
85
  - lib/dynamo-local-ruby/schema_loader.rb
86
86
  - lib/dynamo-local-ruby/version.rb
87
+ - lib/jars/dynamodb_local/DynamoDBLocal.jar
88
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/antlr-runtime-4.1.jar
89
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/aws-java-sdk-1.9.33.jar
90
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/commons-cli-1.2.jar
91
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/commons-lang3-3.x.jar
92
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jackson-annotations-2.3.2.jar
93
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jackson-core-2.3.2.jar
94
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jackson-databind-2.3.2.jar
95
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-ajp-8.1.12.v20130726.jar
96
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-annotations-8.1.12.v20130726.jar
97
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-client-8.1.12.v20130726.jar
98
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-continuation-8.1.12.v20130726.jar
99
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-deploy-8.1.12.v20130726.jar
100
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-http-8.1.12.v20130726.jar
101
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-io-8.1.12.v20130726.jar
102
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-jmx-8.1.12.v20130726.jar
103
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-jndi-8.1.12.v20130726.jar
104
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-overlay-deployer-8.1.12.v20130726.jar
105
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-plus-8.1.12.v20130726.jar
106
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-policy-8.1.12.v20130726.jar
107
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-rewrite-8.1.12.v20130726.jar
108
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-security-8.1.12.v20130726.jar
109
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-server-8.1.12.v20130726.jar
110
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-servlet-8.1.12.v20130726.jar
111
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-servlets-8.1.12.v20130726.jar
112
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-start.jar
113
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-util-8.1.12.v20130726.jar
114
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-webapp-8.1.12.v20130726.jar
115
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-websocket-8.1.12.v20130726.jar
116
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/jetty-xml-8.1.12.v20130726.jar
117
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/joda-time-2.3.jar
118
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/libsqlite4java-linux-amd64.so
119
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/libsqlite4java-linux-i386.so
120
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/libsqlite4java-osx.dylib
121
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/log4j-api-2.1.jar
122
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/log4j-core-2.1.jar
123
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/servlet-api-3.0.jar
124
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/spdy-core-8.1.12.v20130726.jar
125
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/spdy-jetty-8.1.12.v20130726.jar
126
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/spdy-jetty-http-8.1.12.v20130726.jar
127
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/sqlite4java-win32-x64.dll
128
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/sqlite4java-win32-x86.dll
129
+ - lib/jars/dynamodb_local/DynamoDBLocal_lib/sqlite4java.jar
130
+ - lib/jars/dynamodb_local/LICENSE.txt
131
+ - lib/jars/dynamodb_local/README.txt
132
+ - lib/jars/dynamodb_local/third_party_licenses/THIRD_PARTY_JAVASCRIPT_NOTICES.txt
133
+ - lib/jars/dynamodb_local/third_party_licenses/antlr-runtime-4.1_LICENSE.txt
134
+ - lib/jars/dynamodb_local/third_party_licenses/commons-cli-1.2_LICENSE.txt
135
+ - lib/jars/dynamodb_local/third_party_licenses/commons-cli-1.2_NOTICE.txt
136
+ - lib/jars/dynamodb_local/third_party_licenses/commons-lang-3.3.x_LICENSE.txt
137
+ - lib/jars/dynamodb_local/third_party_licenses/commons-lang-3.3.x_NOTICE.txt
138
+ - lib/jars/dynamodb_local/third_party_licenses/jackson-annotations-2.3.2_NOTICE.txt
139
+ - lib/jars/dynamodb_local/third_party_licenses/jackson-core-2.3.2_NOTICE.txt
140
+ - lib/jars/dynamodb_local/third_party_licenses/jackson-databind-2.3.2_NOTICE.txt
141
+ - lib/jars/dynamodb_local/third_party_licenses/jackson_LICENSE.txt
142
+ - lib/jars/dynamodb_local/third_party_licenses/jetty_LICENSE.txt
143
+ - lib/jars/dynamodb_local/third_party_licenses/jetty_NOTICE.txt
144
+ - lib/jars/dynamodb_local/third_party_licenses/joda-time-2.3_LICENSE.txt
145
+ - lib/jars/dynamodb_local/third_party_licenses/joda-time-2.3_NOTICE.txt
146
+ - lib/jars/dynamodb_local/third_party_licenses/log4j-1.2.17_LICENSE.txt
147
+ - lib/jars/dynamodb_local/third_party_licenses/log4j-1.2.17_NOTICE.txt
148
+ - lib/jars/dynamodb_local/third_party_licenses/servlet-api-3.0_LICENSE.txt
149
+ - lib/jars/dynamodb_local/third_party_licenses/servlet-api-3.0_NOTICE.txt
150
+ - lib/jars/dynamodb_local/third_party_licenses/spdy-core_LICENSE.txt
151
+ - lib/jars/dynamodb_local/third_party_licenses/spdy-core_NOTICE.txt
152
+ - lib/jars/dynamodb_local/third_party_licenses/spdy-jetty_LICENSE.txt
153
+ - lib/jars/dynamodb_local/third_party_licenses/spdy-jetty_NOTICE.txt
154
+ - lib/jars/dynamodb_local/third_party_licenses/sqlite4java_LICENSE.txt
87
155
  homepage: https://github.com/peakxu/dynamo-local-ruby
88
156
  licenses:
89
157
  - MIT
@@ -104,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
172
  version: '0'
105
173
  requirements: []
106
174
  rubyforge_project:
107
- rubygems_version: 2.2.2
175
+ rubygems_version: 2.4.5
108
176
  signing_key:
109
177
  specification_version: 4
110
178
  summary: Ruby wrapper around DynamoDB Local for use with AWS-SDK