yahoo_finanza 0.4.1 → 0.4.2

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: 287075a3324c256a999c548a67787f2bb802db11
4
- data.tar.gz: 2e5bc17087e5eb3215231bb8792c10f9916683ea
3
+ metadata.gz: bb5a111a068ddaa569aadb3818f3e79e83a35c10
4
+ data.tar.gz: 87d822f2a7b8d63ee789a7b6e77ae329475d1dff
5
5
  SHA512:
6
- metadata.gz: eaaffbad09da16a39bf44c53c95ee81d37111af7a3c59e8c9c3d155006ac1125523386e86d1920a94afb78a56aa83986e31c95255c9b104e15af82141f633eb7
7
- data.tar.gz: 92278d07dde23fff31c06de77a6ed629743362df887a054ab986bbb88e9e5f9bf16eb3d2ee83bd8acfd4453f8fc804395bcbdee290c6a22b8df37ebd42e11625
6
+ metadata.gz: 9045d16087e44482a5d420c8012cdea71b7d31fe5f0c5d7b7965ef7607d44d477e45361c9a9f7b758a336944e365b06ec9ee53aa80df657c90684166d28aa887
7
+ data.tar.gz: 8d889744fd3d4e3e6f038c1bd452e4dcb9a06db2d488d9c62f0054d34ecbe2bb45d5f3ba51ee850d8f9fb88dcab8787c04e721d30bc28f57daef00b8b14098c9
@@ -1,4 +1,4 @@
1
1
  # Yahoo Finanza Version
2
2
  module YahooFinanza
3
- VERSION = '0.4.1'
3
+ VERSION = '0.4.2'
4
4
  end
@@ -1,5 +1,6 @@
1
1
  require 'yahoo_finanza/parser'
2
2
 
3
+ require 'fuzzystringmatch'
3
4
  require 'rest-client'
4
5
  require 'mechanize'
5
6
  require 'yql'
@@ -34,11 +35,12 @@ module YahooFinanza
34
35
 
35
36
  class SymbolSearchWorker < BaseWorker
36
37
  def initialize(key)
38
+ @matcher = FuzzyStringMatch::JaroWinkler.create( :native )
37
39
  @key = key
38
40
  end
39
41
 
40
42
  def run
41
- (YahooFinanza::Constants.nyse + YahooFinanza::Constants.nasdaq + YahooFinanza::Constants.amex).select { |symbol| symbol.to_s.include? @key.upcase }
43
+ (YahooFinanza::Constants.nyse + YahooFinanza::Constants.nasdaq + YahooFinanza::Constants.amex).reject { |symbol| @matcher.getDistance(@key.upcase, symbol.to_s) < 0.75 }
42
44
  end
43
45
  end
44
46
 
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.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric D. Santos
@@ -9,104 +9,118 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-01 00:00:00.000000000 Z
12
+ date: 2015-10-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: yql
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: mechanize
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: rest-client
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: fuzzy-string-match
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
54
68
  - !ruby/object:Gem::Version
55
69
  version: '0'
56
70
  - !ruby/object:Gem::Dependency
57
71
  name: bundler
58
72
  requirement: !ruby/object:Gem::Requirement
59
73
  requirements:
60
- - - ~>
74
+ - - "~>"
61
75
  - !ruby/object:Gem::Version
62
76
  version: '1.7'
63
77
  type: :development
64
78
  prerelease: false
65
79
  version_requirements: !ruby/object:Gem::Requirement
66
80
  requirements:
67
- - - ~>
81
+ - - "~>"
68
82
  - !ruby/object:Gem::Version
69
83
  version: '1.7'
70
84
  - !ruby/object:Gem::Dependency
71
85
  name: rake
72
86
  requirement: !ruby/object:Gem::Requirement
73
87
  requirements:
74
- - - ~>
88
+ - - "~>"
75
89
  - !ruby/object:Gem::Version
76
90
  version: '10.0'
77
91
  type: :development
78
92
  prerelease: false
79
93
  version_requirements: !ruby/object:Gem::Requirement
80
94
  requirements:
81
- - - ~>
95
+ - - "~>"
82
96
  - !ruby/object:Gem::Version
83
97
  version: '10.0'
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: rspec
86
100
  requirement: !ruby/object:Gem::Requirement
87
101
  requirements:
88
- - - '>='
102
+ - - ">="
89
103
  - !ruby/object:Gem::Version
90
104
  version: '0'
91
105
  type: :development
92
106
  prerelease: false
93
107
  version_requirements: !ruby/object:Gem::Requirement
94
108
  requirements:
95
- - - '>='
109
+ - - ">="
96
110
  - !ruby/object:Gem::Version
97
111
  version: '0'
98
112
  - !ruby/object:Gem::Dependency
99
113
  name: pry
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
- - - '>='
116
+ - - ">="
103
117
  - !ruby/object:Gem::Version
104
118
  version: '0'
105
119
  type: :development
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
108
122
  requirements:
109
- - - '>='
123
+ - - ">="
110
124
  - !ruby/object:Gem::Version
111
125
  version: '0'
112
126
  description: |-
@@ -119,10 +133,10 @@ extensions: []
119
133
  extra_rdoc_files: []
120
134
  files:
121
135
  - lib/yahoo_finanza.rb
122
- - lib/yahoo_finanza/version.rb
123
- - lib/yahoo_finanza/parser.rb
124
136
  - lib/yahoo_finanza/client.rb
125
137
  - lib/yahoo_finanza/constants.rb
138
+ - lib/yahoo_finanza/parser.rb
139
+ - lib/yahoo_finanza/version.rb
126
140
  - lib/yahoo_finanza/workers.rb
127
141
  homepage: https://github.com/cometaworks/yahoo_finanza
128
142
  licenses:
@@ -134,17 +148,17 @@ require_paths:
134
148
  - lib
135
149
  required_ruby_version: !ruby/object:Gem::Requirement
136
150
  requirements:
137
- - - '>='
151
+ - - ">="
138
152
  - !ruby/object:Gem::Version
139
153
  version: '0'
140
154
  required_rubygems_version: !ruby/object:Gem::Requirement
141
155
  requirements:
142
- - - '>='
156
+ - - ">="
143
157
  - !ruby/object:Gem::Version
144
158
  version: '0'
145
159
  requirements: []
146
160
  rubyforge_project:
147
- rubygems_version: 2.0.14
161
+ rubygems_version: 2.4.8
148
162
  signing_key:
149
163
  specification_version: 4
150
164
  summary: An easy to use and updated yahoo finance gem with finance utils and a Yahoo