mlb 0.5.9 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +0 -3
- data/README.md +0 -1
- data/lib/mlb/request.rb +0 -1
- data/lib/mlb/team.rb +3 -3
- data/lib/mlb/version.rb +1 -1
- data/mlb.gemspec +3 -2
- metadata +7 -7
data/.travis.yml
CHANGED
data/README.md
CHANGED
data/lib/mlb/request.rb
CHANGED
data/lib/mlb/team.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'faraday'
|
2
|
-
require '
|
2
|
+
require 'multi_json'
|
3
3
|
|
4
4
|
module MLB
|
5
5
|
class Team
|
@@ -27,7 +27,7 @@ module MLB
|
|
27
27
|
# connection error, in which case read from a fixture file
|
28
28
|
@all ||= begin
|
29
29
|
results_to_team(results_from_freebase)
|
30
|
-
rescue
|
30
|
+
rescue Faraday::Error::ConnectionFailed, Faraday::Error::TimeoutError
|
31
31
|
results_to_team(results_from_cache)
|
32
32
|
end
|
33
33
|
end
|
@@ -50,7 +50,7 @@ module MLB
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def self.results_from_cache
|
53
|
-
|
53
|
+
MultiJson.load(file_from_cache("teams.json").read)
|
54
54
|
end
|
55
55
|
|
56
56
|
def self.file_from_cache(file_name)
|
data/lib/mlb/version.rb
CHANGED
data/mlb.gemspec
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
require File.expand_path('../lib/mlb/version', __FILE__)
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
|
-
gem.add_dependency 'faraday', '~> 0.
|
5
|
+
gem.add_dependency 'faraday', '~> 0.8'
|
6
6
|
gem.add_dependency 'faraday_middleware', '~> 0.8'
|
7
|
-
gem.add_dependency '
|
7
|
+
gem.add_dependency 'multi_json', '~> 1.3'
|
8
8
|
gem.add_development_dependency 'maruku'
|
9
9
|
gem.add_development_dependency 'rake'
|
10
10
|
gem.add_development_dependency 'rspec'
|
@@ -18,6 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.homepage = 'https://github.com/sferik/mlb'
|
19
19
|
gem.name = 'mlb'
|
20
20
|
gem.require_paths = ['lib']
|
21
|
+
gem.required_ruby_version = '>= 1.9.0'
|
21
22
|
gem.required_rubygems_version = Gem::Requirement.new('>= 1.3.6')
|
22
23
|
gem.summary = gem.description
|
23
24
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mlb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0.
|
21
|
+
version: '0.8'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.8'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: faraday_middleware
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,13 +44,13 @@ dependencies:
|
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0.8'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
47
|
+
name: multi_json
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
49
49
|
none: false
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '1.
|
53
|
+
version: '1.3'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +58,7 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.3'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
63
|
name: maruku
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -191,7 +191,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
191
191
|
requirements:
|
192
192
|
- - ! '>='
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version:
|
194
|
+
version: 1.9.0
|
195
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
196
|
none: false
|
197
197
|
requirements:
|