yahoo_finanza 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb5a111a068ddaa569aadb3818f3e79e83a35c10
4
- data.tar.gz: 87d822f2a7b8d63ee789a7b6e77ae329475d1dff
3
+ metadata.gz: ca919f9cbbad25047bd58b4b3cdccdc66a5a0c14
4
+ data.tar.gz: 6a6822ff52a03843162af5ce09945827b0e3cd67
5
5
  SHA512:
6
- metadata.gz: 9045d16087e44482a5d420c8012cdea71b7d31fe5f0c5d7b7965ef7607d44d477e45361c9a9f7b758a336944e365b06ec9ee53aa80df657c90684166d28aa887
7
- data.tar.gz: 8d889744fd3d4e3e6f038c1bd452e4dcb9a06db2d488d9c62f0054d34ecbe2bb45d5f3ba51ee850d8f9fb88dcab8787c04e721d30bc28f57daef00b8b14098c9
6
+ metadata.gz: aa9c38395cae970a0bbdb1a3eac53ac69ed81c8f3eeff2486787df13c0185c05d52e5ec58c704640e467f0bc9ba8cb0a67884c28d89e5a39821d945f43c0b151
7
+ data.tar.gz: 4a08070fa5ecb450ef7f6766a31203c0c5d7983b39048d701b673cf4f914e731ccf09b4dbeedbc8dee05eb370f75879a355ce18027b04aa9211e95dd0a0d57cf
@@ -1,4 +1,4 @@
1
1
  # Yahoo Finanza Version
2
2
  module YahooFinanza
3
- VERSION = '0.4.2'
3
+ VERSION = '0.4.3'
4
4
  end
@@ -40,7 +40,10 @@ module YahooFinanza
40
40
  end
41
41
 
42
42
  def run
43
- (YahooFinanza::Constants.nyse + YahooFinanza::Constants.nasdaq + YahooFinanza::Constants.amex).reject { |symbol| @matcher.getDistance(@key.upcase, symbol.to_s) < 0.75 }
43
+ (YahooFinanza::Constants.nyse + YahooFinanza::Constants.nasdaq + YahooFinanza::Constants.amex)
44
+ .map { |symbol| { symbol: symbol, fuzzy_score: @matcher.getDistance(@key.upcase, symbol.to_s) } }
45
+ .reject { |element| element[:fuzzy_score] < 0.65 }.sort_by { |element| element[:fuzzy_score] }
46
+ .reverse.collect { |stock| stock[:symbol] }
44
47
  end
45
48
  end
46
49
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yahoo_finanza
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric D. Santos
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-12 00:00:00.000000000 Z
12
+ date: 2015-10-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yql