lita-onewheel-finance 0.3.1 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,9 +25,33 @@ 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 'errors' do
29
- mock_up 'worldtradedata-error'
30
- send_command 'quote in'
31
- expect(replies.last).to eq('`in` not found on any stock exchange.')
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
+ end
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")
32
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
52
+ #it 'searches with 1 result' do
53
+ # mock_up 'worldtradedata-search-1'
54
+ # send_command 'quote nike'
55
+ # expect(replies.last).to eq('NKE')
56
+ #end
33
57
  end
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.3.1
4
+ version: 0.7.1
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-01-02 00:00:00.000000000 Z
11
+ date: 2020-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita
@@ -130,20 +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
151
+ - spec/fixtures/worldtradedata-search-1.json
152
+ - spec/fixtures/yahoo-quote.json
147
153
  - spec/lita/handlers/onewheel_finance_spec.rb
148
154
  - spec/spec_helper.rb
149
155
  homepage: https://github.com/onewheelskyward/lita-onewheel-finance
@@ -166,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
172
  - !ruby/object:Gem::Version
167
173
  version: '0'
168
174
  requirements: []
169
- rubygems_version: 3.0.3
175
+ rubygems_version: 3.1.2
170
176
  signing_key:
171
177
  specification_version: 4
172
178
  summary: Designed to query stock indicies and return relevant data.
@@ -175,7 +181,10 @@ test_files:
175
181
  - spec/fixtures/alphavantage-quote-down.json
176
182
  - spec/fixtures/effr.html
177
183
  - spec/fixtures/worldtradedata-error.json
184
+ - spec/fixtures/worldtradedata-quote-dji.json
178
185
  - spec/fixtures/worldtradedata-quote-down.json
179
186
  - spec/fixtures/worldtradedata-quote-up.json
187
+ - spec/fixtures/worldtradedata-search-1.json
188
+ - spec/fixtures/yahoo-quote.json
180
189
  - spec/lita/handlers/onewheel_finance_spec.rb
181
190
  - spec/spec_helper.rb
@@ -1 +0,0 @@
1
- 2.6.5