Skip to content

Instantly share code, notes, and snippets.

@fabien7337
Created May 24, 2013 09:16
Show Gist options
  • Save fabien7337/5642329 to your computer and use it in GitHub Desktop.
Save fabien7337/5642329 to your computer and use it in GitHub Desktop.
bundle update & rspec spec for Dynamoid
Dynamoid git:(master) ✗ bundle update
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Using rake (10.0.4)
Using i18n (0.6.1)
Using multi_json (1.7.3)
Using activesupport (3.2.13)
Using builder (3.0.4)
Using activemodel (3.2.13)
Using json (1.8.0)
Using nokogiri (1.5.9)
Using uuidtools (2.1.4)
Using aws-sdk (1.10.0)
Using bundler (1.3.2)
Using coderay (1.0.9)
Using diff-lcs (1.2.4)
Using rack (1.5.2)
Using rack-protection (1.5.0)
Using tilt (1.4.1)
Using sinatra (1.4.2)
Using fake_dynamo (0.2.1)
Using git (1.2.5)
Using github-markup (0.7.5)
Using rdoc (4.0.1)
Using jeweler (1.8.4)
Using metaclass (0.0.1)
Using method_source (0.8.1)
Using mocha (0.10.0)
Using slop (3.4.5)
Using pry (0.9.12.2)
Using redcarpet (1.17.2)
Using rspec-core (2.13.1)
Using rspec-expectations (2.13.0)
Using rspec-mocks (2.13.1)
Using rspec (2.13.0)
Using tzinfo (0.3.37)
Using yard (0.8.6.1)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.
Dynamoid git:(master) ✗ rspec spec
WARN: Unresolved specs during Gem::Specification.reset:
uuidtools (~> 2.1)
nokogiri (>= 1.4.4)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
*** Mocha deprecation warning: Change `require 'mocha'` to `require 'mocha/setup'`.
*** Mocha deprecation warning: Test::Unit or MiniTest must be loaded *before* Mocha.
*** Mocha deprecation warning: If you're integrating with a test library other than Test::Unit or MiniTest, you should use `require 'mocha/api'` instead of `require 'mocha'`.
(387.85 ms) LIST TABLES - [[]]
(388.28 ms) CACHE TABLES
/usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/aws-sdk-1.10.0/lib/aws/core/client.rb:360:in `return_or_raise': Validation error detected: KeySchema must be a Array (AWS::DynamoDB::Errors::ValidationException)
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/aws-sdk-1.10.0/lib/aws/core/client.rb:461:in `client_request'
from (eval):3:in `create_table'
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/aws-sdk-1.10.0/lib/aws/dynamo_db/table_collection.rb:98:in `create'
from /Users/fabien/code/Dynamoid/lib/dynamoid/adapter/aws_sdk.rb:114:in `create_table'
from /Users/fabien/code/Dynamoid/lib/dynamoid/adapter.rb:146:in `block (3 levels) in <module:Adapter>'
from /Users/fabien/code/Dynamoid/lib/dynamoid/adapter.rb:39:in `benchmark'
from /Users/fabien/code/Dynamoid/lib/dynamoid/adapter.rb:146:in `block (2 levels) in <module:Adapter>'
from /Users/fabien/code/Dynamoid/lib/dynamoid/persistence.rb:49:in `create_table'
from /Users/fabien/code/Dynamoid/lib/dynamoid/indexes.rb:45:in `block in create_indexes'
from /Users/fabien/code/Dynamoid/lib/dynamoid/indexes.rb:42:in `each'
from /Users/fabien/code/Dynamoid/lib/dynamoid/indexes.rb:42:in `create_indexes'
from /Users/fabien/code/Dynamoid/lib/dynamoid/indexes.rb:28:in `index'
from /Users/fabien/code/Dynamoid/spec/app/models/user.rb:9:in `<class:User>'
from /Users/fabien/code/Dynamoid/spec/app/models/user.rb:1:in `<top (required)>'
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/fabien/code/Dynamoid/spec/spec_helper.rb:35:in `block in <top (required)>'
from /Users/fabien/code/Dynamoid/spec/spec_helper.rb:35:in `each'
from /Users/fabien/code/Dynamoid/spec/spec_helper.rb:35:in `<top (required)>'
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:106:in `require'
from /usr/local/opt/rbenv/versions/1.9.3-p392/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:106:in `require'
from /Users/fabien/code/Dynamoid/spec/dynamoid/adapter/aws_sdk_spec.rb:2:in `<top (required)>'
from /usr/local/Cellar/rbenv/0.4.0/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load'
from /usr/local/Cellar/rbenv/0.4.0/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
from /usr/local/Cellar/rbenv/0.4.0/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
from /usr/local/Cellar/rbenv/0.4.0/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /usr/local/Cellar/rbenv/0.4.0/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from /usr/local/Cellar/rbenv/0.4.0/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
from /usr/local/Cellar/rbenv/0.4.0/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
And in my fake_dynamo :
➜ ~ fake_dynamo --port 4567
Loading fake_dynamo data ...
== Sinatra/1.4.2 has taken the stage on 4567 for production with backup from Thin
>> Thin web server (v1.5.1 codename Straight Razor)
>> Maximum connections set to 1024
>> Listening on 127.0.0.1:4567, CTRL+C to stop
operation ListTables
data
{}
response
{"TableNames"=>[]}
operation CreateTable
data
{"TableName"=>"dynamoid_tests_index_user_names",
"KeySchema"=>
{"HashKeyElement"=>{"AttributeName"=>"id", "AttributeType"=>"S"}},
"ProvisionedThroughput"=>{"ReadCapacityUnits"=>100, "WriteCapacityUnits"=>20}}
response
{"__type"=>"com.amazon.coral.validate#ValidationException",
"message"=>"Validation error detected: KeySchema must be a Array"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment