dota 0.0.19 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d96a945aaf9d39392aa65f1bc19051304bbdd143
4
- data.tar.gz: d7ac4845c2627e16fa887f91404ca1dc1886caaa
3
+ metadata.gz: 9141ca7af8dfcde82f04ff1bed165b1637993390
4
+ data.tar.gz: fc7f314a0dbefd75ebf3e5956089ca85b83fad44
5
5
  SHA512:
6
- metadata.gz: d49d7105f8d74f307580dc5f2a162ffa5c6fdd61130783603ecfeed8a222ca5b27b2c43fb97d1446ced0f30f6dc4104c6a19e0a7dd87d68ef676e5d904769267
7
- data.tar.gz: 4e52f0ed5b26aa31f2fc8ef2ce943305b26b82ca0fe3a0b0a670404ef5a8ccf72711b085529e86e427b0f384cda4997a634bafca83d87753756ebe91c400b98d
6
+ metadata.gz: 7bdb9fdaa43aa20a5b85b699b871a6edfdfa5e1daac59cff0979d399188bf66394ce24f35a5eb111e11edcb1e17be6e5920ef703720e8f632baec7ef13a32896
7
+ data.tar.gz: 82e8e44d2715f6e8ff06e5f90695e72b7899600631e5c72985caea4f1ab2d668614390bf2148ed027a0d80e8808c1cbcf7beddb1b8f850eaedd446c7c610eff1
@@ -1,14 +1,15 @@
1
1
  language: ruby
2
-
3
2
  rvm:
4
- - 1.9.3
5
- - 2.0.0
6
- - 2.1.2
7
- - jruby
8
- - rbx
9
-
3
+ - 2.0
4
+ - 2.1
5
+ - 2.2
6
+ - 2.3.0
7
+ # - jruby
8
+ # - rbx
9
+ before_install:
10
+ - gem update bundler
10
11
  install: bundle install --retry=3
11
-
12
+ sudo: false
12
13
  addons:
13
14
  code_climate:
14
15
  repo_token: 5e3e0f72f98a8345473dac4f2a2e2c980509d57ed1fa87725f3dcc299da0f795
data/README.md CHANGED
@@ -292,7 +292,7 @@ unit.items # Array[Dota::API:Item], Unit's inventory (6 slots)
292
292
  ```ruby
293
293
  ability_upgrade.time # Integer, Seconds since the match started when the player learned an ability
294
294
  ability_upgrade.level # Integer, Player's level when the ability was learned
295
- ability_upgrade.ability # Dota::API:Ability
295
+ ability_upgrade.ability # Dota::API::Ability
296
296
  ```
297
297
 
298
298
  #### Abilities
@@ -327,7 +327,7 @@ friend.made_at # Time, When the friend was added to the player's friend lis
327
327
 
328
328
  ## Resources
329
329
 
