questrade_api 0.0.1 → 0.0.2

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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +3 -0
  5. data/.yardopts +9 -0
  6. data/Gemfile +15 -0
  7. data/Guardfile +6 -0
  8. data/{LICENSE.txt → LICENSE} +0 -0
  9. data/README.md +31 -45
  10. data/Rakefile +4 -0
  11. data/lib/questrade_api/authorization.rb +94 -0
  12. data/lib/questrade_api/client.rb +87 -0
  13. data/lib/questrade_api/modules/util.rb +22 -0
  14. data/lib/questrade_api/rest/account.rb +101 -0
  15. data/lib/questrade_api/rest/activity.rb +58 -0
  16. data/lib/questrade_api/rest/balance.rb +81 -0
  17. data/lib/questrade_api/rest/base.rb +88 -0
  18. data/lib/questrade_api/rest/execution.rb +59 -0
  19. data/lib/questrade_api/rest/market.rb +42 -0
  20. data/lib/questrade_api/rest/order.rb +58 -0
  21. data/lib/questrade_api/rest/position.rb +48 -0
  22. data/lib/questrade_api/rest/time.rb +26 -0
  23. data/lib/questrade_api/version.rb +1 -1
  24. data/questrade_api.gemspec +2 -3
  25. data/spec/fixtures/json/accounts.json +21 -0
  26. data/spec/fixtures/json/activities.json +36 -0
  27. data/spec/fixtures/json/balances.json +55 -0
  28. data/spec/fixtures/json/executions.json +46 -0
  29. data/spec/fixtures/json/markets.json +34 -0
  30. data/spec/fixtures/json/orders.json +49 -0
  31. data/spec/fixtures/json/positions.json +17 -0
  32. data/spec/fixtures/json/time.json +3 -0
  33. data/spec/questrade_api/authorization_spec.rb +74 -0
  34. data/spec/questrade_api/client_spec.rb +38 -0
  35. data/spec/questrade_api/rest/account_spec.rb +88 -0
  36. data/spec/questrade_api/rest/activity_spec.rb +70 -0
  37. data/spec/questrade_api/rest/balance_spec.rb +34 -0
  38. data/spec/questrade_api/rest/execution_spec.rb +80 -0
  39. data/spec/questrade_api/rest/market_spec.rb +63 -0
  40. data/spec/questrade_api/rest/order_spec.rb +95 -0
  41. data/spec/questrade_api/rest/position_spec.rb +47 -0
  42. data/spec/questrade_api/rest/time_spec.rb +34 -0
  43. data/spec/spec_helper.rb +107 -0
  44. data/spec/support/json_fixtures.rb +21 -0
  45. metadata +61 -47
@@ -0,0 +1,21 @@
1
+ module JSONFixtures
2
+ # Return the path to the JSON fixtures directory
3
+ def json_dir
4
+ File.join File.dirname(__FILE__), "../fixtures/json"
5
+ end
6
+
7
+ # Return a filename for a JSON fixture
8
+ def json_file(filename)
9
+ File.join json_dir, filename
10
+ end
11
+
12
+ # Return the contents of a JSON fixture as a String
13
+ def json_string(filename)
14
+ File.read json_file(filename)
15
+ end
16
+
17
+ # Return the contents of a JSON fixture as a data structure
18
+ def json_struct(filename)
19
+ JSON.parse json_string(filename)
20
+ end
21
+ end
metadata CHANGED
@@ -1,57 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: questrade_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruno Meira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-07 00:00:00.000000000 Z
11
+ date: 2017-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.14'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.14'
27
- - !ruby/object:Gem::Dependency
28
- name: guard
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: guard-rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
13
  - !ruby/object:Gem::Dependency
56
14
  name: rspec
57
15
  requirement: !ruby/object:Gem::Requirement
@@ -116,13 +74,49 @@ extensions: []
116
74
  extra_rdoc_files: []
117
75
  files:
118
76
  - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
