Built 49d1e8c and failed

Added proxy configuration to readme. Added missing code blocks to readme.

by: Josh Bassett | on Jul 26th | commit: 49d1e8c9434923f0627864a05661671bc9266628

Build Output:

(in /home/luke/apps/integrity/builds/lukeredpath-clickatell-master)
Jeweler not available. Install it with: gem install jeweler

Hash
- should return only the keys specified
- should return only the keys specified, ignoring keys that do not exist

API::CommandExecutor
- should have test mode
- should default to not test mode

API::CommandExecutor#execute in non-test mode
- should not record requests

API::CommandExecutor#execute in non-test mode without a proxy
- should execute commands through the proxy

API::CommandExecutor#execute in non-test mode with a proxy
- should execute commands through the proxy

API::CommandExecutor#execute in test mode
- should not make any network calls
- should start with an empty request collection
- should record sms requests
- should record a request for each call
- should return a response that approximates a true Net::HttpResponse (FAILED - 1)

API::CommandExecutor#execute in test mode each recorded request
- should return the command information

API Command
- should return encoded URL for the specified command and parameters
- should URL encode any special characters in parameters
- should use a custom host when constructing command URLs if specified
- should use the default host if specified custom host is nil
- should use the default host if specified custom host is an empty string

Secure API Command
- should use HTTPS

Command executor
- should create an API command with the given params
- should send the URI generated by the created command via HTTP get and return the response (FAILED - 2)
- should send the command over a secure HTTPS connection if :secure option is set to true (FAILED - 3)

API
- should use the api_id, username and password to authenticate and return the new session id
- should support ping, using the current session_id
- should support sending messages to a specified number, returning the message id
- should support sending messages to a multiple numbers, returning the message ids
- should set the :from parameter and set the :req_feat to 48 when using a custom from string when sending a message
- should set the :mo flag to 1 when :set_mobile_originated is true when sending a message
- should set the callback flag to the number passed in the options hash
- should set the client message id to the number passed in the options hash
- should ignore any invalid parameters when sending a message
- should support message status query for a given message id, returning the message status
- should support balance query, returning number of credits as a float
- should raise an API::Error if the response parser raises

Clickatell::API when authenticating
- should authenticate to retrieve a session_id and return a new API instance using that session id

Clickatell::API with no authentication options set
- should build commands with no authentication options

Clickatell::API in secure mode
- should execute commands securely

API Error
- should parse http response string to create error

Clickatell::API#test_mode
- should create a new CommandExecutor with test_mode parameter set to true
- should record all commands
- should return the recorded commands in a flattened array

Response parser
- should return hash for one-line success response
- should return array of hashes for multi-line success response
- should raise API::Error if response contains an error message
- should parse a message status code of 6 when the response body contains a status code of 006
- should parse a message status code of 7 when the response body contains a status code of 007
- should parse a message status code of 8 when the response body contains a status code of 008
- should parse a message status code of 9 when the response body contains a status code of 009
- should parse a message status code of 10 when the response body contains a status code of 010
- should parse a message status code of 11 when the response body contains a status code of 011
- should parse a message status code of 12 when the response body contains a status code of 012
- should parse a message status code of 1 when the response body contains a status code of 001
- should parse a message status code of 2 when the response body contains a status code of 002
- should parse a message status code of 3 when the response body contains a status code of 003
- should parse a message status code of 4 when the response body contains a status code of 004
- should parse a message status code of 5 when the response body contains a status code of 005

Response parser in test mode
- should return something approximating a session_id

1)
NoMethodError in 'API::CommandExecutor#execute in test mode should return a response that approximates a true Net::HttpResponse'
undefined method `body' for [#<Clickatell::API::FakeHttpResponse:0xb7951e30>]:Array
./spec/command_executor_spec.rb:86:

2)
Mocha::ExpectationError in 'Command executor should send the URI generated by the created command via HTTP get and return the response'
unexpected invocation: #<Class:0xb794043c>.new('clickatell.com', nil, nil, nil, nil, nil)
satisfied expectations:
- allowed any number of times, already invoked once: Clickatell::API::Command.new(any_parameters)
- allowed any number of times, already invoked once: #<Mock:Command>.with_params(any_parameters)
- allowed any number of times, not yet invoked: Net::HTTP.new('clickatell.com', 8080)
- allowed any number of times, not yet invoked: #<FakeHttp:0xb79419f4>.get('/path?foo=bar')
- allowed any number of times, not yet invoked: #<FakeHttp:0xb79419f4>.use_ssl=(any_parameters)
./spec/../lib/clickatell/api/command_executor.rb:53:in `get_response'
./spec/../lib/clickatell/api/command_executor.rb:34:in `execute'
./spec/api_spec.rb:77:

3)
Mocha::ExpectationError in 'Command executor should send the command over a secure HTTPS connection if :secure option is set to true'
unexpected invocation: #<Class:0xb793b428>.new('api.clickatell.com', nil, nil, nil, nil, nil)
unsatisfied expectations:
- expected exactly once, not yet invoked: #<Mock:HTTP>.use_ssl=(true)
satisfied expectations:
- allowed any number of times, not yet invoked: Net::HTTP.new(any_parameters)
- allowed any number of times, not yet invoked: #<Mock:HTTP>.start(any_parameters)
./spec/../lib/clickatell/api/command_executor.rb:53:in `get_response'
./spec/../lib/clickatell/api/command_executor.rb:34:in `execute'
./spec/api_spec.rb:85:

Finished in 0.049924 seconds

57 examples, 3 failures
rake aborted!
Command /usr/bin/ruby1.8 -I"spec"  "/usr/lib/ruby/gems/1.8/gems/rspec-1.2.7/bin/spec" "spec/hash_ext_spec.rb" "spec/command_executor_spec.rb" "spec/api_spec.rb" "spec/response_spec.rb" --format specdoc --colour failed

(See full trace by running task with --trace)