oakdex-pokemon 0.0.7 → 0.0.8

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: f76d4ae970dc1d103c9ce5a2fd9301e19786e067
4
- data.tar.gz: 716c84b59d44cb3d5a95ec70a7601431aebf4d49
3
+ metadata.gz: 8c02e42da558ccaa157023610180fd9a4ff76a31
4
+ data.tar.gz: 2261f64dd5da5ff8e6b1607e80afe2524ede7b41
5
5
  SHA512:
6
- metadata.gz: 052e9a4a83ba05746908ef6f56dc12d9dfc1d322e044d4584232238ef0a03c568dcca022e2df50acbaf5c47ef7cda8032e79155fd74aec2132e60bcac44f3d20
7
- data.tar.gz: a8be7b269365758dbfa5faa6a02c5da440f6ee253a370daacfb501738656cb348912bf5875e11fb0fe86a30a97c35a3e426614125dc0517f7d2e1d9c4162f8a9
6
+ metadata.gz: 2d871277239b2563dbd99c991f71c78394c6bb6128fd115650e26461f8fbfec9093ec61bcc57ad5be33374ebf2a1835ecf53c30d94d4d73ca392b532145341f0
7
+ data.tar.gz: af2df952ee119c85f40c8111c11603de07eea88c8139a4802dce1175b68dc19048aa33f27fec21cc006c1d83f97bcf671b3c3a1916cd29ef4cb88a816ba92967
@@ -22,6 +22,10 @@ module Oakdex
22
22
 
23
23
  attr_accessor :trainer
24
24
 
25
+ def self.root
26
+ File.expand_path '../../../', __FILE__
27
+ end
28
+
25
29
  def self.create(species_name, options = {})
26
30
  species = Oakdex::Pokedex::Pokemon.find!(species_name)
27
31
  Factory.create(species, options)
@@ -6,10 +6,9 @@ module Oakdex
6
6
  class Pokemon
7
7
  # Imports and validates pokemon
8
8
  class Import
9
- SCHEMA_PATH = './lib/oakdex/pokemon/schema.json'.freeze
10
-
11
9
  def self.schema
12
- @schema ||= File.read(File.expand_path(SCHEMA_PATH))
10
+ schema_path = File.join Oakdex::Pokemon.root, 'lib', 'oakdex', 'pokemon', 'schema.json'
11
+ @schema ||= File.read(File.expand_path(schema_path))
13
12
  end
14
13
 
15
14
  def initialize(data)
@@ -1,5 +1,5 @@
1
1
  module Oakdex
2
2
  class Pokemon
3
- VERSION = '0.0.7'
3
+ VERSION = '0.0.8'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oakdex-pokemon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jalyna Schroeder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-10 00:00:00.000000000 Z
11
+ date: 2019-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oakdex-pokedex