lita-onewheel-finance 0.4.0 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/alphavantage_quote.rb +68 -0
- data/lib/lita/handlers/irc_colors.rb +43 -0
- data/lib/lita/handlers/onewheel_finance.rb +65 -229
- data/lib/lita/handlers/worldtradedata_quote.rb +128 -0
- data/lib/lita/handlers/yahoo_quote.rb +58 -0
- data/lita-onewheel-finance.gemspec +1 -1
- data/spec/fixtures/worldtradedata-quote-dji.json +32 -0
- data/spec/fixtures/yahoo-quote.json +1664 -0
- data/spec/lita/handlers/onewheel_finance_spec.rb +22 -4
- metadata +11 -4
- data/.ruby-version +0 -1
@@ -25,12 +25,30 @@ describe Lita::Handlers::OnewheelFinance, lita_handler: true do
|
|
25
25
|
expect(replies.last).to include('(Consumer Staples Select Sector SPDR Fund)')
|
26
26
|
end
|
27
27
|
|
28
|
-
it '
|
29
|
-
mock_up 'worldtradedata-
|
30
|
-
send_command '
|
31
|
-
expect(replies.last).to
|
28
|
+
it 'nasdaq:lulu' do
|
29
|
+
mock_up 'worldtradedata-quote-up'
|
30
|
+
send_command 'q nasdaq:lulu'
|
31
|
+
expect(replies.last).to include("\u000314NASDAQ - \u0003LULU: \u000302$233.01\u0003")
|
32
32
|
end
|
33
33
|
|
34
|
+
it 'removes $ from ^ reqs' do
|
35
|
+
mock_up 'worldtradedata-quote-dji'
|
36
|
+
send_command 'q ^dji'
|
37
|
+
expect(replies.last).to include("\u000314INDEXDJX - \u0003^DJI: \u00030225766.64\u0003 \u000304 ↯-1190.95\u0003, \u000304-4.42%\u0003 \u000314(Dow Jones Industrial Average)\u0003")
|
38
|
+
end
|
39
|
+
|
40
|
+
#it 'errors' do
|
41
|
+
# mock_up 'worldtradedata-error'
|
42
|
+
# send_command 'quote in'
|
43
|
+
# expect(replies.last).to eq('`in` not found on any stock exchange.')
|
44
|
+
#end
|
45
|
+
|
46
|
+
|
47
|
+
# This doesn't exist
|
48
|
+
#it 'TADAWUL:2222' do
|
49
|
+
# mock_up 'worldtradedata-TADAWUL-2222.json'
|
50
|
+
#
|
51
|
+
#end
|
34
52
|
#it 'searches with 1 result' do
|
35
53
|
# mock_up 'worldtradedata-search-1'
|
36
54
|
# send_command 'quote nike'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-onewheel-finance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kreps
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
@@ -130,21 +130,26 @@ extensions: []
|
|
130
130
|
extra_rdoc_files: []
|
131
131
|
files:
|
132
132
|
- ".gitignore"
|
133
|
-
- ".ruby-version"
|
134
133
|
- ".travis.yml"
|
135
134
|
- Gemfile
|
136
135
|
- README.md
|
137
136
|
- Rakefile
|
138
137
|
- lib/lita-onewheel-finance.rb
|
138
|
+
- lib/lita/handlers/alphavantage_quote.rb
|
139
|
+
- lib/lita/handlers/irc_colors.rb
|
139
140
|
- lib/lita/handlers/onewheel_finance.rb
|
141
|
+
- lib/lita/handlers/worldtradedata_quote.rb
|
142
|
+
- lib/lita/handlers/yahoo_quote.rb
|
140
143
|
- lita-onewheel-finance.gemspec
|
141
144
|
- spec/fixtures/alphavantage-global-quote.json
|
142
145
|
- spec/fixtures/alphavantage-quote-down.json
|
143
146
|
- spec/fixtures/effr.html
|
144
147
|
- spec/fixtures/worldtradedata-error.json
|
148
|
+
- spec/fixtures/worldtradedata-quote-dji.json
|
145
149
|
- spec/fixtures/worldtradedata-quote-down.json
|
146
150
|
- spec/fixtures/worldtradedata-quote-up.json
|
147
151
|
- spec/fixtures/worldtradedata-search-1.json
|
152
|
+
- spec/fixtures/yahoo-quote.json
|
148
153
|
- spec/lita/handlers/onewheel_finance_spec.rb
|
149
154
|
- spec/spec_helper.rb
|
150
155
|
homepage: https://github.com/onewheelskyward/lita-onewheel-finance
|
@@ -167,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
172
|
- !ruby/object:Gem::Version
|
168
173
|
version: '0'
|
169
174
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
175
|
+
rubygems_version: 3.1.2
|
171
176
|
signing_key:
|
172
177
|
specification_version: 4
|
173
178
|
summary: Designed to query stock indicies and return relevant data.
|
@@ -176,8 +181,10 @@ test_files:
|
|
176
181
|
- spec/fixtures/alphavantage-quote-down.json
|
177
182
|
- spec/fixtures/effr.html
|
178
183
|
- spec/fixtures/worldtradedata-error.json
|
184
|
+
- spec/fixtures/worldtradedata-quote-dji.json
|
179
185
|
- spec/fixtures/worldtradedata-quote-down.json
|
180
186
|
- spec/fixtures/worldtradedata-quote-up.json
|
181
187
|
- spec/fixtures/worldtradedata-search-1.json
|
188
|
+
- spec/fixtures/yahoo-quote.json
|
182
189
|
- spec/lita/handlers/onewheel_finance_spec.rb
|
183
190
|
- spec/spec_helper.rb
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.6.5
|