ddbcli 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/README.md +11 -1
- data/ddbcli.gemspec +2 -3
- data/etc/pack_to_one_script.rb +0 -23
- data/lib/ddbcli/version.rb +1 -1
- data/spec/ddbcli_spec.rb +6 -0
- metadata +6 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ba2b4b657fdade3a2a4ee336bf68e626f1ca380
|
4
|
+
data.tar.gz: b9db9bd0a0038393f74d13956695033b6b905c48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a1a50cc84278336c8a36bd7f1e2112aeaafa80efc31086fcdae2df84398a0c437c9f4deb5d8c4c65316be04f3cf5376650240ad45e36d8464387e223153ea0e
|
7
|
+
data.tar.gz: abacaa29bc63401e0374386144a8fe2c658721be72788168af3c7edb2d7c0df3b63431502036afb773ac736c48ddd4bdefbc1243102a4eb8a2af50562fe60081
|
data/.travis.yml
CHANGED
@@ -3,7 +3,8 @@ rvm:
|
|
3
3
|
- 2.0.0
|
4
4
|
install:
|
5
5
|
- mkdir /tmp/dynamodb
|
6
|
-
|
6
|
+
#- wget -O - http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest | tar xz --directory /tmp/dynamodb
|
7
|
+
- wget -O - http://dynamodb-preview.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest_preview.tar.gz | tar xz --directory /tmp/dynamodb
|
7
8
|
before_script:
|
8
9
|
- java -Djava.library.path=/tmp/dynamodb/DynamoDBLocal_lib -jar /tmp/dynamodb/DynamoDBLocal.jar -inMemory &
|
9
10
|
script:
|
data/README.md
CHANGED
@@ -9,6 +9,16 @@ ddbcli is an interactive command-line client of Amazon DynamoDB.
|
|
9
9
|
|
10
10
|
$ gem install ddbcli
|
11
11
|
|
12
|
+
If you are not using RubyGems, you can use the script file that depend on only Ruby.
|
13
|
+
|
14
|
+
see https://github.com/winebarrel/ddbcli/releases
|
15
|
+
|
16
|
+
```sh
|
17
|
+
https://github.com/winebarrel/ddbcli/releases/download/0.5.1/ddbcli-0.x.x.gz
|
18
|
+
gunzip -c ddbcli-0.x.x.gz > ddbcli
|
19
|
+
chmod 755 ddbcli
|
20
|
+
```
|
21
|
+
|
12
22
|
## Usage
|
13
23
|
|
14
24
|
```sh
|
@@ -235,7 +245,7 @@ Append
|
|
235
245
|
# Test
|
236
246
|
|
237
247
|
```sh
|
238
|
-
# http://dynamodb-
|
248
|
+
# http://dynamodb-preview.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest_preview.tar.gz
|
239
249
|
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar &
|
240
250
|
bundle install
|
241
251
|
bundle exec rake
|
data/ddbcli.gemspec
CHANGED
@@ -18,9 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.
|
22
|
-
spec.add_development_dependency 'bundler', '~> 1.3'
|
21
|
+
spec.add_development_dependency 'bundler'
|
23
22
|
spec.add_development_dependency 'rake'
|
24
|
-
spec.add_development_dependency 'rspec', '>=
|
23
|
+
spec.add_development_dependency 'rspec', '>= 3.0.0'
|
25
24
|
spec.add_development_dependency 'racc'
|
26
25
|
end
|
data/etc/pack_to_one_script.rb
CHANGED
@@ -11,22 +11,6 @@ require LIB_DIR.join('ddbcli/version')
|
|
11
11
|
|
12
12
|
DEST_FILE = "pkg/ddbcli-#{DynamoDB::VERSION}"
|
13
13
|
|
14
|
-
JSON_VERSION = '1.8.2'
|
15
|
-
JSON_ARCHIVE = ROOT_DIR.join("v#{JSON_VERSION}.tar.gz")
|
16
|
-
JSON_ROOT_DIR = ROOT_DIR.join("json-#{JSON_VERSION}")
|
17
|
-
JSON_LIB_DIR = JSON_ROOT_DIR.join('lib')
|
18
|
-
|
19
|
-
def use_json
|
20
|
-
system("wget -q https://github.com/flori/json/archive/#{JSON_ARCHIVE.basename}")
|
21
|
-
system("tar xf #{JSON_ARCHIVE}")
|
22
|
-
|
23
|
-
begin
|
24
|
-
yield
|
25
|
-
ensure
|
26
|
-
FileUtils.rm_rf([JSON_ROOT_DIR, JSON_ARCHIVE])
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
14
|
def recursive_print(file, prefix, lib_path, fout, buf = [])
|
31
15
|
return if buf.include?(file)
|
32
16
|
|
@@ -52,12 +36,6 @@ def read_bin_file
|
|
52
36
|
}.join("\n")
|
53
37
|
end
|
54
38
|
|
55
|
-
json_buf = StringIO.new
|
56
|
-
|
57
|
-
use_json do
|
58
|
-
recursive_print('json/pure.rb', 'json', JSON_LIB_DIR, json_buf)
|
59
|
-
end
|
60
|
-
|
61
39
|
ddbcli_buf = StringIO.new
|
62
40
|
recursive_print('ddbcli.rb', 'ddbcli', LIB_DIR, ddbcli_buf)
|
63
41
|
|
@@ -65,7 +43,6 @@ FileUtils.mkdir_p(ROOT_DIR.join(DEST_FILE).dirname)
|
|
65
43
|
|
66
44
|
ROOT_DIR.join(DEST_FILE).open('wb', 0755) do |f|
|
67
45
|
f.puts '#!/usr/bin/env ruby'
|
68
|
-
f.puts json_buf.string
|
69
46
|
f.puts ddbcli_buf.string.gsub(%r|require\s+['"]json['"]|m, '')
|
70
47
|
f.puts read_bin_file
|
71
48
|
end
|
data/lib/ddbcli/version.rb
CHANGED
data/spec/ddbcli_spec.rb
CHANGED
@@ -30,6 +30,7 @@ describe 'ddbcli' do
|
|
30
30
|
|
31
31
|
expect(out).to eq(
|
32
32
|
{"AttributeDefinitions"=>[{"AttributeName"=>"id", "AttributeType"=>"N"}],
|
33
|
+
"StreamSpecification" => {"StreamEnabled"=>false},
|
33
34
|
"TableName"=>"foo",
|
34
35
|
"KeySchema"=>[{"AttributeName"=>"id", "KeyType"=>"HASH"}],
|
35
36
|
"TableStatus"=>"ACTIVE",
|
@@ -60,6 +61,7 @@ describe 'ddbcli' do
|
|
60
61
|
{"AttributeDefinitions"=>
|
61
62
|
[{"AttributeName"=>"id", "AttributeType"=>"N"},
|
62
63
|
{"AttributeName"=>"val", "AttributeType"=>"S"}],
|
64
|
+
"StreamSpecification" => {"StreamEnabled"=>false},
|
63
65
|
"TableName"=>"foo",
|
64
66
|
"KeySchema"=>
|
65
67
|
[{"AttributeName"=>"id", "KeyType"=>"HASH"},
|
@@ -94,6 +96,7 @@ describe 'ddbcli' do
|
|
94
96
|
[{"AttributeName"=>"id", "AttributeType"=>"N"},
|
95
97
|
{"AttributeName"=>"val", "AttributeType"=>"S"},
|
96
98
|
{"AttributeName"=>"val2", "AttributeType"=>"S"}],
|
99
|
+
"StreamSpecification" => {"StreamEnabled"=>false},
|
97
100
|
"TableName"=>"foo",
|
98
101
|
"KeySchema"=>
|
99
102
|
[{"AttributeName"=>"id", "KeyType"=>"HASH"},
|
@@ -136,6 +139,7 @@ describe 'ddbcli' do
|
|
136
139
|
[{"AttributeName"=>"id", "AttributeType"=>"N"},
|
137
140
|
{"AttributeName"=>"val", "AttributeType"=>"S"},
|
138
141
|
{"AttributeName"=>"val2", "AttributeType"=>"S"}],
|
142
|
+
"StreamSpecification" => {"StreamEnabled"=>false},
|
139
143
|
"TableName"=>"foo",
|
140
144
|
"KeySchema"=>
|
141
145
|
[{"AttributeName"=>"id", "KeyType"=>"HASH"},
|
@@ -180,6 +184,7 @@ describe 'ddbcli' do
|
|
180
184
|
[{"AttributeName"=>"id", "AttributeType"=>"N"},
|
181
185
|
{"AttributeName"=>"val", "AttributeType"=>"S"},
|
182
186
|
{"AttributeName"=>"val2", "AttributeType"=>"S"}],
|
187
|
+
"StreamSpecification" => {"StreamEnabled"=>false},
|
183
188
|
"TableName"=>"foo",
|
184
189
|
"KeySchema"=>
|
185
190
|
[{"AttributeName"=>"id", "KeyType"=>"HASH"},
|
@@ -235,6 +240,7 @@ describe 'ddbcli' do
|
|
235
240
|
"NumberOfDecreasesToday"=>0,
|
236
241
|
"ReadCapacityUnits"=>2,
|
237
242
|
"WriteCapacityUnits"=>2},
|
243
|
+
"StreamSpecification" => {"StreamEnabled"=>false},
|
238
244
|
"TableSizeBytes"=>0,
|
239
245
|
"ItemCount"=>0,
|
240
246
|
"GlobalSecondaryIndexes"=>
|
metadata
CHANGED
@@ -1,43 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddbcli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
|
-
type: :
|
20
|
+
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ~>
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '1.3'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '1.3'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: rake
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +44,14 @@ dependencies:
|
|
58
44
|
requirements:
|
59
45
|
- - '>='
|
60
46
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
47
|
+
version: 3.0.0
|
62
48
|
type: :development
|
63
49
|
prerelease: false
|
64
50
|
version_requirements: !ruby/object:Gem::Requirement
|
65
51
|
requirements:
|
66
52
|
- - '>='
|
67
53
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
54
|
+
version: 3.0.0
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: racc
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|