mlb 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  rvm:
2
2
  - 1.8.7
3
- - 1.9.1
4
3
  - 1.9.2
4
+ - 1.9.3
5
+ - jruby
6
+ - rbx
7
+ - rbx-2.0
5
8
  - ree
6
- - ruby-head
data/README.md CHANGED
@@ -1,21 +1,16 @@
1
- MLB.rb
2
- ======
1
+ # MLB.rb
3
2
  MLB.rb is a Ruby library for retrieving current Major League Baseball players, managers, teams, divisions, and leagues.
4
3
 
5
- Installation
6
- ------------
4
+ ## <a name="installation">Installation</a>
7
5
  gem install mlb
8
6
 
9
- Documentation
10
- -------------
7
+ ## <a name="documentation">Documentation</a>
11
8
  [http://rdoc.info/gems/mlb](http://rdoc.info/gems/mlb)
12
9
 
13
- Continuous Integration
14
- ----------------------
10
+ ## <a name="ci">Continuous Integration</a>
15
11
  [![Build Status](https://secure.travis-ci.org/sferik/mlb.png)](http://travis-ci.org/sferik/mlb)
16
12
 
17
- Usage Examples
18
- -----
13
+ ## <a name="examples">Usage Examples</a>
19
14
  $ irb
20
15
  >> require 'mlb'
21
16
  >> MLB::Team.all.first.name # => "Arizona Diamondbacks"
@@ -32,8 +27,7 @@ Usage Examples
32
27
  >> MLB::Team.all.first.players.first.number # => 28
33
28
  >> MLB::Team.all.first.players.first.position # => "Right fielder"
34
29
 
35
- Contributing
36
- ------------
30
+ ## <a name="contributing">Contributing</a>
37
31
  In the spirit of [free software](http://www.fsf.org/licensing/essays/free-sw.html), **everyone** is encouraged to help improve this project.
38
32
 
39
33
  Here are some ways *you* can contribute:
@@ -51,17 +45,17 @@ Here are some ways *you* can contribute:
51
45
 
52
46
  All contributors will be added to the credits and will receive the respect and gratitude of the community.
53
47
 
54
- Submitting an Issue
55
- -------------------
56
- We use the [GitHub issue tracker](https://github.com/sferik/mlb/issues) to track bugs and
57
- features. Before submitting a bug report or feature request, check to make sure it hasn't already
58
- been submitted. You can indicate support for an existing issuse by voting it up. When submitting a
59
- bug report, please include a [Gist](https://gist.github.com/) that includes a stack trace and any
60
- details that may be necessary to reproduce the bug, including your gem version, Ruby version, and
61
- operating system. Ideally, a bug report should include a pull request with failing specs.
62
-
63
- Submitting a Pull Request
64
- -------------------------
48
+ ## <a name="issues">Submitting an Issue</a>
49
+ We use the [GitHub issue tracker](https://github.com/sferik/mlb/issues) to
50
+ track bugs and features. Before submitting a bug report or feature request,
51
+ check to make sure it hasn't already been submitted. You can indicate support
52
+ for an existing issuse by voting it up. When submitting a bug report, please
53
+ include a [Gist](https://gist.github.com/) that includes a stack trace and any
54
+ details that may be necessary to reproduce the bug, including your gem version,
55
+ Ruby version, and operating system. Ideally, a bug report should include a pull
56
+ request with failing specs.
57
+
58
+ ## <a name="pulls">Submitting a Pull Request</a>
65
59
  1. Fork the project.
66
60
  2. Create a topic branch.
67
61
  3. Implement your feature or bug fix.
@@ -72,15 +66,16 @@ Submitting a Pull Request
72
66
  8. Commit and push your changes.
73
67
  9. Submit a pull request. Please do not include changes to the gemspec, version, or history file. (If you want to create your own version for some reason, please do so in a separate commit.)
74
68
 
75
- Supported Rubies
76
- ----------------
69
+ ## <a name="rubies">Supported Rubies</a>
77
70
  This library aims to support and is [tested
78
71
  against](http://travis-ci.org/sferik/mlb) the following Ruby implementations:
79
72
 
80
73
  * Ruby 1.8.7
81
74
  * Ruby 1.9.1
82
75
  * Ruby 1.9.2
83
- * Ruby Enterprise Edition 1.8.7
76
+ * [JRuby](http://www.jruby.org/)
77
+ * [Rubinius](http://rubini.us/)
78
+ * [Ruby Enterprise Edition](http://www.rubyenterpriseedition.com/)
84
79
 
85
80
  If something doesn't work on one of these interpreters, it should be considered
86
81
  a bug.
@@ -96,8 +91,7 @@ implementation, you will be personally responsible for providing patches in a
96
91
  timely fashion. If critical issues for a particular implementation exist at the
97
92
  time of a major release, support for that Ruby version may be dropped.
98
93
 
99
- Credits
100
- -------
94
+ ## <a name="credits">Credits</a>
101
95
  Many thanks to:
102
96
 
103
97
  * [Bundler](http://gembundler.com/)
@@ -111,7 +105,6 @@ Many thanks to:
111
105
  * [WebMock](https://github.com/bblimke/webmock/)
112
106
  * [YARD](http://yardoc.org/)
113
107
 
114
- Copyright
115
- ---------
108
+ ## <a name="copyright">Copyright</a>
116
109
  Copyright (c) 2010 Erik Michaels-Ober.
117
110
  See [LICENSE](https://github.com/sferik/mlb/blob/master/LICENSE.md) for details.
data/Rakefile CHANGED
File without changes
data/cache/teams.json CHANGED
@@ -63,11 +63,6 @@
63
63
  "player": "Chad Tracy",
64
64
  "position": "First baseman"
65
65
  },
66
- {
67
- "number": 19,
68
- "player": "Chris Snyder",
69
- "position": "Catcher"
70
- },
71
66
  {
72
67
  "number": 64,
73
68
  "player": "Clay Zavada",
@@ -292,11 +287,6 @@
292
287
  "player": "Casey Kotchman",
293
288
  "position": "First baseman"
294
289
  },
295
- {
296
- "number": 50,
297
- "player": "Charlie Morton",
298
- "position": "Starting pitcher"
299
- },
300
290
  {
301
291
  "number": 10,
302
292
  "player": "Chipper Jones",
@@ -407,11 +397,6 @@
407
397
  "player": "Mart\u00edn Prado",
408
398
  "position": "Second baseman"
409
399
  },
410
- {
411
- "number": 23,
412
- "player": "Matt Diaz",
413
- "position": "Left fielder"
414
- },
415
400
  {
416
401
  "number": 51,
417
402
  "player": "Mike Gonz\u00e1lez",
@@ -725,8 +710,8 @@
725
710
  {
726
711
  "/common/topic/image": [
727
712
  {
728
- "id": "/m/03r68rn",
729
- "timestamp": "2008-03-12T04:11:19.0000Z"
713
+ "id": "/m/0h5dbn2",
714
+ "timestamp": "2011-09-22T02:51:59.0000Z"
730
715
  }
731
716
  ],
732
717
  "/sports/sports_team/arena_stadium": [
@@ -1082,11 +1067,6 @@
1082
1067
  "player": "Kevin Gregg",
1083
1068
  "position": "Relief pitcher"
1084
1069
  },
1085
- {
1086
- "number": 22,
1087
- "player": "Kevin Hart",
1088
- "position": "Relief pitcher"
1089
- },
1090
1070
  {
1091
1071
  "number": 1,
1092
1072
  "player": "Kosuke Fukudome",
@@ -1948,254 +1928,6 @@
1948
1928
  ],
1949
1929
  "type": "/baseball/baseball_team"
1950
1930
  },
1951
- {
1952
- "/common/topic/image": [
1953
- {
1954
- "id": "/m/029hc9n",
1955
- "timestamp": "2007-04-15T02:48:23.0022Z"
1956
- }
1957
- ],
1958
- "/sports/sports_team/arena_stadium": [
1959
- {
1960
- "name": "Coors Field"
1961
- }
1962
- ],
1963
- "/sports/sports_team/founded": [
1964
- {
1965
- "value": "1993"
1966
- }
1967
- ],
1968
- "/sports/sports_team/team_mascot": [
1969
- {
1970
- "id": "/m/0fgjk2",
1971
- "name": "Dinger",
1972
- "type": [
1973
- "/common/topic",
1974
- "/sports/mascot"
1975
- ]
1976
- }
1977
- ],
1978
- "current_manager": {
1979
- "name": "Clint Hurdle"
1980
- },
1981
- "current_roster": [
1982
- {
1983
- "number": 28,
1984
- "player": "Aaron Cook",
1985
- "position": "Starting pitcher"
1986
- },
1987
- {
1988
- "number": 41,
1989
- "player": "Alan Embree",
1990
- "position": "Relief pitcher"
1991
- },
1992
- {
1993
- "number": 11,
1994
- "player": "Brad Hawpe",
1995
- "position": "Right fielder"
1996
- },
1997
- {
1998
- "number": 5,
1999
- "player": "Carlos Gonz\u00e1lez",
2000
- "position": "Center fielder"
2001
- },
2002
- {
2003
- "number": 20,
2004
- "player": "Chris Iannetta",
2005
- "position": "Catcher"
2006
- },
2007
- {
2008
- "number": 64,
2009
- "player": "Chris Nelson",
2010
- "position": "Shortstop"
2011
- },
2012
- {
2013
- "number": 12,
2014
- "player": "Clint Barmes",
2015
- "position": "Shortstop"
2016
- },
2017
- {
2018
- "number": 24,
2019
- "player": "Dexter Fowler",
2020
- "position": "Center fielder"
2021
- },
2022
- {
2023
- "number": 4,
2024
- "player": "Eric Young, Jr.",
2025
- "position": "Second baseman"
2026
- },
2027
- {
2028
- "number": 61,
2029
- "player": "Esmil Rogers",
2030
- "position": "Pitcher"
2031
- },
2032
- {
2033
- "number": 56,
2034
- "player": "Franklin Morales",
2035
- "position": "Starting pitcher"
2036
- },
2037
- {
2038
- "number": 27,
2039
- "player": "Garrett Atkins",
2040
- "position": "Third baseman"
2041
- },
2042
- {
2043
- "number": 54,
2044
- "player": "Greg Reynolds",
2045
- "position": "Starting pitcher"
2046
- },
2047
- {
2048
- "number": 23,
2049
- "player": "Greg Smith",
2050
- "position": "Starting pitcher"
2051
- },
2052
- {
2053
- "number": 63,
2054
- "player": "Hector Gomez",
2055
- "position": "Shortstop"
2056
- },
2057
- {
2058
- "number": 16,
2059
- "player": "Huston Street",
2060
- "position": "Relief pitcher"
2061
- },
2062
- {
2063
- "number": 9,
2064
- "player": "Ian Stewart",
2065
- "position": "Third baseman"
2066
- },
2067
- {
2068
- "number": 49,
2069
- "player": "Jason Grilli",
2070
- "position": "Relief pitcher"
2071
- },
2072
- {
2073
- "number": 48,
2074
- "player": "Jason Hirsh",
2075
- "position": "Starting pitcher"
2076
- },
2077
- {
2078
- "number": 21,
2079
- "player": "Jason Marquis",
2080
- "position": "Starting pitcher"
2081
- },
2082
- {
2083
- "number": 10,
2084
- "player": "Jeff Baker",
2085
- "position": "Second baseman"
2086
- },
2087
- {
2088
- "number": 26,
2089
- "player": "Jeff Francis",
2090
- "position": "Starting pitcher"
2091
- },
2092
- {
2093
- "number": 47,
2094
- "player": "Joe Koshansky",
2095
- "position": "First baseman"
2096
- },
2097
- {
2098
- "number": 29,
2099
- "player": "Jorge de la Rosa",
2100
- "position": "Starting pitcher"
2101
- },
2102
- {
2103
- "number": 52,
2104
- "player": "Juan Morillo",
2105
- "position": "Relief pitcher"
2106
- },
2107
- {
2108
- "number": 60,
2109
- "player": "Manuel Corpas",
2110
- "position": "Relief pitcher"
2111
- },
2112
- {
2113
- "number": 14,
2114
- "player": "Matt Murton",
2115
- "position": "Left fielder"
2116
- },
2117
- {
2118
- "number": 6,
2119
- "player": "Omar Quintanilla",
2120
- "position": "Shortstop"
2121
- },
2122
- {
2123
- "number": 46,
2124
- "player": "Ryan Mattheus",
2125
- "position": "Pitcher"
2126
- },
2127
- {
2128
- "number": 37,
2129
- "player": "Ryan Speier",
2130
- "position": "Relief pitcher"
2131
- },
2132
- {
2133
- "number": 19,
2134
- "player": "Ryan Spilborghs",
2135
- "position": "Right fielder"
2136
- },
2137
- {
2138
- "number": 70,
2139
- "player": "Samuel Deduno",
2140
- "position": "Pitcher"
2141
- },
2142
- {
2143
- "number": 7,
2144
- "player": "Seth Smith",
2145
- "position": "Right fielder"
2146
- },
2147
- {
2148
- "number": 44,
2149
- "player": "Shane Lindsay",
2150
- "position": "Pitcher"
2151
- },
2152
- {
2153
- "number": 58,
2154
- "player": "Steven Register",
2155
- "position": "Relief pitcher"
2156
- },
2157
- {
2158
- "number": 35,
2159
- "player": "Taylor Buchholz",
2160
- "position": "Relief pitcher"
2161
- },
2162
- {
2163
- "number": 17,
2164
- "player": "Todd Helton",
2165
- "position": "First baseman"
2166
- },
2167
- {
2168
- "number": 2,
2169
- "player": "Troy Tulowitzki",
2170
- "position": "Shortstop"
2171
- },
2172
- {
2173
- "number": 38,
2174
- "player": "Ubaldo Jimenez",
2175
- "position": "Starting pitcher"
2176
- },
2177
- {
2178
- "number": 8,
2179
- "player": "Yorvit Torrealba",
2180
- "position": "Catcher"
2181
- }
2182
- ],
2183
- "division": {
2184
- "name": "National League West"
2185
- },
2186
- "league": {
2187
- "name": "National League"
2188
- },
2189
- "name": "Colorado Rockies",
2190
- "team_stats": [
2191
- {
2192
- "losses": 88,
2193
- "season": "2008 Major League Baseball season",
2194
- "wins": 74
2195
- }
2196
- ],
2197
- "type": "/baseball/baseball_team"
2198
- },
2199
1931
  {
2200
1932
  "/common/topic/image": [
2201
1933
  {
@@ -2520,11 +2252,6 @@
2520
2252
  "player": "Chris Volstad",
2521
2253
  "position": "Starting pitcher"
2522
2254
  },
2523
- {
2524
- "number": 63,
2525
- "player": "Christopher Leroux",
2526
- "position": "Pitcher"
2527
- },
2528
2255
  {
2529
2256
  "number": 12,
2530
2257
  "player": "Cody Ross",
@@ -2834,11 +2561,6 @@
2834
2561
  "player": "Kazuo Matsui",
2835
2562
  "position": "Second baseman"
2836
2563
  },
2837
- {
2838
- "number": 17,
2839
- "player": "Lance Berkman",
2840
- "position": "First baseman"
2841
- },
2842
2564
  {
2843
2565
  "number": 22,
2844
2566
  "player": "LaTroy Hawkins",
@@ -3220,11 +2942,6 @@
3220
2942
  "player": "Bobby Wilson",
3221
2943
  "position": "Catcher"
3222
2944
  },
3223
- {
3224
- "number": 3,
3225
- "player": "Brandon Wood",
3226
- "position": "Shortstop"
3227
- },
3228
2945
  {
3229
2946
  "number": 40,
3230
2947
  "player": "Brian Fuentes",
@@ -3534,11 +3251,6 @@
3534
3251
  "player": "James Loney",
3535
3252
  "position": "First baseman"
3536
3253
  },
3537
- {
3538
- "number": 52,
3539
- "player": "James McDonald",
3540
- "position": "Relief pitcher"
3541
- },
3542
3254
  {
3543
3255
  "number": 77,
3544
3256
  "player": "Jamie Hoffmann",
@@ -3638,11 +3350,6 @@
3638
3350
  "number": 78,
3639
3351
  "player": "Victor Garate",
3640
3352
  "position": "Pitcher"
3641
- },
3642
- {
3643
- "number": 75,
3644
- "player": "Xavier Paul",
3645
- "position": "Center fielder"
3646
3353
  }
3647
3354
  ],
3648
3355
  "division": {
@@ -4566,11 +4273,6 @@
4566
4273
  "player": "Jorge Posada",
4567
4274
  "position": "Catcher"
4568
4275
  },
4569
- {
4570
- "number": 41,
4571
- "player": "Jose Veras",
4572
- "position": "Relief pitcher"
4573
- },
4574
4276
  {
4575
4277
  "number": 26,
4576
4278
  "player": "Jos\u00e9 Molina",
@@ -5172,53 +4874,73 @@
5172
4874
  }
5173
4875
  ],
5174
4876
  "current_manager": {
5175
- "name": "John Russell"
4877
+ "name": "Clint Hurdle"
5176
4878
  },
5177
4879
  "current_roster": [
5178
4880
  {
5179
- "number": 25,
5180
- "player": "Adam LaRoche",
5181
- "position": "First baseman"
4881
+ "number": 44,
4882
+ "player": "Alex Presley",
4883
+ "position": "Center fielder"
5182
4884
  },
5183
4885
  {
5184
- "number": 15,
5185
- "player": "Andy LaRoche",
5186
- "position": "Third baseman"
4886
+ "number": 22,
4887
+ "player": "Andrew McCutchen",
4888
+ "position": "Center fielder"
5187
4889
  },
5188
4890
  {
5189
- "number": 44,
5190
- "player": "Brandon Moss",
5191
- "position": "Left fielder"
4891
+ "number": 32,
4892
+ "player": "Brad Lincoln",
4893
+ "position": "Starting pitcher"
5192
4894
  },
5193
4895
  {
5194
- "number": 10,
5195
- "player": "Brian Bixler",
4896
+ "number": 2,
4897
+ "player": "Brandon Wood",
5196
4898
  "position": "Shortstop"
5197
4899
  },
5198
4900
  {
5199
- "number": 38,
5200
- "player": "Craig Hansen",
5201
- "position": "Relief pitcher"
4901
+ "number": 64,
4902
+ "player": "Bryan Morris",
4903
+ "position": "Starting pitcher"
5202
4904
  },
5203
4905
  {
5204
4906
  "number": 50,
5205
- "player": "Dave Davidson",
4907
+ "player": "Charlie Morton",
4908
+ "position": "Starting pitcher"
4909
+ },
4910
+ {
4911
+ "number": 12,
4912
+ "player": "Chase d'Arnaud",
4913
+ "position": "Shortstop"
4914
+ },
4915
+ {
4916
+ "number": 30,
4917
+ "player": "Chris Resop",
5206
4918
  "position": "Relief pitcher"
5207
4919
  },
5208
4920
  {
5209
- "number": null,
5210
- "player": "Delwyn Young",
5211
- "position": null
4921
+ "number": 19,
4922
+ "player": "Chris Snyder",
4923
+ "position": "Catcher"
5212
4924
  },
5213
4925
  {
5214
- "number": 56,
5215
- "player": "Donald Veal",
5216
- "position": "Pitcher"
4926
+ "number": 63,
4927
+ "player": "Christopher Leroux",
4928
+ "position": "Relief pitcher"
5217
4929
  },
5218
4930
  {
5219
- "number": 16,
5220
- "player": "Eric Hinske",
5221
- "position": "Left fielder"
4931
+ "number": 34,
4932
+ "player": "Daniel McCutchen",
4933
+ "position": "Relief pitcher"
4934
+ },
4935
+ {
4936
+ "number": 57,
4937
+ "player": "Daniel Moskos",
4938
+ "position": "Relief pitcher"
4939
+ },
4940
+ {
4941
+ "number": 69,
4942
+ "player": "Eric Fryer",
4943
+ "position": "Catcher"
5222
4944
  },
5223
4945
  {
5224
4946
  "number": 47,
@@ -5226,19 +4948,19 @@
5226
4948
  "position": "Relief pitcher"
5227
4949
  },
5228
4950
  {
5229
- "number": 12,
5230
- "player": "Freddy Sanchez",
5231
- "position": "Second baseman"
4951
+ "number": 46,
4952
+ "player": "Garrett Jones",
4953
+ "position": "Right fielder"
5232
4954
  },
5233
4955
  {
5234
- "number": 45,
5235
- "player": "Ian Snell",
5236
- "position": "Starting pitcher"
4956
+ "number": 66,
4957
+ "player": "Gorkys Hernandez",
4958
+ "position": "Center fielder"
5237
4959
  },
5238
4960
  {
5239
- "number": 2,
5240
- "player": "Jack Wilson",
5241
- "position": "Shortstop"
4961
+ "number": 53,
4962
+ "player": "James McDonald",
4963
+ "position": "Starting pitcher"
5242
4964
  },
5243
4965
  {
5244
4966
  "number": 35,
@@ -5247,58 +4969,78 @@
5247
4969
  },
5248
4970
  {
5249
4971
  "number": 61,
5250
- "player": "Jeff Sues",
5251
- "position": "Pitcher"
4972
+ "player": "Jeff Locke",
4973
+ "position": "Starting pitcher"
5252
4974
  },
5253
4975
  {
5254
4976
  "number": 27,
5255
4977
  "player": "Jeffrey Karstens",
5256
4978
  "position": "Starting pitcher"
5257
4979
  },
4980
+ {
4981
+ "number": 97,
4982
+ "player": "Joe Beimel",
4983
+ "position": "Relief pitcher"
4984
+ },
4985
+ {
4986
+ "number": 52,
4987
+ "player": "Joel Hanrahan",
4988
+ "position": "Relief pitcher"
4989
+ },
4990
+ {
4991
+ "number": 31,
4992
+ "player": "Jose Tabata",
4993
+ "position": "Left fielder"
4994
+ },
5258
4995
  {
5259
4996
  "number": 43,
5260
- "player": "Jesse Chavez",
4997
+ "player": "Jose Veras",
5261
4998
  "position": "Relief pitcher"
5262
4999
  },
5263
5000
  {
5264
- "number": 46,
5265
- "player": "Jimmy Barthmaier",
5001
+ "number": 62,
5002
+ "player": "Josh Harrison",
5003
+ "position": "Third baseman"
5004
+ },
5005
+ {
5006
+ "number": 29,
5007
+ "player": "Kevin Correia",
5266
5008
  "position": "Starting pitcher"
5267
5009
  },
5268
5010
  {
5269
- "number": 34,
5270
- "player": "John Grabow",
5011
+ "number": 25,
5012
+ "player": "Kevin Hart",
5271
5013
  "position": "Relief pitcher"
5272
5014
  },
5273
5015
  {
5274
- "number": 31,
5275
- "player": "Jose Tabata",
5276
- "position": "Center fielder"
5016
+ "number": 67,
5017
+ "player": "Kyle McPherson",
5018
+ "position": "Starting pitcher"
5277
5019
  },
5278
5020
  {
5279
- "number": 36,
5280
- "player": "Luis Cruz",
5281
- "position": "Second baseman"
5021
+ "number": 37,
5022
+ "player": "Lyle Overbay",
5023
+ "position": "First baseman"
5282
5024
  },
5283
5025
  {
5284
- "number": 55,
5285
- "player": "Matt Capps",
5286
- "position": "Relief pitcher"
5026
+ "number": 23,
5027
+ "player": "Matt Diaz",
5028
+ "position": "Right fielder"
5287
5029
  },
5288
5030
  {
5289
- "number": 13,
5290
- "player": "Nate McLouth",
5291
- "position": "Center fielder"
5031
+ "number": 60,
5032
+ "player": "Michael Crotta",
5033
+ "position": "Relief pitcher"
5292
5034
  },
5293
5035
  {
5294
- "number": 19,
5295
- "player": "Neil Walker",
5296
- "position": "Third baseman"
5036
+ "number": 55,
5037
+ "player": "Michael McKenry",
5038
+ "position": "Catcher"
5297
5039
  },
5298
5040
  {
5299
- "number": 3,
5300
- "player": "Nyjer Morgan",
5301
- "position": "Outfielder"
5041
+ "number": 18,
5042
+ "player": "Neil Walker",
5043
+ "position": "Second baseman"
5302
5044
  },
5303
5045
  {
5304
5046
  "number": 28,
@@ -5306,84 +5048,49 @@
5306
5048
  "position": "Starting pitcher"
5307
5049
  },
5308
5050
  {
5309
- "number": 53,
5051
+ "number": 24,
5310
5052
  "player": "Pedro Alvarez",
5311
5053
  "position": "Third baseman"
5312
5054
  },
5313
5055
  {
5314
- "number": 32,
5315
- "player": "Phil Dumatrait",
5316
- "position": "Starting pitcher"
5056
+ "number": 3,
5057
+ "player": "Pedro Ciriaco",
5058
+ "position": "Shortstop"
5317
5059
  },
5318
5060
  {
5319
5061
  "number": 5,
5320
- "player": "Ram\u00f3n V\u00e1zquez",
5321
- "position": "Third baseman"
5322
- },
5323
- {
5324
- "number": 23,
5325
- "player": "Robinzon Diaz",
5326
- "position": "Catcher"
5327
- },
5328
- {
5329
- "number": 63,
5330
- "player": "Ronald Uviedo",
5331
- "position": "Pitcher"
5062
+ "player": "Ronny Cede\u00f1o",
5063
+ "position": "Shortstop"
5332
5064
  },
5333
5065
  {
5334
5066
  "number": 49,
5335
5067
  "player": "Ross Ohlendorf",
5336
- "position": "Relief pitcher"
5068
+ "position": "Starting pitcher"
5337
5069
  },
5338
5070
  {
5339
5071
  "number": 41,
5340
5072
  "player": "Ryan Doumit",
5341
5073
  "position": "Catcher"
5342
5074
  },
5343
- {
5344
- "number": 58,
5345
- "player": "R\u00f3mulo S\u00e1nchez",
5346
- "position": "Relief pitcher"
5347
- },
5348
- {
5349
- "number": 17,
5350
- "player": "Sean Burnett",
5351
- "position": "Relief pitcher"
5352
- },
5353
5075
  {
5354
5076
  "number": 51,
5355
5077
  "player": "Steve Pearce",
5356
- "position": "Right fielder"
5357
- },
5358
- {
5359
- "number": 64,
5360
- "player": "Steven Lerud",
5361
- "position": "Catcher"
5362
- },
5363
- {
5364
- "number": null,
5365
- "player": "Tim Alderson",
5366
- "position": null
5367
- },
5368
- {
5369
- "number": 24,
5370
- "player": "Tom Gorzelanny",
5371
- "position": "Starting pitcher"
5078
+ "position": "First baseman"
5372
5079
  },
5373
5080
  {
5374
- "number": 30,
5375
- "player": "Tyler Yates",
5081
+ "number": 48,
5082
+ "player": "Tim Wood",
5376
5083
  "position": "Relief pitcher"
5377
5084
  },
5378
5085
  {
5379
- "number": 76,
5380
- "player": "Virgil Vasquez",
5381
- "position": "Pitcher"
5086
+ "number": 65,
5087
+ "player": "Tony Watson",
5088
+ "position": "Relief pitcher"
5382
5089
  },
5383
5090
  {
5384
- "number": 57,
5385
- "player": "Zach Duke",
5386
- "position": "Starting pitcher"
5091
+ "number": 38,
5092
+ "player": "Xavier Paul",
5093
+ "position": "Left fielder"
5387
5094
  }
5388
5095
  ],
5389
5096
  "division": {
@@ -5395,9 +5102,9 @@
5395
5102
  "name": "Pittsburgh Pirates",
5396
5103
  "team_stats": [
5397
5104
  {
5398
- "losses": 95,
5399
- "season": "2008 Major League Baseball season",
5400
- "wins": 67
5105
+ "losses": 105,
5106
+ "season": "2010 Major League Baseball season",
5107
+ "wins": 57
5401
5108
  }
5402
5109
  ],
5403
5110
  "type": "/baseball/baseball_team"
@@ -5877,6 +5584,9 @@
5877
5584
  "/sports/sports_team/arena_stadium": [
5878
5585
  {
5879
5586
  "name": "Safeco Field"
5587
+ },
5588
+ {
5589
+ "name": "Kingdome"
5880
5590
  }
5881
5591
  ],
5882
5592
  "/sports/sports_team/founded": [
@@ -6053,11 +5763,6 @@
6053
5763
  "player": "Rob Johnson",
6054
5764
  "position": "Catcher"
6055
5765
  },
6056
- {
6057
- "number": 3,
6058
- "player": "Ronny Cede\u00f1o",
6059
- "position": "Second baseman"
6060
- },
6061
5766
  {
6062
5767
  "number": 48,
6063
5768
  "player": "Roy Corcoran",
@@ -6241,6 +5946,11 @@
6241
5946
  "player": "Kyle McClellan",
6242
5947
  "position": "Relief pitcher"
6243
5948
  },
5949
+ {
5950
+ "number": 17,
5951
+ "player": "Lance Berkman",
5952
+ "position": "Right fielder"
5953
+ },
6244
5954
  {
6245
5955
  "number": 78,
6246
5956
  "player": "Matthew Scherer",
@@ -6871,11 +6581,6 @@
6871
6581
  "player": "Jos\u00e9 A. Bautista",
6872
6582
  "position": "Third baseman"
6873
6583
  },
6874
- {
6875
- "number": 35,
6876
- "player": "Lyle Overbay",
6877
- "position": "First baseman"
6878
- },
6879
6584
  {
6880
6585
  "number": 24,
6881
6586
  "player": "Ricardo Romero",
@@ -7009,11 +6714,6 @@
7009
6714
  "player": "Jes\u00fas Flores",
7010
6715
  "position": "Catcher"
7011
6716
  },
7012
- {
7013
- "number": 38,
7014
- "player": "Joel Hanrahan",
7015
- "position": "Relief pitcher"
7016
- },
7017
6717
  {
7018
6718
  "number": 31,
7019
6719
  "player": "John Lannan",
@@ -7158,5 +6858,5 @@
7158
6858
  }
7159
6859
  ],
7160
6860
  "status": "200 OK",
7161
- "transaction_id": "cache;cache02.p01.sjc1:8101;2011-05-03T00:10:07Z;0043"
6861
+ "transaction_id": "cache;cache02.p01.sjc1:8101;2011-10-14T05:41:59Z;0033"
7162
6862
  }
data/lib/mlb/player.rb CHANGED
@@ -6,8 +6,8 @@ module MLB
6
6
  private
7
7
 
8
8
  def initialize(attributes={})
9
- attributes.each_pair do |key, value|
10
- instance_eval("@#{key}=value") if self.respond_to?(key)
9
+ attributes.each do |key, value|
10
+ instance_variable_set("@#{key}", value) if self.respond_to?(key)
11
11
  end
12
12
  end
13
13
 
data/lib/mlb/team.rb CHANGED
@@ -38,8 +38,8 @@ module MLB
38
38
  private
39
39
 
40
40
  def initialize(attributes={})
41
- attributes.each_pair do |key, value|
42
- instance_eval("@#{key}=value") if self.respond_to?(key)
41
+ attributes.each do |key, value|
42
+ instance_variable_set("@#{key}", value) if self.respond_to?(key)
43
43
  end
44
44
  end
45
45
 
data/lib/mlb/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MLB
2
- VERSION = "0.5.5"
2
+ VERSION = "0.5.6"
3
3
  end
data/mlb.gemspec CHANGED
@@ -1,21 +1,19 @@
1
- # -*- encoding: utf-8 -*-
1
+ # encoding: utf-8
2
2
  require File.expand_path('../lib/mlb/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.add_development_dependency 'maruku', '~> 0.6'
5
+ gem.add_dependency 'faraday', '~> 0.7.4'
6
+ gem.add_dependency 'faraday_middleware', '~> 0.7.0'
7
+ gem.add_dependency 'multi_json', '~> 1.0.0'
6
8
  gem.add_development_dependency 'rake', '~> 0.9'
9
+ gem.add_development_dependency 'rdiscount', '~> 1.6'
7
10
  gem.add_development_dependency 'rspec', '~> 2.6'
8
11
  gem.add_development_dependency 'simplecov', '~> 0.4'
9
- gem.add_development_dependency 'webmock', '~> 1.6'
12
+ gem.add_development_dependency 'webmock', '~> 1.7'
10
13
  gem.add_development_dependency 'yard', '~> 0.7'
11
- gem.add_development_dependency 'ZenTest', '~> 4.5'
12
- gem.add_runtime_dependency 'faraday', '~> 0.7.4'
13
- gem.add_runtime_dependency 'faraday_middleware', '~> 0.7.0'
14
- gem.add_runtime_dependency 'multi_json', '~> 1.0.0'
15
14
  gem.author = "Erik Michaels-Ober"
16
15
  gem.description = %q{MLB.rb is a Ruby library for retrieving current Major League Baseball players, managers, teams, divisions, and leagues.}
17
16
  gem.email = 'sferik@gmail.com'
18
- gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
17
  gem.files = `git ls-files`.split("\n")
20
18
  gem.homepage = 'https://github.com/sferik/mlb'
21
19
  gem.name = 'mlb'
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.5.5
4
+ version: 0.5.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,56 +9,55 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-07-30 00:00:00.000000000 -07:00
13
- default_executable:
12
+ date: 2011-10-14 00:00:00.000000000Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
- name: maruku
17
- requirement: &70294870896860 !ruby/object:Gem::Requirement
15
+ name: faraday
16
+ requirement: &70098238915200 !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ~>
21
20
  - !ruby/object:Gem::Version
22
- version: '0.6'
23
- type: :development
21
+ version: 0.7.4
22
+ type: :runtime
24
23
  prerelease: false
25
- version_requirements: *70294870896860
24
+ version_requirements: *70098238915200
26
25
  - !ruby/object:Gem::Dependency
27
- name: rake
28
- requirement: &70294870896320 !ruby/object:Gem::Requirement
26
+ name: faraday_middleware
27
+ requirement: &70098238914540 !ruby/object:Gem::Requirement
29
28
  none: false
30
29
  requirements:
31
30
  - - ~>
32
31
  - !ruby/object:Gem::Version
33
- version: '0.9'
34
- type: :development
32
+ version: 0.7.0
33
+ type: :runtime
35
34
  prerelease: false
36
- version_requirements: *70294870896320
35
+ version_requirements: *70098238914540
37
36
  - !ruby/object:Gem::Dependency
38
- name: rspec
39
- requirement: &70294870895860 !ruby/object:Gem::Requirement
37
+ name: multi_json
38
+ requirement: &70098238914000 !ruby/object:Gem::Requirement
40
39
  none: false
41
40
  requirements:
42
41
  - - ~>
43
42
  - !ruby/object:Gem::Version
44
- version: '2.6'
45
- type: :development
43
+ version: 1.0.0
44
+ type: :runtime
46
45
  prerelease: false
47
- version_requirements: *70294870895860
46
+ version_requirements: *70098238914000
48
47
  - !ruby/object:Gem::Dependency
49
- name: simplecov
50
- requirement: &70294870895380 !ruby/object:Gem::Requirement
48
+ name: rake
49
+ requirement: &70098238913420 !ruby/object:Gem::Requirement
51
50
  none: false
52
51
  requirements:
53
52
  - - ~>
54
53
  - !ruby/object:Gem::Version
55
- version: '0.4'
54
+ version: '0.9'
56
55
  type: :development
57
56
  prerelease: false
58
- version_requirements: *70294870895380
57
+ version_requirements: *70098238913420
59
58
  - !ruby/object:Gem::Dependency
60
- name: webmock
61
- requirement: &70294870894920 !ruby/object:Gem::Requirement
59
+ name: rdiscount
60
+ requirement: &70098238912860 !ruby/object:Gem::Requirement
62
61
  none: false
63
62
  requirements:
64
63
  - - ~>
@@ -66,62 +65,51 @@ dependencies:
66
65
  version: '1.6'
67
66
  type: :development
68
67
  prerelease: false
69
- version_requirements: *70294870894920
68
+ version_requirements: *70098238912860
70
69
  - !ruby/object:Gem::Dependency
71
- name: yard
72
- requirement: &70294870894400 !ruby/object:Gem::Requirement
70
+ name: rspec
71
+ requirement: &70098238912180 !ruby/object:Gem::Requirement
73
72
  none: false
74
73
  requirements:
75
74
  - - ~>
76
75
  - !ruby/object:Gem::Version
77
- version: '0.7'
76
+ version: '2.6'
78
77
  type: :development
79
78
  prerelease: false
80
- version_requirements: *70294870894400
79
+ version_requirements: *70098238912180
81
80
  - !ruby/object:Gem::Dependency
82
- name: ZenTest
83
- requirement: &70294870893900 !ruby/object:Gem::Requirement
81
+ name: simplecov
82
+ requirement: &70098238911060 !ruby/object:Gem::Requirement
84
83
  none: false
85
84
  requirements:
86
85
  - - ~>
87
86
  - !ruby/object:Gem::Version
88
- version: '4.5'
87
+ version: '0.4'
89
88
  type: :development
90
89
  prerelease: false
91
- version_requirements: *70294870893900
92
- - !ruby/object:Gem::Dependency
93
- name: faraday
94
- requirement: &70294870893440 !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
97
- - - ~>
98
- - !ruby/object:Gem::Version
99
- version: 0.7.4
100
- type: :runtime
101
- prerelease: false
102
- version_requirements: *70294870893440
90
+ version_requirements: *70098238911060
103
91
  - !ruby/object:Gem::Dependency
104
- name: faraday_middleware
105
- requirement: &70294870892920 !ruby/object:Gem::Requirement
92
+ name: webmock
93
+ requirement: &70098238910220 !ruby/object:Gem::Requirement
106
94
  none: false
107
95
  requirements:
108
96
  - - ~>
109
97
  - !ruby/object:Gem::Version
110
- version: 0.7.0
111
- type: :runtime
98
+ version: '1.7'
99
+ type: :development
112
100
  prerelease: false
113
- version_requirements: *70294870892920
101
+ version_requirements: *70098238910220
114
102
  - !ruby/object:Gem::Dependency
115
- name: multi_json
116
- requirement: &70294870892420 !ruby/object:Gem::Requirement
103
+ name: yard
104
+ requirement: &70098238903100 !ruby/object:Gem::Requirement
117
105
  none: false
118
106
  requirements:
119
107
  - - ~>
120
108
  - !ruby/object:Gem::Version
121
- version: 1.0.0
122
- type: :runtime
109
+ version: '0.7'
110
+ type: :development
123
111
  prerelease: false
124
- version_requirements: *70294870892420
112
+ version_requirements: *70098238903100
125
113
  description: MLB.rb is a Ruby library for retrieving current Major League Baseball
126
114
  players, managers, teams, divisions, and leagues.
127
115
  email: sferik@gmail.com
@@ -129,7 +117,6 @@ executables: []
129
117
  extensions: []
130
118
  extra_rdoc_files: []
131
119
  files:
132
- - .autotest
133
120
  - .gemtest
134
121
  - .gitignore
135
122
  - .rspec
@@ -148,7 +135,6 @@ files:
148
135
  - mlb.gemspec
149
136
  - spec/helper.rb
150
137
  - spec/mlb_spec.rb
151
- has_rdoc: true
152
138
  homepage: https://github.com/sferik/mlb
153
139
  licenses: []
154
140
  post_install_message:
@@ -169,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
155
  version: 1.3.6
170
156
  requirements: []
171
157
  rubyforge_project:
172
- rubygems_version: 1.6.2
158
+ rubygems_version: 1.8.10
173
159
  signing_key:
174
160
  specification_version: 3
175
161
  summary: MLB.rb is a Ruby library for retrieving current Major League Baseball players,
data/.autotest DELETED
@@ -1 +0,0 @@
1
- require 'autotest/bundler'