ib-api 10.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +52 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CLAUDE.md +131 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +120 -0
- data/Guardfile +24 -0
- data/LICENSE +674 -0
- data/LLM_GUIDE.md +388 -0
- data/README.md +114 -0
- data/Rakefile +11 -0
- data/VERSION +1 -0
- data/api.gemspec +50 -0
- data/bin/console +96 -0
- data/bin/console.yml +3 -0
- data/bin/setup +8 -0
- data/bin/simple +91 -0
- data/changelog.md +32 -0
- data/conditions/ib/execution_condition.rb +31 -0
- data/conditions/ib/margin_condition.rb +28 -0
- data/conditions/ib/order_condition.rb +29 -0
- data/conditions/ib/percent_change_condition.rb +34 -0
- data/conditions/ib/price_condition.rb +44 -0
- data/conditions/ib/time_condition.rb +42 -0
- data/conditions/ib/volume_condition.rb +36 -0
- data/lib/class_extensions.rb +167 -0
- data/lib/ib/base.rb +109 -0
- data/lib/ib/base_properties.rb +178 -0
- data/lib/ib/connection.rb +573 -0
- data/lib/ib/constants.rb +402 -0
- data/lib/ib/contract.rb +30 -0
- data/lib/ib/errors.rb +52 -0
- data/lib/ib/messages/abstract_message.rb +68 -0
- data/lib/ib/messages/incoming/abstract_message.rb +116 -0
- data/lib/ib/messages/incoming/abstract_tick.rb +25 -0
- data/lib/ib/messages/incoming/account_message.rb +26 -0
- data/lib/ib/messages/incoming/alert.rb +34 -0
- data/lib/ib/messages/incoming/contract_data.rb +105 -0
- data/lib/ib/messages/incoming/contract_message.rb +13 -0
- data/lib/ib/messages/incoming/delta_neutral_validation.rb +23 -0
- data/lib/ib/messages/incoming/execution_data.rb +50 -0
- data/lib/ib/messages/incoming/histogram_data.rb +30 -0
- data/lib/ib/messages/incoming/historical_data.rb +65 -0
- data/lib/ib/messages/incoming/historical_data_update.rb +50 -0
- data/lib/ib/messages/incoming/managed_accounts.rb +21 -0
- data/lib/ib/messages/incoming/market_depth.rb +34 -0
- data/lib/ib/messages/incoming/market_depth_l2.rb +15 -0
- data/lib/ib/messages/incoming/next_valid_id.rb +19 -0
- data/lib/ib/messages/incoming/open_order.rb +290 -0
- data/lib/ib/messages/incoming/order_status.rb +85 -0
- data/lib/ib/messages/incoming/portfolio_value.rb +47 -0
- data/lib/ib/messages/incoming/position_data.rb +21 -0
- data/lib/ib/messages/incoming/positions_multi.rb +15 -0
- data/lib/ib/messages/incoming/real_time_bar.rb +32 -0
- data/lib/ib/messages/incoming/receive_fa.rb +30 -0
- data/lib/ib/messages/incoming/scanner_data.rb +54 -0
- data/lib/ib/messages/incoming/tick_by_tick.rb +77 -0
- data/lib/ib/messages/incoming/tick_efp.rb +18 -0
- data/lib/ib/messages/incoming/tick_generic.rb +12 -0
- data/lib/ib/messages/incoming/tick_option.rb +60 -0
- data/lib/ib/messages/incoming/tick_price.rb +60 -0
- data/lib/ib/messages/incoming/tick_size.rb +55 -0
- data/lib/ib/messages/incoming/tick_string.rb +13 -0
- data/lib/ib/messages/incoming.rb +292 -0
- data/lib/ib/messages/outgoing/abstract_message.rb +84 -0
- data/lib/ib/messages/outgoing/bar_request_message.rb +247 -0
- data/lib/ib/messages/outgoing/new-place-order.rb +193 -0
- data/lib/ib/messages/outgoing/old-place-order.rb +147 -0
- data/lib/ib/messages/outgoing/place_order.rb +149 -0
- data/lib/ib/messages/outgoing/request_account_summary.rb +79 -0
- data/lib/ib/messages/outgoing/request_historical_data.rb +182 -0
- data/lib/ib/messages/outgoing/request_market_data.rb +102 -0
- data/lib/ib/messages/outgoing/request_market_depth.rb +57 -0
- data/lib/ib/messages/outgoing/request_real_time_bars.rb +48 -0
- data/lib/ib/messages/outgoing/request_scanner_subscription.rb +73 -0
- data/lib/ib/messages/outgoing/request_tick_by_tick_data.rb +21 -0
- data/lib/ib/messages/outgoing.rb +410 -0
- data/lib/ib/messages.rb +139 -0
- data/lib/ib/order_condition.rb +26 -0
- data/lib/ib/plugins.rb +27 -0
- data/lib/ib/prepare_data.rb +61 -0
- data/lib/ib/raw_message_parser.rb +99 -0
- data/lib/ib/socket.rb +83 -0
- data/lib/ib/support.rb +236 -0
- data/lib/ib/version.rb +6 -0
- data/lib/ib-api.rb +44 -0
- data/lib/server_versions.rb +145 -0
- data/lib/support/array_function.rb +28 -0
- data/lib/support/logging.rb +45 -0
- data/models/ib/account.rb +72 -0
- data/models/ib/account_value.rb +33 -0
- data/models/ib/bag.rb +55 -0
- data/models/ib/bar.rb +31 -0
- data/models/ib/combo_leg.rb +127 -0
- data/models/ib/contract.rb +411 -0
- data/models/ib/contract_detail.rb +118 -0
- data/models/ib/execution.rb +67 -0
- data/models/ib/forex.rb +12 -0
- data/models/ib/future.rb +64 -0
- data/models/ib/index.rb +14 -0
- data/models/ib/option.rb +149 -0
- data/models/ib/option_detail.rb +84 -0
- data/models/ib/order.rb +720 -0
- data/models/ib/order_state.rb +155 -0
- data/models/ib/portfolio_value.rb +86 -0
- data/models/ib/spread.rb +176 -0
- data/models/ib/stock.rb +25 -0
- data/models/ib/underlying.rb +32 -0
- data/plugins/ib/advanced-account.rb +442 -0
- data/plugins/ib/alerts/base-alert.rb +125 -0
- data/plugins/ib/alerts/gateway-alerts.rb +15 -0
- data/plugins/ib/alerts/order-alerts.rb +73 -0
- data/plugins/ib/auto-adjust.rb +0 -0
- data/plugins/ib/connection-tools.rb +122 -0
- data/plugins/ib/eod.rb +326 -0
- data/plugins/ib/greeks.rb +102 -0
- data/plugins/ib/managed-accounts.rb +274 -0
- data/plugins/ib/market-price.rb +150 -0
- data/plugins/ib/option-chain.rb +167 -0
- data/plugins/ib/order-flow.rb +157 -0
- data/plugins/ib/order-prototypes/abstract.rb +67 -0
- data/plugins/ib/order-prototypes/adaptive.rb +40 -0
- data/plugins/ib/order-prototypes/all-in-one.rb +46 -0
- data/plugins/ib/order-prototypes/combo.rb +46 -0
- data/plugins/ib/order-prototypes/forex.rb +40 -0
- data/plugins/ib/order-prototypes/limit.rb +193 -0
- data/plugins/ib/order-prototypes/market.rb +116 -0
- data/plugins/ib/order-prototypes/pegged.rb +169 -0
- data/plugins/ib/order-prototypes/premarket.rb +31 -0
- data/plugins/ib/order-prototypes/stop.rb +202 -0
- data/plugins/ib/order-prototypes/volatility.rb +39 -0
- data/plugins/ib/order-prototypes.rb +118 -0
- data/plugins/ib/probability-of-expiring.rb +109 -0
- data/plugins/ib/process-orders.rb +155 -0
- data/plugins/ib/roll.rb +86 -0
- data/plugins/ib/spread-prototypes/butterfly.rb +77 -0
- data/plugins/ib/spread-prototypes/calendar.rb +97 -0
- data/plugins/ib/spread-prototypes/stock-spread.rb +56 -0
- data/plugins/ib/spread-prototypes/straddle.rb +70 -0
- data/plugins/ib/spread-prototypes/strangle.rb +93 -0
- data/plugins/ib/spread-prototypes/vertical.rb +83 -0
- data/plugins/ib/spread-prototypes.rb +70 -0
- data/plugins/ib/symbols/abstract.rb +136 -0
- data/plugins/ib/symbols/bonds.rb +28 -0
- data/plugins/ib/symbols/cfd.rb +19 -0
- data/plugins/ib/symbols/combo.rb +46 -0
- data/plugins/ib/symbols/commodity.rb +17 -0
- data/plugins/ib/symbols/forex.rb +41 -0
- data/plugins/ib/symbols/futures.rb +127 -0
- data/plugins/ib/symbols/index.rb +43 -0
- data/plugins/ib/symbols/options.rb +99 -0
- data/plugins/ib/symbols/stocks.rb +44 -0
- data/plugins/ib/symbols/version.rb +5 -0
- data/plugins/ib/symbols.rb +118 -0
- data/plugins/ib/verify.rb +226 -0
- data/symbols/w20.yml +210 -0
- data/t.txt +20 -0
- data/update.md +71 -0
- metadata +327 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 935f3bd0a0fd4d93c9c3d602fe872cadab16d05b714ea361c80efc784f46e9aa
|
|
4
|
+
data.tar.gz: ffb84a6d0d631c783f1baa30d03125718365d7ee438aa6a4e2da2035ec463ac6
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 852305cb2978fa5725238262398b53bb7b2a5e5ae7e44507042d02648db1ddb6868ad820f523aef17e68015a341b4d8b1a9606201ef6d6ef4b582440aa4811f4
|
|
7
|
+
data.tar.gz: 574f46966e87bcb2f2408cd811b913caf8387f9cd5dbddfc45b841aee010aeb8b2d8ed43feea4a2abe038305ddcf0208b1a894bf68a46e588ed16c0afdd9ca5b
|
data/.gitignore
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
*.gem
|
|
2
|
+
*.rbc
|
|
3
|
+
*.swp
|
|
4
|
+
*.swo
|
|
5
|
+
/.config
|
|
6
|
+
/coverage/
|
|
7
|
+
/InstalledFiles
|
|
8
|
+
/pkg/
|
|
9
|
+
/spec/reports/
|
|
10
|
+
/spec/examples.txt
|
|
11
|
+
/test/tmp/
|
|
12
|
+
/test/version_tmp/
|
|
13
|
+
/tmp/
|
|
14
|
+
|
|
15
|
+
# Used by dotenv library to load environment variables.
|
|
16
|
+
# .env
|
|
17
|
+
|
|
18
|
+
## Specific to RubyMotion:
|
|
19
|
+
.dat*
|
|
20
|
+
.repl_history
|
|
21
|
+
build/
|
|
22
|
+
*.bridgesupport
|
|
23
|
+
build-iPhoneOS/
|
|
24
|
+
build-iPhoneSimulator/
|
|
25
|
+
|
|
26
|
+
## Specific to RubyMotion (use of CocoaPods):
|
|
27
|
+
#
|
|
28
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
|
29
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
|
30
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
|
31
|
+
#
|
|
32
|
+
# vendor/Pods/
|
|
33
|
+
|
|
34
|
+
## Documentation cache and generated files:
|
|
35
|
+
/.yardoc/
|
|
36
|
+
/_yardoc/
|
|
37
|
+
/doc/
|
|
38
|
+
/rdoc/
|
|
39
|
+
|
|
40
|
+
## Environment normalization:
|
|
41
|
+
/.bundle/
|
|
42
|
+
/vendor/bundle
|
|
43
|
+
/lib/bundler/man/
|
|
44
|
+
|
|
45
|
+
# for a library or gem, you might want to ignore these files since the code is
|
|
46
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
47
|
+
# Gemfile.lock
|
|
48
|
+
# .ruby-version
|
|
49
|
+
# .ruby-gemset
|
|
50
|
+
|
|
51
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
52
|
+
.rvmrc
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CLAUDE.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
**ib-api** is a Ruby gem providing a modular interface to Interactive Brokers' TWS API (Trader Workstation/Gateway). It's a modern reimplementation of ib-ruby designed for TWS version 10.19+ with Zeitwerk integration and an extensible plugin system.
|
|
8
|
+
|
|
9
|
+
## Architecture
|
|
10
|
+
|
|
11
|
+
The codebase follows an **event-driven, message-based architecture** with three main layers:
|
|
12
|
+
|
|
13
|
+
1. **Connection Layer** (`lib/ib/connection.rb`): Manages TCP socket connection to TWS/Gateway, handles message queuing, and provides the primary API interface. Uses a workflow state machine (virgin → ready/gateway_mode/lean_mode → account_based_operations).
|
|
14
|
+
|
|
15
|
+
2. **Message Layer** (`lib/ib/messages/`): Bidirectional message system using a `def_message` macro to dynamically generate message classes. Supports multiple IB API versions (currently client version 66, server version 165+). Messages are processed by `RawMessageParser` which decodes the binary protocol from IB.
|
|
16
|
+
|
|
17
|
+
3. **Model Layer** (`models/ib/`, Zeitwerk-loaded): ActiveModel-based data models for contracts (Stock, Option, Future, etc.), orders, market data, and spreads.
|
|
18
|
+
|
|
19
|
+
**Plugin Architecture**: Extensible system in `plugins/ib/` that adds automation capabilities. Plugins extend `IB::Connection` through mixins and are activated via `activate_plugin`. State machine manages plugin availability based on connection state.
|
|
20
|
+
|
|
21
|
+
## Development Commands
|
|
22
|
+
|
|
23
|
+
### Testing
|
|
24
|
+
```bash
|
|
25
|
+
# Run all tests
|
|
26
|
+
bundle exec rake spec
|
|
27
|
+
# or
|
|
28
|
+
bundle exec rspec
|
|
29
|
+
|
|
30
|
+
# Run with Guard (continuous testing)
|
|
31
|
+
bundle exec guard
|
|
32
|
+
|
|
33
|
+
# Run specific test file
|
|
34
|
+
bundle exec rspec spec/ib/contract_spec.rb
|
|
35
|
+
|
|
36
|
+
# Run focused tests (using fit/fdescribe/fcontext or :focus tag)
|
|
37
|
+
bundle exec rspec --tag focus
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Interactive Console
|
|
41
|
+
```bash
|
|
42
|
+
# Connect to IB Gateway (default)
|
|
43
|
+
./console g
|
|
44
|
+
|
|
45
|
+
# Connect to TWS
|
|
46
|
+
./console t
|
|
47
|
+
|
|
48
|
+
# The console sets up C as the connection instance
|
|
49
|
+
# C points to IB::Connection.current
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Build
|
|
53
|
+
```bash
|
|
54
|
+
# Install dependencies
|
|
55
|
+
bundle install
|
|
56
|
+
|
|
57
|
+
# Build the gem
|
|
58
|
+
gem build ib-api.gemspec
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Testing Configuration
|
|
62
|
+
|
|
63
|
+
Tests require `spec/spec.yml` with IB account details:
|
|
64
|
+
```yaml
|
|
65
|
+
:connection:
|
|
66
|
+
:port: 4002 # IB Gateway port (4001/4002) or TWS (7496/7497)
|
|
67
|
+
:host: 127.0.0.1 # IB server host
|
|
68
|
+
:account: DU123456 # Your paper account ID (required)
|
|
69
|
+
:base_currency: EUR # Base currency
|
|
70
|
+
:market_data: false # Include market-data dependent tests
|
|
71
|
+
:stock:
|
|
72
|
+
:symbol: 'GE' # Sample symbol for tests
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The test suite is safe to run with a real (paper trading) account as integration tests on order placement are not included.
|
|
76
|
+
|
|
77
|
+
## Key Patterns
|
|
78
|
+
|
|
79
|
+
### Message Processing
|
|
80
|
+
- Incoming messages are queued in `IB::Connection#received` hash by message type
|
|
81
|
+
- Subscribe to messages: `ib.subscribe(:OrderStatus) { |msg| ... }`
|
|
82
|
+
- Wait for messages: `ib.wait_for :OrderStatus`
|
|
83
|
+
- Send messages: `ib.send_message :PlaceOrder, order: order, contract: contract`
|
|
84
|
+
|
|
85
|
+
### Connection Workflow
|
|
86
|
+
States: `virgin` → `lean_mode`/`gateway_mode`/`ready` → `account_based_operations` → `account_based_orderflow`
|
|
87
|
+
|
|
88
|
+
- `lean_mode`: Minimal connection, no account data
|
|
89
|
+
- `gateway_mode`: Multi-account gateway access
|
|
90
|
+
- `ready`: Standard single-account connection
|
|
91
|
+
- `account_based_operations`: Account data loaded, portfolio available
|
|
92
|
+
- `account_based_orderflow`: Order processing active
|
|
93
|
+
|
|
94
|
+
### Plugin Development
|
|
95
|
+
Plugins are Ruby files in `plugins/ib/` that extend `IB::Connection`:
|
|
96
|
+
```ruby
|
|
97
|
+
# plugins/ib/my_plugin.rb
|
|
98
|
+
module IB
|
|
99
|
+
module Connection
|
|
100
|
+
def my_method
|
|
101
|
+
# implementation
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Activate: `ib.activate_plugin :my_plugin`
|
|
108
|
+
|
|
109
|
+
### Zeitwerk Autoloading
|
|
110
|
+
Models in `models/ib/` are autoloaded by Zeitwerk. No explicit requires needed. Inflection rules are set in `lib/ib-api.rb`.
|
|
111
|
+
|
|
112
|
+
## Testing Framework
|
|
113
|
+
|
|
114
|
+
- **RSpec** with: `rspec-its`, `rspec-given`, `rspec-collection_matchers`
|
|
115
|
+
- Test data: `SAMPLE` constant holds a test IB::Stock configured from `spec.yml`
|
|
116
|
+
- Account shortcut: `ACCOUNT` constant holds the account ID from `spec.yml`
|
|
117
|
+
- Focus tests: Use `fit`, `fdescribe`, `fcontext` or tag with `:focus`
|
|
118
|
+
|
|
119
|
+
## Message Debugging
|
|
120
|
+
|
|
121
|
+
When implementing new message types, uncomment line 37 in `lib/ib/messages/incoming/abstract_message.rb` to see raw TWS output. The console (`./console`) is useful for quick message testing - inspect `C.received` hash to see collected messages.
|
|
122
|
+
|
|
123
|
+
## Important Files
|
|
124
|
+
|
|
125
|
+
- `lib/ib/connection.rb`: Main connection and workflow management
|
|
126
|
+
- `lib/ib/plugins.rb`: Plugin activation system
|
|
127
|
+
- `lib/ib-api.rb`: Entry point, Zeitwerk setup
|
|
128
|
+
- `lib/ib/messages/outgoing/` & `lib/ib/messages/incoming/`: Message definitions
|
|
129
|
+
- `models/ib/`: Data models (Contract, Order, etc.)
|
|
130
|
+
- `spec/spec_helper.rb`: Test configuration
|
|
131
|
+
- `spec/howto.md`: Guide for implementing and testing messages
|
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
|
10
|
+
orientation.
|
|
11
|
+
|
|
12
|
+
## Our Standards
|
|
13
|
+
|
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
|
15
|
+
include:
|
|
16
|
+
|
|
17
|
+
* Using welcoming and inclusive language
|
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
|
19
|
+
* Gracefully accepting constructive criticism
|
|
20
|
+
* Focusing on what is best for the community
|
|
21
|
+
* Showing empathy towards other community members
|
|
22
|
+
|
|
23
|
+
Examples of unacceptable behavior by participants include:
|
|
24
|
+
|
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
* Public or private harassment
|
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
|
+
|
|
34
|
+
## Our Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
+
response to any instances of unacceptable behavior.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
+
threatening, offensive, or harmful.
|
|
45
|
+
|
|
46
|
+
## Scope
|
|
47
|
+
|
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
+
when an individual is representing the project or its community. Examples of
|
|
50
|
+
representing a project or community include using an official project e-mail
|
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
|
53
|
+
further defined and clarified by project maintainers.
|
|
54
|
+
|
|
55
|
+
## Enforcement
|
|
56
|
+
|
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
+
reported by contacting the project team at info@mailout.halfgarten-capital.de. All
|
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
|
63
|
+
|
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
+
members of the project's leadership.
|
|
67
|
+
|
|
68
|
+
## Attribution
|
|
69
|
+
|
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
|
72
|
+
|
|
73
|
+
[homepage]: http://contributor-covenant.org
|
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
source "https://rubygems.org"
|
|
2
|
+
|
|
3
|
+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
|
4
|
+
|
|
5
|
+
# Specify your gem's dependencies in api.gemspec
|
|
6
|
+
gemspec
|
|
7
|
+
|
|
8
|
+
# gem 'value_semantics' # models, future plans
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
gem 'rspec'
|
|
13
|
+
gem 'rspec-its'
|
|
14
|
+
gem 'rspec-given'
|
|
15
|
+
gem 'rspec-collection_matchers'
|
|
16
|
+
gem 'guard'
|
|
17
|
+
gem 'guard-rspec'
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
ib-api (10.33.1)
|
|
5
|
+
activemodel
|
|
6
|
+
activesupport (>= 6.0)
|
|
7
|
+
ox
|
|
8
|
+
terminal-table
|
|
9
|
+
workflow (~> 3.1)
|
|
10
|
+
zeitwerk
|
|
11
|
+
|
|
12
|
+
GEM
|
|
13
|
+
remote: https://rubygems.org/
|
|
14
|
+
specs:
|
|
15
|
+
activemodel (7.1.3.4)
|
|
16
|
+
activesupport (= 7.1.3.4)
|
|
17
|
+
activesupport (7.1.3.4)
|
|
18
|
+
base64
|
|
19
|
+
bigdecimal
|
|
20
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
21
|
+
connection_pool (>= 2.2.5)
|
|
22
|
+
drb
|
|
23
|
+
i18n (>= 1.6, < 2)
|
|
24
|
+
minitest (>= 5.1)
|
|
25
|
+
mutex_m
|
|
26
|
+
tzinfo (~> 2.0)
|
|
27
|
+
base64 (0.2.0)
|
|
28
|
+
bigdecimal (3.1.8)
|
|
29
|
+
coderay (1.1.3)
|
|
30
|
+
concurrent-ruby (1.3.3)
|
|
31
|
+
connection_pool (2.4.1)
|
|
32
|
+
diff-lcs (1.5.1)
|
|
33
|
+
drb (2.2.1)
|
|
34
|
+
ffi (1.17.3-x86_64-linux-gnu)
|
|
35
|
+
formatador (1.1.0)
|
|
36
|
+
given_core (3.8.2)
|
|
37
|
+
sorcerer (>= 0.3.7)
|
|
38
|
+
guard (2.18.1)
|
|
39
|
+
formatador (>= 0.2.4)
|
|
40
|
+
listen (>= 2.7, < 4.0)
|
|
41
|
+
lumberjack (>= 1.0.12, < 2.0)
|
|
42
|
+
nenv (~> 0.1)
|
|
43
|
+
notiffany (~> 0.0)
|
|
44
|
+
pry (>= 0.13.0)
|
|
45
|
+
shellany (~> 0.0)
|
|
46
|
+
thor (>= 0.18.1)
|
|
47
|
+
guard-compat (1.2.1)
|
|
48
|
+
guard-rspec (4.7.3)
|
|
49
|
+
guard (~> 2.1)
|
|
50
|
+
guard-compat (~> 1.1)
|
|
51
|
+
rspec (>= 2.99.0, < 4.0)
|
|
52
|
+
i18n (1.14.5)
|
|
53
|
+
concurrent-ruby (~> 1.0)
|
|
54
|
+
listen (3.9.0)
|
|
55
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
56
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
|
57
|
+
lumberjack (1.2.10)
|
|
58
|
+
method_source (1.1.0)
|
|
59
|
+
minitest (5.24.1)
|
|
60
|
+
mutex_m (0.2.0)
|
|
61
|
+
nenv (0.3.0)
|
|
62
|
+
notiffany (0.1.3)
|
|
63
|
+
nenv (~> 0.1)
|
|
64
|
+
shellany (~> 0.0)
|
|
65
|
+
ox (2.14.18)
|
|
66
|
+
pry (0.14.2)
|
|
67
|
+
coderay (~> 1.1)
|
|
68
|
+
method_source (~> 1.0)
|
|
69
|
+
rake (13.2.1)
|
|
70
|
+
rb-fsevent (0.11.2)
|
|
71
|
+
rb-inotify (0.11.1)
|
|
72
|
+
ffi (~> 1.0)
|
|
73
|
+
rspec (3.13.0)
|
|
74
|
+
rspec-core (~> 3.13.0)
|
|
75
|
+
rspec-expectations (~> 3.13.0)
|
|
76
|
+
rspec-mocks (~> 3.13.0)
|
|
77
|
+
rspec-collection_matchers (1.2.1)
|
|
78
|
+
rspec-expectations (>= 2.99.0.beta1)
|
|
79
|
+
rspec-core (3.13.0)
|
|
80
|
+
rspec-support (~> 3.13.0)
|
|
81
|
+
rspec-expectations (3.13.1)
|
|
82
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
83
|
+
rspec-support (~> 3.13.0)
|
|
84
|
+
rspec-given (3.8.2)
|
|
85
|
+
given_core (= 3.8.2)
|
|
86
|
+
rspec (>= 2.14.0)
|
|
87
|
+
rspec-its (1.3.0)
|
|
88
|
+
rspec-core (>= 3.0.0)
|
|
89
|
+
rspec-expectations (>= 3.0.0)
|
|
90
|
+
rspec-mocks (3.13.1)
|
|
91
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
92
|
+
rspec-support (~> 3.13.0)
|
|
93
|
+
rspec-support (3.13.1)
|
|
94
|
+
shellany (0.0.1)
|
|
95
|
+
sorcerer (2.0.1)
|
|
96
|
+
terminal-table (3.0.2)
|
|
97
|
+
unicode-display_width (>= 1.1.1, < 3)
|
|
98
|
+
thor (1.3.1)
|
|
99
|
+
tzinfo (2.0.6)
|
|
100
|
+
concurrent-ruby (~> 1.0)
|
|
101
|
+
unicode-display_width (2.5.0)
|
|
102
|
+
workflow (3.1.1)
|
|
103
|
+
zeitwerk (2.6.16)
|
|
104
|
+
|
|
105
|
+
PLATFORMS
|
|
106
|
+
x86_64-linux
|
|
107
|
+
|
|
108
|
+
DEPENDENCIES
|
|
109
|
+
bundler
|
|
110
|
+
guard
|
|
111
|
+
guard-rspec
|
|
112
|
+
ib-api!
|
|
113
|
+
rake (~> 13.0)
|
|
114
|
+
rspec
|
|
115
|
+
rspec-collection_matchers
|
|
116
|
+
rspec-given
|
|
117
|
+
rspec-its
|
|
118
|
+
|
|
119
|
+
BUNDLED WITH
|
|
120
|
+
2.4.6
|
data/Guardfile
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# A sample Guardfile
|
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
|
3
|
+
|
|
4
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
|
5
|
+
require "ostruct"
|
|
6
|
+
|
|
7
|
+
# Generic Ruby apps
|
|
8
|
+
rspec = OpenStruct.new
|
|
9
|
+
rspec.spec = ->(m) { "spec/#{m}_spec.rb" }
|
|
10
|
+
rspec.spec_dir = "spec"
|
|
11
|
+
rspec.spec_helper = "spec/spec_helper.rb"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# watch(%r{^lib/models/ib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
|
15
|
+
# watch(%r{^lib/ib/messages/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
|
16
|
+
# watch(%r{^lib/ib/symbols/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
|
17
|
+
|
|
18
|
+
watch(%r{^ib/(.+)\.rb$}) { |m| "spec/ib/#{m[1]}_spec.rb" }
|
|
19
|
+
# watch(%r{^models/(.+)\.rb$}) { |m| "spec/models/#{m[1]}_spec.rb" }
|
|
20
|
+
watch(%r{^spec/.+_spec\.rb$})
|
|
21
|
+
watch('spec/spec_helper.rb') { "spec" }
|
|
22
|
+
# watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
|
23
|
+
end
|
|
24
|
+
|