wowget 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/wowget/item.rb +6 -7
  2. metadata +1 -1
data/lib/wowget/item.rb CHANGED
@@ -21,8 +21,8 @@ module Wowget
21
21
  attr_accessor :recipe_id
22
22
  attr_accessor :error
23
23
 
24
- ITEM_QUALITIES = ['Poor', 'Common', 'Uncommon', 'Rare', 'Epic', 'Legendary', 'Artifact', 'Heirloom']
25
- ITEM_CATEGORIES = {
24
+ QUALITIES = ['Poor', 'Common', 'Uncommon', 'Rare', 'Epic', 'Legendary', 'Artifact', 'Heirloom']
25
+ CATEGORIES = {
26
26
  0 => 'Consumables',
27
27
  1 => 'Containers',
28
28
  2 => 'Weapons',
@@ -36,7 +36,7 @@ module Wowget
36
36
  15 => 'Miscellaneous',
37
37
  16 => 'Glyphs'
38
38
  }
39
- ITEM_SUBCATEGORIES = {
39
+ SUBCATEGORIES = {
40
40
  'Consumables' => {
41
41
  0 => 'Consumables',
42
42
  1 => 'Potions',
@@ -205,7 +205,6 @@ module Wowget
205
205
  end
206
206
  end
207
207
 
208
-
209
208
  if item_id
210
209
  item_xml = Nokogiri::XML(open("http://www.wowhead.com/item=#{item_id}&xml"))
211
210
  if item_xml.css('wowhead error').length == 1
@@ -238,15 +237,15 @@ module Wowget
238
237
  end
239
238
 
240
239
  def quality
241
- ITEM_QUALITIES[self.quality_id]
240
+ QUALITIES[self.quality_id]
242
241
  end
243
242
 
244
243
  def category
245
- ITEM_CATEGORIES[self.category_id]
244
+ CATEGORIES[self.category_id]
246
245
  end
247
246
 
248
247
  def subcategory
249
- ITEM_SUBCATEGORIES[self.category][self.subcategory_id]
248
+ SUBCATEGORIES[self.category][self.subcategory_id]
250
249
  end
251
250
 
252
251
  def inventory_slot
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: wowget
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.9
5
+ version: 0.1.10
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ben Darlow