330
- - [Steam-Powered DOTA on Rails](http://www.sitepoint.com/steam-powered-dota-on-rails/) by Ilya Bodrov-Krukowski - A tutorial for getting personal match statistics that makes use of this library for Steam integration. (www.sitepoint.com)
330
+ - [Steam-Powered DOTA on Rails](http://www.sitepoint.com/steam-powered-dota-on-rails/) and [DOTA 2 on Rails: Digging Deeper](http://www.sitepoint.com/dota-2-rails-digging-deeper/) by Ilya Bodrov-Krukowski - A tutorial for getting personal match statistics that makes use of this library for Steam integration. (www.sitepoint.com)
331
331
  - [Things You Should Know Before Starting API Development](http://dev.dota2.com/showthread.php?t=58317) by MuppetMaster42 (dev.dota2.com)
332
332
  - [Dota 2 WebAPI Wiki](https://wiki.teamfortress.com/wiki/WebAPI#Dota_2) (wiki.teamfortress.com)
333
333
  - [Dota 2 WebAPI Forums](http://dev.dota2.com/forumdisplay.php?f=411) (dev.dota2.com)
@@ -1580,8 +1580,8 @@
1580
1580
  - Brewmaster Earth Spell Immunity
1581
1581
  5406:
1582
1582
  - brewmaster_earth_pulverize
1583
- - Pulverize
1584
- - Brewmaster Earth Pulverize
1583
+ - Demolish
1584
+ - Brewmaster Earth Demolish
1585
1585
  5408:
1586
1586
  - brewmaster_storm_dispel_magic
1587
1587
  - Dispel Magic
@@ -328,3 +328,6 @@
328
328
  112:
329
329
  - winter_wyvern
330
330
  - Winter Wyvern
331
+ 113:
332
+ - arc_warden
333
+ - Arc Warden
@@ -105,7 +105,7 @@
105
105
  - Magic Stick
106
106
  35:
107
107
  - recipe_magic_wand
108
- - Recipe: Magic Wand
108
+ - "Recipe: Magic Wand"
109
109
  36:
110
110
  - magic_wand
111
111
  - Magic Wand
@@ -141,13 +141,13 @@
141
141
  - Town Portal Scroll
142
142
  47:
143
143
  - recipe_travel_boots
144
- - Recipe: Boots of Travel
144
+ - "Recipe: Boots of Travel"
145
145
  48:
146
146
  - travel_boots
147
147
  - Boots of Travel
148
148
  49:
149
149
  - recipe_phase_boots
150
- - Recipe: Phase Boots
150
+ - "Recipe: Phase Boots"
151
151
  50:
152
152
  - phase_boots
153
153
  - Phase Boots
@@ -186,61 +186,61 @@
186
186
  - Vitality Booster
187
187
  62:
188
188
  - recipe_power_treads
189
- - Recipe: Power Treads
189
+ - "Recipe: Power Treads"
190
190
  63:
191
191
  - power_treads
192
192
  - Power Treads
193
193
  64:
194
194
  - recipe_hand_of_midas
195
- - Recipe: Hand of Midas
195
+ - "Recipe: Hand of Midas"
196
196
  65:
197
197
  - hand_of_midas
198
198
  - Hand of Midas
199
199
  66:
200
200
  - recipe_oblivion_staff
201
- - Recipe: Oblivion Staff
201
+ - "Recipe: Oblivion Staff"
202
202
  67:
203
203
  - oblivion_staff
204
204
  - Oblivion Staff
205
205
  68:
206
206
  - recipe_pers
207
- - Recipe: Perseverance
207
+ - "Recipe: Perseverance"
208
208
  69:
209
209
  - pers
210
210
  - Perseverance
211
211
  70:
212
212
  - recipe_poor_mans_shield
213
- - Recipe: Poor Man's Shield
213
+ - "Recipe: Poor Man's Shield"
214
214
  71:
215
215
  - poor_mans_shield
216
216
  - Poor Man's Shield
217
217
  72:
218
218
  - recipe_bracer
219
- - Recipe: Bracer
219
+ - "Recipe: Bracer"
220
220
  73:
221
221
  - bracer
222
222
  - Bracer
223
223
  74:
224
224
  - recipe_wraith_band
225
- - Recipe: Wraith Band
225
+ - "Recipe: Wraith Band"
226
226
  75:
227
227
  - wraith_band
228
228
  - Wraith Band
229
229
  76:
230
230
  - recipe_null_talisman
231
- - Recipe: Null Talisman
231
+ - "Recipe: Null Talisman"
232
232
  77:
233
233
  - null_talisman
234
234
  - Null Talisman
235
235
  78:
236
236
  - recipe_mekansm
237
- - Recipe: Mekansm
237
+ - "Recipe: Mekansm"
238
238
  79:
239
239
  - mekansm
240
240
  - Mekansm
241
241
  80:
242
242
  - recipe_vladmir
243
- - Recipe: Vladmir's Offering
243
+ - "Recipe: Vladmir's Offering"
244
244
  81:
245
245
  - vladmir
246
246
  - Vladmir's Offering
@@ -249,97 +249,97 @@
249
249
  - Flying Courier
250
250
  85:
251
251
  - recipe_buckler
252
- - Recipe: Buckler
252
+ - "Recipe: Buckler"
253
253
  86:
254
254
  - buckler
255
255
  - Buckler
256
256
  87:
257
257
  - recipe_ring_of_basilius
258
- - Recipe: Ring of Basilius
258
+ - "Recipe: Ring of Basilius"
259
259
  88:
260
260
  - ring_of_basilius
261
261
  - Ring of Basilius
262
262
  89:
263
263
  - recipe_pipe
264
- - Recipe: Pipe of Insight
264
+ - "Recipe: Pipe of Insight"
265
265
  90:
266
266
  - pipe
267
267
  - Pipe of Insight
268
268
  91:
269
269
  - recipe_urn_of_shadows
270
- - Recipe: Urn of Shadows
270
+ - "Recipe: Urn of Shadows"
271
271
  92:
272
272
  - urn_of_shadows
273
273
  - Urn of Shadows
274
274
  93:
275
275
  - recipe_headdress
276
- - Recipe: Headdress
276
+ - "Recipe: Headdress"
277
277
  94:
278
278
  - headdress
279
279
  - Headdress
280
280
  95:
281
281
  - recipe_sheepstick
282
- - Recipe: Scythe of Vyse
282
+ - "Recipe: Scythe of Vyse"
283
283
  96:
284
284
  - sheepstick
285
285
  - Scythe of Vyse
286
286
  97:
287
287
  - recipe_orchid
288
- - Recipe: Orchid Malevolence
288
+ - "Recipe: Orchid Malevolence"
289
289
  98:
290
290
  - orchid
291
291
  - Orchid Malevolence
292
292
  99:
293
293
  - recipe_cyclone
294
- - Recipe: Eul's Scepter of Divinity
294
+ - "Recipe: Eul's Scepter of Divinity"
295
295
  100:
296
296
  - cyclone
297
297
  - Eul's Scepter of Divinity
298
298
  101:
299
299
  - recipe_force_staff
300
- - Recipe: Force Staff
300
+ - "Recipe: Force Staff"
301
301
  102:
302
302
  - force_staff
303
303
  - Force Staff
304
304
  103:
305
305
  - recipe_dagon
306
- - Recipe: Dagon
306
+ - "Recipe: Dagon"
307
307
  104:
308
308
  - dagon
309
309
  - Dagon
310
310
  105:
311
311
  - recipe_necronomicon
312
- - Recipe: Necronomicon
312
+ - "Recipe: Necronomicon"
313
313
  106:
314
314
  - necronomicon
315
315
  - Necronomicon
316
316
  107:
317
317
  - recipe_ultimate_scepter
318
- - Recipe: Aghanim's Scepter
318
+ - "Recipe: Aghanim's Scepter"
319
319
  108:
320
320
  - ultimate_scepter
321
321
  - Aghanim's Scepter
322
322
  109:
323
323
  - recipe_refresher
324
- - Recipe: Refresher Orb
324
+ - "Recipe: Refresher Orb"
325
325
  110:
326
326
  - refresher
327
327
  - Refresher Orb
328
328
  111:
329
329
  - recipe_assault
330
- - Recipe: Assault Cuirass
330
+ - "Recipe: Assault Cuirass"
331
331
  112:
332
332
  - assault
333
333
  - Assault Cuirass
334
334
  113:
335
335
  - recipe_heart
336
- - Recipe: Heart of Tarrasque
336
+ - "Recipe: Heart of Tarrasque"
337
337
  114:
338
338
  - heart
339
339
  - Heart of Tarrasque
340
340
  115:
341
341
  - recipe_black_king_bar
342
- - Recipe: Black King Bar
342
+ - "Recipe: Black King Bar"
343
343
  116:
344
344
  - black_king_bar
345
345
  - Black King Bar
@@ -348,103 +348,103 @@
348
348
  - Aegis of the Immortal
349
349
  118:
350
350
  - recipe_shivas_guard
351
- - Recipe: Shiva's Guard
351
+ - "Recipe: Shiva's Guard"
352
352
  119:
353
353
  - shivas_guard
354
354
  - Shiva's Guard
355
355
  120:
356
356
  - recipe_bloodstone
357
- - Recipe: Bloodstone
357
+ - "Recipe: Bloodstone"
358
358
  121:
359
359
  - bloodstone
360
360
  - Bloodstone
361
361
  122:
362
362
  - recipe_sphere
363
- - Recipe: Linken's Sphere
363
+ - "Recipe: Linken's Sphere"
364
364
  123:
365
365
  - sphere
366
366
  - Linken's Sphere
367
367
  124:
368
368
  - recipe_vanguard
369
- - Recipe: Vanguard
369
+ - "Recipe: Vanguard"
370
370
  125:
371
371
  - vanguard
372
372
  - Vanguard
373
373
  126:
374
374
  - recipe_blade_mail
375
- - Recipe: Blade Mail
375
+ - "Recipe: Blade Mail"
376
376
  127:
377
377
  - blade_mail
378
378
  - Blade Mail
379
379
  128:
380
380
  - recipe_soul_booster
381
- - Recipe: Soul Booster
381
+ - "Recipe: Soul Booster"
382
382
  129:
383
383
  - soul_booster
384
384
  - Soul Booster
385
385
  130:
386
386
  - recipe_hood_of_defiance
387
- - Recipe: Hood of Defiance
387
+ - "Recipe: Hood of Defiance"
388
388
  131:
389
389
  - hood_of_defiance
390
390
  - Hood of Defiance
391
391
  132:
392
392
  - recipe_rapier
393
- - Recipe: Divine Rapier
393
+ - "Recipe: Divine Rapier"
394
394
  133:
395
395
  - rapier
396
396
  - Divine Rapier
397
397
  134:
398
398
  - recipe_monkey_king_bar
399
- - Recipe: Monkey King Bar
399
+ - "Recipe: Monkey King Bar"
400
400
  135:
401
401
  - monkey_king_bar
402
402
  - Monkey King Bar
403
403
  136:
404
404
  - recipe_radiance
405
- - Recipe: Radiance
405
+ - "Recipe: Radiance"
406
406
  137:
407
407
  - radiance
408
408
  - Radiance
409
409
  138:
410
410
  - recipe_butterfly
411
- - Recipe: Butterfly
411
+ - "Recipe: Butterfly"
412
412
  139:
413
413
  - butterfly
414
414
  - Butterfly
415
415
  140:
416
416
  - recipe_greater_crit
417
- - Recipe: Daedalus
417
+ - "Recipe: Daedalus"
418
418
  141:
419
419
  - greater_crit
420
420
  - Daedalus
421
421
  142:
422
422
  - recipe_basher
423
- - Recipe: Skull Basher
423
+ - "Recipe: Skull Basher"
424
424
  143:
425
425
  - basher
426
426
  - Skull Basher
427
427
  144:
428
428
  - recipe_bfury
429
- - Recipe: Battle Fury
429
+ - "Recipe: Battle Fury"
430
430
  145:
431
431
  - bfury
432
432
  - Battle Fury
433
433
  146:
434
434
  - recipe_manta
435
- - Recipe: Manta Style
435
+ - "Recipe: Manta Style"
436
436
  147:
437
437
  - manta
438
438
  - Manta Style
439
439
  148:
440
440
  - recipe_lesser_crit
441
- - Recipe: Crystalys
441
+ - "Recipe: Crystalys"
442
442
  149:
443
443
  - lesser_crit
444
444
  - Crystalys
445
445
  150:
446
446
  - recipe_armlet
447
- - Recipe: Armlet of Mordiggian
447
+ - "Recipe: Armlet of Mordiggian"
448
448
  151:
449
449
  - armlet
450
450
  - Armlet of Mordiggian
@@ -453,85 +453,85 @@
453
453
  - Shadow Blade
454
454
  153:
455
455
  - recipe_sange_and_yasha
456
- - Recipe: Sange and Yasha
456
+ - "Recipe: Sange and Yasha"
457
457
  154:
458
458
  - sange_and_yasha
459
459
  - Sange and Yasha
460
460
  155:
461
461
  - recipe_satanic
462
- - Recipe: Satanic
462
+ - "Recipe: Satanic"
463
463
  156:
464
464
  - satanic
465
465
  - Satanic
466
466
  157:
467
467
  - recipe_mjollnir
468
- - Recipe: Mjollnir
468
+ - "Recipe: Mjollnir"
469
469
  158:
470
470
  - mjollnir
471
471
  - Mjollnir
472
472
  159:
473
473
  - recipe_skadi
474
- - Recipe: Eye of Skadi
474
+ - "Recipe: Eye of Skadi"
475
475
  160:
476
476
  - skadi
477
477
  - Eye of Skadi
478
478
  161:
479
479
  - recipe_sange
480
- - Recipe: Sange
480
+ - "Recipe: Sange"
481
481
  162:
482
482
  - sange
483
483
  - Sange
484
484
  163:
485
485
  - recipe_helm_of_the_dominator
486
- - Recipe: Helm of the Dominator
486
+ - "Recipe: Helm of the Dominator"
487
487
  164:
488
488
  - helm_of_the_dominator
489
489
  - Helm of the Dominator
490
490
  165:
491
491
  - recipe_maelstrom
492
- - Recipe: Maelstrom
492
+ - "Recipe: Maelstrom"
493
493
  166:
494
494
  - maelstrom
495
495
  - Maelstrom
496
496
  167:
497
497
  - recipe_desolator
498
- - Recipe: Desolator
498
+ - "Recipe: Desolator"
499
499
  168:
500
500
  - desolator
501
501
  - Desolator
502
502
  169:
503
503
  - recipe_yasha
504
- - Recipe: Yasha
504
+ - "Recipe: Yasha"
505
505
  170:
506
506
  - yasha
507
507
  - Yasha
508
508
  171:
509
509
  - recipe_mask_of_madness
510
- - Recipe: Mask of Madness
510
+ - "Recipe: Mask of Madness"
511
511
  172:
512
512
  - mask_of_madness
513
513
  - Mask of Madness
514
514
  173:
515
515
  - recipe_diffusal_blade
516
- - Recipe: Diffusal Blade
516
+ - "Recipe: Diffusal Blade"
517
517
  174:
518
518
  - diffusal_blade
519
519
  - Diffusal Blade
520
520
  175:
521
521
  - recipe_ethereal_blade
522
- - Recipe: Ethereal Blade
522
+ - "Recipe: Ethereal Blade"
523
523
  176:
524
524
  - ethereal_blade
525
525
  - Ethereal Blade
526
526
  177:
527
527
  - recipe_soul_ring
528
- - Recipe: Soul Ring
528
+ - "Recipe: Soul Ring"
529
529
  178:
530
530
  - soul_ring
531
531
  - Soul Ring
532
532
  179:
533
533
  - recipe_arcane_boots
534
- - Recipe: Arcane Boots
534
+ - "Recipe: Arcane Boots"
535
535
  180:
536
536
  - arcane_boots
537
537
  - Arcane Boots
@@ -543,16 +543,16 @@
543
543
  - Stout Shield
544
544
  183:
545
545
  - recipe_invis_sword
546
- - Recipe: Shadow Blade
546
+ - "Recipe: Shadow Blade"
547
547
  184:
548
548
  - recipe_ancient_janggo
549
- - Recipe: Drum of Endurance
549
+ - "Recipe: Drum of Endurance"
550
550
  185:
551
551
  - ancient_janggo
552
552
  - Drum of Endurance
553
553
  186:
554
554
  - recipe_medallion_of_courage
555
- - Recipe: Medallion of Courage
555
+ - "Recipe: Medallion of Courage"
556
556
  187:
557
557
  - medallion_of_courage
558
558
  - Medallion of Courage
@@ -561,16 +561,16 @@
561
561
  - Smoke of Deceit
562
562
  189:
563
563
  - recipe_veil_of_discord
564
- - Recipe: Veil of Discord
564
+ - "Recipe: Veil of Discord"
565
565
  190:
566
566
  - veil_of_discord
567
567
  - Veil of Discord
568
568
  191:
569
569
  - recipe_necronomicon_2
570
- - Recipe: Necronomicon
570
+ - "Recipe: Necronomicon"
571
571
  192:
572
572
  - recipe_necronomicon_3
573
- - Recipe: Necronomicon
573
+ - "Recipe: Necronomicon"
574
574
  193:
575
575
  - necronomicon_2
576
576
  - Necronomicon
@@ -579,22 +579,22 @@
579
579
  - Necronomicon
580
580
  195:
581
581
  - recipe_diffusal_blade_2
582
- - Recipe: Diffusal Blade
582
+ - "Recipe: Diffusal Blade"
583
583
  196:
584
584
  - diffusal_blade_2
585
585
  - Diffusal Blade
586
586
  197:
587
587
  - recipe_dagon_2
588
- - Recipe: Dagon
588
+ - "Recipe: Dagon"
589
589
  198:
590
590
  - recipe_dagon_3
591
- - Recipe: Dagon
591
+ - "Recipe: Dagon"
592
592
  199:
593
593
  - recipe_dagon_4
594
- - Recipe: Dagon
594
+ - "Recipe: Dagon"
595
595
  200:
596
596
  - recipe_dagon_5
597
- - Recipe: Dagon
597
+ - "Recipe: Dagon"
598
598
  201:
599
599
  - dagon_2
600
600
  - Dagon
@@ -609,31 +609,31 @@
609
609
  - Dagon
610
610
  205:
611
611
  - recipe_rod_of_atos
612
- - Recipe: Rod of Atos
612
+ - "Recipe: Rod of Atos"
613
613
  206:
614
614
  - rod_of_atos
615
615
  - Rod of Atos
616
616
  207:
617
617
  - recipe_abyssal_blade
618
- - Recipe: Abyssal Blade
618
+ - "Recipe: Abyssal Blade"
619
619
  208:
620
620
  - abyssal_blade
621
621
  - Abyssal Blade
622
622
  209:
623
623
  - recipe_heavens_halberd
624
- - Recipe: Heaven's Halberd
624
+ - "Recipe: Heaven's Halberd"
625
625
  210:
626
626
  - heavens_halberd
627
627
  - Heaven's Halberd
628
628
  211:
629
629
  - recipe_ring_of_aquila
630
- - Recipe: Ring of Aquila
630
+ - "Recipe: Ring of Aquila"
631
631
  212:
632
632
  - ring_of_aquila
633
633
  - Ring of Aquila
634
634
  213:
635
635
  - recipe_tranquil_boots
636
- - Recipe: Tranquil Boots
636
+ - "Recipe: Tranquil Boots"
637
637
  214:
638
638
  - tranquil_boots
639
639
  - Tranquil Boots
@@ -645,40 +645,64 @@
645
645
  - Enchanted Mango
646
646
  217:
647
647
  - recipe_ward_dispenser
648
- - Recipe: Ward Dispenser
648
+ - "Recipe: Ward Dispenser"
649
649
  218:
650
650
  - ward_dispenser
651
651
  - Ward Dispenser
652
652
  219:
653
653
  - recipe_travel_boots_2
654
- - Recipe: Upgraded Boots of Travel
654
+ - "Recipe: Upgraded Boots of Travel"
655
655
  220:
656
656
  - travel_boots_2
657
657
  - Upgraded Boots of Travel
658
658
  221:
659
659
  - recipe_lotus_orb
660
- - Recipe: Lotus Orb
660
+ - "Recipe: Lotus Orb"
661
661
  226:
662
662
  - lotus_orb
663
663
  - Lotus Orb
664
664
  227:
665
665
  - recipe_solar_crest
666
- - Recipe: Solar Crest
666
+ - "Recipe: Solar Crest"
667
667
  228:
668
668
  - recipe_octarine_core
669
- - Recipe: Octarine Core
669
+ - "Recipe: Octarine Core"
670
670
  229:
671
671
  - solar_crest
672
672
  - Solar Crest
673
673
  230:
674
674
  - recipe_guardian_greaves
675
- - Recipe: Guardian Greaves
675
+ - "Recipe: Guardian Greaves"
676
676
  231:
677
677
  - guardian_greaves
678
678
  - Guardian Greaves
679
+ 232:
680
+ - aether_lens
681
+ - Aether Lens
682
+ 233:
683
+ - recipe_aether_lens
684
+ - "Recipe: Aether Lens"
685
+ 234:
686
+ - recipe_dragon_lance
687
+ - "Recipe: Dragon Lance"
679
688
  235:
680
689
  - octarine_core
681
690
  - Octarine Core
691
+ 236:
692
+ - dragon_lance
693
+ - Dragon Lance
694
+ 237:
695
+ - faerie_fire
696
+ - Faerie Fire
697
+ 238:
698
+ - recipe_iron_talon
699
+ - "Recipe: Iron Talon"
700
+ 239:
701
+ - iron_talon
702
+ - Iron Talon
703
+ 240:
704
+ - blight_stone
705
+ - Blight Stone
682
706
  241:
683
707
  - tango_single
684
708
  - Tango (Shared)
@@ -687,25 +711,55 @@
687
711
  - Crimson Guard
688
712
  243:
689
713
  - recipe_crimson_guard
690
- - Recipe: Crimson Guard
714
+ - "Recipe: Crimson Guard"
715
+ 244:
716
+ - wind_lace
717
+ - Wind Lace
718
+ 245:
719
+ - recipe_bloodthorn
720
+ - "Recipe: Bloodthorn"
691
721
  246:
692
722
  - recipe_moon_shard
693
- - Recipe: Moon Shard
723
+ - "Recipe: Moon Shard"
694
724
  247:
695
725
  - moon_shard
696
726
  - Moon Shard
697
727
  248:
698
728
  - recipe_silver_edge
699
- - Recipe: Silver Edge
729
+ - "Recipe: Silver Edge"
700
730
  249:
701
731
  - silver_edge
702
732
  - Silver Edge
733
+ 250:
734
+ - bloodthorn
735
+ - Bloodthorn
736
+ 251:
737
+ - recipe_echo_sabre
738
+ - "Recipe: Echo Sabre"
739
+ 252:
740
+ - echo_sabre
741
+ - Echo Sabre
703
742
  253:
704
743
  - recipe_glimmer_cape
705
- - Recipe: Glimmer Cape
744
+ - "Recipe: Glimmer Cape"
706
745
  254:
707
746
  - glimmer_cape
708
747
  - Glimmer Cape
748
+ 257:
749
+ - tome_of_knowledge
750
+ - Tome of Knowledge
751
+ 262:
752
+ - recipe_hurricane_pike
753
+ - "Recipe: Hurricane Pike"
754
+ 263:
755
+ - hurricane_pike
756
+ - Hurricane Pike
757
+ 264:
758
+ - banana
759
+ - Banana
760
+ 265:
761
+ - infused_raindrop
762
+ - Infused Raindrop
709
763
  1000:
710
764
  - halloween_candy_corn
711
765
  - Greevil Taffy
@@ -768,4 +822,4 @@
768
822
  - Greevil Chow
769
823
  1020:
770
824
  - winter_greevil_chewy
771
- - Greevil Blink Bone
825
+ - Greevil Blink Bone
@@ -18,16 +18,16 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.add_dependency "facets", "~> 3.0"
21
22
  spec.add_dependency "faraday", "~> 0.9.1"
22
23
  spec.add_dependency "faraday_middleware", "~> 0.9.1"
23
- spec.add_dependency "facets", "~> 3.0.0"
24
24
 
25
- spec.add_development_dependency "rake"
26
- spec.add_development_dependency "rspec"
27
- spec.add_development_dependency "guard-rspec"
28
- spec.add_development_dependency "pry"
29
- spec.add_development_dependency "dotenv"
30
- spec.add_development_dependency "vcr"
31
- spec.add_development_dependency "webmock"
32
- spec.add_development_dependency "codeclimate-test-reporter"
25
+ spec.add_development_dependency "codeclimate-test-reporter", "~> 0.5.0"
26
+ spec.add_development_dependency "dotenv", "~> 2.1"
27
+ spec.add_development_dependency "guard-rspec", "~> 4.6"
28
+ spec.add_development_dependency "listen", "~> 2.10"
29
+ spec.add_development_dependency "pry", "~> 0.10"
30
+ spec.add_development_dependency "rake", "~> 11.1"
31
+ spec.add_development_dependency "rspec", "~> 3.4"
32
+ spec.add_development_dependency "vcr", "~> 3.0"
33
33
  end
@@ -11,15 +11,12 @@ module Dota
11
11
  @name = mapping[id][1]
12
12
  end
13
13
 
14
+ # Possible values for type:
15
+ # :lg - 85x64 PNG image
16
+ # :eg - 27x20 PNG image
14
17
  def image_url(type = :lg)
15
- # Possible values for type:
16
- # :lg - 85x64 PNG image
17
- # :eg - 27x20 PNG image
18
- if internal_name =~ /\Arecipe/
19
- "http://cdn.dota2.com/apps/dota2/images/items/recipe_#{type}.png"
20
- else
21
- "http://cdn.dota2.com/apps/dota2/images/items/#{internal_name}_#{type}.png"
22
- end
18
+ filename = "#{internal_name.sub(/\Arecipe_/, '')}_#{type}.png"
19
+ "http://cdn.dota2.com/apps/dota2/images/items/#{filename}"
23
20
  end
24
21
 
25
22
  private
@@ -22,6 +22,10 @@ module Dota
22
22
  def url
23
23
  raw["tournament_url"]
24
24
  end
25
+
26
+ def itemdef
27
+ raw["itemdef"]
28
+ end
25
29
  end
26
30
  end
27
31
  end
@@ -2,7 +2,7 @@ module Dota
2
2
  module API
3
3
  class LiveMatch < BasicMatch
4
4
  def duration
5
- raw["scoreboard"]["duration"]
5
+ raw_scoreboard["duration"]
6
6
  end
7
7
 
8
8
  def league_id
@@ -30,37 +30,40 @@ module Dota
30
30
  end
31
31
 
32
32
  def roshan_timer
33
- raw["scoreboard"]["roshan_respawn_timer"]
33
+ raw_scoreboard["roshan_respawn_timer"]
34
34
  end
35
35
 
36
36
  def radiant
37
- @radiant ||= Side.new(raw_side(:radiant))
37
+ @radiant ||= Side.new(raw_side("radiant"))
38
38
  end
39
39
 
40
40
  def dire
41
- @dire ||= Side.new(raw_side(:dire))
41
+ @dire ||= Side.new(raw_side("dire"))
42
42
  end
43
43
 
44
44
  private
45
45
 
46
- def raw_side(type)
47
- raw_side = raw["#{type}_team"]
48
- .merge(raw["scoreboard"]["#{type}"])
49
- .merge("series_wins" => raw["#{type}_series_wins"])
50
- merge_player_names(raw_side)
46
+ def raw_scoreboard
47
+ raw["scoreboard"] || {
48
+ "radiant" => { "players" => [] },
49
+ "dire" => { "players" => [] },
50
+ }
51
51
  end
52
52
 
53
- def merge_player_names(raw_side)
54
- raw_side["players"].map! do |player|
55
- id = player["account_id"]
56
- player.merge("name" => player_name_from_id(id))
53
+ def raw_side(type)
54
+ side_scoreboard = raw_scoreboard[type]
55
+ side_players = side_scoreboard["players"].map do |player|
56
+ player.merge("name" => player_name_from_id(player["account_id"]))
57
57
  end
58
- raw_side
58
+
59
+ (raw["#{type}_team"] || {})
60
+ .merge(side_scoreboard)
61
+ .merge("players" => side_players)
62
+ .merge("series_wins" => raw["#{type}_series_wins"])
59
63
  end
60
64
 
61
65
  def player_name_from_id(id)
62
- player = raw["players"].detect { |p| id == p["account_id"] }
63
- player["name"]
66
+ raw["players"].detect { |p| id == p["account_id"] }["name"]
64
67
  end
65
68
  end
66
69
  end
@@ -1,3 +1,3 @@
1
1
  module Dota
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
@@ -4,7 +4,7 @@ RSpec.describe Dota::API::Hero do
4
4
  specify ".all" do
5
5
  heroes = described_class.all
6
6
  expect(heroes.first).to be_a described_class
7
- expect(heroes.count).to eq 110
7
+ expect(heroes.count).to eq 111
8
8
  end
9
9
 
10
10
  specify ".find" do
@@ -4,7 +4,7 @@ RSpec.describe Dota::API::Item do
4
4
  specify ".all" do
5
5
  items = described_class.all
6
6
  expect(items.first).to be_a described_class
7
- expect(items.count).to eq 257
7
+ expect(items.count).to eq 275
8
8
  end
9
9
 
10
10
  specify "#id" do
@@ -15,7 +15,14 @@ RSpec.describe Dota::API::Item do
15
15
  expect(item.name).to eq "Blink Dagger"
16
16
  end
17
17
 
18
- specify "#image_url" do
19
- expect(item.image_url).to eq "http://cdn.dota2.com/apps/dota2/images/items/blink_lg.png"
18
+ describe "#image_url" do
19
+ specify "normal" do
20
+ expect(item.image_url).to eq "http://cdn.dota2.com/apps/dota2/images/items/blink_lg.png"
21
+ end
22
+
23
+ specify "recipe-like" do
24
+ expect(item).to receive(:internal_name) { "recipe_some_other_item" }
25
+ expect(item.image_url).to eq "http://cdn.dota2.com/apps/dota2/images/items/some_other_item_lg.png"
26
+ end
20
27
  end
21
28
  end
@@ -20,4 +20,8 @@ RSpec.describe Dota::API::League do
20
20
  specify "#url" do
21
21
  expect(league.url).to eq "https://binarybeast.com/xDOTA21404228/"
22
22
  end
23
+
24
+ specify "#itemdef" do
25
+ expect(league.itemdef).to eq 10541
26
+ end
23
27
  end
@@ -25,12 +25,36 @@ RSpec.describe Dota::API::LiveMatch do
25
25
  expect(live_match.stream_delay).to eq 120
26
26
  end
27
27
 
28
- specify "#radiant" do
29
- expect(live_match.radiant).to be_a Dota::API::LiveMatch::Side
28
+ describe "#radiant" do
29
+ specify do
30
+ expect(live_match.radiant).to be_a Dota::API::LiveMatch::Side
31
+ end
32
+
33
+ specify "team without a profile" do
34
+ live_match.raw["radiant_team"] = nil
35
+ expect(live_match.radiant).to be_a Dota::API::LiveMatch::Side
36
+ end
37
+
38
+ specify "no scoreboard" do
39
+ live_match.raw["scoreboard"] = nil
40
+ expect(live_match.radiant).to be_a Dota::API::LiveMatch::Side
41
+ end
30
42
  end
31
43
 
32
- specify "#dire" do
33
- expect(live_match.dire).to be_a Dota::API::LiveMatch::Side
44
+ describe "#dire" do
45
+ specify do
46
+ expect(live_match.dire).to be_a Dota::API::LiveMatch::Side
47
+ end
48
+
49
+ specify "team without a profile" do
50
+ live_match.raw["dire_team"] = nil
51
+ expect(live_match.dire).to be_a Dota::API::LiveMatch::Side
52
+ end
53
+
54
+ specify "no scoreboard" do
55
+ live_match.raw["scoreboard"] = nil
56
+ expect(live_match.dire).to be_a Dota::API::LiveMatch::Side
57
+ end
34
58
  end
35
59
 
36
60
  specify "#series_type" do
@@ -3,7 +3,7 @@ require 'vcr'
3
3
  VCR.configure do |c|
4
4
  c.ignore_hosts "codeclimate.com"
5
5
  c.allow_http_connections_when_no_cassette = false
6
- c.hook_into :webmock
6
+ c.hook_into :faraday
7
7
  c.cassette_library_dir = File.join(File.dirname(__FILE__), "..", "fixtures", "vcr_cassettes")
8
8
  c.configure_rspec_metadata!
9
9
  c.filter_sensitive_data("<STEAM_API_KEY>") { ENV.fetch("STEAM_API_KEY") }
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dota
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vinni Carlo Caños
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-08 00:00:00.000000000 Z
11
+ date: 2016-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: faraday
14
+ name: facets
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.1
19
+ version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.1
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: faraday_middleware
28
+ name: faraday
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
@@ -39,131 +39,131 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.9.1
41
41
  - !ruby/object:Gem::Dependency
42
- name: facets
42
+ name: faraday_middleware
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.0
47
+ version: 0.9.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.0.0
54
+ version: 0.9.1
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake
56
+ name: codeclimate-test-reporter
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.5.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 0.5.0
69
69
  - !ruby/object:Gem::Dependency
70
- name: rspec
70
+ name: dotenv
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '2.1'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: '2.1'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: guard-rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '4.6'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '4.6'
97
97
  - !ruby/object:Gem::Dependency
98
- name: pry
98
+ name: listen
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '2.10'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '2.10'
111
111
  - !ruby/object:Gem::Dependency
112
- name: dotenv
112
+ name: pry
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '0.10'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '0.10'
125
125
  - !ruby/object:Gem::Dependency
126
- name: vcr
126
+ name: rake
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: '11.1'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: '11.1'
139
139
  - !ruby/object:Gem::Dependency
140
- name: webmock
140
+ name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0'
145
+ version: '3.4'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0'
152
+ version: '3.4'
153
153
  - !ruby/object:Gem::Dependency
154
- name: codeclimate-test-reporter
154
+ name: vcr
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '0'
159
+ version: '3.0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '0'
166
+ version: '3.0'
167
167
  description: Ruby client for the Dota 2 WebAPI
168
168
  email:
169
169
  - vinnicc@gmail.com
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
262
  version: '0'
263
263
  requirements: []
264
264
  rubyforge_project:
265
- rubygems_version: 2.4.5
265
+ rubygems_version: 2.5.1
266
266
  signing_key:
267
267
  specification_version: 4
268
268
  summary: Ruby client for the Dota 2 WebAPI