Skip to content

Commit

Permalink
Documentation and extra requires for MRI 1.8.7 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
arvicco committed Jul 19, 2012
1 parent 1c9207e commit bd7edd8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ JRuby head (ruby-1.9.3-p203-compatible mode). It is not JRuby-specific though, a
for either JRuby or MRI, please report an [issue](https://github.com/ib-ruby/ib-ruby/issues/new)
and we will work on it.

Please keep in mind that when using Ruby 1.8.7, you need to either explicitly:
``` ruby
require 'rubygems'
require 'ib'
```

or set the environment variable "RUBYOPT" to "-rubygems":

set RUBYOPT=-rubygems

## CONTRIBUTING:

1. Fork it
Expand Down
5 changes: 3 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
Plan:

0. Full Rails compatibility as a Rails engine.

1. IB#send_message method should accept block, thus compressing subscribe/send_message
pair into a single call - to simplify DSL.

Expand Down Expand Up @@ -35,6 +33,9 @@ Done:

7. Make ActiveModel-like attributes Hash and serialization for tableless Models

8. Rails compatibility as a Rails engine.

9. Improved init for IB models with attribute defaults.

Ideas for future:

Expand Down
5 changes: 3 additions & 2 deletions lib/ib/connection.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require 'thread'
require 'ib/socket'
require 'ib/logger'

Expand All @@ -11,10 +12,10 @@ class Connection

DEFAULT_OPTIONS = {:host =>'127.0.0.1',
:port => '4001', # IB Gateway connection (default)
#:port => '7496', # TWS connection, with annoying pop-ups
#:port => '7496', # TWS connection
:connect => true, # Connect at initialization
:reader => true, # Start a separate reader Thread
:received => true, # Keep all received messages in a Hash
:received => true, # Keep all received messages in a @received Hash
:logger => nil,
:client_id => nil, # Will be randomly assigned
:client_version => 57, # 48, # 57 = can receive commissionReport message
Expand Down
8 changes: 5 additions & 3 deletions spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ IB historical data farm is known to disappear from time to time, so any specs re
historical data will fail while this outage lasts.

If you experience such intermittent spec failures, it is recommended that you run the
failing specs several times, possibly with a delay of 10-20 minutes. Start debugging
the specs only if they are failing regularly. Otherwise, you may just waste time chasing
an artifact of unreliable IB connection, rather than some real problem with the specs.
failing specs several times, possibly with a delay of 10-20 minutes. Sometimes it helps
to restart your TWS or Gateway, as it may be stuck in inconsistent state, preventing
test suite from running properly. Start debugging the specs only if they are failing
regularly. Otherwise, you may just waste time chasing an artifact of unreliable IB
connection, rather than some real problem with the specs.

# WRITING YOUR OWN INTEGRATION SPECS

Expand Down

0 comments on commit bd7edd8

Please sign in to comment.