79
+ - ".yardopts"
119
80
  - Gemfile
120
- - LICENSE.txt
81
+ - Guardfile
82
+ - LICENSE
121
83
  - README.md
122
84
  - Rakefile
123
85
  - lib/questrade_api.rb
86
+ - lib/questrade_api/authorization.rb
87
+ - lib/questrade_api/client.rb
88
+ - lib/questrade_api/modules/util.rb
89
+ - lib/questrade_api/rest/account.rb
90
+ - lib/questrade_api/rest/activity.rb
91
+ - lib/questrade_api/rest/balance.rb
92
+ - lib/questrade_api/rest/base.rb
93
+ - lib/questrade_api/rest/execution.rb
94
+ - lib/questrade_api/rest/market.rb
95
+ - lib/questrade_api/rest/order.rb
96
+ - lib/questrade_api/rest/position.rb
97
+ - lib/questrade_api/rest/time.rb
124
98
  - lib/questrade_api/version.rb
125
99
  - questrade_api.gemspec
100
+ - spec/fixtures/json/accounts.json
101
+ - spec/fixtures/json/activities.json
102
+ - spec/fixtures/json/balances.json
103
+ - spec/fixtures/json/executions.json
104
+ - spec/fixtures/json/markets.json
105
+ - spec/fixtures/json/orders.json
106
+ - spec/fixtures/json/positions.json
107
+ - spec/fixtures/json/time.json
108
+ - spec/questrade_api/authorization_spec.rb
109
+ - spec/questrade_api/client_spec.rb
110
+ - spec/questrade_api/rest/account_spec.rb
111
+ - spec/questrade_api/rest/activity_spec.rb
112
+ - spec/questrade_api/rest/balance_spec.rb
113
+ - spec/questrade_api/rest/execution_spec.rb
114
+ - spec/questrade_api/rest/market_spec.rb
115
+ - spec/questrade_api/rest/order_spec.rb
116
+ - spec/questrade_api/rest/position_spec.rb
117
+ - spec/questrade_api/rest/time_spec.rb
118
+ - spec/spec_helper.rb
119
+ - spec/support/json_fixtures.rb
126
120
  homepage: https://github.com/brunomeira/questrade_api
127
121
  licenses:
128
122
  - MIT
@@ -135,7 +129,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
129
  requirements:
136
130
  - - ">="
137
131
  - !ruby/object:Gem::Version
138
- version: '0'
132
+ version: 2.0.0
139
133
  required_rubygems_version: !ruby/object:Gem::Requirement
140
134
  requirements:
141
135
  - - ">="
@@ -147,4 +141,24 @@ rubygems_version: 2.5.1
147
141
  signing_key:
148
142
  specification_version: 4
149
143
  summary: An elegant Ruby gem to interact with Questrade API
150
- test_files: []
144
+ test_files:
145
+ - spec/fixtures/json/accounts.json
146
+ - spec/fixtures/json/activities.json
147
+ - spec/fixtures/json/balances.json
148
+ - spec/fixtures/json/executions.json
149
+ - spec/fixtures/json/markets.json
150
+ - spec/fixtures/json/orders.json
151
+ - spec/fixtures/json/positions.json
152
+ - spec/fixtures/json/time.json
153
+ - spec/questrade_api/authorization_spec.rb
154
+ - spec/questrade_api/client_spec.rb
155
+ - spec/questrade_api/rest/account_spec.rb
156
+ - spec/questrade_api/rest/activity_spec.rb
157
+ - spec/questrade_api/rest/balance_spec.rb
158
+ - spec/questrade_api/rest/execution_spec.rb
159
+ - spec/questrade_api/rest/market_spec.rb
160
+ - spec/questrade_api/rest/order_spec.rb
161
+ - spec/questrade_api/rest/position_spec.rb
162
+ - spec/questrade_api/rest/time_spec.rb
163
+ - spec/spec_helper.rb
164
+ - spec/support/json_fixtures.rb