soracom / soracom-sdk-ruby Goto Github PK
View Code? Open in Web Editor NEWRuby gem for SORACOM API
License: MIT License
Ruby gem for SORACOM API
License: MIT License
http://qiita.com/domokun70cm/items/7b1b43f6b9321e66a73b
[ec2-user@ip-172-31-20-195 ~]$ soracom group create
/usr/local/share/ruby/gems/2.0/gems/soracom-1.0.1/lib/soracom/client.rb:204:in `create_group': wrong number of arguments (2 for 0) (ArgumentError)
from /usr/local/share/ruby/gems/2.0/gems/soracom-1.0.1/lib/soracom/cli.rb:141:in `create'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor.rb:235:in `block in subcommand'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /usr/local/share/ruby/gems/2.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /usr/local/share/ruby/gems/2.0/gems/soracom-1.0.1/exe/soracom:5:in `<top (required)>'
from /usr/local/bin/soracom:23:in `load'
from /usr/local/bin/soracom:23:in `<main>'
Failures:
1) Soracom initialize fails without any credentials
Failure/Error: expect { Soracom::Client.new }.to raise_error('Could not find any credentials(apikey or email & password)')
expected Exception with "Could not find any credentials(apikey or email & password)", got #<RuntimeError: Could not find any credentials(authKeyId & authKey or email & password or operatorId & userName and password)> with backtrace:
# ./lib/soracom/client.rb:50:in `initialize'
# ./spec/soracom_spec.rb:9:in `new'
# ./spec/soracom_spec.rb:9:in `block (3 levels) in <top (required)>'
# ./spec/soracom_spec.rb:9:in `block (2 levels) in <top (required)>'
# ./spec/soracom_spec.rb:9:in `block (2 levels) in <top (required)>'
2) Soracom initialize fails with invalid credentials
Failure/Error: expect { Soracom::Client.new(email: '[email protected]', password: 'foobar') }.to raise_error('400 Bad Request')
expected Exception with "400 Bad Request", got #<SystemExit: ERROR: Invalid username/password supplied.> with backtrace:
# ./lib/soracom/client.rb:45:in `abort'
# ./lib/soracom/client.rb:45:in `rescue in initialize'
# ./lib/soracom/client.rb:26:in `initialize'
# ./spec/soracom_spec.rb:13:in `new'
# ./spec/soracom_spec.rb:13:in `block (3 levels) in <top (required)>'
# ./spec/soracom_spec.rb:13:in `block (2 levels) in <top (required)>'
# ./spec/soracom_spec.rb:13:in `block (2 levels) in <top (required)>'
3) Soracom initialize succeeds with valid credentials
Failure/Error: expect { Soracom::Client.new(email: 'REPLACEME', password: 'REPLACEME') }.to raise_error('400 Bad Request')
expected Exception with "400 Bad Request", got #<SystemExit: ERROR: Constraint vaiolation of input value. message:not a well-formed email address:email> with backtrace:
# ./lib/soracom/client.rb:45:in `abort'
# ./lib/soracom/client.rb:45:in `rescue in initialize'
# ./lib/soracom/client.rb:26:in `initialize'
# ./spec/soracom_spec.rb:17:in `new'
# ./spec/soracom_spec.rb:17:in `block (3 levels) in <top (required)>'
# ./spec/soracom_spec.rb:17:in `block (2 levels) in <top (required)>'
# ./spec/soracom_spec.rb:17:in `block (2 levels) in <top (required)>'
Finished in 0.37482 seconds (files took 0.24693 seconds to load)
4 examples, 3 failures
Failed examples:
rspec ./spec/soracom_spec.rb:8 # Soracom initialize fails without any credentials
rspec ./spec/soracom_spec.rb:12 # Soracom initialize fails with invalid credentials
rspec ./spec/soracom_spec.rb:16 # Soracom initialize succeeds with valid credentials
reported by miyamoto-san
正
soracom event_handler list # list groups
誤
soracom event_handler list # list event handlers
I could successfully installed soracom-sdk-ruby by gem behind proxy. But a command is not available because of proxy authentication. How can I configure proxy settings?
>soracom subscribe list
ERROR: 407 "Proxy Authentication Required"
Btw, I am using Windiows 7. Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.